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

disable trade route ICA swap #1137

Merged
merged 2 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 0 additions & 6 deletions x/stakeibc/keeper/hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,6 @@ func (k Keeper) BeforeEpochStart(ctx sdk.Context, epochInfo epochstypes.EpochInf
if epochInfo.Identifier == epochstypes.MINT_EPOCH {
k.AllocateHostZoneReward(ctx)
}
// At the hour epoch, query the swap price on each trade route and initiate the token swap
if epochInfo.Identifier == epochstypes.HOUR_EPOCH {
k.UpdateAllSwapPrices(ctx)
k.SwapAllRewardTokens(ctx)
}

}

func (k Keeper) AfterEpochEnd(ctx sdk.Context, epochInfo epochstypes.EpochInfo) {}
Expand Down
2 changes: 2 additions & 0 deletions x/stakeibc/keeper/reward_converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ func (k Keeper) BuildSwapMsg(rewardAmount sdkmath.Int, route types.TradeRoute) (
return msg, nil
}

// DEPRECATED: The on-chain swap has been deprecated in favor of an authz controller
// Trade reward tokens in the Trade ICA for the host denom tokens using ICA remote tx on trade zone
// The amount represents the total amount of the reward token in the trade ICA found by the calling ICQ
func (k Keeper) SwapRewardTokens(ctx sdk.Context, rewardAmount sdkmath.Int, route types.TradeRoute) error {
Expand Down Expand Up @@ -461,6 +462,7 @@ func (k Keeper) TradeConvertedBalanceQuery(ctx sdk.Context, route types.TradeRou
return nil
}

// DEPRECATED: The on-chain swap has been deprecated in favor of an authz controller. Price is no longer needed
// Kick off ICQ for the spot price on the pool given the input and output denoms implied by the given TradeRoute
// the callback for this query is responsible for updating the returned spot price on the keeper data
func (k Keeper) PoolPriceQuery(ctx sdk.Context, route types.TradeRoute) error {
Expand Down