Skip to content

Commit 3d30435

Browse files
Removed the operator from staking's architecture (#1382)
* Update architecture.adoc Removing the operator * Update architecture.adoc * Update architecture.adoc * Update architecture.adoc * Update architecture.adoc --------- Co-authored-by: Raz Landau <[email protected]>
1 parent 0e0510c commit 3d30435

File tree

1 file changed

+10
-24
lines changed

1 file changed

+10
-24
lines changed

components/Starknet/modules/staking/pages/architecture.adoc

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@ Staking is divided into several key components, each responsible for different a
1313
| Contract
1414
| Description
1515

16-
| Operator Contract
17-
| Acts as the access point for all interactions with the staking system, wrapping around the staking contract. It enforces access control and whitelisting, ensuring that only authorized users can perform staking operations.
18-
1916
| Staking Contract
20-
| The central contract that manages the staking process. It handles direct staking, rewards distribution, and interactions with delegation pools. Validators interact with this contract through the Operator contract to stake their tokens, claim rewards, and initiate unstaking.
17+
| The central contract that manages the staking process, which handles direct staking, rewards distribution, and interactions with delegation pools. Validators interact with this contract to stake their tokens, claim rewards, and initiate unstaking.
2118

2219
| Delegation Pooling Contract
2320
| This contract manages the delegation process, allowing delegators to assign their tokens to a validator for staking. The contract is responsible for tracking each delegator's share, calculating their rewards, and managing the delegation and unstaking processes.
@@ -46,31 +43,20 @@ The following data structures are stored within the contracts and play a crucial
4643

4744
For more technical details, you can refer to the full staking specification document available in: https://github.com/starkware-libs/starknet-staking/blob/main/docs/spec.md[Staking Repository Spec].
4845

49-
== Operator Contract
50-
51-
The operator contract serves as the first point of interaction for all users. It manages access control, ensuring that only authorized users can stake, claim rewards, and interact with the staking system. The operator contract forwards user requests to the relevant contracts (e.g., staking contract) and includes features such as whitelisting, which restricts access to specific users if activated.
52-
53-
*Key Functions and Responsibilities*: +
54-
`stake`: Allows users to stake their STRK tokens, forwarding the request to the staking contract. +
55-
`increase_stake`: Lets existing stakers add more tokens to their stake. +
56-
`claim_rewards`: Facilitates the claiming of rewards for stakers and delegators. +
57-
`unstake_intent`: Initiates the unstaking process by signaling intent, which the staking contract processes. +
58-
`unstake_action`: Finalizes the unstaking process after the waiting period.
59-
6046
== Staking Contract
6147

62-
The staking contract is the core of the staking system. It manages the entire lifecycle of staking, from initial staking to claiming rewards and unstaking. The operator contract interacts with the staking contract to execute these functions.
48+
The staking contract is the core of the staking system. It manages the entire lifecycle of staking, from initial staking to claiming rewards and unstaking.
6349

64-
*Key Functions and Responsibilities (accessed via the Operator contract)*: +
65-
`stake`: Allows users to stake their STRK tokens. This is facilitated by the Operator contract and forwarded to the Staking contract. +
66-
`increase_stake`: Lets existing validators increase their stake, accessed through the Operator. +
67-
`unstake_intent`: Initiates the unstaking process, managed by the Operator contract, which interacts with the Staking contract to initiate and finalize the unstaking process. +
68-
`unstake_action`: Finalizes the unstaking process after the waiting period, returning tokens to the user through the Operator. +
69-
`claim_rewards`: Allows users to claim rewards, facilitated through the Operator contract.
50+
*Key Functions and Responsibilities *: +
51+
`stake`: Allows users to stake their STRK tokens. +
52+
`increase_stake`: Lets existing validators increase their stake. +
53+
`unstake_intent`: Initiates the unstaking process, which can be finalized using `unstake_action` if sufficient time has passed. +
54+
`unstake_action`: Finalizes the unstaking process after the waiting period, returning tokens to the validator address. +
55+
`claim_rewards`: Allows users to claim rewards.
7056

7157
== Delegation Pooling Contract
7258

73-
The delegation pooling contract enables users to delegate their tokens through the Operator contract. All interactions, such as entering or exiting the pool, are forwarded to the appropriate contracts via the Operator. This contract tracks each delegator's contribution, calculates their rewards, and manages the delegation lifecycle.
59+
The delegation pooling contract enables users to delegate their tokens. All interactions, such as entering or exiting the pool, are enabled through this contracts, which tracks each delegator's contribution, calculates their rewards, and manages the delegation lifecycle.
7460

7561
*Key Functions and Responsibilities*: +
7662
`enter_delegation_pool`: Allows users to delegate their tokens to the pool associated with a validator. This function transfers the tokens, updates the delegator's record, and integrates them into the validator's pool. +
@@ -98,4 +84,4 @@ The minting curve contract defines the economic model that governs reward distri
9884

9985
== Security and Upgradability
10086

101-
The staking architecture on Starknet is designed with security and upgradability in mind. Each contract is modular, allowing for targeted upgrades and improvements without affecting the entire system. The introduction of the Operator contract adds an extra layer of access control, ensuring only authorized users can interact with the staking system. Access control mechanisms are in place to ensure that only authorized parties can make critical changes, further enhancing the security of the staking process.
87+
The staking architecture on Starknet is designed with security and upgradability in mind. Each contract is modular, allowing for targeted upgrades and improvements without affecting the entire system. Access control mechanisms are in place to ensure that only authorized parties can make critical changes, further enhancing the security of the staking process.

0 commit comments

Comments
 (0)