By Oliver Thorn
Hedera uniquely features Scheduled Transactions - providing an on-chain mechanism for multiple parties to sign a transaction to execute at some point in the future. Following the release of Hedera mainnet v0.57, this functionality is getting a significant upgrade with HIP-423 - expanding the possibilities for developers and users to schedule transactions for future execution.
This enhancement transforms what was primarily a multi-signature coordination tool into a comprehensive scheduling system that better aligns with enterprise and developer needs.
What's Changing?
The current Scheduled Transaction implementation has two key limitations:
- Transactions must be signed within 30 minutes of creation
- Only certain types of transactions can be scheduled
HIP-423 addresses these constraints by:
- Enabling transactions to be scheduled for execution at arbitrary future times
- Expanding the types of transactions that can be scheduled
- Introducing throttling and management mechanisms
- Maintaining backward compatibility with existing scheduled transactions
Key Benefits
For Institutional Users
Extended Review Periods
Instead of the current 30-minute window, transactions can now be scheduled with longer timeframes, allowing proper review and approval processes.
Better Governance Support
Enables the Hedera Council and other institutional users to move their approval processes on-chain.
Enhanced Transaction Planning
Financial operations like invoicing and trust distributions can be scheduled well in advance.
For Developers
Smart Contract Scheduling (dependent on HIP-755 / HIP-756)
Enables scheduling of smart contract-related operations.
Improved Control
The new wait_for_expiry flag provides flexibility in execution timing.
Clear throttling rules
Prevents system congestion while ensuring fairness.
Code Snippet
Let's create a Hedera transaction that utilizes this new functionality. In this instance, a withdraw Smart Contract function is being invoked. However, unlike a regular transaction, we are not executing the transaction immediately.
Instead, we pass the Transaction object into ScheduledCreateTransaction with a specified time in the future. This is the transaction we then execute, and Hedera will then manage the execution of the ContractCreateTransaction at the scheduled time.
const contractExecTx = new ContractExecuteTransaction()
.setContractId(contractId)
.setFunction("withdraw")
.setGas(100000);
// Create schedule tx that will execute the contract call in 10 minutes
const TEN_MINS_FROM_NOW = new Date().getTime() + 10 * 60 * 1000;
const scheduleTx = new ScheduleCreateTransaction()
.setScheduledTransaction(contractExecTx)
.setExpirationTime(Timestamp.fromDate(new Date(TEN_MINS_FROM_NOW)))
.setWaitForExpiry(true) // this defaults to false. If true, the schedule will wait for the expiry time to be reached before executing the transaction
// Sign and submit the schedule tx
const response = await scheduleTx.execute(client);
const receipt = await response.getReceipt(client);
For All Users
The benefits of HIP-423 extend to all network participants through expanded transaction type support, enhanced security mechanisms for controlled execution, and an optimized fee structure that prevents potential spam while keeping costs reasonable for legitimate use cases. Users gain more flexibility in how they interact with scheduled transactions while benefiting from improved safeguards that protect network integrity.
How It Works
The enhanced Scheduled Transaction system introduces several new features:
Flexible Timing
- Transactions can be scheduled up to 2 months in the future
- Execution happens at the earliest available consensus time after the scheduled time
- Optional wait_for_expiry flag controls execution behavior
Smart Throttling
- Separate throttles for scheduled and real-time transactions
- Built-in protections against network congestion
- Fair resource allocation across different transaction types
Enhanced Security
- All scheduled transactions are evaluated at expiration time
- Clear rules for signature requirements and validation
- Protection against various attack vectors
Mirror Node Integration
New APIs for querying pending scheduled transactions
Improved tracking of transaction status and execution
Practical Use Cases
Corporate Governance
Corporate entities can now schedule important updates weeks in advance, providing ample time for thorough review processes. This is particularly valuable for multi-signature transactions that require approval from multiple stakeholders. The system maintains a transparent on-chain record of all approvals, enhancing accountability and documentation of governance decisions.
Financial Operations
Financial teams gain the ability to strategically schedule future payments and transfers, improving cash flow management and operational efficiency. The system enables automatic distribution scheduling for trusts, streamlining complex financial operations. Additionally, contract payments can be automatically released upon receiving the required signatures, reducing manual intervention and improving payment process reliability.
Enhanced Smart Contract Management
Developers can now schedule smart contract creation transactions to occur at future dates, with execution contingent on receiving the required signatures. This enables better coordination of contract deployment timing and ensures proper stakeholder approval before contract creation.
Conclusion
HIP-423 represents a significant evolution in Hedera's transaction scheduling capabilities, providing the flexibility and features needed for enterprise-grade applications while maintaining the network's security and performance. This upgrade enables more sophisticated use cases while ensuring backward compatibility with existing implementations.
For developers and users looking to leverage these new capabilities, updated documentation and SDKs will be available to support the enhanced functionality. The implementation includes careful consideration of security implications and performance impacts, ensuring the feature remains robust and reliable for all users.
Additional Resources:
Scheduled Transactions SDK: https://docs.hedera.com/hedera/sdks-and-apis/sdks/schedule-transaction/create-a-schedule-transaction
HIP-423 Documentation: https://hips.hedera.com/hip/hip-423
HIP-755 Documentation: https://hips.hedera.com/hip/hip-755
HIP-756 Documentation: https://hips.hedera.com/hip/hip-756
Getting Started on Hedera: https://hedera.com/getting-started
Top comments (0)