Reward Mechanism
The NFA Labs Fountain Staking system is a unique staking and reward distribution mechanism on the Ethereum blockchain. It employs a sigmoid function to calculate rewards, ensuring a fair and balanced distribution.
Mathematical Model
The system uses a sigmoid function to calculate rewards. This function is known for its S-shaped curve, which is ideal for modeling situations where a balance is required.
The sigmoid function is represented as:
Where "e" is the base of natural logarithms, and "x "is the input to the function. The sigmoid function is used to model the reward distribution over time, ensuring that early and late stakers do not receive disproportionate rewards.
The proportions array in the createRewardContractForFountain
function represents the sigmoid function's output at different points. The difference between each successive pair of values models the sigmoid function's derivative, which is used to calculate the reward at any given point.
Reward Fountains
The system uses the concept of "Fountains" to categorize stakes. Each Fountain has its own reward contract, which calculates and distributes rewards based on the stake's duration and the sigmoid function.
The createFountain
function in the NFAiUserStakes contract is used to create a new fountain. The parameters for this function include the bucket ID, reward contract addresses, eligible token addresses, withdrawal fee, and a boolean indicating whether a receipt token should be issued.
The createRewardContractForFountain
function in the NFAiRewardManager contract is used to create a reward contract for a fountain. The parameters for this function include the bucket ID, epoch duration, epoch start time, rewards token address, and proportions.
Security Measures
The system incorporates several security measures:
Reentrancy Guards: Prevents recursive calls during crucial transactions.
SafeMath Utilization: Ensures all calculations are error-free.
Restricted Access: Critical functions are accessible only to authorized individuals.
Epochs
In the context of the NFA Labs Fountain Staking system, an epoch is a fixed period of time used for reward distribution. The duration of an epoch is defined when creating a reward contract for a fountain, as seen in the createRewardContractForFountain
function.
The epochDuration parameter represents the length of an epoch in seconds. For example, a value of 604800 represents one week.
The epochStartTime parameter represents the start time of the first epoch. It's typically set to the current time when the contract is deployed.
Reward Scaling
The proportions array represents the output of the sigmoid function at different points. The sigmoid function is used to model the reward distribution over time, ensuring that early and late stakers do not receive disproportionate rewards.
The difference between each successive pair of values in the proportions array models the sigmoid function's derivative, which is used to calculate the reward at any given point as shown in the array example below.
Increasing Rewards
In addition to the staking rewards, there are opportunities that users can benefit from to generate more rewards. This method, presented as a cycle, aims to leverage the staking mechanism in the Fountain of Peirene to effectively increase $NFAI holdings over time:
Buy $NFAi: The initial step involves purchasing $NFAi tokens. The decision on when to buy can be influenced by economic principles such as market sentiment, analysis, and the evaluation of supply and demand dynamics.
Stake for $wNuni in the Fountain of Peirene: By staking $NFAi tokens, users will mint $wNuni.
Sell $wNuni: Selling the $wNuni tokens at the right time.
Buy $NFAi: The proceeds from selling $wNuni to $ETH are used to purchase more $NFAi tokens.
Restake in the Fountain of Peirene: Use your previously purchased $NFAi to restake and mint $wNuni.
Repeat the Cycle: Repeating the cycle of buying, staking, selling, and restaking can lead to optimized reward generation. Informed by economic insights, each iteration has the potential to enhance efficiency and profitability.
This approach integrates with the practical steps of the staking cycle to create a strategic framework for maximizing rewards. By applying economic principles, users can make informed decisions that enhance their ability to generate additional rewards. Your security is paramount. Ensure you're visiting official links and understand the risks involved in DeFi staking. We recommend educating yourself on smart contract safety and market risks before participating. For assistance, please refer to our FAQ section or reach out to our support team for further guidence.
Last updated
Was this helpful?