tx · 2AVhqgZdK7yK9H5A72uY9trzgVU1JLLkzHY8fAePkJKx 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT: -0.01400000 Waves 2021.12.23 04:31 [1846251] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves
{ "type": 13, "id": "2AVhqgZdK7yK9H5A72uY9trzgVU1JLLkzHY8fAePkJKx", "fee": 1400000, "feeAssetId": null, "timestamp": 1640223107368, "version": 1, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "377sLapw8MgjaTPEcUuRyMwmH1PmSDqetue9B4VPfNPTaJbqdYPVynPRytSK3mddsszXRp5MhtnusMvsMH9qNjZW" ], "script": "base64:AAIFAAAAAAAAAGoIAhIECgIICBIECgIBBBIFCgMBAQQSAwoBARIAEgYKBAEBAQgSBAoCAQESAwoBARIECgIICBIAEgMKAQgSBQoDAQEBEgQKAggBEgQKAgEBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEIAAAAPwAAAAAKbFBkZWNpbWFscwAAAAAAAAAACAAAAAAGc2NhbGU4AAAAAAAF9eEAAAAAAAxzY2FsZThCaWdJbnQJAAE2AAAAAQAAAAAABfXhAAAAAAAJY2FsY0Vycm9yCQABNgAAAAEAAAAAAAAPQkAAAAAAB3NjYWxlMTgJAAE2AAAAAQAN4Lazp2QAAAAAAAAKemVyb0JpZ0ludAkAATYAAAABAAAAAAAAAAAAAAAAAAlvbmVCaWdJbnQJAAE2AAAAAQAAAAAAAAAAAQAAAAADU0VQAgAAAAJfXwAAAAAFRU1QVFkCAAAAAAAAAAAKUG9vbEFjdGl2ZQAAAAAAAAAAAQAAAAAPUG9vbFB1dERpc2FibGVkAAAAAAAAAAACAAAAABNQb29sTWF0Y2hlckRpc2FibGVkAAAAAAAAAAADAAAAAAxQb29sU2h1dGRvd24AAAAAAAAAAAQAA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AAAKb3JkZXJWYWxpZAkBAAAAG3ZhbGlkYXRlTWF0Y2hlck9yZGVyQWxsb3dlZAAAAAEFAAAABW9yZGVyBAAAAAtzZW5kZXJWYWxpZAkAAfQAAAADCAUAAAAFb3JkZXIAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAVvcmRlcgAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAVvcmRlcgAAAA9zZW5kZXJQdWJsaWNLZXkEAAAADG1hdGNoZXJWYWxpZAkAAfQAAAADCAUAAAAFb3JkZXIAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAVvcmRlcgAAAAZwcm9vZnMAAAAAAAAAAAEFAAAACm1hdGNoZXJQdWIDAwMFAAAACm9yZGVyVmFsaWQFAAAAC3NlbmRlclZhbGlkBwUAAAAMbWF0Y2hlclZhbGlkBwYJAQAAAA90aHJvd09yZGVyRXJyb3IAAAADBQAAAApvcmRlclZhbGlkBQAAAAtzZW5kZXJWYWxpZAUAAAAMbWF0Y2hlclZhbGlkBAAAAA1tYW5hZ2VyUHVibGljCQEAAAALdmFsdWVPckVsc2UAAAACCQAEHQAAAAIFAAAABHRoaXMJAQAAABNrZXlNYW5hZ2VyUHVibGljS2V5AAAAAAUAAAAFRU1QVFkDCQAAAAAAAAIFAAAADW1hbmFnZXJQdWJsaWMFAAAABUVNUFRZCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAJAAJZAAAAAQUAAAANbWFuYWdlclB1YmxpY7P5iBc=", "chainId": 84, "height": 1846251, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Dj6My6m64KDiGwvarr9cz13pyMB1Gy4TXgBU2DWFo9dj Next: D54r4EnVkYimfc6wZy9dhQygDnhB3PSu9Rn6NT8hF3hJ Diff:
Old | New | Differences | |
---|---|---|---|
583 | 583 | let outPrAmt = r._2 | |
584 | 584 | let totalR = if ((outAssetId == amId)) | |
585 | 585 | then { | |
586 | - | let prSwopPartInAmountAsset = (resultAmtAmount - outAmAmt) | |
587 | - | let convRes = fraction(toX18(prSwopPartInAmountAsset, amDcm), swapPriceX18, scale18) | |
588 | - | let prAssetDiff = fraction((convRes - prAssetSwapX18), scale8BigInt, prAssetSwapX18) | |
589 | 586 | let amtAsRes = fromX18(fraction(toX18(outPrAmt, prDcm), scale18, swapPriceX18), amDcm) | |
590 | - | if (if ((prAssetDiff > calcError)) | |
591 | - | then true | |
592 | - | else (-(calcError) > prAssetDiff)) | |
593 | - | then throw(((("Slippage exeeded the value " + toString(calcError)) + " and equal to ") + toString(prAssetDiff))) | |
594 | - | else (amtAsRes + outAmAmt) | |
587 | + | (amtAsRes + outAmAmt) | |
595 | 588 | } | |
596 | 589 | else { | |
597 | 590 | let amSwopPartInPriceAsset = (resultPrAmount - outPrAmt) | |
598 | 591 | let convRes = fraction(toX18(amSwopPartInPriceAsset, amDcm), scale18, swapPriceX18) | |
599 | 592 | let prAsRes = fromX18(fraction(toX18(outAmAmt, amDcm), swapPriceX18, scale18), prDcm) | |
600 | 593 | let amAssetDiff = fraction((convRes - amAssetSwapX18), scale8BigInt, amAssetSwapX18) | |
601 | - | if (if ((amAssetDiff > calcError)) | |
602 | - | then true | |
603 | - | else (-(calcError) > amAssetDiff)) | |
604 | - | then throw(((("Slippage exeeded the value " + toString(calcError)) + " and equal to ") + toString(amAssetDiff))) | |
605 | - | else (prAsRes + outPrAmt) | |
594 | + | (prAsRes + outPrAmt) | |
606 | 595 | } | |
607 | 596 | let amBalance = getAccBalance(amId) | |
608 | 597 | let amBalanceX18 = toX18(amBalance, amDcm) |
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 scale8 = 100000000 | |
7 | 7 | ||
8 | 8 | let scale8BigInt = toBigInt(100000000) | |
9 | 9 | ||
10 | 10 | let calcError = toBigInt(1000000) | |
11 | 11 | ||
12 | 12 | let scale18 = toBigInt(1000000000000000000) | |
13 | 13 | ||
14 | 14 | let zeroBigInt = toBigInt(0) | |
15 | 15 | ||
16 | 16 | let oneBigInt = toBigInt(1) | |
17 | 17 | ||
18 | 18 | let SEP = "__" | |
19 | 19 | ||
20 | 20 | let EMPTY = "" | |
21 | 21 | ||
22 | 22 | let PoolActive = 1 | |
23 | 23 | ||
24 | 24 | let PoolPutDisabled = 2 | |
25 | 25 | ||
26 | 26 | let PoolMatcherDisabled = 3 | |
27 | 27 | ||
28 | 28 | let PoolShutdown = 4 | |
29 | 29 | ||
30 | 30 | let idxPoolAddress = 1 | |
31 | 31 | ||
32 | 32 | let idxPoolStatus = 2 | |
33 | 33 | ||
34 | 34 | let idxLPAsId = 3 | |
35 | 35 | ||
36 | 36 | let idxAmAsId = 4 | |
37 | 37 | ||
38 | 38 | let idxPrAsId = 5 | |
39 | 39 | ||
40 | 40 | let idxAmtAsDcm = 6 | |
41 | 41 | ||
42 | 42 | let idxPriceAsDcm = 7 | |
43 | 43 | ||
44 | 44 | let idxIAmtAsId = 8 | |
45 | 45 | ||
46 | 46 | let idxIPriceAsId = 9 | |
47 | 47 | ||
48 | 48 | let idxFactStakCntr = 1 | |
49 | 49 | ||
50 | 50 | let idxFactSlippCntr = 7 | |
51 | 51 | ||
52 | 52 | func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult)) | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18)) | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func toScale (amt,resScale,curScale) = fraction(amt, resScale, curScale) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func abs (val) = if ((zeroBigInt > val)) | |
62 | 62 | then -(val) | |
63 | 63 | else val | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func keyFactCntr () = "%s__factoryContract" | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func keyPriceLast () = "%s%s__price__last" | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func keyPriceHistory (h,timestamp) = makeString(["%s%s%d%d__price__history", toString(h), toString(timestamp)], SEP) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func keyPutActionByUser (userAddress,txId) = ((("%s%s%s__P__" + userAddress) + "__") + txId) | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func keyGetActionByUser (userAddress,txId) = ((("%s%s%s__G__" + userAddress) + "__") + txId) | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func keyAmtAsset () = "%s__amountAsset" | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func keyPriceAsset () = "%s__priceAsset" | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func keyFactoryConfig () = "%s__factoryConfig" | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func keyMatcherPub () = "%s%s__matcher__publicKey" | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func keyPoolConfig (iAmtAsset,iPriceAsset) = (((("%d%d%s__" + iAmtAsset) + "__") + iPriceAsset) + "__config") | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func keyAllPoolsShutdown () = "%s__shutdown" | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func keyPoolWeight (contractAddress) = ("%s%s__poolWeight__" + contractAddress) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func throwOrderError (orderValid,senderValid,matcherValid) = throw(((((("order validation failed: orderValid=" + toString(orderValid)) + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid))) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | let factoryContract = addressFromStringValue(getStringOrFail(this, keyFactCntr())) | |
118 | 118 | ||
119 | 119 | func isGlobalShutdown () = valueOrElse(getBoolean(factoryContract, keyAllPoolsShutdown()), false) | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func getMatcherPubOrFail () = fromBase58String(getStringOrFail(factoryContract, keyMatcherPub())) | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func getPoolConfig () = { | |
126 | 126 | let amtAs = getStringOrFail(this, keyAmtAsset()) | |
127 | 127 | let priceAs = getStringOrFail(this, keyPriceAsset()) | |
128 | 128 | let iPriceAs = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAs)) | |
129 | 129 | let iAmtAs = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amtAs)) | |
130 | 130 | split(getStringOrFail(factoryContract, keyPoolConfig(toString(iAmtAs), toString(iPriceAs))), SEP) | |
131 | 131 | } | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func getFactoryConfig () = split(getStringOrFail(factoryContract, keyFactoryConfig()), SEP) | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func dataPutActionInfo (inAmtAssetAmt,inPriceAssetAmt,outLpAmt,price,slippageByUser,slippageReal,txHeight,txTimestamp,slipageAmAmt,slipagePrAmt) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(inAmtAssetAmt), toString(inPriceAssetAmt), toString(outLpAmt), toString(price), toString(slippageByUser), toString(slippageReal), toString(txHeight), toString(txTimestamp), toString(slipageAmAmt), toString(slipagePrAmt)], SEP) | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func dataGetActionInfo (outAmtAssetAmt,outPriceAssetAmt,inLpAmt,price,txHeight,txTimestamp) = makeString(["%d%d%d%d%d%d", toString(outAmtAssetAmt), toString(outPriceAssetAmt), toString(inLpAmt), toString(price), toString(txHeight), toString(txTimestamp)], SEP) | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | func getAccBalance (assetId) = if ((assetId == "WAVES")) | |
144 | 144 | then wavesBalance(this).available | |
145 | 145 | else assetBalance(this, fromBase58String(assetId)) | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | func calcPriceBigInt (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18) | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | func privateCalcPrice (amAssetDcm,prAssetDcm,amAmt,prAmt) = { | |
152 | 152 | let amtAsAmtX18 = toX18(amAmt, amAssetDcm) | |
153 | 153 | let prAsAmtX18 = toX18(prAmt, prAssetDcm) | |
154 | 154 | calcPriceBigInt(prAsAmtX18, amtAsAmtX18) | |
155 | 155 | } | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func calcPrices (amAmt,prAmt,lpAmt) = { | |
159 | 159 | let cfg = getPoolConfig() | |
160 | 160 | let amtAsDcm = parseIntValue(cfg[idxAmtAsDcm]) | |
161 | 161 | let prAsDcm = parseIntValue(cfg[idxPriceAsDcm]) | |
162 | 162 | let priceX18 = privateCalcPrice(amtAsDcm, prAsDcm, amAmt, prAmt) | |
163 | 163 | let amAmtX18 = toX18(amAmt, amtAsDcm) | |
164 | 164 | let prAmtX18 = toX18(prAmt, prAsDcm) | |
165 | 165 | let lpAmtX18 = toX18(lpAmt, scale8) | |
166 | 166 | let lpPrInAmAsX18 = calcPriceBigInt(amAmtX18, lpAmtX18) | |
167 | 167 | let lpPrInPrAsX18 = calcPriceBigInt(prAmtX18, lpAmtX18) | |
168 | 168 | [priceX18, lpPrInAmAsX18, lpPrInPrAsX18] | |
169 | 169 | } | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | func calculatePrices (amAmt,prAmt,lpAmt) = { | |
173 | 173 | let prices = calcPrices(amAmt, prAmt, lpAmt) | |
174 | 174 | [fromX18(prices[0], scale8), fromX18(prices[1], scale8), fromX18(prices[2], scale8)] | |
175 | 175 | } | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func estimateGetOperation (txId58,pmtAssetId,pmtLpAmt,userAddress) = { | |
179 | 179 | let cfg = getPoolConfig() | |
180 | 180 | let lpId = cfg[idxLPAsId] | |
181 | 181 | let amId = cfg[idxAmAsId] | |
182 | 182 | let prId = cfg[idxPrAsId] | |
183 | 183 | let amDcm = parseIntValue(cfg[idxAmtAsDcm]) | |
184 | 184 | let prDcm = parseIntValue(cfg[idxPriceAsDcm]) | |
185 | 185 | let poolStatus = cfg[idxPoolStatus] | |
186 | 186 | let lpEmission = valueOrErrorMessage(assetInfo(fromBase58String(lpId)), (("Asset " + lpId) + " doesn't exist")).quantity | |
187 | 187 | if ((lpId != pmtAssetId)) | |
188 | 188 | then throw("Invalid asset passed.") | |
189 | 189 | else { | |
190 | 190 | let amBalance = getAccBalance(amId) | |
191 | 191 | let amBalanceX18 = toX18(amBalance, amDcm) | |
192 | 192 | let prBalance = getAccBalance(prId) | |
193 | 193 | let prBalanceX18 = toX18(prBalance, prDcm) | |
194 | 194 | let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18) | |
195 | 195 | let curPrice = fromX18(curPriceX18, scale8) | |
196 | 196 | let pmtLpAmtX18 = toX18(pmtLpAmt, scale8) | |
197 | 197 | let lpEmissionX18 = toX18(lpEmission, scale8) | |
198 | 198 | let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissionX18) | |
199 | 199 | let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissionX18) | |
200 | 200 | let outAmAmt = fromX18(outAmAmtX18, amDcm) | |
201 | 201 | let outPrAmt = fromX18(outPrAmtX18, prDcm) | |
202 | 202 | let state = if ((txId58 == "")) | |
203 | 203 | then nil | |
204 | 204 | else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES")) | |
205 | 205 | then unit | |
206 | 206 | else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES")) | |
207 | 207 | then unit | |
208 | 208 | else fromBase58String(prId)), StringEntry(keyGetActionByUser(toString(userAddress), txId58), dataGetActionInfo(outAmAmt, outPrAmt, pmtLpAmt, curPrice, height, lastBlock.timestamp)), IntegerEntry(keyPriceLast(), curPrice), IntegerEntry(keyPriceHistory(height, lastBlock.timestamp), curPrice)] | |
209 | 209 | $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmission, curPriceX18, poolStatus, state) | |
210 | 210 | } | |
211 | 211 | } | |
212 | 212 | ||
213 | 213 | ||
214 | 214 | func estimatePutOperation (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEvaluate,emitLp) = { | |
215 | 215 | let cfg = getPoolConfig() | |
216 | 216 | let lpId = fromBase58String(cfg[idxLPAsId]) | |
217 | 217 | let amIdStr = cfg[idxAmAsId] | |
218 | 218 | let prIdStr = cfg[idxPrAsId] | |
219 | 219 | let inAmIdStr = cfg[idxIAmtAsId] | |
220 | 220 | let inPrIdStr = cfg[idxIPriceAsId] | |
221 | 221 | let amtDcm = parseIntValue(cfg[idxAmtAsDcm]) | |
222 | 222 | let priceDcm = parseIntValue(cfg[idxPriceAsDcm]) | |
223 | 223 | let poolStatus = cfg[idxPoolStatus] | |
224 | 224 | let lpEmission = valueOrErrorMessage(assetInfo(lpId), "Wrong lp asset.").quantity | |
225 | 225 | let amBalance = if (isEvaluate) | |
226 | 226 | then getAccBalance(amIdStr) | |
227 | 227 | else (getAccBalance(amIdStr) - inAmAmt) | |
228 | 228 | let prBalance = if (isEvaluate) | |
229 | 229 | then getAccBalance(prIdStr) | |
230 | 230 | else (getAccBalance(prIdStr) - inPrAmt) | |
231 | 231 | let inAmAssetAmtX18 = toX18(inAmAmt, amtDcm) | |
232 | 232 | let inPrAssetAmtX18 = toX18(inPrAmt, priceDcm) | |
233 | 233 | let userPriceX18 = calcPriceBigInt(inPrAssetAmtX18, inAmAssetAmtX18) | |
234 | 234 | let amBalanceX18 = toX18(amBalance, amtDcm) | |
235 | 235 | let prBalanceX18 = toX18(prBalance, priceDcm) | |
236 | 236 | let res = if ((lpEmission == 0)) | |
237 | 237 | then { | |
238 | 238 | let curPriceX18 = zeroBigInt | |
239 | 239 | let slippageX18 = zeroBigInt | |
240 | 240 | let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN) | |
241 | 241 | $Tuple5(fromX18(lpAmtX18, scale8), fromX18(inAmAssetAmtX18, amtDcm), fromX18(inPrAssetAmtX18, priceDcm), calcPriceBigInt((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18) | |
242 | 242 | } | |
243 | 243 | else { | |
244 | 244 | let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18) | |
245 | 245 | let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18) | |
246 | 246 | let slippageX18 = toX18(slippage, scale8) | |
247 | 247 | if (if ((curPriceX18 != zeroBigInt)) | |
248 | 248 | then (slippageRealX18 > slippageX18) | |
249 | 249 | else false) | |
250 | 250 | then throw(((("Price slippage " + toString(slippageRealX18)) + " exceeded ") + toString(slippageX18))) | |
251 | 251 | else { | |
252 | 252 | let lpEmissionX18 = toX18(lpEmission, scale8) | |
253 | 253 | let prViaAmX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18) | |
254 | 254 | let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18) | |
255 | 255 | let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18)) | |
256 | 256 | then $Tuple2(amViaPrX18, inPrAssetAmtX18) | |
257 | 257 | else $Tuple2(inAmAssetAmtX18, prViaAmX18) | |
258 | 258 | let expAmtAssetAmtX18 = expectedAmts._1 | |
259 | 259 | let expPriceAssetAmtX18 = expectedAmts._2 | |
260 | 260 | let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18) | |
261 | 261 | $Tuple5(fromX18(lpAmtX18, scale8), fromX18(expAmtAssetAmtX18, amtDcm), fromX18(expPriceAssetAmtX18, priceDcm), curPriceX18, slippageX18) | |
262 | 262 | } | |
263 | 263 | } | |
264 | 264 | let calcLpAmt = res._1 | |
265 | 265 | let calcAmAssetPmt = res._2 | |
266 | 266 | let calcPrAssetPmt = res._3 | |
267 | 267 | let curPrice = fromX18(res._4, scale8) | |
268 | 268 | let slippageCalc = fromX18(res._5, scale8) | |
269 | 269 | if ((0 >= calcLpAmt)) | |
270 | 270 | then throw("LP is less than zero.") | |
271 | 271 | else { | |
272 | 272 | let emitLpAmt = if (!(emitLp)) | |
273 | 273 | then 0 | |
274 | 274 | else calcLpAmt | |
275 | 275 | let amDiff = (inAmAmt - calcAmAssetPmt) | |
276 | 276 | let prDiff = (inPrAmt - calcPrAssetPmt) | |
277 | 277 | let commonState = [IntegerEntry(keyPriceLast(), curPrice), IntegerEntry(keyPriceHistory(height, lastBlock.timestamp), curPrice), StringEntry(keyPutActionByUser(userAddress, txId58), dataPutActionInfo(calcAmAssetPmt, calcPrAssetPmt, emitLpAmt, curPrice, slippage, slippageCalc, height, lastBlock.timestamp, amDiff, prDiff))] | |
278 | 278 | $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEmission, lpId, poolStatus, commonState, amDiff, prDiff, inAmId, inPrId) | |
279 | 279 | } | |
280 | 280 | } | |
281 | 281 | ||
282 | 282 | ||
283 | 283 | func validateMatcherOrderAllowed (order) = { | |
284 | 284 | let cfg = getPoolConfig() | |
285 | 285 | let amtAssetId = cfg[idxAmAsId] | |
286 | 286 | let priceAssetId = cfg[idxPrAsId] | |
287 | 287 | let poolStatus = parseIntValue(cfg[idxPoolStatus]) | |
288 | 288 | let amtAssetDcm = parseIntValue(cfg[idxAmtAsDcm]) | |
289 | 289 | let priceAssetDcm = parseIntValue(cfg[idxPriceAsDcm]) | |
290 | 290 | let accAmtAssetBalance = getAccBalance(amtAssetId) | |
291 | 291 | let accPriceAssetBalance = getAccBalance(priceAssetId) | |
292 | 292 | let curPriceX18 = if ((order.orderType == Buy)) | |
293 | 293 | then privateCalcPrice(amtAssetDcm, priceAssetDcm, (accAmtAssetBalance + order.amount), accPriceAssetBalance) | |
294 | 294 | else privateCalcPrice(amtAssetDcm, priceAssetDcm, (accAmtAssetBalance - order.amount), accPriceAssetBalance) | |
295 | 295 | let curPrice = fromX18(curPriceX18, scale8) | |
296 | 296 | if (if (if (isGlobalShutdown()) | |
297 | 297 | then true | |
298 | 298 | else (poolStatus == PoolMatcherDisabled)) | |
299 | 299 | then true | |
300 | 300 | else (poolStatus == PoolShutdown)) | |
301 | 301 | then throw("Exchange operations disabled") | |
302 | 302 | else { | |
303 | 303 | let orderAmtAsset = order.assetPair.amountAsset | |
304 | 304 | let orderAmtAssetStr = if ((orderAmtAsset == unit)) | |
305 | 305 | then "WAVES" | |
306 | 306 | else toBase58String(value(orderAmtAsset)) | |
307 | 307 | let orderPriceAsset = order.assetPair.priceAsset | |
308 | 308 | let orderPriceAssetStr = if ((orderPriceAsset == unit)) | |
309 | 309 | then "WAVES" | |
310 | 310 | else toBase58String(value(orderPriceAsset)) | |
311 | 311 | if (if ((orderAmtAssetStr != amtAssetId)) | |
312 | 312 | then true | |
313 | 313 | else (orderPriceAssetStr != priceAssetId)) | |
314 | 314 | then throw("Wrong order assets.") | |
315 | 315 | else { | |
316 | 316 | let orderPrice = order.price | |
317 | 317 | let priceDcm = fraction(scale8, priceAssetDcm, amtAssetDcm) | |
318 | 318 | let castedOrderPrice = toScale(orderPrice, scale8, priceDcm) | |
319 | 319 | let isOrderPriceValid = if ((order.orderType == Buy)) | |
320 | 320 | then (curPrice >= castedOrderPrice) | |
321 | 321 | else (castedOrderPrice >= curPrice) | |
322 | 322 | true | |
323 | 323 | } | |
324 | 324 | } | |
325 | 325 | } | |
326 | 326 | ||
327 | 327 | ||
328 | 328 | func commonGet (i) = if ((size(i.payments) != 1)) | |
329 | 329 | then throw("exactly 1 payment is expected") | |
330 | 330 | else { | |
331 | 331 | let pmt = value(i.payments[0]) | |
332 | 332 | let pmtAssetId = value(pmt.assetId) | |
333 | 333 | let pmtAmt = pmt.amount | |
334 | 334 | let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller) | |
335 | 335 | let outAmAmt = res._1 | |
336 | 336 | let outPrAmt = res._2 | |
337 | 337 | let poolStatus = parseIntValue(res._9) | |
338 | 338 | let state = res._10 | |
339 | 339 | if (if (isGlobalShutdown()) | |
340 | 340 | then true | |
341 | 341 | else (poolStatus == PoolShutdown)) | |
342 | 342 | then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus))) | |
343 | 343 | else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state) | |
344 | 344 | } | |
345 | 345 | ||
346 | 346 | ||
347 | 347 | func commonPut (caller,txId,amAsPmt,prAsPmt,slippage,emitLp) = { | |
348 | 348 | let estPut = estimatePutOperation(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, false, emitLp) | |
349 | 349 | let status = parseIntValue(estPut._8) | |
350 | 350 | if (if (if (isGlobalShutdown()) | |
351 | 351 | then true | |
352 | 352 | else (status == PoolPutDisabled)) | |
353 | 353 | then true | |
354 | 354 | else (status == PoolShutdown)) | |
355 | 355 | then throw(("Put operation is blocked by admin. Status = " + toString(status))) | |
356 | 356 | else estPut | |
357 | 357 | } | |
358 | 358 | ||
359 | 359 | ||
360 | 360 | func calcD (a,b,lVal) = { | |
361 | 361 | let l = toBigInt(lVal) | |
362 | 362 | let val4 = toBigInt(4) | |
363 | 363 | let val2 = toBigInt(2) | |
364 | 364 | let val3 = toBigInt(3) | |
365 | 365 | let ApB = (a + b) | |
366 | 366 | let AmB = (a * b) | |
367 | 367 | let l41 = ((val4 * l) - oneBigInt) | |
368 | 368 | let lApBpow = pow((l * ApB), 0, val2, 0, 0, DOWN) | |
369 | 369 | let AmbL41pow = (AmB * pow((l41 / val3), 0, val3, 0, 0, DOWN)) | |
370 | 370 | let lAmpApb = ((l * AmB) * ApB) | |
371 | 371 | let rPart = (AmB * pow((AmbL41pow + lApBpow), 0, toBigInt(5), 1, 0, DOWN)) | |
372 | 372 | let M = (val2 * pow((lAmpApb + rPart), 0, toBigInt(333333), 6, 0, DOWN)) | |
373 | 373 | let divPart = (l41 / (val3 * M)) | |
374 | 374 | (((toBigInt(-4) * AmB) * divPart) + M) | |
375 | 375 | } | |
376 | 376 | ||
377 | 377 | ||
378 | 378 | @Callable(i) | |
379 | 379 | func constructor (factoryContract,managerPublicKey) = if ((i.caller != this)) | |
380 | 380 | then throw("permissions denied") | |
381 | 381 | else [StringEntry(keyFactCntr(), factoryContract), StringEntry(keyManagerPublicKey(), managerPublicKey)] | |
382 | 382 | ||
383 | 383 | ||
384 | 384 | ||
385 | 385 | @Callable(i) | |
386 | 386 | func put (slip,autoStake) = { | |
387 | 387 | let factCfg = getFactoryConfig() | |
388 | 388 | let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Incorrect staking address.") | |
389 | 389 | let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Incorrect slippage address.") | |
390 | 390 | if ((0 > slip)) | |
391 | 391 | then throw("Invalid slippage.") | |
392 | 392 | else if ((size(i.payments) != 2)) | |
393 | 393 | then throw("2 payments are expected") | |
394 | 394 | else { | |
395 | 395 | let estPut = commonPut(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(value(i.payments[0]).assetId, value(i.payments[0]).amount), i.payments[1], slip, true) | |
396 | 396 | let emitLpAmt = estPut._2 | |
397 | 397 | let lpAssetId = estPut._7 | |
398 | 398 | let state = estPut._9 | |
399 | 399 | let amDiff = estPut._10 | |
400 | 400 | let prDiff = estPut._11 | |
401 | 401 | let amId = estPut._12 | |
402 | 402 | let prId = estPut._13 | |
403 | 403 | let emitInv = invoke(factoryContract, "emit", [emitLpAmt], nil) | |
404 | 404 | if ((emitInv == emitInv)) | |
405 | 405 | then { | |
406 | 406 | let slippageAInv = if ((amDiff > 0)) | |
407 | 407 | then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)]) | |
408 | 408 | else nil | |
409 | 409 | if ((slippageAInv == slippageAInv)) | |
410 | 410 | then { | |
411 | 411 | let slippagePInv = if ((prDiff > 0)) | |
412 | 412 | then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)]) | |
413 | 413 | else nil | |
414 | 414 | if ((slippagePInv == slippagePInv)) | |
415 | 415 | then { | |
416 | 416 | let lpTrnsfr = if (autoStake) | |
417 | 417 | then { | |
418 | 418 | let slpStakeInv = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)]) | |
419 | 419 | if ((slpStakeInv == slpStakeInv)) | |
420 | 420 | then nil | |
421 | 421 | else throw("Strict value is not equal to itself.") | |
422 | 422 | } | |
423 | 423 | else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)] | |
424 | 424 | (state ++ lpTrnsfr) | |
425 | 425 | } | |
426 | 426 | else throw("Strict value is not equal to itself.") | |
427 | 427 | } | |
428 | 428 | else throw("Strict value is not equal to itself.") | |
429 | 429 | } | |
430 | 430 | else throw("Strict value is not equal to itself.") | |
431 | 431 | } | |
432 | 432 | } | |
433 | 433 | ||
434 | 434 | ||
435 | 435 | ||
436 | 436 | @Callable(i) | |
437 | 437 | func putOneTkn (inAmtAmount,inPrAmount,autoStake) = { | |
438 | 438 | let cfg = getFactoryConfig() | |
439 | 439 | let stakingCntr = valueOrErrorMessage(addressFromString(cfg[idxFactStakCntr]), "Wrong staking address") | |
440 | 440 | let slipCntr = valueOrErrorMessage(addressFromString(cfg[idxFactSlippCntr]), "Wrong slippage address") | |
441 | 441 | let poolCfg = getPoolConfig() | |
442 | 442 | let amId = poolCfg[idxAmAsId] | |
443 | 443 | let prId = poolCfg[idxPrAsId] | |
444 | 444 | let amDcm = parseIntValue(poolCfg[idxAmtAsDcm]) | |
445 | 445 | let prDcm = parseIntValue(poolCfg[idxPriceAsDcm]) | |
446 | 446 | if ((size(i.payments) != 1)) | |
447 | 447 | then throw("exactly 1 payment is expected") | |
448 | 448 | else { | |
449 | 449 | let pmt = value(i.payments[0]) | |
450 | 450 | let pmtAssetId = toBase58String(value(pmt.assetId)) | |
451 | 451 | let pmtAmt = pmt.amount | |
452 | 452 | let amAssetSwapX18 = toX18(inAmtAmount, amDcm) | |
453 | 453 | let prAssetSwapX18 = toX18(inPrAmount, prDcm) | |
454 | 454 | let amBalance = getAccBalance(amId) | |
455 | 455 | let amBalanceX18 = toX18(amBalance, amDcm) | |
456 | 456 | let prBalance = getAccBalance(prId) | |
457 | 457 | let prBalanceX18 = toX18(prBalance, prDcm) | |
458 | 458 | let dCur = calcD(toBigInt(amBalance), toBigInt(prBalance), 5000000000) | |
459 | 459 | let isValid = if ((pmtAssetId == amId)) | |
460 | 460 | then { | |
461 | 461 | let pmtAmtX18 = toX18(pmtAmt, amDcm) | |
462 | 462 | let prAdiff = prAssetSwapX18 | |
463 | 463 | let amAdiff = (pmtAmtX18 - amAssetSwapX18) | |
464 | 464 | let dSwap = calcD((toBigInt(amBalance) + toBigInt(fromX18(amAdiff, amDcm))), (toBigInt(prBalance) - toBigInt(fromX18(prAdiff, prDcm))), 5000000000) | |
465 | 465 | true | |
466 | 466 | } | |
467 | 467 | else { | |
468 | 468 | let pmtPrX18 = toX18(pmtAmt, prDcm) | |
469 | 469 | let prAdiff = (prAssetSwapX18 - pmtPrX18) | |
470 | 470 | let amAdiff = amAssetSwapX18 | |
471 | 471 | let dSwap = calcD((toBigInt(amBalance) - toBigInt(fromX18(amAdiff, amDcm))), (toBigInt(prBalance) + toBigInt(fromX18(prAdiff, prDcm))), 50) | |
472 | 472 | true | |
473 | 473 | } | |
474 | 474 | if (!(isValid)) | |
475 | 475 | then throw("Errors.") | |
476 | 476 | else { | |
477 | 477 | let estPut = commonPut(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(fromBase58String(amId), inAmtAmount), AttachedPayment(fromBase58String(prId), inPrAmount), 50000000000, true) | |
478 | 478 | let emitLpAmt = estPut._2 | |
479 | 479 | let lpAssetId = estPut._7 | |
480 | 480 | let state = estPut._9 | |
481 | 481 | let amDiff = estPut._10 | |
482 | 482 | let prDiff = estPut._11 | |
483 | 483 | let emitInv = invoke(factoryContract, "emit", [emitLpAmt], nil) | |
484 | 484 | if ((emitInv == emitInv)) | |
485 | 485 | then { | |
486 | 486 | let slippageAInv = if ((amDiff > 0)) | |
487 | 487 | then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(amId), amDiff)]) | |
488 | 488 | else nil | |
489 | 489 | if ((slippageAInv == slippageAInv)) | |
490 | 490 | then { | |
491 | 491 | let slippagePInv = if ((prDiff > 0)) | |
492 | 492 | then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(prId), prDiff)]) | |
493 | 493 | else nil | |
494 | 494 | if ((slippagePInv == slippagePInv)) | |
495 | 495 | then { | |
496 | 496 | let lpTrnsfr = if (autoStake) | |
497 | 497 | then { | |
498 | 498 | let slpStakeInv = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)]) | |
499 | 499 | if ((slpStakeInv == slpStakeInv)) | |
500 | 500 | then nil | |
501 | 501 | else throw("Strict value is not equal to itself.") | |
502 | 502 | } | |
503 | 503 | else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)] | |
504 | 504 | (state ++ lpTrnsfr) | |
505 | 505 | } | |
506 | 506 | else throw("Strict value is not equal to itself.") | |
507 | 507 | } | |
508 | 508 | else throw("Strict value is not equal to itself.") | |
509 | 509 | } | |
510 | 510 | else throw("Strict value is not equal to itself.") | |
511 | 511 | } | |
512 | 512 | } | |
513 | 513 | } | |
514 | 514 | ||
515 | 515 | ||
516 | 516 | ||
517 | 517 | @Callable(i) | |
518 | 518 | func putForFree (maxSlippage) = if ((0 > maxSlippage)) | |
519 | 519 | then throw("Invalid value passed") | |
520 | 520 | else if ((size(i.payments) != 2)) | |
521 | 521 | then throw("exactly 2 payments are expected") | |
522 | 522 | else { | |
523 | 523 | let estPut = commonPut(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(value(i.payments[0]).assetId, value(i.payments[0]).amount), i.payments[1], maxSlippage, false) | |
524 | 524 | estPut._9 | |
525 | 525 | } | |
526 | 526 | ||
527 | 527 | ||
528 | 528 | ||
529 | 529 | @Callable(i) | |
530 | 530 | func get () = { | |
531 | 531 | let res = commonGet(i) | |
532 | 532 | let outAmtAmt = res._1 | |
533 | 533 | let outPrAmt = res._2 | |
534 | 534 | let pmtAmt = res._3 | |
535 | 535 | let pmtAssetId = res._4 | |
536 | 536 | let state = res._5 | |
537 | 537 | let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
538 | 538 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
539 | 539 | then state | |
540 | 540 | else throw("Strict value is not equal to itself.") | |
541 | 541 | } | |
542 | 542 | ||
543 | 543 | ||
544 | 544 | ||
545 | 545 | @Callable(i) | |
546 | 546 | func getOneTkn (amAssetSwap,prAssetSwap,outAmount,outAssetId) = if ((size(i.payments) != 1)) | |
547 | 547 | then throw("exactly 1 payment is expected") | |
548 | 548 | else { | |
549 | 549 | let cfg = getPoolConfig() | |
550 | 550 | let lpId = cfg[idxLPAsId] | |
551 | 551 | let amId = cfg[idxAmAsId] | |
552 | 552 | let prId = cfg[idxPrAsId] | |
553 | 553 | let amDcm = parseIntValue(cfg[idxAmtAsDcm]) | |
554 | 554 | let prDcm = parseIntValue(cfg[idxPriceAsDcm]) | |
555 | 555 | let poolStatus = cfg[idxPoolStatus] | |
556 | 556 | if (if ((outAssetId != amId)) | |
557 | 557 | then (outAssetId != prId) | |
558 | 558 | else false) | |
559 | 559 | then throw(("Incorrect out asset id passed: " + outAssetId)) | |
560 | 560 | else { | |
561 | 561 | let resultAssetId = if ((outAssetId == amId)) | |
562 | 562 | then amId | |
563 | 563 | else prId | |
564 | 564 | let resultAmtAmount = if ((outAssetId == amId)) | |
565 | 565 | then outAmount | |
566 | 566 | else 0 | |
567 | 567 | let resultPrAmount = if ((outAssetId == prId)) | |
568 | 568 | then outAmount | |
569 | 569 | else 0 | |
570 | 570 | let pmt = value(i.payments[0]) | |
571 | 571 | let userAddress = i.caller | |
572 | 572 | let txId58 = toBase58String(i.transactionId) | |
573 | 573 | let pmtAssetId = value(pmt.assetId) | |
574 | 574 | let pmtAmt = pmt.amount | |
575 | 575 | if ((lpId != toBase58String(pmtAssetId))) | |
576 | 576 | then throw("Invalid asset passed.") | |
577 | 577 | else { | |
578 | 578 | let amAssetSwapX18 = toX18(amAssetSwap, amDcm) | |
579 | 579 | let prAssetSwapX18 = toX18(prAssetSwap, prDcm) | |
580 | 580 | let swapPriceX18 = calcPriceBigInt(prAssetSwapX18, amAssetSwapX18) | |
581 | 581 | let r = estimateGetOperation(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller) | |
582 | 582 | let outAmAmt = r._1 | |
583 | 583 | let outPrAmt = r._2 | |
584 | 584 | let totalR = if ((outAssetId == amId)) | |
585 | 585 | then { | |
586 | - | let prSwopPartInAmountAsset = (resultAmtAmount - outAmAmt) | |
587 | - | let convRes = fraction(toX18(prSwopPartInAmountAsset, amDcm), swapPriceX18, scale18) | |
588 | - | let prAssetDiff = fraction((convRes - prAssetSwapX18), scale8BigInt, prAssetSwapX18) | |
589 | 586 | let amtAsRes = fromX18(fraction(toX18(outPrAmt, prDcm), scale18, swapPriceX18), amDcm) | |
590 | - | if (if ((prAssetDiff > calcError)) | |
591 | - | then true | |
592 | - | else (-(calcError) > prAssetDiff)) | |
593 | - | then throw(((("Slippage exeeded the value " + toString(calcError)) + " and equal to ") + toString(prAssetDiff))) | |
594 | - | else (amtAsRes + outAmAmt) | |
587 | + | (amtAsRes + outAmAmt) | |
595 | 588 | } | |
596 | 589 | else { | |
597 | 590 | let amSwopPartInPriceAsset = (resultPrAmount - outPrAmt) | |
598 | 591 | let convRes = fraction(toX18(amSwopPartInPriceAsset, amDcm), scale18, swapPriceX18) | |
599 | 592 | let prAsRes = fromX18(fraction(toX18(outAmAmt, amDcm), swapPriceX18, scale18), prDcm) | |
600 | 593 | let amAssetDiff = fraction((convRes - amAssetSwapX18), scale8BigInt, amAssetSwapX18) | |
601 | - | if (if ((amAssetDiff > calcError)) | |
602 | - | then true | |
603 | - | else (-(calcError) > amAssetDiff)) | |
604 | - | then throw(((("Slippage exeeded the value " + toString(calcError)) + " and equal to ") + toString(amAssetDiff))) | |
605 | - | else (prAsRes + outPrAmt) | |
594 | + | (prAsRes + outPrAmt) | |
606 | 595 | } | |
607 | 596 | let amBalance = getAccBalance(amId) | |
608 | 597 | let amBalanceX18 = toX18(amBalance, amDcm) | |
609 | 598 | let prBalance = getAccBalance(prId) | |
610 | 599 | let prBalanceX18 = toX18(prBalance, prDcm) | |
611 | 600 | let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18) | |
612 | 601 | let curPrice = fromX18(curPriceX18, scale8) | |
613 | 602 | let state = [ScriptTransfer(userAddress, totalR, if ((resultAssetId == "WAVES")) | |
614 | 603 | then unit | |
615 | 604 | else fromBase58String(resultAssetId)), StringEntry(keyGetActionByUser(toString(userAddress), txId58), dataGetActionInfo(resultAmtAmount, resultPrAmount, pmtAmt, curPrice, height, lastBlock.timestamp)), IntegerEntry(keyPriceLast(), curPrice), IntegerEntry(keyPriceHistory(height, lastBlock.timestamp), curPrice)] | |
616 | 605 | let burn = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
617 | 606 | if ((burn == burn)) | |
618 | 607 | then state | |
619 | 608 | else throw("Strict value is not equal to itself.") | |
620 | 609 | } | |
621 | 610 | } | |
622 | 611 | } | |
623 | 612 | ||
624 | 613 | ||
625 | 614 | ||
626 | 615 | @Callable(i) | |
627 | 616 | func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = { | |
628 | 617 | let res = commonGet(i) | |
629 | 618 | let outAmAmt = res._1 | |
630 | 619 | let outPrAmt = res._2 | |
631 | 620 | let pmtAmt = res._3 | |
632 | 621 | let pmtAssetId = res._4 | |
633 | 622 | let state = res._5 | |
634 | 623 | if ((noLessThenAmtAsset > outAmAmt)) | |
635 | 624 | then throw(((("noLessThenAmtAsset failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset))) | |
636 | 625 | else if ((noLessThenPriceAsset > outPrAmt)) | |
637 | 626 | then throw(((("noLessThenPriceAsset failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset))) | |
638 | 627 | else { | |
639 | 628 | let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
640 | 629 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
641 | 630 | then state | |
642 | 631 | else throw("Strict value is not equal to itself.") | |
643 | 632 | } | |
644 | 633 | } | |
645 | 634 | ||
646 | 635 | ||
647 | 636 | ||
648 | 637 | @Callable(i) | |
649 | 638 | func unstakeAndGet (amount) = { | |
650 | 639 | let checkPayments = if ((size(i.payments) != 0)) | |
651 | 640 | then throw("No payments are expected") | |
652 | 641 | else true | |
653 | 642 | if ((checkPayments == checkPayments)) | |
654 | 643 | then { | |
655 | 644 | let cfg = getPoolConfig() | |
656 | 645 | let factoryCfg = getFactoryConfig() | |
657 | 646 | let lpAssetId = fromBase58String(cfg[idxLPAsId]) | |
658 | 647 | let stakingContract = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Error. Incorrect staking address.") | |
659 | 648 | let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(lpAssetId), amount], nil) | |
660 | 649 | if ((unstakeInv == unstakeInv)) | |
661 | 650 | then { | |
662 | 651 | let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller) | |
663 | 652 | let poolStatus = parseIntValue(res._9) | |
664 | 653 | let state = res._10 | |
665 | 654 | let checkPoolStatus = if (if (isGlobalShutdown()) | |
666 | 655 | then true | |
667 | 656 | else (poolStatus == PoolShutdown)) | |
668 | 657 | then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus))) | |
669 | 658 | else true | |
670 | 659 | if ((checkPoolStatus == checkPoolStatus)) | |
671 | 660 | then { | |
672 | 661 | let burnLPAssetOnFactory = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)]) | |
673 | 662 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
674 | 663 | then state | |
675 | 664 | else throw("Strict value is not equal to itself.") | |
676 | 665 | } | |
677 | 666 | else throw("Strict value is not equal to itself.") | |
678 | 667 | } | |
679 | 668 | else throw("Strict value is not equal to itself.") | |
680 | 669 | } | |
681 | 670 | else throw("Strict value is not equal to itself.") | |
682 | 671 | } | |
683 | 672 | ||
684 | 673 | ||
685 | 674 | ||
686 | 675 | @Callable(i) | |
687 | 676 | func activate (amtAssetStr,priceAssetStr) = if ((toString(i.caller) != toString(factoryContract))) | |
688 | 677 | then throw("permissions denied") | |
689 | 678 | else $Tuple2([StringEntry(keyAmtAsset(), amtAssetStr), StringEntry(keyPriceAsset(), priceAssetStr)], "success") | |
690 | 679 | ||
691 | 680 | ||
692 | 681 | ||
693 | 682 | @Callable(i) | |
694 | 683 | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, getPoolConfig()) | |
695 | 684 | ||
696 | 685 | ||
697 | 686 | ||
698 | 687 | @Callable(i) | |
699 | 688 | func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId)) | |
700 | 689 | ||
701 | 690 | ||
702 | 691 | ||
703 | 692 | @Callable(i) | |
704 | 693 | func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = { | |
705 | 694 | let prices = calcPrices(amAmt, prAmt, lpAmt) | |
706 | 695 | $Tuple2(nil, [toString(prices[0]), toString(prices[1]), toString(prices[2])]) | |
707 | 696 | } | |
708 | 697 | ||
709 | 698 | ||
710 | 699 | ||
711 | 700 | @Callable(i) | |
712 | 701 | func fromX18WrapperREADONLY (val,resultScaleMult) = $Tuple2(nil, fromX18(parseBigIntValue(val), resultScaleMult)) | |
713 | 702 | ||
714 | 703 | ||
715 | 704 | ||
716 | 705 | @Callable(i) | |
717 | 706 | func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(toX18(origVal, origScaleMult))) | |
718 | 707 | ||
719 | 708 | ||
720 | 709 | ||
721 | 710 | @Callable(i) | |
722 | 711 | func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(calcPriceBigInt(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18)))) | |
723 | 712 | ||
724 | 713 | ||
725 | 714 | ||
726 | 715 | @Callable(i) | |
727 | 716 | func estimatePutOperationWrapperREADONLY (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEvaluate,emitLp) = $Tuple2(nil, estimatePutOperation(txId58, slippage, inAmAmt, inAmId, inPrAmt, inPrId, userAddress, isEvaluate, emitLp)) | |
728 | 717 | ||
729 | 718 | ||
730 | 719 | ||
731 | 720 | @Callable(i) | |
732 | 721 | func estimateGetOperationWrapperREADONLY (txId58,pmtAssetId,pmtLpAmt,userAddress) = { | |
733 | 722 | let res = estimateGetOperation(txId58, pmtAssetId, pmtLpAmt, addressFromStringValue(userAddress)) | |
734 | 723 | $Tuple2(nil, $Tuple10(res._1, res._2, res._3, res._4, res._5, res._6, res._7, toString(res._8), res._9, res._10)) | |
735 | 724 | } | |
736 | 725 | ||
737 | 726 | ||
738 | 727 | @Verifier(tx) | |
739 | 728 | func verify () = match tx { | |
740 | 729 | case order: Order => | |
741 | 730 | let matcherPub = getMatcherPubOrFail() | |
742 | 731 | let orderValid = validateMatcherOrderAllowed(order) | |
743 | 732 | let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey) | |
744 | 733 | let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub) | |
745 | 734 | if (if (if (orderValid) | |
746 | 735 | then senderValid | |
747 | 736 | else false) | |
748 | 737 | then matcherValid | |
749 | 738 | else false) | |
750 | 739 | then true | |
751 | 740 | else throwOrderError(orderValid, senderValid, matcherValid) | |
752 | 741 | case _ => | |
753 | 742 | let managerPublic = valueOrElse(getString(this, keyManagerPublicKey()), EMPTY) | |
754 | 743 | if ((managerPublic == EMPTY)) | |
755 | 744 | then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
756 | 745 | else sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(managerPublic)) | |
757 | 746 | } | |
758 | 747 |
github/deemru/w8io/026f985 69.81 ms ◑