Skip to content

Commit

Permalink
[Estaking]: Change EdenB mint amount (#995)
Browse files Browse the repository at this point in the history
* change mint amount

* add comment
  • Loading branch information
amityadav0 authored Nov 26, 2024
1 parent c5a9bbd commit 99bd50b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion x/estaking/keeper/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,19 @@ func (k Keeper) UpdateStakersRewards(ctx sdk.Context) error {
return err
}

totalElysEdenStake, err := k.TotalBondedElysEdenTokens(ctx)
if err != nil {
return err
}

stakersMaxEdenAmount := params.MaxEdenRewardAprStakers.
MulInt(totalElysEdenEdenBStake).
MulInt(totalElysEdenStake).
QuoInt64(totalBlocksPerYear)

// Use min amount (eden allocation from tokenomics and max apr based eden amount)
stakersEdenAmount = math.MinInt(stakersEdenAmount, stakersMaxEdenAmount.TruncateInt())

// EdenB should be mint based on Elys + Eden staked (should exclude edenB staked)
stakersEdenBAmount := math.LegacyNewDecFromInt(totalElysEdenEdenBStake).
Mul(params.EdenBoostApr).
QuoInt64(totalBlocksPerYear).
Expand Down

0 comments on commit 99bd50b

Please sign in to comment.