Basilisk-node icon indicating copy to clipboard operation
Basilisk-node copied to clipboard

Move funds on end of LBP to XYK

Open mrq1911 opened this issue 3 years ago • 6 comments

  • [ ] add ability move funds to xyk after lbp concludes
  • [x] disallow creation of lbp if xyk already exists
  • [x] disallow creation of xyk before lbp ends

discord thread

mrq1911 avatar Nov 17 '21 17:11 mrq1911

@lumir-mrkva Do we want to also create XYK pool at the end of LBP if the pool doesn't exist?

Roznovjak avatar Jan 05 '22 14:01 Roznovjak

@lumir-mrkva I have some questions. What if XYK pool already exists before LBP? (I thing there is nothing we can do to prevent it). Do we want to create XYK pool immediately at the end of LBP or when remove_liquidity is called? (In the former case, pool creation needs to be somehow automated/scheduled).

I have also discussed architectural design with Martin, and we like the idea of creating a new pallet for it.

Roznovjak avatar Jan 06 '22 16:01 Roznovjak

The second part of the task was already solved by this PR.

Roznovjak avatar Jan 07 '22 09:01 Roznovjak

you shouldn't be able to create LBP if the XYK pool already exists

mrq1911 avatar Jan 10 '22 14:01 mrq1911

@lumir-mrkva ability to create XYK at the end of LBP and transfer funds there should be configurable in the config or in the create_pool method? In other words, configurable for all LBP pools without an exception or configurable individually for each pool?

Roznovjak avatar Apr 27 '22 20:04 Roznovjak

@lumir-mrkva ability to create XYK at the end of LBP and transfer funds there should be configurable in the config or in the create_pool method? In other words, configurable for all LBP pools without an exception or configurable individually for each pool?

This should be decision of the team conducting the LBP. There are different use-cases that you might do with LBP including just distributing / sale of tokens instead of initializing liquidity. If I'd tackle this I would look at the close / end function and do the logic there where it can be an option if final weights are 50/50.

Optionally the close function could create only partial pool and transfer the rest to the owner.

jak-pan avatar Apr 27 '22 21:04 jak-pan