pendulum-chain / portal

The Pendulum/Amplitude portal UI
GNU General Public License v3.0
1 stars 1 forks source link

Nabla: Disallow swaps that move less than 1000 tokens #502

Open TorstenStueber opened 1 week ago

TorstenStueber commented 1 week ago

If the swap in amount or swap out amount is less than 1000 (raw balance), then the swap will fail. For that reason also such an amount should be disallowed by the UI, otherwise it looks buggy to the user.

Reason

The swap in and swap out amounts are temporarily moved to the router contract. If these amounts are less than 1000 (raw balance), then the router contract would temporarily hold a non-zero amount less than the existential deposit, which we defined to be 1000 (raw balance).

TorstenStueber commented 1 week ago

@pendulum-chain/product This is a bug that is unlikely to arise (only for very small swap amounts) but we should fix it anyway.