From 5203b2cddbc9bcfcf6c335ee7be777c8b58533e6 Mon Sep 17 00:00:00 2001 From: none00y Date: Fri, 20 Sep 2024 14:23:31 +0200 Subject: [PATCH 1/2] restore rounding in get_delta_x fix intermediate names in wasm --- sdk/contracts/invariant/invariant.json | 2 +- sdk/contracts/invariant/invariant.wasm | Bin 140652 -> 140943 bytes sdk/contracts/psp22/psp22.json | 2 +- sdk/contracts/psp22/psp22.wasm | Bin 15123 -> 15123 bytes sdk/package-lock.json | 12 ++++++------ sdk/package.json | 4 ++-- sdk/src/abis/invariant.ts | 2 +- sdk/src/abis/psp22.ts | 2 +- sdk/src/wasm/clamm.rs | 4 +++- sdk/src/wasm/types/sqrt_price.rs | 8 ++++---- src/contracts/storage/pool.rs | 2 +- src/math/clamm.rs | 23 ++++++++++++++--------- 12 files changed, 34 insertions(+), 27 deletions(-) diff --git a/sdk/contracts/invariant/invariant.json b/sdk/contracts/invariant/invariant.json index 4a3f9bca..2ffc8448 100644 --- a/sdk/contracts/invariant/invariant.json +++ b/sdk/contracts/invariant/invariant.json @@ -1,6 +1,6 @@ { "source": { - "hash": "0x6535e78f66cf026b69bf940c0439337244baa2e34a6e9059a4730e00f9783811", + "hash": "0x8dc9df28bd121964ee2a8bb81ea6945b0d5ac58dfa67869ea48dcabdba92dc07", "language": "ink! 5.0.0", "compiler": "rustc 1.77.0", "build_info": { diff --git a/sdk/contracts/invariant/invariant.wasm b/sdk/contracts/invariant/invariant.wasm index ddd1bf3a325ef276a9babfc01d1dcf965ef4a736..8270a6e2dbb7feb2e045a91ad11a7be34d21e216 100644 GIT binary patch delta 16936 zcmch9d3aPsws@cF+ev3>=qzMkx;p_91hSC?qChT+Ac91lad_?sxP*PtL1F9;1_&56 zSka0K5)=glF=GciIsqf1GKx;nC@}DI&|${R489jNqfw*&&Z)a}2ZH#$`M$>=xmBl5 z)!FNuy0@CsZ`&Vw*WPpu3$xHaE5Dv)B*YH@s|8>XARxhlBMgTkc^w<6*Z?eiKfB&u zx6c;k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nO#aIpJ6V?b!Q?Hhm6OF-=WW(yTf{#3BVW$u z^Snxon`8OqnFWLy9H%t1I5sj_Gcq_bIx=lG6J}4O zck@*>KaesNjW>*ZlLa+<8HFd$*K`#Fo5|q#gCPrKE`y^&mI5=#Xic!uTAP@F>ii9R zS%nn@1o$RDG~6}$zdrkBdp#>gM!wBe`d1ji@)LoahlXN|j5?El7=;4u^fTTmtqgRl s9s|hG4yG(6Mj-u#F-rg}I$6o&3{dTR6C*~Q%}S<=S%7XnX6efa06}n9R{#J2 diff --git a/sdk/package-lock.json b/sdk/package-lock.json index 3e035c3f..75e2cb9b 100644 --- a/sdk/package-lock.json +++ b/sdk/package-lock.json @@ -1,15 +1,15 @@ { "name": "@invariant-labs/a0-sdk", - "version": "0.2.24", + "version": "0.2.25", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@invariant-labs/a0-sdk", - "version": "0.2.24", + "version": "0.2.25", "license": "ISC", "dependencies": { - "@invariant-labs/a0-sdk-wasm": "0.1.26", + "@invariant-labs/a0-sdk-wasm": "file:src/wasm/pkg", "@polkadot/api": "^10.12.4", "@polkadot/api-contract": "^10.12.4", "@scio-labs/use-inkathon": "^0.6.3", @@ -524,9 +524,8 @@ "dev": true }, "node_modules/@invariant-labs/a0-sdk-wasm": { - "version": "0.1.26", - "resolved": "https://registry.npmjs.org/@invariant-labs/a0-sdk-wasm/-/a0-sdk-wasm-0.1.26.tgz", - "integrity": "sha512-Y2OjXpKzrqpBbkgUyVLQvDoNyOsa5AsadGRUJVOVsesZ8771W3CEURrJTrZyh8HtMZEeVUUtA30dU8+YppsTNw==" + "resolved": "src/wasm/pkg", + "link": true }, "node_modules/@isaacs/cliui": { "version": "8.0.2", @@ -5414,6 +5413,7 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "src/wasm/pkg": {}, "wasm/pkg": { "name": "invariant-a0-wasm", "version": "0.1.1", diff --git a/sdk/package.json b/sdk/package.json index 8d3b912b..8bdf301e 100644 --- a/sdk/package.json +++ b/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@invariant-labs/a0-sdk", - "version": "0.2.24", + "version": "0.2.25", "collaborators": [ "Invariant Labs" ], @@ -60,7 +60,7 @@ "test:update-position-seconds-per-liquidity": "mocha ./tests/update-position-seconds-per-liquidity.test.ts -g update-position-seconds-per-liquidity" }, "dependencies": { - "@invariant-labs/a0-sdk-wasm": "0.1.26", + "@invariant-labs/a0-sdk-wasm": "file:src/wasm/pkg", "@polkadot/api": "^10.12.4", "@polkadot/api-contract": "^10.12.4", "@scio-labs/use-inkathon": "^0.6.3", diff --git a/sdk/src/abis/invariant.ts b/sdk/src/abis/invariant.ts index 46f6f30f..8f5e6272 100644 --- a/sdk/src/abis/invariant.ts +++ b/sdk/src/abis/invariant.ts @@ -1,7 +1,7 @@ export const abi = ` { "source": { - "hash": "0x6535e78f66cf026b69bf940c0439337244baa2e34a6e9059a4730e00f9783811", + "hash": "0x8dc9df28bd121964ee2a8bb81ea6945b0d5ac58dfa67869ea48dcabdba92dc07", "language": "ink! 5.0.0", "compiler": "rustc 1.77.0", "build_info": { diff --git a/sdk/src/abis/psp22.ts b/sdk/src/abis/psp22.ts index 5e314bf1..2b74032f 100644 --- a/sdk/src/abis/psp22.ts +++ b/sdk/src/abis/psp22.ts @@ -1,7 +1,7 @@ export const abi = ` { "source": { - "hash": "0xb4082b7d4aedb8479925aa96a383ea722dc1a7e9b29ad5a4d5f95ad707db4e09", + "hash": "0xc286df19a483e4b4fcb2b2342b14e33cdb6dade49ebe0dea80f4fab27ae200ba", "language": "ink! 5.0.0", "compiler": "rustc 1.77.0", "build_info": { diff --git a/sdk/src/wasm/clamm.rs b/sdk/src/wasm/clamm.rs index 8acb1be7..7d3f07f2 100644 --- a/sdk/src/wasm/clamm.rs +++ b/sdk/src/wasm/clamm.rs @@ -179,7 +179,9 @@ pub fn get_delta_x( sqrt_price_a .cast::() .checked_mul(sqrt_price_b.here()) - .ok_or_else(|| err!(TrackableError::MUL))?, + .ok_or_else(|| err!(TrackableError::MUL))? + .checked_add(SqrtPrice::almost_one().here()) + .ok_or_else(|| err!(TrackableError::ADD))?, ), }) } diff --git a/sdk/src/wasm/types/sqrt_price.rs b/sdk/src/wasm/types/sqrt_price.rs index d75a4513..ec9c414f 100644 --- a/sdk/src/wasm/types/sqrt_price.rs +++ b/sdk/src/wasm/types/sqrt_price.rs @@ -30,7 +30,7 @@ impl SqrtPrice { let nominator = U448::uint_cast(nominator); let denominator = U448::uint_cast(denominator); - let intermediate_u320 = nominator + let intermediate_u448 = nominator .checked_mul(Self::one().cast::()) .ok_or_else(|| err!(TrackableError::MUL))? .checked_mul(Self::one().cast::()) @@ -38,7 +38,7 @@ impl SqrtPrice { .checked_div(denominator) .ok_or_else(|| err!(TrackableError::DIV))?; - let result = U256::uint_checked_cast(intermediate_u320) + let result = U256::uint_checked_cast(intermediate_u448) .map_err(|e| err!(&e))? .checked_div(U256::from(Self::one().get())) .ok_or_else(|| err!(TrackableError::DIV))? @@ -54,7 +54,7 @@ impl SqrtPrice { let nominator = U448::uint_cast(nominator); let denominator = U448::uint_cast(denominator); - let intermediate_u320 = nominator + let intermediate_u448 = nominator .checked_mul(Self::one().cast::()) .ok_or_else(|| err!(TrackableError::MUL))? .checked_mul(Self::one().cast::()) @@ -64,7 +64,7 @@ impl SqrtPrice { .checked_div(denominator) .ok_or_else(|| err!(TrackableError::DIV))?; - let result = U256::uint_checked_cast(intermediate_u320) + let result = U256::uint_checked_cast(intermediate_u448) .map_err(|e| err!(&e))? .checked_add(U256::from(Self::almost_one().get())) .ok_or_else(|| err!(TrackableError::ADD))? diff --git a/src/contracts/storage/pool.rs b/src/contracts/storage/pool.rs index fee3abb6..693e68b8 100644 --- a/src/contracts/storage/pool.rs +++ b/src/contracts/storage/pool.rs @@ -622,7 +622,7 @@ mod tests { .update_liquidity(liquidity_delta, liquidity_sign, upper_tick, lower_tick) .unwrap(); - assert_eq!(x, TokenAmount(4999999999999999999999995)); + assert_eq!(x, TokenAmount(2500187490625273443357761)); assert_eq!(y, TokenAmount(5)); assert_eq!(pool.liquidity, Liquidity::from_integer(5)) } diff --git a/src/math/clamm.rs b/src/math/clamm.rs index c62ad8bd..c4766533 100644 --- a/src/math/clamm.rs +++ b/src/math/clamm.rs @@ -164,7 +164,9 @@ pub fn get_delta_x( sqrt_price_a .cast::() .checked_mul(sqrt_price_b.here()) - .ok_or_else(|| err!(TrackableError::MUL))?, + .ok_or_else(|| err!(TrackableError::MUL))? + .checked_add(SqrtPrice::almost_one().here()) + .ok_or_else(|| err!(TrackableError::ADD))?, ), }) } @@ -1030,7 +1032,7 @@ mod tests { SwapResult { next_sqrt_price: SqrtPrice::new(2000000000000000000000000), amount_in: TokenAmount(340282366920938463463374607431769), - amount_out: TokenAmount(170141183460469231731687303715884), + amount_out: TokenAmount(170141183460469231731687218645292), fee_amount: TokenAmount(0) } ) @@ -1064,7 +1066,7 @@ mod tests { let expected_result = SwapResult { next_sqrt_price: SqrtPrice::new(1000018999999999999999999), amount_in: TokenAmount(6465364971497830805463835175), - amount_out: TokenAmount(6465242131897324756293472063), + amount_out: TokenAmount(6465242131897324756293465598), fee_amount: TokenAmount(340282366914473098491876776626304376280), }; @@ -1127,7 +1129,7 @@ mod tests { SwapResult { next_sqrt_price: SqrtPrice::new(MAX_SQRT_PRICE), amount_in: TokenAmount(340282366891153598040639304410374383019), - amount_out: TokenAmount(340282366920938463463374607431551802886), + amount_out: TokenAmount(340282366920938463463374267149184852163), fee_amount: TokenAmount(0) } ) @@ -1203,7 +1205,7 @@ mod tests { SwapResult { next_sqrt_price: SqrtPrice::new(MAX_SQRT_PRICE), amount_in: TokenAmount(79230632432451957492634392915), - amount_out: TokenAmount(79230632439387003072335686522), + amount_out: TokenAmount(79230632439387003072335607291), fee_amount: TokenAmount(0) } ); @@ -1548,7 +1550,7 @@ mod tests { let result = get_delta_x( SqrtPrice::from_integer(1u8), SqrtPrice::from_integer(2u8), - Liquidity::from_integer(2u8), + Liquidity::from_integer(2u8) + Liquidity::new(1), false, ) .unwrap(); @@ -1576,7 +1578,10 @@ mod tests { let result_down = get_delta_x(sqrt_price_a, sqrt_price_b, liquidity, false).unwrap(); let result_up = get_delta_x(sqrt_price_a, sqrt_price_b, liquidity, true).unwrap(); - assert_eq!(result_down, TokenAmount::from_decimal(liquidity)); + assert_eq!( + result_down, + TokenAmount::from_decimal(liquidity) - TokenAmount::new(1) + ); assert_eq!(result_up, TokenAmount::from_decimal(liquidity)); } // no more overflow after extending the type to U320 in intermediate operations @@ -1627,7 +1632,7 @@ mod tests { let result = get_delta_x(max_sqrt_price, min_sqrt_price, max_liquidity, false).unwrap(); - assert_eq!(result, TokenAmount(340282366920938463463374468856710103650)) + assert_eq!(result, TokenAmount(340282366920938463463374128574343152927)) } } { @@ -1661,7 +1666,7 @@ mod tests { false, ) .unwrap(); - assert_eq!(TokenAmount(340282366920938463463374607431768146213), result); + assert_eq!(TokenAmount(4294940505789835294958676759947697), result); } } // minimize denominator on minimize liquidity which fits into TokenAmount From 5c67c06b81fa39b2ed9dad4682c346d01574187d Mon Sep 17 00:00:00 2001 From: none00y Date: Fri, 20 Sep 2024 15:54:00 +0200 Subject: [PATCH 2/2] publish sdk and wasm --- sdk/package-lock.json | 7 +++++-- sdk/package.json | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sdk/package-lock.json b/sdk/package-lock.json index 75e2cb9b..bca1147b 100644 --- a/sdk/package-lock.json +++ b/sdk/package-lock.json @@ -9,7 +9,7 @@ "version": "0.2.25", "license": "ISC", "dependencies": { - "@invariant-labs/a0-sdk-wasm": "file:src/wasm/pkg", + "@invariant-labs/a0-sdk-wasm": "0.1.27", "@polkadot/api": "^10.12.4", "@polkadot/api-contract": "^10.12.4", "@scio-labs/use-inkathon": "^0.6.3", @@ -5413,7 +5413,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "src/wasm/pkg": {}, + "src/wasm/pkg": { + "name": "@invariant-labs/a0-sdk-wasm", + "version": "0.1.27" + }, "wasm/pkg": { "name": "invariant-a0-wasm", "version": "0.1.1", diff --git a/sdk/package.json b/sdk/package.json index 8bdf301e..f3905dd8 100644 --- a/sdk/package.json +++ b/sdk/package.json @@ -60,7 +60,7 @@ "test:update-position-seconds-per-liquidity": "mocha ./tests/update-position-seconds-per-liquidity.test.ts -g update-position-seconds-per-liquidity" }, "dependencies": { - "@invariant-labs/a0-sdk-wasm": "file:src/wasm/pkg", + "@invariant-labs/a0-sdk-wasm": "0.1.27", "@polkadot/api": "^10.12.4", "@polkadot/api-contract": "^10.12.4", "@scio-labs/use-inkathon": "^0.6.3",