BNB staking mechanics
BNB Liquid Staking lets the user stake their funds through the corresponding smart contracts on the Binance network, accumulate rewards, and receive their stake and rewards when unstaking.
The following section explains staking requirements, fees, rewards, validators, smart contracts and function calls to interact with these smart contracts.
Requirements
The requirements when staking are:
-
Minimum value to stake — 0.502 BNB (the 0.002 part is the relayer fee added on top of 0.5 BNB).
-
Maximum value to stake — unlimited, at the user’s discretion.
The requirements when unstaking are:
- Minimum value to unstake — 0.5 BNB.
- Maximum value to unstake — up to the initial stake for ankrBNB.
- Unbond time (before user gets their unstaked funds) — 7–15 days.
- Splitting large unstaked amounts between several unbond times due to limited nodes capacities.
Fees
-
Ankr takes 10% fee from the staking reward.
-
When staking, the user pays the relayer fee — 0.002 BNB, which is a fee for transferring assets between BNB Chain (prev. Binance Chain) and BNB Beacon Chain (prev. Binance Chain).
-
When unstaking, the user pays nothing, while Ankr pays:
-
Unbonding transaction fee (undelegate_fee) — 0.004 BNB.
-
Cross-chain transaction fee (transfer_out_fee) — 0.000075 BNB.
-
The user must also count in the gas price for outgoing transactions.
Rewards
Validators receive rewards every day, at midnight, UTC.
The APY is calculated from the validators' rewards.
The rewards the user gets are calculated using the exchange ratio explained later in this document.
To understand BNB Liquid Staking, you need to know the entities and understand the workflow under the hood.
The following entities are involved:
- Smart contracts
- Ankr addresses
- Ankr validators
Smart contracts
Smart contracts and addresses involved in BNB Liquid Staking are:
- BinancePool Proxy (opens in a new tab) — contracts on BNB Chain where the user sends their initial staking or unstaking request.
- aBNBb Proxy (opens in a new tab) — contract on BNB Chain is an intermediary in the ankrBNB staking and unstaking process.
- ankrBNB Proxy (opens in a new tab) — contract on BNB Chain that mints or burns ankrBNB tokens for the user. All interactions go through the Proxy part.
- TokenHub (opens in a new tab) — contract on BNB Chain that makes cross-chain transfers between BNB Chain and Binance Chain.
- Intermediary address (opens in a new tab) — BNB backend service on Binance Chain that:
- When staking, receives the staked funds from BinancePool to send to the validators.
- When unstaking, receives the unstaked funds to later crosschain-send it to the operator address.
- Operator address (opens in a new tab) — BNB backend service on BNB Chain that:
- When unstaking, receives the unstaked funds+rewards to send to stakers.
Validators
- Ankr validator (opens in a new tab)
- Avengers (opens in a new tab)
- BNB48 Club validator (opens in a new tab)
- CertiK (opens in a new tab)
- MathWallet (opens in a new tab)
- Tranchess (opens in a new tab)
Staking workflow
- User sends a request to the
BinancePool::stake({value:stake+relayer_fee})
on BNB Chain.stake
specifies the staked amount and should meet the requirements described above, whilefee
specifies the fee deducted from the user’s wallet for the staking. BinancePool
verifies the request checking theminimal_stake_value
and the user-paidrelayer_fee
, executesTokenHub::transferOut()
to make a cross-chain transaction to Binance Chain, mints ankrBNB in the amount defined by the current exchange ratio, and then issues aStaked()
event with thesender
,stake
,intermediary
parameters.- BNB backend service detects the issued
Staked()
event and creates a record in its Postgres database, then waits for the successful cross-chain transaction completion to Binance Chain, which usually takes around 45s. - Upon transaction completion, the staked amount ends up at
intermediaryAddress
— the BNB backend service address on Binance Chain. Then the BNB backend service executessendDelegation(validatorAddress, stake)
on Binance Chain to send the stake tovalidatorAddress
of one of the validators from the Ankr set.
Exchange ratio
When staking, the user receives:
- ankrBNB in the amount calculated the following way:
user's_stake * exchange_ratio
.
When unstaking, the user receives their_stake + accumulated_rewards
in BNB.
It is calculated by the following formula: accumulated_amount_ankrBNB / exchange ratio
.
The exchange ratio is calculated by the following formula:
uint256 totalShares = totalSharesSupply(); == ankrBNB.totalSupply();
uint256 denominator = _totalStaked + totalRewards - _totalUnbondedBonds;
_ratio = (totalShares * 1e18) / denominator;
Unstaking workflow
- For ankrBNB, the user sends a request to the
ankrBNB::approve(aBNBb.address, amount)
to let theaBNBb
smart contract transfer the user's Liquid Staking tokens. - User sends a request to the
BinancePool::unstake(amount)
on BNB Chain.amount
specifies the amount to be released back to the user. - BinancePool verifies the request checking the
minimal_stake_value
andbalance_of_user
, then executesaBNBb::lockSharesFor()
to transfer ankrBNB from user to theaBNBb
smart contract address (input amount) thenaBNBb::burn()
executes to decrease total supply of tokens. - BNB backend service detects the
UnstakePending()
event and creates a record in Postgres database, then starts to check the database for newUnstake
requests every day at 00:00. If it finds a newUnstake
request, it executessideChainUnbond(bsc, validatorAddress, totalPendingAmount)
on the Binance Chain wheretotalPendingAmount
specifies the aggregate pending amount to unstake for different users andvalidatorAddress
specifies the address of one of the validators from the Ankr set to gettotalPendingAmount
from. - After the
UnbondTime
,intermediaryAddress
receivesundelegated(unbonded)
funds. Then the BNB backend service makes a cross-chain transaction tooperatorAddress
on BNB Chain. - Upon the cross-transaction completion, the unstaked amount ends up at
operatorAddress
. Then the BNB backend service executesBinancePool::distributeRewards({value: totalPendingAmount})
on BNB Chain to distribute stakes and rewards to the users.
The unstake process
To understand the Step 4 through 6 clearer, look at the following description.
- Ankr accumulated all the unstaking transaction from Liquid Staking users in a pool.
- Once every 24 hours, Ankr check if there is a validator that doesn't have a pending unstaking transaction.
- If such validator is found, Ankr sends an unstaking transaction to it. The amount in this transaction is an aggregate of all the total users unstaking transactions since the last Ankr unstaking transaction.
- The transaction takes 7 days to be processes, which is the BNB Chain unbond time period.
- After the unbond time period ends, Ankr receives the unstaked funds and redistributes them to the users.
Additional information
Additional details To get more information about staking on Binance, read Staking (opens in a new tab), Delegating (opens in a new tab), and Binance cross-chain transfer (opens in a new tab).
To get more information about unstaking on Binance, read Unbond (opens in a new tab) and Binance cross-chain transfer (opens in a new tab).