This repository has been archived by the owner on Jan 10, 2025. It is now read-only.
SPL Token Swap - v2.0.0
joncinque
released this
01 Mar 22:29
·
4981 commits
to master
since this release
Changes
- Add multiple curve possibilities on top of the traditional constant product / Uniswap curve
- constant price: price fixed at pool creation
- constant product with offset: adds a faked amount of liquidity on one side of the pool, useful for new coin offerings
- Add ability to deposit and withdraw a single token type, instead of both at once
- Improve calculations
Build
The token swap program contains hard-coded constraints on fees and fee account owners. For this build, available at program id SwaPpA9LAaLfeLi3a68M4DjnLqgtticKg6CnyNwgAC8
on devnet, testnet, and mainnet-beta, the fee account for any pool must be owned by HfoTxFR1Tm6kGmWgYWD6J7YHVy1UwqSULUGVLXkJqaKN
.
Run the build command from token-swap/program
:
SWAP_PROGRAM_OWNER_FEE_ADDRESS=HfoTxFR1Tm6kGmWgYWD6J7YHVy1UwqSULUGVLXkJqaKN cargo build-bpf --features=production