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

Initial full implementation of ZapPoolLiquidity. #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gnarlycow
Copy link

Add and implement a new liquidity pool tx type called "zap liquidity". See Zapper's definition of "zap".

For example, if a user wants to zap liquidity into the DTSLA-DUSD pool. ZapPoolLiquidity works in the following way:

  1. Takes a certain amount of DFI as the input token.
  2. Swap all input DFI tokens for DUSD.
  3. Optimally swap a portion of DUSD for DTSLA, and provide the obtained DTSLA along with the remaining DUSD tokens as liquidity to the DTSLA-DUSD pool.
    All three steps are done in a single tx.

Code is preliminarily complete; functional test in progress.

@gnarlycow gnarlycow requested a review from gaohan137 August 1, 2022 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant