Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

F/rewards generation 2 #62

Merged
merged 4 commits into from
Nov 8, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix / improve comments
  • Loading branch information
maurolacy committed Oct 31, 2024
commit 4b02612272b7dd6d43a5fa0087b74a3f30e19d19
8 changes: 4 additions & 4 deletions x/babylon/keeper/mint_rewards.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"github.com/cosmos/cosmos-sdk/types/errors"
)

// MintBlockRewards mints new "virtual" bonding tokens and sends them to the staking contract for distribution.
// The amount minted is removed from the SupplyOffset (so that it will become negative), when supported.
// Authorization of the actor/recipient should be handled before entering this method.
// The amount is computed based on the finality inflation rate and the total staking token supply, in the bonded denom
// MintBlockRewards mints new tokens and sends them to the staking contract for distribution.
// Authorization of the actor should be handled before entering this method.
// Authorization of the recipient is being handled within the method for safety, but can
// be removed for flexibility
func (k Keeper) MintBlockRewards(pCtx sdk.Context, recipient sdk.AccAddress, amt sdk.Coin) (sdkmath.Int, error) {
if amt.Amount.IsNil() || amt.Amount.IsZero() || amt.Amount.IsNegative() {
return sdkmath.ZeroInt(), errors.ErrInvalidRequest.Wrap("amount")
Expand Down
Loading