Liquidswap V0 Docs

V0.5 Update

In March 2023, a new version of the Liquidswap contracts - v0.5 - was released.
The main reasons for the protocol upgrade are as follows:
  • The latest version of Move now supports u256 types, which allows for cheaper gas-wise stable swaps.
  • As our v0 upgrade policy is immutable, we couldn't upgrade v0, so we deployed v0.5 on both the testnet and mainnet and upgraded the UI.
  • Stable pools liquidity will be migrated to v0.5 over time.
  • We strongly recommend that new pools be created using v0.5.
  • The current UI creates new pools using v0.5.
  • Update has been reviewed by Ottersec team.
The contracts have been deployed on both the mainnet and testnet at the following address:
Pools stored on the following resource account:
LP coins module deployed on the following resource account:

Smart Contracts

The smart contract logic remains mostly the same for v0.5, so all examples and logic should work in the same way. However, for v0.5, there are no different versions of the router, as the default router has already been deployed with all the fixes we made during v0.
Additionally, since gas usage has been reduced for v0.5, you are welcome to use router best price swap functions, getters, etc. for stable swaps again.
LP name & Symbols
LP coins of v0.5 version has the following name and symbol format:
  • Name - LS05 LP-{coin_x_symbol}-{coin_y_symbol}-{curve: S or U}
  • Symbol - {coin_x_symbol}-{coin_y_symbol}{curve: S or U}