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

Chopsticks Liquidity Pool Setup #67

Closed
wants to merge 33 commits into from

Conversation

clangenb
Copy link
Contributor

This PR aims to test and document the steps needed to setup a liquidity pool on Basilisk.

Preliminary

Run a local chopsticks setup. All the linked encoded transactions below will open on the local chopsticks setup, ready for execution. Note: Minor changes are needed for the Production setup, as we are going to do a KSM pool, and not BSX. Alice is going to be the liquidity pool creator and manager.

  1. Run chopsticks: npx @acala-network/chopsticks@latest xcm --r=kusama --p=chopsticks/bajun.yml --p=chopsticks/basilisk.yml
  2. Transfer 28600 BAJU (~2000.- USD) to from Bajun to Alice on Basilisk.
  3. Create BAJU<>BSX Liquidity
    Pool: xyc.createPool. You will see quite some events, and a pool adress is created. We can confirm that the pool holds 900 BSX and 28500 BAJU by checking its native and token balance, and an initial shares amount of 900,000,000,000,000.
  4. Sell 100mBaju get at least 200 mBSX (some value suitable for current token liquidity distribution), tx:
  • Sell executed: 100 mBaju for 3,148410007 mBSX
  • 2nd sell executed: 100 mBaju for 3,148387946 mBSX (slightly less BSX, which is expected due to liquidity change)
  • Liquidity pool balance: 899.9937 BSX + 28500.2 BAJU (-0.007 BSX +0.2 BAJU)
  • Liquidity shares: 900,000,000,000,000 shares (unchanged)
  1. Withdraw liquidity 185 shares
  • Pool transfers 184.99 BSX and 5858 BAJU to Alice.
  1. Add Liquidity 100mBSX and max 8000 BAJU, tx:
  • Added 100 mBSX + 3.166 BAJU.

clangenb and others added 30 commits May 13, 2024 15:56
Co-authored-by: clangenb <37865735+clangenb@users.noreply.github.com>
@clangenb clangenb closed this Jun 28, 2024
@clangenb clangenb deleted the cl/basilisk-liquidity-pool-setup branch July 3, 2024 13:10
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