Skip to content

Commit

Permalink
fix(migration): changed default values for incentive creation to prot…
Browse files Browse the repository at this point in the history
…ect against dos (#1653)
  • Loading branch information
omritoptix authored Dec 14, 2024
1 parent f756f91 commit 887a547
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/upgrades/v4/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"strings"

errorsmod "cosmossdk.io/errors"
"cosmossdk.io/math"
"github.com/cometbft/cometbft/crypto"
"github.com/cosmos/cosmos-sdk/baseapp"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down Expand Up @@ -285,7 +286,11 @@ func ReformatFinalizationQueue(queue rollapptypes.BlockHeightToFinalizationQueue
}

func migrateIncentivesParams(ctx sdk.Context, ik *incentiveskeeper.Keeper) {
DYM := math.NewIntWithDecimal(1, 18)
params := incentivestypes.DefaultParams()
params.CreateGaugeBaseFee = DYM.MulRaw(10)
params.AddToGaugeBaseFee = DYM.MulRaw(10)
params.AddDenomFee = DYM.MulRaw(10)
params.DistrEpochIdentifier = "day"
ik.SetParams(ctx, params)
}
Expand Down

0 comments on commit 887a547

Please sign in to comment.