monorepo
monorepo copied to clipboard
As a passive LP, I want an easy way to add liquidity to Amarok AMMs by providing a single asset
Problem Users don't wan to have to bridge/swap to have 50/50 pairs of madUSDC and adopted USDC
Ideas to solve this We allow users to provide liquidity in a less manual way through the UI that clearly explains what is happening with their fundss
Acceptance Criteria [ ] User choose to can add USDC for a given chain in the UI [ ] Offfchain and helper contracts automatically swaps 50% and fund the AMM [ ] This is visible and understandable to the users [ ] [TBD] This is equally easy to reverse out of? <-- CONSIDER NEW ISSUE
Implementation Steps
Other
What will this look like with diamond pattern?
- Create
- Test
- UI
Zapping into position isn't necessary for our pools because users can add liquidity in any proportion of tokenX/tokenY, even fully single-sided. Depending on the current reserves, the deposit can have positive or negative price impact on the pool.
It would be difficult to determine the 'optimal' swap + deposit amounts because the state of the pool can change between the swap and the deposit, causing the first calculation for the swap to be obsolete.
Withdrawing from the pool will give back a split of X and Y tokens, not just one, unless the user specifies to withdraw in a single token (which will incur higher price impact).
In summary:
- Update pool UI to allow for any amount of X,Y to be deposited (currently it is calculating amounts using an incorrect
ratebased onvirtualPrice- this should be removed) [#2570] - Show user the price impact of their deposit/withdraw [pending #2151]