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

add liquidity to an existing pool (with smart wallet) #5077

Closed
1 of 4 tasks
rowgraus opened this issue Apr 11, 2022 · 11 comments
Closed
1 of 4 tasks

add liquidity to an existing pool (with smart wallet) #5077

rowgraus opened this issue Apr 11, 2022 · 11 comments
Assignees
Labels
AMM Inter-protocol Overarching Inter Protocol user-story User story that needs to be implemented and tested.

Comments

@rowgraus
Copy link

rowgraus commented Apr 11, 2022

As a new liquidity provider, I need to be able to add liquidity to an existing pool

  • I must add liquidity in the existing ratio of assets the pool
  • I would like quick action buttons that will add maximum liquidity based on my asset balances (note: UX issue - asset balances may span multiple purses)
  • I would like “single asset liquidity provision” which lets me pick one asset to provide, and the front end then trades half into the other asset and adds the result as liquidity (nice-to-have; not blocking)
  • use background signer (delegate from interactive signer to background signer for low-privilege actions #4406) when adding the liquidity issuer?
@rowgraus rowgraus added the user-story User story that needs to be implemented and tested. label Apr 11, 2022
@Tartuffo Tartuffo added the Inter-protocol Overarching Inter Protocol label Apr 11, 2022
@Tartuffo Tartuffo added this to the Mainnet 1 milestone Apr 12, 2022
@samsiegart
Copy link
Contributor

I believe this is implemented, but not the single asset part

image

@samsiegart
Copy link
Contributor

@rowgraus Can we break out the single-asset-liquidity feature into a separate ticket?

@dckc
Copy link
Member

dckc commented May 3, 2022

I can't get this to work on devnet. The UI spins after I choose IbcATOM.

I thought maybe it was because there is no liquidity yet, but I can't get adding liquidity to work from the REPL either.
log of my attempts: https://gist.github.com/dckc/4415d09a33d257267f2825ab967e7b06

@Chris-Hibbert @arirubinstein @mhofman can you tell what I'm doing wrong?

@dckc
Copy link
Member

dckc commented May 3, 2022

@arirubinstein pointed me at amm_swap.js; I had no luck with that either.

I basically just substituted IbcATOM for BLD:
https://gist.github.com/dckc/4415d09a33d257267f2825ab967e7b06#file-amm_swap-js

$ agoric deploy scripts/amm_swap.js 
Open CapTP connection to ws://127.0.0.1:8000/private/captp...o
agoric: deploy: running /home/connolly/projects/agoric/agoric-sdk/packages/run-protocol/scripts/amm_swap.js
agoric: deploy: Deploy script will run with Node.js ESM
awaiting home promise...
swap
add liquidity
CapTP bundle exception: (RemoteRangeError(error:captp:unknown#20001)#1)
RemoteRangeError(error:captp:unknown#20001)#1: floorDivide: zero divider

  at WebSocket.<anonymous> (packages/agoric-cli/src/deploy.js:120:13)
  at WebSocket.emit (node:events:520:28)
...

@dckc
Copy link
Member

dckc commented May 4, 2022

AUSD pool works

The IbcATOM pool is in some strange state. So with @Chris-Hibbert , I made a new pool using the "Anchor" asset, AUSD (aka USDC) and all seems well:
Screenshot at 2022-05-03 18-55-15
Screenshot at 2022-05-03 18-56-21
Screenshot at 2022-05-03 18-58-00

@dckc dckc closed this as completed May 4, 2022
@dckc dckc changed the title As a new liquidity provider, I need to be able to add liquidity to an existing pool add liquidity to an existing pool (with smart wallet) Aug 8, 2022
@dckc dckc reopened this Aug 8, 2022
@dckc
Copy link
Member

dckc commented Aug 10, 2022

We're talking about this as a stretch goal for an upcoming release.

@dckc
Copy link
Member

dckc commented Aug 16, 2022

@rowgraus , our current approach to adding a the liquidity issuer (#5914) involves an interactive signature (using keplr). We aim to take advantage of the background signer (#4406) in due course; I'm interested on your take on how important that is for this launch story. I suppose you'll ask for an estimate, so we better look into it, @samsiegart .

@dckc
Copy link
Member

dckc commented Aug 18, 2022

@nalinbhatt was able to add liquidity. rough edges:

  • "why do I have to choose that pool thing?"
  • "add issuer" issue was unresponsive (clue/work-around: reload wallet, dapp)

@dckc dckc closed this as completed Aug 18, 2022
@dckc
Copy link
Member

dckc commented Nov 1, 2022

I think changes to the smart wallet API mean this doesn't quite work any more.

@ivanlei ivanlei removed the MUST-HAVE label Mar 20, 2023
@turadg
Copy link
Member

turadg commented Sep 6, 2023

I think this is no longer planned. If it is, @otoole-brendan please reopen and revise the description with what's left to do.

@turadg turadg closed this as not planned Won't fix, can't repro, duplicate, stale Sep 6, 2023
@otoole-brendan
Copy link
Contributor

Agreed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AMM Inter-protocol Overarching Inter Protocol user-story User story that needs to be implemented and tested.
Projects
None yet
Development

No branches or pull requests

7 participants