v17

package
v23.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UpgradeName = "v17"

	// Community pool tax updated from 2 -> 5%
	CommunityPoolTax = sdk.MustNewDecFromStr("0.05")

	// Redemption rate bounds updated to give ~3 months of slack on outer bounds
	RedemptionRateOuterMinAdjustment = sdk.MustNewDecFromStr("0.05")
	RedemptionRateOuterMaxAdjustment = sdk.MustNewDecFromStr("0.10")

	// Define the hub chainId for disabling tokenization
	GaiaChainId = "cosmoshub-4"

	// Osmosis will have a slighly larger buffer with the redemption rate
	// since their yield is less predictable
	OsmosisChainId              = "osmosis-1"
	OsmosisRedemptionRateBuffer = sdk.MustNewDecFromStr("0.02")

	// Rate limits updated according to TVL
	// Framework:
	//       < 2.5M: No rate limit
	//   2.5M - 10M: 50%
	//    10M - 20M: 25%
	//    20M - 40M: 20%
	//    40M - 50M: 15%
	//        > 50M: 10%
	UpdatedRateLimits = map[string]sdkmath.Int{
		"comdex-1":     sdkmath.ZeroInt(),
		"cosmoshub-4":  sdkmath.NewInt(15),
		"evmos_9001-2": sdkmath.NewInt(50),
		"injective-1":  sdkmath.ZeroInt(),
		"juno-1":       sdkmath.NewInt(50),
		"osmosis-1":    sdkmath.NewInt(15),
		"phoenix-1":    sdkmath.ZeroInt(),
		"sommelier-3":  sdkmath.ZeroInt(),
		"stargaze-1":   sdkmath.ZeroInt(),
		"umee-1":       sdkmath.ZeroInt(),
	}

	// Osmo transfer channel is required for new rate limits
	OsmosisTransferChannelId = "channel-5"

	// Constants for Prop 225
	CommunityPoolGrowthAddress = "stride1lj0m72d70qerts9ksrsphy9nmsd4h0s88ll9gfphmhemh8ewet5qj44jc9"
	LiquidityReceiver          = "stride1auhjs4zgp3ahvrpkspf088r2psz7wpyrypcnal"
	Prop225TransferAmount      = sdk.NewInt(31_572_300_000)
	Ustrd                      = "ustrd"
)

Functions

func AddRateLimitToOsmosis

func AddRateLimitToOsmosis(ctx sdk.Context, k ratelimitkeeper.Keeper) error

Rate limits transfers to osmosis across each stToken

func CreateUpgradeHandler

func CreateUpgradeHandler(
	mm *module.Manager,
	configurator module.Configurator,
	bankKeeper bankkeeper.Keeper,
	distributionkeeper distributionkeeper.Keeper,
	icqKeeper icqkeeper.Keeper,
	ratelimitKeeper ratelimitkeeper.Keeper,
	stakeibcKeeper stakeibckeeper.Keeper,
) upgradetypes.UpgradeHandler

CreateUpgradeHandler creates an SDK upgrade handler for v17

func DeleteAllStaleQueries

func DeleteAllStaleQueries(ctx sdk.Context, k icqkeeper.Keeper)

Deletes all stale queries

func ExecuteProp223

func ExecuteProp223(ctx sdk.Context, k distributionkeeper.Keeper) error

Increases the community pool tax from 2 to 5% This was from prop 223 which passed, but was deleted due to an ICS blacklist

func ExecuteProp225

func ExecuteProp225(ctx sdk.Context, k bankkeeper.Keeper) error

Execute Prop 225, release STRD to stride1auhjs4zgp3ahvrpkspf088r2psz7wpyrypcnal

func MigrateStakeibcParams

func MigrateStakeibcParams(ctx sdk.Context, k stakeibckeeper.Keeper)

Migrate the stakeibc params to add the ValidatorWeightCap parameter

NOTE: If a parameter is added, the old params cannot be unmarshalled to the new schema. To get around this, we have to set each parameter explicitly Considering all mainnet stakeibc params are set to the default, we can just use that

func MigrateUnbondingRecords

func MigrateUnbondingRecords(ctx sdk.Context, k stakeibckeeper.Keeper) error

Migrate the user redemption records to add the stToken amount, calculated by estimating the redemption rate from the corresponding host zone unbonding records UserUnbondingRecords previously only used Native Token Amounts, we now want to use StTokenAmounts We only really need to migrate records in status UNBONDING_QUEUE or UNBONDING_IN_PROGRESS because the stToken amount is never used after unbonding is initiated

func RegisterCommunityPoolAddresses

func RegisterCommunityPoolAddresses(ctx sdk.Context, k stakeibckeeper.Keeper) error

Migrates the host zones to the new structure which supports community pool liquid staking We don't have to perform a true migration here since only new fields were added (in other words, we can deserialize the old host zone structs into the new types) This will also register the relevant community pool ICA addresses

func ResetSlashQueryInProgress

func ResetSlashQueryInProgress(ctx sdk.Context, k stakeibckeeper.Keeper)

Resets the slash query in progress flag for each validator

func UpdateRateLimitThresholds

func UpdateRateLimitThresholds(ctx sdk.Context, sk stakeibckeeper.Keeper, rk ratelimitkeeper.Keeper)

Update rate limits based on current TVL

func UpdateRedemptionRateBounds

func UpdateRedemptionRateBounds(ctx sdk.Context, k stakeibckeeper.Keeper)

Updates the outer redemption rate bounds

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL