Skip to content

AMM: Atomic deposit and add liquidity script #287

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

Closed
Tracked by #231
supiket opened this issue Nov 8, 2022 · 0 comments · Fixed by #312 or #365
Closed
Tracked by #231

AMM: Atomic deposit and add liquidity script #287

supiket opened this issue Nov 8, 2022 · 0 comments · Fixed by #312 or #365
Assignees
Labels
App: AMM Label used to filter for the app issue Improvement Enhancing a feature that already exists
Milestone

Comments

@supiket
Copy link
Contributor

supiket commented Nov 8, 2022

Motivation

Currently, adding liquidity to an exchange contract requires three steps:

  1. Deposit some amount of asset A using deposit()
  2. Deposit some amount of asset B using deposit()
  3. Add liquidity using add_liquidity()

A Sway script can do this atomically.

Specification

The script should accept asset IDs and the amounts to be deposited to add liquidity by using up at least one of the assets (this depends on the ratio of the values of the two assets). Should refund any extra amount.

@supiket supiket added New Feature New addition that does not currently exist App: AMM Label used to filter for the app issue labels Nov 8, 2022
@supiket supiket self-assigned this Nov 8, 2022
@supiket supiket added Improvement Enhancing a feature that already exists and removed New Feature New addition that does not currently exist labels Nov 8, 2022
@simonr0204 simonr0204 moved this to Todo in Fuel Network Dec 9, 2022
@simonr0204 simonr0204 moved this from Todo to In Progress in Fuel Network Dec 9, 2022
@simonr0204 simonr0204 moved this from In Progress to Review in Fuel Network Dec 12, 2022
@supiket supiket mentioned this issue Jan 9, 2023
6 tasks
@github-project-automation github-project-automation bot moved this from Review to Done in Fuel Network Jan 23, 2023
@simonr0204 simonr0204 added this to the beta-3 milestone Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment