-
Notifications
You must be signed in to change notification settings - Fork 91
18-decimal ERC-style tokens malfunction in liquidity module poolsΒ #801
Copy link
Copy link
Open
Description
Current Behavior
Tokens with 18 decimals (e.g. gravETH and similar ERC-20 bridged tokens) do not work correctly in x/liquidity module pools. Swaps involving these tokens fail randomly (~80% failure rate, see #663 for related overflow evidence).
Expected Behavior
Pools containing 18-decimal tokens should handle deposits, withdrawals, and swaps correctly, same as 6-decimal native tokens.
Hypothesis
The liquidity module batch matching arithmetic likely truncates or overflows when operating on amounts with 18-decimal precision. The module was designed for 6-decimal Cosmos-native tokens.
Reproduction
- Create a pool with a high-decimal IBC token (e.g. gravETH) and a native token
- Attempt swaps in both directions
- Observe random failures
Fix Path
Requires chain upgrade β module-level arithmetic fix in batch execution.
Related: #663 (swap overflow with large amounts)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels