Releases: pontem-network/liquidswap
Releases · pontem-network/liquidswap
v0.4.4
v0.4.3
v0.4.2
Changelog:
- Entry point for
router::swap_unchecked
. - New admin addresses for mainnet (msafe multisig).
v0.4.1
Changelog:
Important: Aptos changed resource account generation algorithm so we had to change addresses and migrate to new ones
- Modules deployed at -
0x190d44266241744264b964a37b8f09863167a12d3e70cda39376cfb4e3561e12
. - LP coins and pools placed at -
0x05a97986a9d031c4567e15b797be516910cfcb4156312482efc6a19c0a30c948
. - Some comments fixed.
We hope we wouldn't need to do it again and it's final.
v0.4.0
Mainnet preparation
We freeze code and module addresses.
Only treasury addresses will be changed with release on mainnet.
Changelog:
- Flashloans enabled.
- Dynamic fees enabled: there are default different fees for uncorrelated and stable pools. Treasury has option to change fee for individual pool.
- Liquidity pool resource account and LP coin resource account changed to:
0x8aa500cd155a6087509fa84bc7f0deed3363dd253ecb62b2f110885dacf01c67
. - All modules deployed on new address:
0x4e9fce03284c0ce0b86c88dd5a46f050cad2f4f33c4cdd29d98f501868558c81
. - All modules are immutable, include dependencies (exclude 0x1 ones).
Follow our changes by reading documentation.
v0.3.0
For more info on the v0.3.0 major release, please refer to docs.
Changelog:
- Contracts deployed on testnet.
- All the modules are deployed at the same address as before:
0x43417434fd869edee76cca2a4d2301e528a1551b1d719b75c350c3c97d15b8b9
. - All the pools are currently stored on the Resource Account created during the Liquidswap initialization:
0x385068db10693e06512ed54b1e6e8f1fb9945bb7a78c28a45585939ce953f99e
- As all the pools are stored at the same address, it’s no longer necessary to pass the
pool_addr
parameter as an argument to functions. - The current structure of each pool is as follows:
struct LiquidityPool<phantom X, phantom Y, phantom Curve> has key {
coin_x_reserve: Coin<X>,
coin_y_reserve: Coin<Y>,
last_block_timestamp: u64,
last_price_x_cumulative: u128,
last_price_y_cumulative: u128,
lp_mint_cap: coin::MintCapability<LP<X, Y, Curve>>,
lp_burn_cap: coin::BurnCapability<LP<X, Y, Curve>>,
// Scales are pow(10, token_decimals).
x_scale: u64,
y_scale: u64,
}
- The third generic parameter,
LP
, has been replaced with a new parameter,Curve
. Curve
specifies which liquidity curve is used for the LiquidityPool and can be one of the following:- Uncorrelated:
liquidswap::curves::Uncorrelated
- Stable:
liquidswap::curves::Stable
.
- Uncorrelated:
- New pools no longer require specifying the
LP
parameter, as they all share the same LP coin type:
struct LP<phantom X, phantom Y, phantom Curve> {}
deployed at0x385068db10693e06512ed54b1e6e8f1fb9945bb7a78c28a45585939ce953f99e
. - The
LP
generic was removed from all the methods for the same reason, so a dev needs only to passX, Y
andCurve
types. - All LP generics are currently sorted by default (meaning that they always have the same X and Y sorting order). So, for a pool like BTC/USDT/Uncorrelated, the LP would always be
LP<BTC, USDT, Uncorrelated>
, notLP<USDT, BTC, Uncorrelated>
. - All the pools are currently unique. For example, there can’t be two BTC/USDT pools on different addresses, but there can be two BTC/USDT pools that use different curves.
- This is an important distiction; still, anyone can create a new pool, and it’s still permissionless.
- A new sorting algorithm for generics: the algorithm takes a coin type (meaning the format
address::module_name::struct_name
) and starts comparing struct names. If the struct name is not the same, it returns the result. If it is the same, it continues comparing module names and addresses. Link: https://github.com/pontem-network/liquidswap/blob/main/sources/libs/coin_helper.move#L35 - A number of methods now require the same order of generics that originally defined a pool. It means that coin type arguments
X
andY
need to be sorted according to the new sorting algorithm.
These methods are (inrouter.move
/scripts.move
):register_pool
/register_pool_and_add_liquidity
add_liquidity
remove_liquidity
The rest of the methods, including swaps and getters, work fine with any coin argument order.
v0.2.8
This is latest version of v0.2.* series, it will be replaced with v0.3 which contains significant changes.
Changelog:
- Update to 15.09.22 devnet.
- Hardcoded names for LP coins.
v0.2.7
What's Changed
- change
signer
to&signer
in all entry functions - add specifications for
libs/math.move
- replace our own
compare.move
with Aptoscomparator.move
. WARN: it changes the expected order of coins in some places - internal: refactor lp value check functionality
v0.2.6
Changelog:
- Update to devnet 26-8-22.
v0.2.5
Сhangelog:
- Update to devnet 18-8-22