How staking works in DeFi
Staking is a way for a network to achieve security using proof-of-stake. Understanding these principles matters because at every point in the cycle below, an individual can create a smart contract function, database table, or support request.
1. Deposit process. The user’s wallet is attached when they send assets to the staking contract.
2. Pooling process. Deposits are pooled until the total deposit amount reaches the staking threshold, for example, 32 ETH.
3. Delegation. Pooled stake is split between validators, both yours and others’, according to the service level agreement (SLA).
4. Validation. They provide blocks and validate them. You have no control over this process, but you will face its negative consequences.
5. Reward Payment. The protocol distributes rewards to the validator’s account following its own timetable. Because these transactions are off-chain, an oracle reports the reward amount on-chain.
6. Distribution of fees. The platform receives 5% to 15%, usually split between node services and the treasury.
7. Distribution. Net gains are distributed to the user as a balance increase in their tokens, a rebate, or an LST exchange rate modification.
8. Withdrawal. The user submits a withdrawal request, waits for the unlocking period to expire, and receives the principal and gains.