[Bug | Dex] Unable to swap between assets of differing decimals
aidan-starke opened this issue · comments
Aidan Starke commented
Currently on Porcini we have a couple pools that aren't working; XRP:SYLO & XRP:ASTO
Attempting to swap with either of these pools results in either InsufficientInputAmount
error, or InvalidConstantProduct
error.
Replicating the exact liquidity pools on a local node, these same swaps go through without issue
zees-dev commented
Note: This is a critical issue
Potential steps to resolution:
-
- This issue occurs on Porcini (testnet) and not locally (when reserves of tokens are the same); hence we need to fork the state of porcini and run/debug it on a local running seed node
- This PR should allow us to fork porcini state and run against that: #546
- command:
cargo run -- --chain=fork.json --execution=Native --alice --tmp --unsafe-ws-external --unsafe-rpc-external --rpc-cors=all
- where
fork.json
is porcini state
- where
- command:
-
- Potentially run another local node with the same reserves of Sylo (any 18dp asset) and XRP (native gas currency - ID
2
)
- Potentially run another local node with the same reserves of Sylo (any 18dp asset) and XRP (native gas currency - ID
-
- Debug and figure out why on porcini-state-node do we get error (
InsufficientInputAmount
) - while on a clean node with the same reserves the error is not encountered
- IDelaly you'd need to debug/watch the variable values and where they would deviate from the 2 running nodes
- Debug and figure out why on porcini-state-node do we get error (
Karishma commented
Ken Vu commented
I believe this has been resolved, can you confirm @aidan-starke @KarishmaBothara
Aidan Starke commented
Confirmed, this has been resolved