Skip to content

Commit 284b493

Browse files
committed
suggestions
1 parent 7088ff7 commit 284b493

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

content/stellar-contracts/governance/timelock-controller.mdx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ title: Timelock Controller
88

99
The Timelock Controller provides a means of enforcing time delays on the execution of transactions. This is considered good practice regarding governance systems because it allows users the opportunity to exit the system if they disagree with a decision before it is executed.
1010

11-
The Timelock contract itself executes transactions, not the user. The Timelock should, therefore, hold associated funds, ownership, and access control roles.
11+
The benefits of a timelock are best seen in an ownership-based system. Typically, the owner is a G-account or another contract. To delay the execution of privileged functions, one can designate a Timelock Controller as the owner of the system.
1212

1313
## Operation Lifecycle
1414

@@ -33,11 +33,6 @@ Timelocked operations follow a specific lifecycle:
3333

3434
**Unset → Waiting → Ready → Done**
3535

36-
- **Unset**: The operation has not been scheduled or has been canceled.
37-
- **Waiting**: The operation has been scheduled and is pending the scheduled delay.
38-
- **Ready**: The timer has expired, and the operation is eligible for execution.
39-
- **Done**: The operation has been executed.
40-
4136
## Timelock Flow
4237

4338
### Schedule
@@ -91,7 +86,7 @@ The minimum delay of a contract is accessible through `get_min_delay`.
9186

9287
## Usage Example
9388

94-
A complete timelock controller implementation with role-based access control.
89+
We are providing below a complete timelock controller implementation with role-based access control.
9590

9691
### Roles
9792

@@ -116,7 +111,7 @@ For self-administration operations (e.g., updating the minimum delay, granting a
116111

117112
**Why not use `execute_op` for self-administration?** Soroban does not allow re-entrancy: a contract cannot call its own public functions during execution. For example, `execute_op` cannot internally call `update_delay` on the same contract. To work around this, the `CustomAccountInterface` implementation validates and marks operations as executed without performing the cross-contract call, allowing admin functions to be called directly.
118113

119-
The `__check_auth` implementation validates that:
114+
The custom `__check_auth` implementation validates that:
120115
- The operation targets the timelock contract itself
121116
- The operation was properly scheduled and is ready for execution
122117
- The predecessor and salt match the scheduled operation

0 commit comments

Comments
 (0)