tx · 9Yfvvc8FhGfKVBumoCfBPgTuC5bfbgnbnHtGL2PbsgVT 3MsryPHGVR5NWpGqXNw1LbqEYUx3Vk88yxN: -0.05000000 Waves 2021.08.10 20:20 [1652539] smart account 3MsryPHGVR5NWpGqXNw1LbqEYUx3Vk88yxN > SELF 0.00000000 Waves
{ "type": 13, "id": "9Yfvvc8FhGfKVBumoCfBPgTuC5bfbgnbnHtGL2PbsgVT", "fee": 5000000, "feeAssetId": null, "timestamp": 1628615994351, "version": 2, "chainId": 84, "sender": "3MsryPHGVR5NWpGqXNw1LbqEYUx3Vk88yxN", "senderPublicKey": "EkxY8bYYRAdDeo26yCeHLGSzDnPpuye9m2yxFRQGpXVy", "proofs": [ "5VRuNnJycPX5nEweJkFWchXHHbrh94F35hqUzadwDeb1dXyYb75gqa1f5E6R3S8niqqbeirnFZNQwg1jMtmP8w25" ], "script": "base64:AAIFAAAAAAAAACMIAhIAEgMKAQESABIAEgcKBQgICAgBEgMKAQESABIAEgASAAAAACUAAAAACmxQZGVjaW1hbHMAAAAAAAAAAAgAAAAAEWRlY2ltYWxzTXVsdFByaWNlCQAAaAAAAAIJAABoAAAAAgAAAAAAAAAAZAAAAAAAAAAD6AAAAAAAAAAD6AAAAAADU0VQAgAAAAJfXwAAAAAKUG9vbEFjdGl2ZQAAAAAAAAAAAQAAAAAPUG9vbFB1dERpc2FibGVkAAAAAAAAAAACAAAAABNQb29sTWF0Y2hlckRpc2FibGVkAAAAAAAAAAADAAAAAAxQb29sU2h1dGRvd24AAAAAAAAAAAQAAAAAEGZhY3RvcnlQdWJsaWNLZXkJAAJZAAAAAQIAAAArTWltUXRCeDdhemhTdEFIMlI1UVY3VWs4aFdFYm03cTg5NzkzZmsxajFtaAAAAAAOaWR4UG9vbEFkZHJlc3MAAAAAAAAAAAIAAAAADWlkeFBvb2xTdGF0dXMAAAAAAAAAAAMAAAAAEGlkeFBvb2xMUEFzc2V0SWQAAAAAAAAAAAQAAAAAEGlkeEFtb3VudEFzc2V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QXNzZXRJZAAAAAhkZWNpbWFscwQAAAAMcHJpY2VBc3NldElkCQACWQAAAAEFAAAADXByaWNlQXNzZXRTdHIEAAAAEnByaWNlQXNzZXREZWNpbWFscwgJAQAAAAV2YWx1ZQAAAAEJAAPsAAAAAQUAAAAMcHJpY2VBc3NldElkAAAACGRlY2ltYWxzBAAAABJscEFzc2V0SXNzdWVBY3Rpb24JAARCAAAABQUAAAALbHBBc3NldE5hbWUFAAAADGxwQXNzZXREZXNjcgAAAAAAAAAAAQAAAAAAAAAACAYEAAAACWxwQXNzZXRJZAkABDgAAAABBQAAABJscEFzc2V0SXNzdWVBY3Rpb24EAAAAEWxwQXNzZXRJZEFzU3RyaW5nCQACWAAAAAEFAAAACWxwQXNzZXRJZAkABRQAAAACCQAETAAAAAIFAAAAEmxwQXNzZXRJc3N1ZUFjdGlvbgkABEwAAAACCQEAAAAEQnVybgAAAAIFAAAACWxwQXNzZXRJZAAAAAAAAAAAAQUAAAADbmlsBQAAABFscEFzc2V0SWRBc1N0cmluZwAAAAFpAQAAAAZtYW5hZ2UAAAABAAAABnN0YXR1cwUAAAADbmlsAAAAAWkBAAAADGVzdGltYXRlZFB1dAAAAAAFAAAAA25pbAAAAAFpAQAAAAVzdGF0cwAAAAAFAAAAA25pbAAAAAFpAQAAAAxlc3RpbWF0ZWRHZXQAAAAABQAAAANuaWwAAAABaQEAAAAFcHJpY2UAAAAABQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleZHYlrE=", "height": 1652539, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AyF2xsLBtVrgtbT1LkiXL3CT2iKARigBMJPCUFnjp9UL Next: EzukvWQocGk3AqtUzUwJHcxuXX68zwQXJ9Hqst1gAjed Diff:
Old | New | Differences | |
---|---|---|---|
88 | 88 | ||
89 | 89 | func getPoolLiquidityByUser (amountAssetInternalId,priceAssetInternalId,userAddress) = { | |
90 | 90 | let currentPoolLiquidityValue = getString(keyPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, userAddress)) | |
91 | - | if (!(isDefined(currentPoolLiquidityValue))) | |
92 | - | then ["", "0", "0", "0"] | |
93 | - | else { | |
94 | - | let currentPoolLiquidity = split(value(currentPoolLiquidityValue), SEP) | |
95 | - | currentPoolLiquidity | |
96 | - | } | |
91 | + | if (true) | |
92 | + | then throw(value(currentPoolLiquidityValue)) | |
93 | + | else if (!(isDefined(currentPoolLiquidityValue))) | |
94 | + | then ["", "0", "0", "0"] | |
95 | + | else { | |
96 | + | let currentPoolLiquidity = split(value(currentPoolLiquidityValue), SEP) | |
97 | + | currentPoolLiquidity | |
98 | + | } | |
97 | 99 | } | |
98 | 100 | ||
99 | 101 | ||
148 | 150 | let poolPriceAssetBalance = parseIntValue(poolLiquidityDataList[idxPoolPriceAssetAmt]) | |
149 | 151 | let poolLPBalance = parseIntValue(poolLiquidityDataList[idxPoolLPAssetAmt]) | |
150 | 152 | let userLiquidityDataList = getPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, toString(i.caller)) | |
151 | - | if (true) | |
152 | - | then throw(toString(size(userLiquidityDataList))) | |
153 | + | let userAmountAssetBalance = parseIntValue(userLiquidityDataList[idxPoolAmountAssetAmt]) | |
154 | + | let userPriceAssetBalance = parseIntValue(userLiquidityDataList[idxPoolPriceAssetAmt]) | |
155 | + | let userLPBalance = parseIntValue(userLiquidityDataList[idxPoolLPAssetAmt]) | |
156 | + | if (if ((amountAssetId != toBase58String(inAmountAssetId))) | |
157 | + | then true | |
158 | + | else (priceAssetId != toBase58String(inPriceAssetId))) | |
159 | + | then throw("Invalid amount or price asset passed.") | |
153 | 160 | else { | |
154 | - | let userAmountAssetBalance = parseIntValue(userLiquidityDataList[idxPoolAmountAssetAmt]) | |
155 | - | let userPriceAssetBalance = parseIntValue(userLiquidityDataList[idxPoolPriceAssetAmt]) | |
156 | - | let userLPBalance = parseIntValue(userLiquidityDataList[idxPoolLPAssetAmt]) | |
157 | - | if (if ((amountAssetId != toBase58String(inAmountAssetId))) | |
158 | - | then true | |
159 | - | else (priceAssetId != toBase58String(inPriceAssetId))) | |
160 | - | then throw("Invalid amount or price asset passed.") | |
161 | + | let decimalsMult4AmountAsset = pow(10, 0, (lPdecimals - amoutAssetDecimals), 0, 0, DOWN) | |
162 | + | let decimalsMult4PriceAsset = pow(10, 0, (lPdecimals - priceAssetDecimals), 0, 0, DOWN) | |
163 | + | let inAmountAssetAmtCalculated = (inAmountAssetAmt * decimalsMult4AmountAsset) | |
164 | + | let inPriceAssetAmtCalculated = (inPriceAssetAmt * decimalsMult4PriceAsset) | |
165 | + | let expectedUserPrice = fraction(inPriceAssetAmtCalculated, decimalsMultPrice, inAmountAssetAmtCalculated) | |
166 | + | let amountAssetPoolLockedAmt = (poolAmountAssetBalance * decimalsMult4AmountAsset) | |
167 | + | let priceAssetPoolLockedAmt = (poolPriceAssetBalance * decimalsMult4PriceAsset) | |
168 | + | let currentPoolPrice = fraction(priceAssetPoolLockedAmt, decimalsMultPrice, amountAssetPoolLockedAmt) | |
169 | + | if ((size(poolLiquidityDataList) == 0)) | |
170 | + | then { | |
171 | + | let partA = pow(inAmountAssetAmtCalculated, 0, 0, 50, 1, DOWN) | |
172 | + | let partB = pow(inPriceAssetAmtCalculated, 0, 0, 50, 1, DOWN) | |
173 | + | let lpAssetsToReturn = (partA * partB) | |
174 | + | [StringEntry(keyPriceLast(), ("%s__" + toString(currentPoolPrice))), StringEntry(keyPriceHistory(height, lastBlock.timestamp), ("%s__" + toString(currentPoolPrice))), StringEntry(keyPutActionByUser(toString(i.caller), toBase58String(i.transactionId)), dataPutActionInfo(inAmountAssetAmt, inPriceAssetAmt, lpAssetsToReturn, currentPoolPrice, slippageTolerance, height, lastBlock.timestamp)), StringEntry(keyPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, toString(i.caller)), dataPoolLiquidity(inAmountAssetAmt, inPriceAssetAmt, lpAssetsToReturn)), StringEntry(keyPoolLiquidity(amountAssetInternalId, priceAssetInternalId), dataPoolLiquidity(inAmountAssetAmt, inPriceAssetAmt, lpAssetsToReturn)), Reissue(lpAssetId, lpAssetsToReturn, true), ScriptTransfer(i.caller, lpAssetsToReturn, lpAssetId)] | |
175 | + | } | |
161 | 176 | else { | |
162 | - | let decimalsMult4AmountAsset = pow(10, 0, (lPdecimals - amoutAssetDecimals), 0, 0, DOWN) | |
163 | - | let decimalsMult4PriceAsset = pow(10, 0, (lPdecimals - priceAssetDecimals), 0, 0, DOWN) | |
164 | - | let inAmountAssetAmtCalculated = (inAmountAssetAmt * decimalsMult4AmountAsset) | |
165 | - | let inPriceAssetAmtCalculated = (inPriceAssetAmt * decimalsMult4PriceAsset) | |
166 | - | let expectedUserPrice = fraction(inPriceAssetAmtCalculated, decimalsMultPrice, inAmountAssetAmtCalculated) | |
167 | - | let amountAssetPoolLockedAmt = (poolAmountAssetBalance * decimalsMult4AmountAsset) | |
168 | - | let priceAssetPoolLockedAmt = (poolPriceAssetBalance * decimalsMult4PriceAsset) | |
169 | - | let currentPoolPrice = fraction(priceAssetPoolLockedAmt, decimalsMultPrice, amountAssetPoolLockedAmt) | |
170 | - | if ((size(poolLiquidityDataList) == 0)) | |
171 | - | then { | |
172 | - | let partA = pow(inAmountAssetAmtCalculated, 0, 0, 50, 1, DOWN) | |
173 | - | let partB = pow(inPriceAssetAmtCalculated, 0, 0, 50, 1, DOWN) | |
174 | - | let lpAssetsToReturn = (partA * partB) | |
175 | - | [StringEntry(keyPriceLast(), ("%s__" + toString(currentPoolPrice))), StringEntry(keyPriceHistory(height, lastBlock.timestamp), ("%s__" + toString(currentPoolPrice))), StringEntry(keyPutActionByUser(toString(i.caller), toBase58String(i.transactionId)), dataPutActionInfo(inAmountAssetAmt, inPriceAssetAmt, lpAssetsToReturn, currentPoolPrice, slippageTolerance, height, lastBlock.timestamp)), StringEntry(keyPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, toString(i.caller)), dataPoolLiquidity(inAmountAssetAmt, inPriceAssetAmt, lpAssetsToReturn)), StringEntry(keyPoolLiquidity(amountAssetInternalId, priceAssetInternalId), dataPoolLiquidity(inAmountAssetAmt, inPriceAssetAmt, lpAssetsToReturn)), Reissue(lpAssetId, lpAssetsToReturn, true), ScriptTransfer(i.caller, lpAssetsToReturn, lpAssetId)] | |
176 | - | } | |
177 | + | let slippage = fraction(currentPoolPrice, 100, expectedUserPrice) | |
178 | + | if ((slippage > slippageTolerance)) | |
179 | + | then throw(((("Price slippage " + toString(slippage)) + " exceeded the passed limit of ") + toString(slippageTolerance))) | |
177 | 180 | else { | |
178 | - | let slippage = fraction(currentPoolPrice, 100, expectedUserPrice) | |
179 | - | if ((slippage > slippageTolerance)) | |
180 | - | then throw(((("Price slippage " + toString(slippage)) + " exceeded the passed limit of ") + toString(slippageTolerance))) | |
181 | - | else { | |
182 | - | let lpAmtByAmountAsset = fraction(poolLPBalance, inAmountAssetAmtCalculated, amountAssetPoolLockedAmt) | |
183 | - | let lpAmtByPriceAsset = fraction(poolLPBalance, inPriceAssetAmtCalculated, priceAssetPoolLockedAmt) | |
184 | - | let totalLp4User = if ((lpAmtByPriceAsset > lpAmtByAmountAsset)) | |
185 | - | then lpAmtByAmountAsset | |
186 | - | else lpAmtByPriceAsset | |
181 | + | let lpAmtByAmountAsset = fraction(poolLPBalance, inAmountAssetAmtCalculated, amountAssetPoolLockedAmt) | |
182 | + | let lpAmtByPriceAsset = fraction(poolLPBalance, inPriceAssetAmtCalculated, priceAssetPoolLockedAmt) | |
183 | + | let totalLp4User = if ((lpAmtByPriceAsset > lpAmtByAmountAsset)) | |
184 | + | then lpAmtByAmountAsset | |
185 | + | else lpAmtByPriceAsset | |
187 | 186 | [StringEntry(keyPriceLast(), ("%s__" + toString(currentPoolPrice))), StringEntry(keyPriceHistory(height, lastBlock.timestamp), ("%s__" + toString(currentPoolPrice))), StringEntry(keyPutActionByUser(toString(i.caller), toBase58String(i.transactionId)), dataPutActionInfo(inAmountAssetAmt, inPriceAssetAmt, totalLp4User, currentPoolPrice, slippageTolerance, height, lastBlock.timestamp)), StringEntry(keyPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, toString(i.caller)), dataPoolLiquidity((userAmountAssetBalance + inAmountAssetAmt), (userPriceAssetBalance + inPriceAssetAmt), (userLPBalance + totalLp4User))), StringEntry(keyPoolLiquidity(amountAssetInternalId, priceAssetInternalId), dataPoolLiquidity((poolAmountAssetBalance + inAmountAssetAmt), (poolPriceAssetBalance + inPriceAssetAmt), (poolLPBalance + totalLp4User))), Reissue(lpAssetId, totalLp4User, true), ScriptTransfer(i.caller, totalLp4User, lpAssetId)] | |
188 | - | } | |
189 | 187 | } | |
190 | 188 | } | |
191 | 189 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let lPdecimals = 8 | |
5 | 5 | ||
6 | 6 | let decimalsMultPrice = ((100 * 1000) * 1000) | |
7 | 7 | ||
8 | 8 | let SEP = "__" | |
9 | 9 | ||
10 | 10 | let PoolActive = 1 | |
11 | 11 | ||
12 | 12 | let PoolPutDisabled = 2 | |
13 | 13 | ||
14 | 14 | let PoolMatcherDisabled = 3 | |
15 | 15 | ||
16 | 16 | let PoolShutdown = 4 | |
17 | 17 | ||
18 | 18 | let factoryPublicKey = fromBase58String("MimQtBx7azhStAH2R5QV7Uk8hWEbm7q89793fk1j1mh") | |
19 | 19 | ||
20 | 20 | let idxPoolAddress = 2 | |
21 | 21 | ||
22 | 22 | let idxPoolStatus = 3 | |
23 | 23 | ||
24 | 24 | let idxPoolLPAssetId = 4 | |
25 | 25 | ||
26 | 26 | let idxAmountAssetId = 5 | |
27 | 27 | ||
28 | 28 | let idxPriceAssetId = 6 | |
29 | 29 | ||
30 | 30 | let idxAmountAssetDecimals = 7 | |
31 | 31 | ||
32 | 32 | let idxPriceAssetDecimals = 8 | |
33 | 33 | ||
34 | 34 | let idxAmountAssetInternalId = 9 | |
35 | 35 | ||
36 | 36 | let idxPriceAssetInternalId = 10 | |
37 | 37 | ||
38 | 38 | let idxPoolWeight = 11 | |
39 | 39 | ||
40 | 40 | let idxPoolAmountAssetAmt = 2 | |
41 | 41 | ||
42 | 42 | let idxPoolPriceAssetAmt = 3 | |
43 | 43 | ||
44 | 44 | let idxPoolLPAssetAmt = 4 | |
45 | 45 | ||
46 | 46 | func keyPriceLast () = "%s%s__price__last" | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func keyPriceHistory (h,timestamp) = makeString(["%s%s%d%d__price__history", toString(h), toString(timestamp)], SEP) | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func keyPoolLiquidity (internalAmountAsset,internalPriceAsset) = (((("%d%d%s__" + internalAmountAsset) + "__") + internalPriceAsset) + "__locked") | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func keyPoolLiquidityByUser (internalAmountAsset,internalPriceAsset,userAddress) = (((((("%d%d%s%s__" + internalAmountAsset) + "__") + internalPriceAsset) + "__") + userAddress) + "__locked") | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func keyPutActionByUser (userAddress,txId) = ((("%s%s%s__P__" + userAddress) + "__") + txId) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func keyGetActionByUser (userAddress,txId) = ((("%s%s%s__G__" + userAddress) + "__") + txId) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset") | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func keyPoolConfig (amountAssetInternal,priceAssetInternal) = (((("%s%d%d%s__" + amountAssetInternal) + "__") + priceAssetInternal) + "__config") | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func getPoolConfig () = { | |
71 | 71 | let factoryAddress = addressFromPublicKey(factoryPublicKey) | |
72 | 72 | let currentPoolAssets = split(valueOrErrorMessage(getString(factoryAddress, keyMappingPoolContractAddressToPoolAssets(toString(this))), "No factory config found for pool address."), SEP) | |
73 | 73 | let currentPoolConfig = split(valueOrErrorMessage(getString(factoryAddress, keyPoolConfig(currentPoolAssets[2], currentPoolAssets[3])), "No factory config found for pool assets."), SEP) | |
74 | 74 | currentPoolConfig | |
75 | 75 | } | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func getPoolLiquidity (amountAssetInternalId,priceAssetInternalId) = { | |
79 | 79 | let currentPoolLiquidityValue = getString(keyPoolLiquidity(amountAssetInternalId, priceAssetInternalId)) | |
80 | 80 | if (!(isDefined(currentPoolLiquidityValue))) | |
81 | 81 | then nil | |
82 | 82 | else { | |
83 | 83 | let currentPoolLiquidity = split(value(currentPoolLiquidityValue), SEP) | |
84 | 84 | currentPoolLiquidity | |
85 | 85 | } | |
86 | 86 | } | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func getPoolLiquidityByUser (amountAssetInternalId,priceAssetInternalId,userAddress) = { | |
90 | 90 | let currentPoolLiquidityValue = getString(keyPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, userAddress)) | |
91 | - | if (!(isDefined(currentPoolLiquidityValue))) | |
92 | - | then ["", "0", "0", "0"] | |
93 | - | else { | |
94 | - | let currentPoolLiquidity = split(value(currentPoolLiquidityValue), SEP) | |
95 | - | currentPoolLiquidity | |
96 | - | } | |
91 | + | if (true) | |
92 | + | then throw(value(currentPoolLiquidityValue)) | |
93 | + | else if (!(isDefined(currentPoolLiquidityValue))) | |
94 | + | then ["", "0", "0", "0"] | |
95 | + | else { | |
96 | + | let currentPoolLiquidity = split(value(currentPoolLiquidityValue), SEP) | |
97 | + | currentPoolLiquidity | |
98 | + | } | |
97 | 99 | } | |
98 | 100 | ||
99 | 101 | ||
100 | 102 | func dataPoolLiquidity (amountAssetLocked,priceAssetLocked,lpTokenLocked) = makeString(["%d%d%d", toString(amountAssetLocked), toString(priceAssetLocked), toString(lpTokenLocked)], SEP) | |
101 | 103 | ||
102 | 104 | ||
103 | 105 | func dataPutActionInfo (inAmountAssetAmt,inPriceAssetAmt,outLpAmt,price,slippageTolerancePassedByUser,txHeight,txTimestamp) = makeString(["%d%d%d%d%d%d%d", toString(inAmountAssetAmt), toString(inPriceAssetAmt), toString(outLpAmt), toString(price), toString(slippageTolerancePassedByUser), toString(txHeight), toString(txTimestamp)], SEP) | |
104 | 106 | ||
105 | 107 | ||
106 | 108 | func dataGetActionInfo (outAmountAssetAmt,outPriceAssetAmt,inLpAmt,price,txHeight,txTimestamp) = makeString(["%d%d%d%d%d%d", toString(outAmountAssetAmt), toString(outPriceAssetAmt), toString(inLpAmt), toString(price), toString(txHeight), toString(txTimestamp)], SEP) | |
107 | 109 | ||
108 | 110 | ||
109 | 111 | func dataPoolLiquidityByUser (amountAssetLocked,priceAssetLocked,lpTokenLocked,userAddress) = makeString(["%d%d%d", toString(amountAssetLocked), toString(priceAssetLocked), toString(lpTokenLocked)], SEP) | |
110 | 112 | ||
111 | 113 | ||
112 | 114 | func calculatePrice (amountAssetAmt,amountAssetDecimals,priceAssetAmt,priceAssetDecimals) = { | |
113 | 115 | let decimalsMult4AmountAsset = pow(10, 0, (lPdecimals - amountAssetDecimals), 0, 0, DOWN) | |
114 | 116 | let decimalsMult4PriceAsset = pow(10, 0, (lPdecimals - priceAssetDecimals), 0, 0, DOWN) | |
115 | 117 | let inAmountAssetAmtFinal = (amountAssetAmt * decimalsMult4AmountAsset) | |
116 | 118 | let inPriceAmtFinal = (priceAssetAmt * decimalsMult4PriceAsset) | |
117 | 119 | let price = fraction(inPriceAmtFinal, decimalsMultPrice, inAmountAssetAmtFinal) | |
118 | 120 | price | |
119 | 121 | } | |
120 | 122 | ||
121 | 123 | ||
122 | 124 | @Callable(i) | |
123 | 125 | func getScriptHash () = { | |
124 | 126 | let hash = toBase64String(value(scriptHash(this))) | |
125 | 127 | throw(hash) | |
126 | 128 | } | |
127 | 129 | ||
128 | 130 | ||
129 | 131 | ||
130 | 132 | @Callable(i) | |
131 | 133 | func put (slippageTolerance) = { | |
132 | 134 | let poolConfigDataList = getPoolConfig() | |
133 | 135 | let lpAssetId = fromBase58String(poolConfigDataList[idxPoolLPAssetId]) | |
134 | 136 | let amountAssetId = poolConfigDataList[idxAmountAssetId] | |
135 | 137 | let priceAssetId = poolConfigDataList[idxPriceAssetId] | |
136 | 138 | let amountAssetInternalId = poolConfigDataList[idxAmountAssetInternalId] | |
137 | 139 | let priceAssetInternalId = poolConfigDataList[idxPriceAssetInternalId] | |
138 | 140 | let amoutAssetDecimals = parseIntValue(poolConfigDataList[idxAmountAssetDecimals]) | |
139 | 141 | let priceAssetDecimals = parseIntValue(poolConfigDataList[idxPriceAssetDecimals]) | |
140 | 142 | let pmtAmountAsset = value(i.payments[0]) | |
141 | 143 | let inAmountAssetAmt = pmtAmountAsset.amount | |
142 | 144 | let inAmountAssetId = value(pmtAmountAsset.assetId) | |
143 | 145 | let pmtPriceAsset = value(i.payments[1]) | |
144 | 146 | let inPriceAssetAmt = pmtPriceAsset.amount | |
145 | 147 | let inPriceAssetId = value(pmtPriceAsset.assetId) | |
146 | 148 | let poolLiquidityDataList = getPoolLiquidity(amountAssetInternalId, priceAssetInternalId) | |
147 | 149 | let poolAmountAssetBalance = parseIntValue(poolLiquidityDataList[idxPoolAmountAssetAmt]) | |
148 | 150 | let poolPriceAssetBalance = parseIntValue(poolLiquidityDataList[idxPoolPriceAssetAmt]) | |
149 | 151 | let poolLPBalance = parseIntValue(poolLiquidityDataList[idxPoolLPAssetAmt]) | |
150 | 152 | let userLiquidityDataList = getPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, toString(i.caller)) | |
151 | - | if (true) | |
152 | - | then throw(toString(size(userLiquidityDataList))) | |
153 | + | let userAmountAssetBalance = parseIntValue(userLiquidityDataList[idxPoolAmountAssetAmt]) | |
154 | + | let userPriceAssetBalance = parseIntValue(userLiquidityDataList[idxPoolPriceAssetAmt]) | |
155 | + | let userLPBalance = parseIntValue(userLiquidityDataList[idxPoolLPAssetAmt]) | |
156 | + | if (if ((amountAssetId != toBase58String(inAmountAssetId))) | |
157 | + | then true | |
158 | + | else (priceAssetId != toBase58String(inPriceAssetId))) | |
159 | + | then throw("Invalid amount or price asset passed.") | |
153 | 160 | else { | |
154 | - | let userAmountAssetBalance = parseIntValue(userLiquidityDataList[idxPoolAmountAssetAmt]) | |
155 | - | let userPriceAssetBalance = parseIntValue(userLiquidityDataList[idxPoolPriceAssetAmt]) | |
156 | - | let userLPBalance = parseIntValue(userLiquidityDataList[idxPoolLPAssetAmt]) | |
157 | - | if (if ((amountAssetId != toBase58String(inAmountAssetId))) | |
158 | - | then true | |
159 | - | else (priceAssetId != toBase58String(inPriceAssetId))) | |
160 | - | then throw("Invalid amount or price asset passed.") | |
161 | + | let decimalsMult4AmountAsset = pow(10, 0, (lPdecimals - amoutAssetDecimals), 0, 0, DOWN) | |
162 | + | let decimalsMult4PriceAsset = pow(10, 0, (lPdecimals - priceAssetDecimals), 0, 0, DOWN) | |
163 | + | let inAmountAssetAmtCalculated = (inAmountAssetAmt * decimalsMult4AmountAsset) | |
164 | + | let inPriceAssetAmtCalculated = (inPriceAssetAmt * decimalsMult4PriceAsset) | |
165 | + | let expectedUserPrice = fraction(inPriceAssetAmtCalculated, decimalsMultPrice, inAmountAssetAmtCalculated) | |
166 | + | let amountAssetPoolLockedAmt = (poolAmountAssetBalance * decimalsMult4AmountAsset) | |
167 | + | let priceAssetPoolLockedAmt = (poolPriceAssetBalance * decimalsMult4PriceAsset) | |
168 | + | let currentPoolPrice = fraction(priceAssetPoolLockedAmt, decimalsMultPrice, amountAssetPoolLockedAmt) | |
169 | + | if ((size(poolLiquidityDataList) == 0)) | |
170 | + | then { | |
171 | + | let partA = pow(inAmountAssetAmtCalculated, 0, 0, 50, 1, DOWN) | |
172 | + | let partB = pow(inPriceAssetAmtCalculated, 0, 0, 50, 1, DOWN) | |
173 | + | let lpAssetsToReturn = (partA * partB) | |
174 | + | [StringEntry(keyPriceLast(), ("%s__" + toString(currentPoolPrice))), StringEntry(keyPriceHistory(height, lastBlock.timestamp), ("%s__" + toString(currentPoolPrice))), StringEntry(keyPutActionByUser(toString(i.caller), toBase58String(i.transactionId)), dataPutActionInfo(inAmountAssetAmt, inPriceAssetAmt, lpAssetsToReturn, currentPoolPrice, slippageTolerance, height, lastBlock.timestamp)), StringEntry(keyPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, toString(i.caller)), dataPoolLiquidity(inAmountAssetAmt, inPriceAssetAmt, lpAssetsToReturn)), StringEntry(keyPoolLiquidity(amountAssetInternalId, priceAssetInternalId), dataPoolLiquidity(inAmountAssetAmt, inPriceAssetAmt, lpAssetsToReturn)), Reissue(lpAssetId, lpAssetsToReturn, true), ScriptTransfer(i.caller, lpAssetsToReturn, lpAssetId)] | |
175 | + | } | |
161 | 176 | else { | |
162 | - | let decimalsMult4AmountAsset = pow(10, 0, (lPdecimals - amoutAssetDecimals), 0, 0, DOWN) | |
163 | - | let decimalsMult4PriceAsset = pow(10, 0, (lPdecimals - priceAssetDecimals), 0, 0, DOWN) | |
164 | - | let inAmountAssetAmtCalculated = (inAmountAssetAmt * decimalsMult4AmountAsset) | |
165 | - | let inPriceAssetAmtCalculated = (inPriceAssetAmt * decimalsMult4PriceAsset) | |
166 | - | let expectedUserPrice = fraction(inPriceAssetAmtCalculated, decimalsMultPrice, inAmountAssetAmtCalculated) | |
167 | - | let amountAssetPoolLockedAmt = (poolAmountAssetBalance * decimalsMult4AmountAsset) | |
168 | - | let priceAssetPoolLockedAmt = (poolPriceAssetBalance * decimalsMult4PriceAsset) | |
169 | - | let currentPoolPrice = fraction(priceAssetPoolLockedAmt, decimalsMultPrice, amountAssetPoolLockedAmt) | |
170 | - | if ((size(poolLiquidityDataList) == 0)) | |
171 | - | then { | |
172 | - | let partA = pow(inAmountAssetAmtCalculated, 0, 0, 50, 1, DOWN) | |
173 | - | let partB = pow(inPriceAssetAmtCalculated, 0, 0, 50, 1, DOWN) | |
174 | - | let lpAssetsToReturn = (partA * partB) | |
175 | - | [StringEntry(keyPriceLast(), ("%s__" + toString(currentPoolPrice))), StringEntry(keyPriceHistory(height, lastBlock.timestamp), ("%s__" + toString(currentPoolPrice))), StringEntry(keyPutActionByUser(toString(i.caller), toBase58String(i.transactionId)), dataPutActionInfo(inAmountAssetAmt, inPriceAssetAmt, lpAssetsToReturn, currentPoolPrice, slippageTolerance, height, lastBlock.timestamp)), StringEntry(keyPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, toString(i.caller)), dataPoolLiquidity(inAmountAssetAmt, inPriceAssetAmt, lpAssetsToReturn)), StringEntry(keyPoolLiquidity(amountAssetInternalId, priceAssetInternalId), dataPoolLiquidity(inAmountAssetAmt, inPriceAssetAmt, lpAssetsToReturn)), Reissue(lpAssetId, lpAssetsToReturn, true), ScriptTransfer(i.caller, lpAssetsToReturn, lpAssetId)] | |
176 | - | } | |
177 | + | let slippage = fraction(currentPoolPrice, 100, expectedUserPrice) | |
178 | + | if ((slippage > slippageTolerance)) | |
179 | + | then throw(((("Price slippage " + toString(slippage)) + " exceeded the passed limit of ") + toString(slippageTolerance))) | |
177 | 180 | else { | |
178 | - | let slippage = fraction(currentPoolPrice, 100, expectedUserPrice) | |
179 | - | if ((slippage > slippageTolerance)) | |
180 | - | then throw(((("Price slippage " + toString(slippage)) + " exceeded the passed limit of ") + toString(slippageTolerance))) | |
181 | - | else { | |
182 | - | let lpAmtByAmountAsset = fraction(poolLPBalance, inAmountAssetAmtCalculated, amountAssetPoolLockedAmt) | |
183 | - | let lpAmtByPriceAsset = fraction(poolLPBalance, inPriceAssetAmtCalculated, priceAssetPoolLockedAmt) | |
184 | - | let totalLp4User = if ((lpAmtByPriceAsset > lpAmtByAmountAsset)) | |
185 | - | then lpAmtByAmountAsset | |
186 | - | else lpAmtByPriceAsset | |
181 | + | let lpAmtByAmountAsset = fraction(poolLPBalance, inAmountAssetAmtCalculated, amountAssetPoolLockedAmt) | |
182 | + | let lpAmtByPriceAsset = fraction(poolLPBalance, inPriceAssetAmtCalculated, priceAssetPoolLockedAmt) | |
183 | + | let totalLp4User = if ((lpAmtByPriceAsset > lpAmtByAmountAsset)) | |
184 | + | then lpAmtByAmountAsset | |
185 | + | else lpAmtByPriceAsset | |
187 | 186 | [StringEntry(keyPriceLast(), ("%s__" + toString(currentPoolPrice))), StringEntry(keyPriceHistory(height, lastBlock.timestamp), ("%s__" + toString(currentPoolPrice))), StringEntry(keyPutActionByUser(toString(i.caller), toBase58String(i.transactionId)), dataPutActionInfo(inAmountAssetAmt, inPriceAssetAmt, totalLp4User, currentPoolPrice, slippageTolerance, height, lastBlock.timestamp)), StringEntry(keyPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, toString(i.caller)), dataPoolLiquidity((userAmountAssetBalance + inAmountAssetAmt), (userPriceAssetBalance + inPriceAssetAmt), (userLPBalance + totalLp4User))), StringEntry(keyPoolLiquidity(amountAssetInternalId, priceAssetInternalId), dataPoolLiquidity((poolAmountAssetBalance + inAmountAssetAmt), (poolPriceAssetBalance + inPriceAssetAmt), (poolLPBalance + totalLp4User))), Reissue(lpAssetId, totalLp4User, true), ScriptTransfer(i.caller, totalLp4User, lpAssetId)] | |
188 | - | } | |
189 | 187 | } | |
190 | 188 | } | |
191 | 189 | } | |
192 | 190 | } | |
193 | 191 | ||
194 | 192 | ||
195 | 193 | ||
196 | 194 | @Callable(i) | |
197 | 195 | func get () = { | |
198 | 196 | let poolConfigList = getPoolConfig() | |
199 | 197 | let lpAssetId = poolConfigList[idxPoolLPAssetId] | |
200 | 198 | let amountAssetId = poolConfigList[idxAmountAssetId] | |
201 | 199 | let priceAssetId = poolConfigList[idxPriceAssetId] | |
202 | 200 | let amountAssetInternalId = poolConfigList[idxAmountAssetInternalId] | |
203 | 201 | let priceAssetInternalId = poolConfigList[idxPriceAssetInternalId] | |
204 | 202 | let userLiquidityList = getPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, toString(i.caller)) | |
205 | 203 | let userLPBalance = parseIntValue(userLiquidityList[idxPoolLPAssetAmt]) | |
206 | 204 | let userAmountAssetBalance = parseIntValue(userLiquidityList[idxPoolAmountAssetAmt]) | |
207 | 205 | let userPriceAssetBalance = parseIntValue(userLiquidityList[idxPoolPriceAssetAmt]) | |
208 | 206 | let poolLiquidityList = getPoolLiquidity(amountAssetInternalId, priceAssetInternalId) | |
209 | 207 | let poolLPBalance = parseIntValue(poolLiquidityList[idxPoolLPAssetAmt]) | |
210 | 208 | let poolAmountAssetBalance = parseIntValue(poolLiquidityList[idxPoolAmountAssetAmt]) | |
211 | 209 | let poolPriceAssetBalance = parseIntValue(poolLiquidityList[idxPoolPriceAssetAmt]) | |
212 | 210 | let pmtAmountAsset = value(i.payments[0]) | |
213 | 211 | let pmtAssetId = value(pmtAmountAsset.assetId) | |
214 | 212 | let pmtAssetAmount = pmtAmountAsset.amount | |
215 | 213 | if ((lpAssetId != toBase58String(pmtAssetId))) | |
216 | 214 | then throw("Invalid asset passed.") | |
217 | 215 | else if ((pmtAssetAmount > userLPBalance)) | |
218 | 216 | then throw("Invalid amount passed. Amount less than available.") | |
219 | 217 | else { | |
220 | 218 | let outAmountAssetAmt = fraction(poolAmountAssetBalance, pmtAssetAmount, poolLPBalance) | |
221 | 219 | let outPriceAssetAmt = fraction(poolPriceAssetBalance, pmtAssetAmount, poolLPBalance) | |
222 | 220 | let currentPrice = fraction(poolPriceAssetBalance, decimalsMultPrice, poolAmountAssetBalance) | |
223 | 221 | [Burn(pmtAssetId, pmtAssetAmount), ScriptTransfer(i.caller, outAmountAssetAmt, fromBase58String(amountAssetId)), ScriptTransfer(i.caller, outPriceAssetAmt, fromBase58String(priceAssetId)), StringEntry(keyPoolLiquidityByUser(amountAssetInternalId, priceAssetInternalId, toString(i.caller)), dataPoolLiquidity((userAmountAssetBalance - outAmountAssetAmt), (userPriceAssetBalance - outPriceAssetAmt), (userLPBalance - pmtAssetAmount))), StringEntry(keyPoolLiquidity(amountAssetInternalId, priceAssetInternalId), dataPoolLiquidity((poolAmountAssetBalance - outAmountAssetAmt), (poolPriceAssetBalance - outPriceAssetAmt), (poolLPBalance - pmtAssetAmount))), StringEntry(keyGetActionByUser(toString(i.caller), toBase58String(i.transactionId)), dataGetActionInfo(outAmountAssetAmt, outPriceAssetAmt, pmtAssetAmount, currentPrice, height, lastBlock.timestamp)), StringEntry(keyPriceLast(), ("%s__" + toString(currentPrice))), StringEntry(keyPriceHistory(height, lastBlock.timestamp), ("%s__" + toString(currentPrice)))] | |
224 | 222 | } | |
225 | 223 | } | |
226 | 224 | ||
227 | 225 | ||
228 | 226 | ||
229 | 227 | @Callable(i) | |
230 | 228 | func topup () = nil | |
231 | 229 | ||
232 | 230 | ||
233 | 231 | ||
234 | 232 | @Callable(i) | |
235 | 233 | func activate (amountAssetStr,priceAssetStr,lpAssetName,lpAssetDescr,poolWeight) = if ((i.callerPublicKey != factoryPublicKey)) | |
236 | 234 | then throw("permissions denied") | |
237 | 235 | else { | |
238 | 236 | let amountAssetId = fromBase58String(amountAssetStr) | |
239 | 237 | let amountAssetDecimals = value(assetInfo(amountAssetId)).decimals | |
240 | 238 | let priceAssetId = fromBase58String(priceAssetStr) | |
241 | 239 | let priceAssetDecimals = value(assetInfo(priceAssetId)).decimals | |
242 | 240 | let lpAssetIssueAction = Issue(lpAssetName, lpAssetDescr, 1, 8, true) | |
243 | 241 | let lpAssetId = calculateAssetId(lpAssetIssueAction) | |
244 | 242 | let lpAssetIdAsString = toBase58String(lpAssetId) | |
245 | 243 | $Tuple2([lpAssetIssueAction, Burn(lpAssetId, 1)], lpAssetIdAsString) | |
246 | 244 | } | |
247 | 245 | ||
248 | 246 | ||
249 | 247 | ||
250 | 248 | @Callable(i) | |
251 | 249 | func manage (status) = nil | |
252 | 250 | ||
253 | 251 | ||
254 | 252 | ||
255 | 253 | @Callable(i) | |
256 | 254 | func estimatedPut () = nil | |
257 | 255 | ||
258 | 256 | ||
259 | 257 | ||
260 | 258 | @Callable(i) | |
261 | 259 | func stats () = nil | |
262 | 260 | ||
263 | 261 | ||
264 | 262 | ||
265 | 263 | @Callable(i) | |
266 | 264 | func estimatedGet () = nil | |
267 | 265 | ||
268 | 266 | ||
269 | 267 | ||
270 | 268 | @Callable(i) | |
271 | 269 | func price () = nil | |
272 | 270 | ||
273 | 271 | ||
274 | 272 | @Verifier(tx) | |
275 | 273 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
276 | 274 |
github/deemru/w8io/026f985 338.01 ms ◑