Attention! Staking does not work with tokens that have taxes or other fees. The staking pool must be added to the exclusion list for these fees.
Staking can distribute rewards in the staked token itself, in another token, or in the native cryptocurrency of the current network (ETH, BNB).
DAppCrypto supports 3 reward algorithms. The reward algorithm is selected by the owner when creating a staking pool.
This algorithm calculates a fixed reward rate based on the total supply of issued tokens.
_totalSupply does not change), which provides high predictability of income for users.At the moment of reward calculation or display, the following formula is used:
TokensInSec = _totalAmount / _stakingDuration / _totalSupply;
reward = TokensInSec * _holderTokens * _holderDuration;
This algorithm dynamically adjusts the reward rate. All tokens in the staking pool are divided by the number of users participating in staking.
At the moment of reward calculation or display, the following formula is used:
TokensInSec = (_totalAmount / _stakingDuration / _totalStaked) - (RewardAmountSent / _totalStaked / _stakingDuration);
reward = TokensInSec * _holderTokens * _holderDuration;
This algorithm is dynamic and the most common in DeFi protocols. It calculates the reward rate based on the total reward pool (_totalRewards) and the current total amount of staked tokens (_totalStaked).
At the moment of reward calculation or display, the following formula is used:
TokensInSec = _totalRewards / _stakingDuration / _totalStaked;
reward = TokensInSec * _holderTokens * _holderDuration;
The choice of a specific algorithm depends on the goals of the protocol and the desired predictability of returns.