Log in/ Sign up

Guide: How staking on Avalanche works, technical analysis of AVAX's liquidity token sAVAX

By @cryptotahin

Source: Twitter

We've always wondered how staked AVAX and the liquidity of the staked position represent assets interacting with each other since the two essentially use different chains.

So, this post provides a quick guide that will tell you how staking on Avalanche works and technically analyze the liquid staking AVAX: sAVAX.

@avalancheavax 's mainnet consists of three chains :

C chain (contract chain): smart contract platform for applications

P chain (platform chain): used for pledge and entrustment of AVAX

X chain (transaction chain): the chain used to transfer funds, with a fixed transfer fee

Without Benqi's liquidity staking tool, the default way for non-technical users to participate in chain security is the staking center on Avalanche Wallet, and staking through this venue only involves using the P-chain and locking AVAX, making funds illiquid.

Let's take a look at how the pledge on the P chain works.

Check out this deal: https://explorer-xp.avax.network/tx/7km8TTY9cuKEBktrcxBstfJBRhUomjtRU6iPAFpXxBzEg8PgX…

This is a "Delegate" call that delegates 30 AVAX to the validator.

PS: Since the P chain uses UTXO, the transfer value is 60 AVAX. 60 AVAX are sent, 30 are used, and another 30 are returned to the user wallet.

After entrusting AVAX, the verification rewards will be accumulated to the P-chain address you provided.

However, once you lock the funds, it becomes illiquid and cannot be regained for 21 days.

This is where @BenqiFinance comes into play.

While delegation and verification are performed on the P chain, Benqi uses fungible assets on the C chain to issue synthetic alternative assets for pledged positions.

These assets are called sAVAX. They are a product of an app, not a staked main AVAX position. Those are locked.

Staking via Avalanche Wallet or Benqi has different dynamics.

The first difference to observe is that while Avalanche protocol parameters are set to require at least 25 AVAX to delegate to a validator, Benqi does not set a minimum stake amount.

The rest of the technical differences are on the C chain.

When you click stake on the page, it will direct you to the sAVAX Token contract. When you look at the DATA tag, you'll see that the function being called is called Submit.

So, submit() is what we're looking for in the source code.

If you're clueless at this point, see one of my posts on trading knowledge .

Avalanche's C chain works basically the same as Ethereum, so that's enough for now.

Usually, when you use a chain explorer, you can read the source code of a verified contract.

However, going to that link and searching for "submit" in the source code doesn't find the function we're looking for.

This is because the contract is a proxy contract, which is a tool that allows both immutability and upgradeability. Click here for more information: https://docs.openzeppelin.com/contracts/4.x/api/proxy…

So we need to go into the deployment of that contract.

Let's search for the keyword "submit" on the second contract.

Soon we saw what the submit() function looks like. The basic function of this contract is to receive AVAX and mint sAVAX in return.

You can see the deconstruction of this function as follows:

And this is what the _mintShares() internal function looks like.

sAVAX is minted here and the internal ledger is updated here.

When you mint sAVAX in return for your AVAX, you are not actually delegating AVAX, as the delegating task is done by third-party contract operators.

This is why the sAVAX contract has a delegation withdrawal function for administrators only.

Operators delegate AVAX to validators on the P chain.

Through the deposit() and accrueRewards() functions, the revenue generated by verification is included in the depositor's total AVAX pool, causing the exchange rate of sAVAX to AVAX to increase over time.

To get your AVAX back, you can exchange sAVAX for AVAX on the open market, or use the unstake option by calling the requestUnlock() function.

When the unlock cooldown period ends, the redeem() function calls the internal _redeem() function, and you can get your AVAX.

in conclusion:

The staked AVAX is on the P chain, which is why you can't see it on http://snowtrace.io .

sAVAX, on the other hand, is an ERC-20 token that exists on the C-chain so applications can utilize it.

P-chain and C-chain are independent environments, and Benqi is like a bridge between the two.

The convenience of sAVAX comes at a price, it is a secondary delegation that allows others to stake (escrow) for you.

More information

1. About subnet and pledge

By @kevinsekniqi

Source: Twitter

Verifying the subnet requires verifying the C chain.

As more subnets are created, more AVAX will be staked regardless of whether they use AVAX as a gas token. Staking AVAX is a measurable indicator of the minimum security of the subnet. This is especially useful if the subnet is new.

There is a limit to the number of subnets each validator can run on.

While there is no limit to how many validators you can have per subnet, there is a limit to how many subnets you can start per validator.

Each validator can actually run up to C chain + several other subnetworks.

These two facts combined mean that:

New subnets appear—existing nodes cannot support more subnet verifications—new nodes appear, which locks more AVAX and further protects the security of the C chain.

The minimum pledge of each delegator is 2K AVAX, and the maximum is 3M AVAX.

The maximum value may decrease over time. This means you cannot run a single node with a highly centralized stake. You have to run new node.

Delegators can stake up to 5x AVAX.

This means you can't run a validator with 2K AVAX but have 1M AVAX delegated to you. You can have up to about 5x 2K AVAX. This means you have to continue staking with a new node.

These two facts combined mean that decentralization is highly incentivized in Avalanche.

In any case, add in the burning of fees and we could be entering an AVAX supply shock crisis.

Addendum: This post assumes that subnetting will become fairly common. However, subnets are one of the best blockchain infrastructure tools out there, and with the rise of application-specific blockchains, I feel subnets will be the main focus of deployments.

If Avalanche's infrastructure is substandard and there are other better options, then Avalanche's theory of liquidity crisis and decentralization will not hold, which means that developers will not choose to deploy on Avalanche.

2. About the hook of sAVAX and AVAX

By @hn_avax

Source: Twitter

Every sAVAX is powered by AVAX.

On the Avalanche network, sAVAX can be redeemed for AVAX+ staking rewards after a 15-day redemption period. Unlike stETH, where the redemption time is temporarily unknown, BENQI's current entrustment period is 14 days, and once there is an unstake request, AVAX can be withdrawn.

If users want to convert sAVAX to AVAX before 15 days, they can do it through avenues like @Platypusdefi with very little slippage. However, if a massive exchange occurs and the sAVAX:AVAX exchange rate becomes unbalanced, then this is unlikely to remain the case for long.

Since you can redeem AVAX in a relatively short period of time, arbitrageurs can be quite effective in closing any price gaps. If sAVAX is trading at a discount, you can buy in and unstake to get more AVAX.

all in all:

- Every sAVAX is backed by AVAX and you can redeem it after 15 days

- Any sAVAX exchange rate imbalance is temporary

- sAVAX is the best base DeFi yield on Avalanche

Add Comment
Load more comments
Trending News