Staking And Reward Distribution

Staking and reward distribution for lenders will be managed with deposit(), withdraw(), and distribute() functions. The distribute () function will be run by the Platform and include logics of calculating daily interest earnings and distributing them to lenders addresses. However, distributing fractional earnings at the end of each day will be not practical.

The gas cost of calculating (by iterating through lenders' array and recording earnings in relevant mappings) and distributing (transferring assets) is expensive. Although AVAX network will provide lower gas fees for these operations compared to ETHEREUM network, the gas cost will still prevent daily reward distribution to the addresses.

To solve this problem, the Platform will propose locked and flexible staking. In the locked-staking model, the lenders will be given AVFI Tokens representing their staked tokens. The rewards will be in AVFI Tokens and will be added to the on-platform account of the lender. AVFI Tokens are ERC-20 based, and they can be transferred or traded on other defi platforms. AVFI Tokens will represent the staked token, such as avfiETH, avfiBTC, avfiAVAX.

At the end of the staking period, the lender can convert all AVFI Tokens(staking+reward) to the original cryptocurrency token. In the flexible-staking model, the users will again earn daily interest in AVFI Tokens on their on-platform account, and they will have the option to convert all AVFI Tokens (staking+reward), convert them to original cryptocurrency tokens and transfer them to their addresses anytime they want. The locked staking model will have higher interest rates to increase the value locked in the Platform.

AvaxFi Protocol will be provided with up-to-date exchange rates for staking and borrowing calculations. For this purpose, Chainlink based solutions will be used and integrated into the Protocol.

Last updated