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
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:
add_high_order_simple_pool
to create those type of pools, it limits to owner or guardians;add_liquidity
can recognize mft token and handle it properly;remove_liquidity
can recognize mft token and handle it properly;corresponding simulation tests are in ref-exchange/tests/test_high_order.rs