BTB
/

Benqi Staked AVAX (sAVAX)

Liquid Stakingwebsite
Liquid staking on Avalanche. An agent can stake AVAX to receive sAVAX, which accrues staking rewards through its exchange rate. To exit, it requests an unlock, waits out the cooldown, and then redeems the AVAX.

What you can do

stakeStake AVAX for sAVAXsAVAX.submit() with AVAX as value; sAVAX is minted to the caller
unstake-requestStart unstaking sAVAXsAVAX.requestUnlock(amount); the cooldown starts and the sAVAX is held by the contract until redeemed
unstake-redeemRedeem AVAX from a finished unlock requestafter the cooldown, call sAVAX.redeem(index) for one request, or sAVAX.redeem() to redeem all redeemable requests
check-unlocksList how many unlock requests an account hassAVAX.getUnlockRequestCount(user), then redeem by index as needed
priceRead the sAVAX to AVAX ratesAVAX.getPooledAvaxByShares(1e18) gives AVAX per sAVAX
Unstaking is not instant. A request waits through a cooldown, and then only inside a limited redemption window. If the window passes, the request expires and redeemOverdueShares returns the sAVAX instead of AVAX.
The AVAX paid out on redeem uses the exchange rate from when the unlock started, so the amount is fixed at request time.
If sAVAX is swapped on a DEX, the price can differ from its exchange rate. Compare against getPooledAvaxByShares before trading.
BENQI governance and its roles can pause staking, pause minting or change the cooldown and redemption periods.

Contracts

Read any function, or build a write and sign it. Amounts are in base units (1 USDC = 1000000).
sAVAX (BENQI Staked AVAX, proxy)staking on avalanche0x2b2C81e08f1Af8835a78Bb2A90AE924ACE0eA4bE
write submit()
Stake AVAX and receive sAVAX. Send the AVAX as msg.value. Returns the sAVAX share amount minted. Reverts on zero value. No approval needed.
write requestUnlock(uint256)
Start unstaking. Argument: sAVAX amount in wei. The sAVAX moves into contract custody and a cooldown starts. No approval needed, but the caller must hold that much sAVAX. The AVAX amount is fixed at the exchange rate when the unlock starts.
write redeem(uint256)
Redeem one unlock request after its cooldown, while it is still inside the redemption window. Argument: unlock request index. Sends the AVAX to the caller.
write redeem()
Redeem every unlock request that is currently redeemable. Sends the total AVAX to the caller. Requests still cooling down are skipped.
write redeemOverdueShares(uint256)
Get back the sAVAX held in custody for an unlock request that has expired without being redeemed. Argument: unlock request index. The sAVAX returns to the caller.
read getUnlockRequestCount(address)
Number of open unlock requests for an account. Argument: account. Use the index range 0 to count minus 1 with redeem(uint256).
read getPooledAvaxByShares(uint256)
Convert an sAVAX share amount into AVAX at the current exchange rate. Use it to show the value of sAVAX.
read getSharesByPooledAvax(uint256)
Convert an AVAX amount into sAVAX shares at the current exchange rate. Returns 0 when the pool is empty.
read balanceOf(address)
sAVAX balance of an account, in wei. sAVAX has 18 decimals.
read totalSupply()
Total sAVAX in circulation.
read totalPooledAvax()
Total AVAX controlled by the protocol, used with totalShares for the exchange rate.