You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: contracts/DESIGN.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ In the diagrams below, tokens/vaults are shown in red, logic contracts are shown
40
40
41
41

42
42
43
-
Triggered by a staker calling either [SuccinctStaking.stake()](./src/SuccinctStaking.sol#L239) or [SuccinctStaking.permitAndStake()](./src/SuccinctStaking.sol#L252), specifying the prover to stake to and the amount of $PROVE to stake.
43
+
Triggered by a staker calling either [SuccinctStaking.stake()](./src/SuccinctStaking.sol#L244) or [SuccinctStaking.permitAndStake()](./src/SuccinctStaking.sol#L257), specifying the prover to stake to and the amount of $PROVE to stake.
44
44
45
45
This deposits $PROVE from the staker into the $iPROVE vault (minting $iPROVE), and then takes that $iPROVE and deposits it into the chosen $PROVER-N vault (minting $PROVER-N). The staking contract escrows this $PROVER-N, while minting $stPROVE to the staker (which acts as the receipt token for staking).
46
46
@@ -52,7 +52,7 @@ After this operation, the staker receives a corresponding amount of $stPROVE.
52
52
53
53

54
54
55
-
Triggered by a staker calling [SuccinctStaking.requestUnstake()](./src/SuccinctStaking.sol#L275), waiting for [SuccinctStaking.unstakePeriod()](./src/SuccinctStaking.sol#L47) seconds to pass, and then calling [SuccinctStaking.finishUnstake()](./src/SuccinctStaking.sol#L325).
55
+
Triggered by a staker calling [SuccinctStaking.requestUnstake()](./src/SuccinctStaking.sol#L280), waiting for [SuccinctStaking.unstakePeriod()](./src/SuccinctStaking.sol#L52) seconds to pass, and then calling [SuccinctStaking.finishUnstake()](./src/SuccinctStaking.sol#L326).
56
56
57
57
This burns the staker's $stPROVE, and then withdraws the $iPROVE from the $PROVER-N vault (burning $PROVER-N), and then withdraws the $PROVE from the $iPROVE vault (burning $iPROVE).
58
58
@@ -64,7 +64,7 @@ After this finishing this operation, the staker receives a corresponding amount
64
64
65
65

66
66
67
-
First triggered by the Auctioneer/VApp calling [SuccinctStaking.requestSlash()](./src/SuccinctStaking.sol#L361). Then, the SuccinctStaking.owner() can process the requested slash either by cancelling it via [SuccinctStaking.cancelSlash()](./src/SuccinctStaking.sol#L386) or, if [SuccinctStaking.slashCancellationPeriod()](./src/SuccinctStaking.sol#L50) seconds have passed, it can be finished via [SuccinctStaking.finishSlash()](./src/SuccinctStaking.sol#L420).
67
+
First triggered by the Auctioneer/VApp calling [SuccinctStaking.requestSlash()](./src/SuccinctStaking.sol#L362). Then, the SuccinctStaking.owner() can process the requested slash either by cancelling it via [SuccinctStaking.cancelSlash()](./src/SuccinctStaking.sol#L387) or, if [SuccinctStaking.slashCancellationPeriod()](./src/SuccinctStaking.sol#L55) seconds have passed, it can be finished via [SuccinctStaking.finishSlash()](./src/SuccinctStaking.sol#L421).
68
68
69
69
If the latter, burns the selected prover vault's corresponding $iPROVE and $PROVE.
70
70
@@ -74,11 +74,11 @@ After finishing this operation, the prover's stakers will have a decreased amoun
74
74
75
75

76
76
77
-
Triggered by the SuccinctStaking.owner() calling [SuccinctStaking.dispense()](./src/SuccinctStaking.sol#L490), specifying the amount of $PROVE to dispense.
77
+
Triggered by the SuccinctStaking.owner() calling [SuccinctStaking.dispense()](./src/SuccinctStaking.sol#L491), specifying the amount of $PROVE to dispense.
78
78
79
79
This moves $PROVE from the staking contract to the $iPROVE vault, effectively distributing the $PROVE to all stakers.
80
80
81
-
The maximum amount of dispense is defined as [SuccinctStaking.maxDispense()](./src/SuccinctStaking.sol#L224), which is bounded by the [SuccinctStaking.dispenseRate()](./src/SuccinctStaking.sol#L53). Dispense rate can also be changed by the owner via [SuccinctStaking.updateDispenseRate()](./src/SuccinctStaking.sol#L518).
81
+
The maximum amount of dispense is defined as [SuccinctStaking.maxDispense()](./src/SuccinctStaking.sol#L229), which is bounded by the [SuccinctStaking.dispenseRate()](./src/SuccinctStaking.sol#L58). Dispense rate can also be changed by the owner via [SuccinctStaking.updateDispenseRate()](./src/SuccinctStaking.sol#L519).
82
82
83
83
It is assumed that the staking contract has ownership of this much $PROVE. Operationally, the staking contract will need to be periodically topped up with $PROVE to cover the dispense rate.
0 commit comments