Skip to content

Balancer LBP Swapper#159

Merged
Joeysantoro merged 10 commits intofeat/v2from
feat/v2-balancer-LBP
Sep 12, 2021
Merged

Balancer LBP Swapper#159
Joeysantoro merged 10 commits intofeat/v2from
feat/v2-balancer-LBP

Conversation

@Joeysantoro
Copy link
Contributor

@Joeysantoro Joeysantoro commented Sep 11, 2021

Introduces one main new contract, the BalancerLBPSwapper.

This swapper takes in 1 asset and triggers an LBP auction into the target asset via the following Timed algorithm:

  1. Withdraw existing LP if exists
  2. Reset weights to 99:1
  3. Deposit new spentAsset and targetAsset at 99:1
  4. Trigger a gradual weight change to 1:99
  5. Transfer remaining target asset to recipient

TODO:

  • Add unit tests
  • More robust e2e tests and deployment scripts
  • Cleanup a few last items in contract logic

Copy link
Contributor

@xklob xklob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial pass looks good but I want to take another looks after reviewing Balancer code.

@Joeysantoro
Copy link
Contributor Author

Will add unit and integration tests in another PR

@Joeysantoro Joeysantoro merged commit 4734654 into feat/v2 Sep 12, 2021
@xklob xklob deleted the feat/v2-balancer-LBP branch September 19, 2021 18:59
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.

2 participants

Comments