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

Feature mft as pool assets #60

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

marco-sundsk
Copy link
Contributor

This is kind of high-order pool feature that will be widely used especially in stable swap pool's lp-token.
The basic idea is to let lp-token can be the backend assets (one or 2 tokens in some token pair) of another swap pool.
To achieve that goal, we refactor following parts:

  • make a dedicated interface add_high_order_simple_pool to create those type of pools, it limits to owner or guardians;
  • make add_liquidity can recognize mft token and handle it properly;
  • make remove_liquidity can recognize mft token and handle it properly;
  • make ordinary swap can recognize mft token and handle it properly;
  • make instant swap can recognize mft token and handle it properly;

corresponding simulation tests are in ref-exchange/tests/test_high_order.rs

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.

1 participant