README
Staking derivatives (seSCRT)
High level description
seSCRT (working title) is a staking derivative for the Secret Network. The purpose is to provide a liquid, fungible token for a user, representing his stake in the network. This token will accrue value, in a similar fashion to PoS staking which will unlock farming, and yield compounding opportunities. The goal is not to optimize APYs for users, but rather:
- Automatic compounding of rewards
- Compounding of rewards without triggering a taxable event (if relevant)
- Minimizing validator risk by spreading delegations out to multiple validators
- Creating a mechanism for private governance voting
- Creating a fungible token which allows double-dipping in DeFi applications while still accruing network-level staking rewards
- Creating an asset class that accrues network-level staking rewards while still remaining liquid
- Allow “private staking”, whereby you can buy seSCRT on the market in a privacy preserving way without leaving a traceable transaction
The main functions of seSCRT
Staking
- Stake SCRT, get seSCRT
- Withdraw (1 step). Unbond -> wait 21 days(*)
- Withdraw (2 steps). Unbond -> wait 21 days -> Claim
(*) if automatic claiming is enabled by the contract
Trading
seSCRT is a SNIP-20 token, and can be sent or transferred to contracts or other users.
Withdrawal Windows
Cosmos chains (by default) have a limit of 7 active unbondings per address. This means that to be able to support many users seSCRT must group up the unbonds in withdrawal windows. These are 3 day sliding windows (customizable) during which all withdraws are aggregated. At the end of such a window, an unbond action is triggered, and the 21-day unbond counter is started. At the end of this time the released funds are distributed to users (user may also manually claim his SCRT if the contract has not yet been triggered).
This means the actual unbonding time is actually 21-24 days, depending on the withdrawal window
User stories and main functions
- A holder of SCRT wants to deposit his coins and receive seSCRT so that he can earn interest while remaining liquid
- User clicks stake button and selects an amount
- A confirmation screen is displayed, with the amount of SCRT deposited, and the number of tokens that will be received
- User clicks confirm
- Secret contract stake function is called
- A holder of seSCRT wants to withdraw his tokens so he can trade his SCRT
- User clicks the unbond button and selects an amount
- A confirmation screen is displayed, with the date the tokens will be available, as well as a warning that he will have to take further actions to claim his SCRT
- Secret contract unbond function is called
- The unbond is displayed for the user, including time to release and amount of SCRT tied to the unbond
- Withdraws should be automatically claimed for the user by the contract. However, in some cases a manual claim might be required. In such a case:
- When matured, the user can click a claim button, which claims all matured deposits
- A user wants to trigger withdrawal window finalization
- The amount of accumulated SCRT that will be rewarded to the caller is displayed
- The time till the withdrawal window closes is displayed
- After the window closes, a user may trigger a function call that closes the transfer window and awards him the SCRT in the reward pool
- A holder of seSCRT wants to see his current balance in tokens and in SCRT, so that he can track his position in a simple way
- There should be a display of current SCRT balance
- There should be a display of current seSCRT balance
- A holder of SCRT wants to see the current exchange rate, so that he can track the value of his seSCRT
- There should be a display of the exchange rate between SCRT<->seSCRT (this is available from the exchange_rate contract query)
- A holder of SCRT wants to be able to see some explanation about staking derivatives, and how it works
- A brief explanation in a landing page
- A more in-depth FAQ page
Gov token
- Optional governance token for seSCRT
- Governance token holders will share the fees generated by the deposit fee
- Governance token holders will vote on new validators added to the pool, removed from the pool, or weight changes in the pool
Stakononics
- Validators can charge whatever commission they want, up to 10% (15%?) – anything over this amount and they will be removed from the validator set.
- Stake is split between validators according to weight. Validators can be weighted differently, but will start out with equal weights, unless otherwise specified
- The algorithm to balance stake between validators is:
- On new deposits
- If deposited amount is greater than
total_staked / no. of validators
, equal amount is staked to the validators (amount / no. of validators
) - If deposited amount is less than
total_staked / no. of validators
then total amount is staked on the validator with least staked amount.
- If deposited amount is greater than
- On new unbond
- If unbond amount is greater that
unbond_amount / no. of validators
then we unbondunbond_amount / no. of validators
amount from each validators and in case staked amount to the validator is less than required then we carry the left amount and add to next validator unbonding amount (i.eunbond_amount / no. of validators
). - If unbond amount is less than
unbond_amount / no. of validators
then total unbond amount is unbonded from the validator withlargest staked amount
.
- If unbond amount is greater that
- On new deposits
- Contract admin will charge a
fee on the reward amount
generated from the valdiators.