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

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

Open
TorstenStueber opened this issue Jun 21, 2024 · 4 comments
Open

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

TorstenStueber opened this issue Jun 21, 2024 · 4 comments
Labels
priority:low Do it some day type:bug Something isn't working

Comments

@TorstenStueber
Copy link
Member

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
Copy link
Member Author

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

@prayagd prayagd added type:bug Something isn't working priority:low Do it some day labels Sep 3, 2024
@prayagd
Copy link
Collaborator

prayagd commented Sep 3, 2024

is this still valid, what if some user tried doing a 500 swap on vortex would it fail?

@prayagd
Copy link
Collaborator

prayagd commented Sep 12, 2024

@TorstenStueber ping

@TorstenStueber
Copy link
Member Author

This is still relevant and important.

A swap that is below this value would fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:low Do it some day type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants