File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,8 @@ contract StakingRewardsCalculator {
194
194
}
195
195
196
196
/// @dev Calculate weekly rewards based on total stake weight and APY
197
- /// @dev Formula: weeklyRewards = (totalStakeWeight * targetApy) / (52 * 1e18 * 100)
197
+ /// @dev Formula: weeklyRewards = (totalStakeWeight * 4 * targetApy) / (52 * 1e18 * 100)
198
+ /// @dev The multiplication by 4 converts stake weight to equivalent annual staked tokens
198
199
/// @dev The division by 100 converts percentage to decimal
199
200
/// @param actualTotalStakeWeight Current total stake weight considering lock periods (in wei)
200
201
/// @param targetApy Target APY calculated from stake weight curve (in wei, e.g., 12% = 12e18)
@@ -207,7 +208,8 @@ contract StakingRewardsCalculator {
207
208
pure
208
209
returns (uint256 weeklyRewards )
209
210
{
210
- uint256 annualRewardsWithPrecision = (actualTotalStakeWeight * uint256 (targetApy));
211
+ // Multiply by 4 to convert stake weight to equivalent annual staked tokens
212
+ uint256 annualRewardsWithPrecision = (actualTotalStakeWeight * 4 * uint256 (targetApy));
211
213
212
214
// Step 4: Convert annual rewards to weekly rewards
213
215
weeklyRewards = annualRewardsWithPrecision / (PRECISION * 100 * WEEKS_IN_YEAR);
You can’t perform that action at this time.
0 commit comments