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

min_swap_amount also gates reward token transfers #991

Merged
merged 3 commits into from
Nov 28, 2023

Conversation

ethan-stride
Copy link
Contributor

Updating the starting transfer(s) in the route to use the pre-existing min_swap_amount TradeRoute field to determine if the transfer is worth it or reward tokens need to build up. The parameter is part of the configurable fields in the update-trade-route tx.

This is to avoid small transfers and swaps given that there are known frictional transfer fees.

Also updated the amount type to use cosmossdk.io/math.Int instead of the deprecated cosmos-sdk/types.Int

@ethan-stride ethan-stride requested a review from sampocs November 28, 2023 13:53
Copy link
Collaborator

@sampocs sampocs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small change to the sdkmath alias, otherwise LGTM!

x/stakeibc/keeper/reward_converter.go Outdated Show resolved Hide resolved
@ethan-stride ethan-stride merged commit d4f4fa6 into autoswap-revenue-tokens Nov 28, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants