tx · GUpMxyZQmTczx19YvnwihhixsXw3smudYtE2uzkPhioe 3MyeMZm2BLBkcgK2VBeTU8h1n562iB3zA2Z: -0.02900000 Waves 2022.09.12 14:00 [2225790] smart account 3MyeMZm2BLBkcgK2VBeTU8h1n562iB3zA2Z > SELF 0.00000000 Waves
{ "type": 13, "id": "GUpMxyZQmTczx19YvnwihhixsXw3smudYtE2uzkPhioe", "fee": 2900000, "feeAssetId": null, "timestamp": 1662980489684, "version": 2, "chainId": 84, "sender": "3MyeMZm2BLBkcgK2VBeTU8h1n562iB3zA2Z", "senderPublicKey": "5bHbDgAVwbyzkor8HrHKU8zcg5RfwKy3rNihVqk8YUvP", "proofs": [ "4vCpHwvqEZKbJ9FTzp7W9DNP3Cyk4ekobNoztWTo2846BbeRnPkbFrLBP3R1Do483nhduyctxBeifxkfJ6gWKJDd" ], "script": "base64:BgJ/CAISAwoBCBIDCgEIEgASBAoCAQQSBwoFAQEBAQQSAwoBARIAEgcKBQEBAQgBEgQKAgEBEgMKAQESBAoCCAgSBAoCCAgSBAoCCAESABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCE8AD2RlZmF1bHREZWNpbWFscwDAhD0ABnNjYWxlOACAwtcvAAxzY2FsZThCaWdJbnQJALYCAQCAwtcvAAdzY2FsZTE4CQC2AgEAgICQu7rWrfANAAp6ZXJvQmlnSW50CQC2AgEAAAAJb25lQmlnSW50CQC2AgEAAQAKc2xpcHBhZ2U0RAkAtgIBCQBlAgUGc2NhbGU4CQBpAgkAaAIFBnNjYWxlOAABBQZzY2FsZTgABUFtdWx0AgMxMDAABURjb252AgExAANTRVACAl9fAAVFTVBUWQIAAApQb29sQWN0aXZlAAEAClBvb2xQdXREaXMAAgAOUG9vbE1hdGNoZXJEaXMAAwAMUG9vbFNodXRkb3duAAQADmlkeFBvb2xBZGRyZXNzAAEACWlkeFBvb2xTdAACAAlpZHhMUEFzSWQAAwAJaWR4QW1Bc0lkAAQ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J5dGVzCQCRAwIIBQVvcmRlcgZwcm9vZnMAAQUKbWF0Y2hlclB1YgMDAwUKb3JkZXJWYWxpZAULc2VuZGVyVmFsaWQHBQxtYXRjaGVyVmFsaWQHBgkBA3RvZQMFCm9yZGVyVmFsaWQFC3NlbmRlclZhbGlkBQxtYXRjaGVyVmFsaWQDCQABAgUHJG1hdGNoMAIUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAXMFByRtYXRjaDAEB25ld0hhc2gJAPYDAQkBBXZhbHVlAQgFAXMGc2NyaXB0BAthbGxvd2VkSGFzaAkA2wQBCQEFdmFsdWUBCQCdCAIFA2ZjYQkBHGtleUFsbG93ZWRMcFN0YWJsZVNjcmlwdEhhc2gABAtjdXJyZW50SGFzaAkA8QcBBQR0aGlzAwMJAAACBQthbGxvd2VkSGFzaAUHbmV3SGFzaAkBAiE9AgULY3VycmVudEhhc2gFB25ld0hhc2gHBgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUPdGFyZ2V0UHVibGljS2V5CQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQ90YXJnZXRQdWJsaWNLZXm6t80v", "height": 2225790, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6ARjEzFb9Ny3m2AjSEVvzyk6kXEHfcX59bafUAQft86N Next: H7C1zzQiAyMEc3aZA1DD3RxeB1V71eJBysAnZm3NAHnM Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let defaultDecimals = | |
4 | + | let defaultDecimals = 1000000 | |
5 | 5 | ||
6 | 6 | let scale8 = 100000000 | |
7 | 7 | ||
347 | 347 | else calcLpAmt | |
348 | 348 | let amDiff = (inAmAmt - calcAmAssetPmt) | |
349 | 349 | let prDiff = (inPrAmt - calcPrAssetPmt) | |
350 | - | let $ | |
350 | + | let $t01664716992 = if (if (isOneAsset) | |
351 | 351 | then (pmtId == amIdStr) | |
352 | 352 | else false) | |
353 | 353 | then $Tuple2(pmtAmt, 0) | |
356 | 356 | else false) | |
357 | 357 | then $Tuple2(0, pmtAmt) | |
358 | 358 | else $Tuple2(calcAmAssetPmt, calcPrAssetPmt) | |
359 | - | let writeAmAmt = $ | |
360 | - | let writePrAmt = $ | |
359 | + | let writeAmAmt = $t01664716992._1 | |
360 | + | let writePrAmt = $t01664716992._2 | |
361 | 361 | let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId58), dataPutActionInfo(writeAmAmt, writePrAmt, emitLpAmt, curPrice, slippage, slippageCalc, height, lastBlock.timestamp, amDiff, prDiff))] | |
362 | 362 | $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId) | |
363 | 363 | } | |
619 | 619 | else { | |
620 | 620 | let amBalance = getAccBalance(amId) | |
621 | 621 | let prBalance = getAccBalance(prId) | |
622 | - | let $ | |
622 | + | let $t02583626532 = if ((pmtAssetId == amId)) | |
623 | 623 | then if (if ((pmtAmtDefaultDecimals > amBalance)) | |
624 | 624 | then true | |
625 | 625 | else (amAssetPart > pmtAmtDefaultDecimals)) | |
632 | 632 | then throw("invalid payment amount") | |
633 | 633 | else $Tuple6(amBalance, (prBalance - pmtAmtDefaultDecimals), 0, 0, (pmtAmtDefaultDecimals - prAssetPart), amAssetPart) | |
634 | 634 | else throw("wrong pmtAssetId") | |
635 | - | let amBalanceNow = $ | |
636 | - | let prBalanceNow = $ | |
637 | - | let virtSwapInAm = $ | |
638 | - | let virtSwapOutPr = $ | |
639 | - | let virtSwapInPr = $ | |
640 | - | let virtSwapOutAm = $ | |
635 | + | let amBalanceNow = $t02583626532._1 | |
636 | + | let prBalanceNow = $t02583626532._2 | |
637 | + | let virtSwapInAm = $t02583626532._3 | |
638 | + | let virtSwapOutPr = $t02583626532._4 | |
639 | + | let virtSwapInPr = $t02583626532._5 | |
640 | + | let virtSwapOutAm = $t02583626532._6 | |
641 | 641 | let D0 = invoke(gwxCntr, "calcD", [toString(amBalanceNow), toString(prBalanceNow), A, Amult, Dconv], nil) | |
642 | 642 | let D1 = invoke(gwxCntr, "calcD", [toString(toBigInt(((amBalanceNow + virtSwapInAm) - virtSwapOutAm))), toString(toBigInt(((prBalanceNow + virtSwapInPr) - virtSwapOutPr))), A, Amult, Dconv], nil) | |
643 | 643 | let D0vsD1 = vd(parseBigIntValue(str(D1)), parseBigIntValue(str(D0)), slippage4D) | |
762 | 762 | let estimPrAmt = r._2 | |
763 | 763 | let amBalance = getAccBalance(amId) | |
764 | 764 | let prBalance = getAccBalance(prId) | |
765 | - | let $ | |
765 | + | let $t03131131768 = if ((outAssetId == amId)) | |
766 | 766 | then $Tuple7((amBalance - estimAmAmt), (prBalance - estimPrAmt), exchResult, estimPrAmt, 0, 0, (estimAmAmt + exchResult)) | |
767 | 767 | else if ((outAssetId == prId)) | |
768 | 768 | then $Tuple7((amBalance - estimAmAmt), (prBalance - estimPrAmt), 0, 0, exchResult, estimAmAmt, (estimPrAmt + exchResult)) | |
769 | 769 | else throw("wrong outAssetId") | |
770 | - | let amBalanceNow = $ | |
771 | - | let prBalanceNow = $ | |
772 | - | let virtSwapInAm = $ | |
773 | - | let virtSwapOutPr = $ | |
774 | - | let virtSwapInPr = $ | |
775 | - | let virtSwapOutAm = $ | |
776 | - | let totalGet = $ | |
770 | + | let amBalanceNow = $t03131131768._1 | |
771 | + | let prBalanceNow = $t03131131768._2 | |
772 | + | let virtSwapInAm = $t03131131768._3 | |
773 | + | let virtSwapOutPr = $t03131131768._4 | |
774 | + | let virtSwapInPr = $t03131131768._5 | |
775 | + | let virtSwapOutAm = $t03131131768._6 | |
776 | + | let totalGet = $t03131131768._7 | |
777 | 777 | if (if ((0 > virtSwapInAm)) | |
778 | 778 | then true | |
779 | 779 | else (0 > virtSwapInPr)) | |
787 | 787 | let finalRes = vad(toBigInt(totalGet), toBigInt(outAmount), toBigInt(slippage)) | |
788 | 788 | if ((finalRes == finalRes)) | |
789 | 789 | then { | |
790 | - | let $ | |
790 | + | let $t03247332577 = if ((outAssetId == amId)) | |
791 | 791 | then $Tuple2(toInt(finalRes._2), 0) | |
792 | 792 | else $Tuple2(0, toInt(finalRes._2)) | |
793 | - | let outAm = $ | |
794 | - | let outPr = $ | |
793 | + | let outAm = $t03247332577._1 | |
794 | + | let outPr = $t03247332577._2 | |
795 | 795 | let curPrX18 = cpbi(t1(prBalance, prDcm), t1(amBalance, amDcm)) | |
796 | 796 | let curPr = f1(curPrX18, scale8) | |
797 | 797 | let state = [ScriptTransfer(userAddress, (outAm + outPr), if ((outAssetId == "WAVES")) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let defaultDecimals = | |
4 | + | let defaultDecimals = 1000000 | |
5 | 5 | ||
6 | 6 | let scale8 = 100000000 | |
7 | 7 | ||
8 | 8 | let scale8BigInt = toBigInt(100000000) | |
9 | 9 | ||
10 | 10 | let scale18 = toBigInt(1000000000000000000) | |
11 | 11 | ||
12 | 12 | let zeroBigInt = toBigInt(0) | |
13 | 13 | ||
14 | 14 | let oneBigInt = toBigInt(1) | |
15 | 15 | ||
16 | 16 | let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8))) | |
17 | 17 | ||
18 | 18 | let Amult = "100" | |
19 | 19 | ||
20 | 20 | let Dconv = "1" | |
21 | 21 | ||
22 | 22 | let SEP = "__" | |
23 | 23 | ||
24 | 24 | let EMPTY = "" | |
25 | 25 | ||
26 | 26 | let PoolActive = 1 | |
27 | 27 | ||
28 | 28 | let PoolPutDis = 2 | |
29 | 29 | ||
30 | 30 | let PoolMatcherDis = 3 | |
31 | 31 | ||
32 | 32 | let PoolShutdown = 4 | |
33 | 33 | ||
34 | 34 | let idxPoolAddress = 1 | |
35 | 35 | ||
36 | 36 | let idxPoolSt = 2 | |
37 | 37 | ||
38 | 38 | let idxLPAsId = 3 | |
39 | 39 | ||
40 | 40 | let idxAmAsId = 4 | |
41 | 41 | ||
42 | 42 | let idxPrAsId = 5 | |
43 | 43 | ||
44 | 44 | let idxAmtAsDcm = 6 | |
45 | 45 | ||
46 | 46 | let idxPriceAsDcm = 7 | |
47 | 47 | ||
48 | 48 | let idxIAmtAsId = 8 | |
49 | 49 | ||
50 | 50 | let idxIPriceAsId = 9 | |
51 | 51 | ||
52 | 52 | let idxFactStakCntr = 1 | |
53 | 53 | ||
54 | 54 | let idxFactSlippCntr = 7 | |
55 | 55 | ||
56 | 56 | let idxFactGwxRewCntr = 10 | |
57 | 57 | ||
58 | 58 | let delay = "%s__delay" | |
59 | 59 | ||
60 | 60 | func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult)) | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18)) | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func abs (val) = if ((zeroBigInt > val)) | |
70 | 70 | then -(val) | |
71 | 71 | else val | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func fc () = "%s__factoryContract" | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func mpk () = "%s__managerPublicKey" | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func pmpk () = "%s__pendingManagerPublicKey" | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func pl () = "%s%s__price__last" | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP) | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId) | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId) | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func aa () = "%s__amountAsset" | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func pa () = "%s__priceAsset" | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func amp () = "%s__amp" | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func ada () = "%s__addonAddr" | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func lgotc (caller) = makeString(["%s%s__lastGetOneTknCall", caller], SEP) | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func lsotc (caller) = makeString(["%s%s__lastPutOneTknCall", caller], SEP) | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func fcfg () = "%s__factoryConfig" | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func mtpk () = "%s%s__matcher__publicKey" | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config") | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr) | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func aps () = "%s__shutdown" | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash" | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func toe (orV,sendrV,matchV) = throw(((((("Failed: ordValid=" + toString(orV)) + " sndrValid=") + toString(sendrV)) + " mtchrValid=") + toString(matchV))) | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func str (val) = match val { | |
135 | 135 | case valStr: String => | |
136 | 136 | valStr | |
137 | 137 | case _ => | |
138 | 138 | throw("fail cast to String") | |
139 | 139 | } | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], "")) | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], "")) | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | let fca = addressFromStringValue(strf(this, fc())) | |
149 | 149 | ||
150 | 150 | let A = strf(this, amp()) | |
151 | 151 | ||
152 | 152 | func igs () = valueOrElse(getBoolean(fca, aps()), false) | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | func mp () = fromBase58String(strf(fca, mtpk())) | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func gpc () = { | |
159 | 159 | let amtAs = strf(this, aa()) | |
160 | 160 | let priceAs = strf(this, pa()) | |
161 | 161 | let iPriceAs = intf(fca, mba(priceAs)) | |
162 | 162 | let iAmtAs = intf(fca, mba(amtAs)) | |
163 | 163 | split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP) | |
164 | 164 | } | |
165 | 165 | ||
166 | 166 | ||
167 | 167 | func gfc () = split(strf(fca, fcfg()), SEP) | |
168 | 168 | ||
169 | 169 | ||
170 | 170 | func dataPutActionInfo (inAmtAssetAmt,inPriceAssetAmt,outLpAmt,price,slipByUser,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(slipByUser), toString(slippageReal), toString(txHeight), toString(txTimestamp), toString(slipageAmAmt), toString(slipagePrAmt)], SEP) | |
171 | 171 | ||
172 | 172 | ||
173 | 173 | 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) | |
174 | 174 | ||
175 | 175 | ||
176 | 176 | func getAccBalance (assetId) = if ((assetId == "WAVES")) | |
177 | 177 | then wavesBalance(this).available | |
178 | 178 | else assetBalance(this, fromBase58String(assetId)) | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18) | |
182 | 182 | ||
183 | 183 | ||
184 | 184 | func vad (A1,A2,slippage) = { | |
185 | 185 | let diff = fraction((A1 - A2), scale8BigInt, A2) | |
186 | 186 | let pass = ((slippage - abs(diff)) > zeroBigInt) | |
187 | 187 | if (!(pass)) | |
188 | 188 | then throw(("Big slpg: " + toString(diff))) | |
189 | 189 | else $Tuple2(pass, min([A1, A2])) | |
190 | 190 | } | |
191 | 191 | ||
192 | 192 | ||
193 | 193 | func vd (D1,D0,slpg) = { | |
194 | 194 | let diff = fraction(D0, scale8BigInt, D1) | |
195 | 195 | let fail = (slpg > diff) | |
196 | 196 | if (if (fail) | |
197 | 197 | then true | |
198 | 198 | else (D0 > D1)) | |
199 | 199 | then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg))) | |
200 | 200 | else fail | |
201 | 201 | } | |
202 | 202 | ||
203 | 203 | ||
204 | 204 | func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = { | |
205 | 205 | let amtAsAmtX18 = t1(amAmt, amAssetDcm) | |
206 | 206 | let prAsAmtX18 = t1(prAmt, prAssetDcm) | |
207 | 207 | cpbi(prAsAmtX18, amtAsAmtX18) | |
208 | 208 | } | |
209 | 209 | ||
210 | 210 | ||
211 | 211 | func calcPrices (amAmt,prAmt,lpAmt) = { | |
212 | 212 | let cfg = gpc() | |
213 | 213 | let amtAsDcm = parseIntValue(cfg[idxAmtAsDcm]) | |
214 | 214 | let prAsDcm = parseIntValue(cfg[idxPriceAsDcm]) | |
215 | 215 | let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt) | |
216 | 216 | let amAmtX18 = t1(amAmt, amtAsDcm) | |
217 | 217 | let prAmtX18 = t1(prAmt, prAsDcm) | |
218 | 218 | let lpAmtX18 = t1(lpAmt, scale8) | |
219 | 219 | let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18) | |
220 | 220 | let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18) | |
221 | 221 | [priceX18, lpPrInAmAsX18, lpPrInPrAsX18] | |
222 | 222 | } | |
223 | 223 | ||
224 | 224 | ||
225 | 225 | func calculatePrices (amAmt,prAmt,lpAmt) = { | |
226 | 226 | let p = calcPrices(amAmt, prAmt, lpAmt) | |
227 | 227 | [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)] | |
228 | 228 | } | |
229 | 229 | ||
230 | 230 | ||
231 | 231 | func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = { | |
232 | 232 | let cfg = gpc() | |
233 | 233 | let lpId = cfg[idxLPAsId] | |
234 | 234 | let amId = cfg[idxAmAsId] | |
235 | 235 | let prId = cfg[idxPrAsId] | |
236 | 236 | let amDcm = parseIntValue(cfg[idxAmtAsDcm]) | |
237 | 237 | let prDcm = parseIntValue(cfg[idxPriceAsDcm]) | |
238 | 238 | let sts = cfg[idxPoolSt] | |
239 | 239 | let lpEmiss = valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "Wrong LP id").quantity | |
240 | 240 | if ((lpId != pmtAssetId)) | |
241 | 241 | then throw("Wrong pmt asset") | |
242 | 242 | else { | |
243 | 243 | let amBalance = getAccBalance(amId) | |
244 | 244 | let prBalance = getAccBalance(prId) | |
245 | 245 | let amountBalanceDefaultDecimals = fraction(amBalance, defaultDecimals, amDcm) | |
246 | 246 | let priceBalanceDefaultDecimals = fraction(prBalance, defaultDecimals, prDcm) | |
247 | 247 | let amBalanceX18 = t1(amountBalanceDefaultDecimals, defaultDecimals) | |
248 | 248 | let prBalanceX18 = t1(priceBalanceDefaultDecimals, defaultDecimals) | |
249 | 249 | let curPriceX18 = cpbi(prBalanceX18, amBalanceX18) | |
250 | 250 | let curPrice = f1(curPriceX18, scale8) | |
251 | 251 | let pmtLpAmtX18 = t1(pmtLpAmt, scale8) | |
252 | 252 | let lpEmissX18 = t1(lpEmiss, scale8) | |
253 | 253 | let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18) | |
254 | 254 | let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18) | |
255 | 255 | let outAmountAmountDefaultDecimals = f1(outAmAmtX18, defaultDecimals) | |
256 | 256 | let outPriceAmountDefaultDecimals = f1(outPrAmtX18, defaultDecimals) | |
257 | 257 | let outAmAmt = fraction(outAmountAmountDefaultDecimals, amDcm, defaultDecimals) | |
258 | 258 | let outPrAmt = fraction(outPriceAmountDefaultDecimals, prDcm, defaultDecimals) | |
259 | 259 | let state = if ((txId58 == "")) | |
260 | 260 | then nil | |
261 | 261 | else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES")) | |
262 | 262 | then unit | |
263 | 263 | else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES")) | |
264 | 264 | then unit | |
265 | 265 | else fromBase58String(prId)), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAmAmt, outPrAmt, pmtLpAmt, curPrice, height, lastBlock.timestamp)), IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice)] | |
266 | 266 | $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state) | |
267 | 267 | } | |
268 | 268 | } | |
269 | 269 | ||
270 | 270 | ||
271 | 271 | func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,pmtAmt,pmtId) = { | |
272 | 272 | let cfg = gpc() | |
273 | 273 | let lpId = fromBase58String(cfg[idxLPAsId]) | |
274 | 274 | let amIdStr = cfg[idxAmAsId] | |
275 | 275 | let prIdStr = cfg[idxPrAsId] | |
276 | 276 | let inAmIdStr = cfg[idxIAmtAsId] | |
277 | 277 | let inPrIdStr = cfg[idxIPriceAsId] | |
278 | 278 | let amtDcm = parseIntValue(cfg[idxAmtAsDcm]) | |
279 | 279 | let priceDcm = parseIntValue(cfg[idxPriceAsDcm]) | |
280 | 280 | let sts = cfg[idxPoolSt] | |
281 | 281 | let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity | |
282 | 282 | let amBalance = if (isEval) | |
283 | 283 | then getAccBalance(amIdStr) | |
284 | 284 | else if (if (isOneAsset) | |
285 | 285 | then (pmtId == amIdStr) | |
286 | 286 | else false) | |
287 | 287 | then (getAccBalance(amIdStr) - pmtAmt) | |
288 | 288 | else if (isOneAsset) | |
289 | 289 | then getAccBalance(amIdStr) | |
290 | 290 | else (getAccBalance(amIdStr) - inAmAmt) | |
291 | 291 | let prBalance = if (isEval) | |
292 | 292 | then getAccBalance(prIdStr) | |
293 | 293 | else if (if (isOneAsset) | |
294 | 294 | then (pmtId == prIdStr) | |
295 | 295 | else false) | |
296 | 296 | then (getAccBalance(prIdStr) - pmtAmt) | |
297 | 297 | else if (isOneAsset) | |
298 | 298 | then getAccBalance(prIdStr) | |
299 | 299 | else (getAccBalance(prIdStr) - inPrAmt) | |
300 | 300 | let amountBalanceDefaultDecimals = fraction(amBalance, defaultDecimals, amtDcm) | |
301 | 301 | let priceBalanceDefaultDecimals = fraction(prBalance, defaultDecimals, priceDcm) | |
302 | 302 | let inAmountAssetAmountDefaultDecimals = fraction(inAmAmt, defaultDecimals, amtDcm) | |
303 | 303 | let inPriceAssetAmountDefaultDecimals = fraction(inPrAmt, defaultDecimals, priceDcm) | |
304 | 304 | let inAmAssetAmtX18 = t1(inAmountAssetAmountDefaultDecimals, defaultDecimals) | |
305 | 305 | let inPrAssetAmtX18 = t1(inPriceAssetAmountDefaultDecimals, defaultDecimals) | |
306 | 306 | let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18) | |
307 | 307 | let amBalanceX18 = t1(amountBalanceDefaultDecimals, defaultDecimals) | |
308 | 308 | let prBalanceX18 = t1(priceBalanceDefaultDecimals, defaultDecimals) | |
309 | 309 | let r = if ((lpEm == 0)) | |
310 | 310 | then { | |
311 | 311 | let curPriceX18 = zeroBigInt | |
312 | 312 | let slippageX18 = zeroBigInt | |
313 | 313 | let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN) | |
314 | 314 | $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, defaultDecimals), f1(inPrAssetAmtX18, defaultDecimals), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18) | |
315 | 315 | } | |
316 | 316 | else { | |
317 | 317 | let curPriceX18 = cpbi(prBalanceX18, amBalanceX18) | |
318 | 318 | let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18) | |
319 | 319 | let slippageX18 = t1(slippage, scale8) | |
320 | 320 | if (if ((curPriceX18 != zeroBigInt)) | |
321 | 321 | then (slippageRealX18 > slippageX18) | |
322 | 322 | else false) | |
323 | 323 | then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18))) | |
324 | 324 | else { | |
325 | 325 | let lpEmissionX18 = t1(lpEm, scale8) | |
326 | 326 | let prViaAmX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18) | |
327 | 327 | let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18) | |
328 | 328 | let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18)) | |
329 | 329 | then $Tuple2(amViaPrX18, inPrAssetAmtX18) | |
330 | 330 | else $Tuple2(inAmAssetAmtX18, prViaAmX18) | |
331 | 331 | let expAmtAssetAmtX18 = expectedAmts._1 | |
332 | 332 | let expPriceAssetAmtX18 = expectedAmts._2 | |
333 | 333 | let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18) | |
334 | 334 | $Tuple5(f1(lpAmtX18, scale8), f1(expAmtAssetAmtX18, defaultDecimals), f1(expPriceAssetAmtX18, defaultDecimals), curPriceX18, slippageX18) | |
335 | 335 | } | |
336 | 336 | } | |
337 | 337 | let calcLpAmt = r._1 | |
338 | 338 | let calcAmAssetPmt = fraction(r._2, amtDcm, defaultDecimals) | |
339 | 339 | let calcPrAssetPmt = fraction(r._3, priceDcm, defaultDecimals) | |
340 | 340 | let curPrice = f1(r._4, scale8) | |
341 | 341 | let slippageCalc = f1(r._5, scale8) | |
342 | 342 | if ((0 >= calcLpAmt)) | |
343 | 343 | then throw("LP <= 0") | |
344 | 344 | else { | |
345 | 345 | let emitLpAmt = if (!(emitLp)) | |
346 | 346 | then 0 | |
347 | 347 | else calcLpAmt | |
348 | 348 | let amDiff = (inAmAmt - calcAmAssetPmt) | |
349 | 349 | let prDiff = (inPrAmt - calcPrAssetPmt) | |
350 | - | let $ | |
350 | + | let $t01664716992 = if (if (isOneAsset) | |
351 | 351 | then (pmtId == amIdStr) | |
352 | 352 | else false) | |
353 | 353 | then $Tuple2(pmtAmt, 0) | |
354 | 354 | else if (if (isOneAsset) | |
355 | 355 | then (pmtId == prIdStr) | |
356 | 356 | else false) | |
357 | 357 | then $Tuple2(0, pmtAmt) | |
358 | 358 | else $Tuple2(calcAmAssetPmt, calcPrAssetPmt) | |
359 | - | let writeAmAmt = $ | |
360 | - | let writePrAmt = $ | |
359 | + | let writeAmAmt = $t01664716992._1 | |
360 | + | let writePrAmt = $t01664716992._2 | |
361 | 361 | let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId58), dataPutActionInfo(writeAmAmt, writePrAmt, emitLpAmt, curPrice, slippage, slippageCalc, height, lastBlock.timestamp, amDiff, prDiff))] | |
362 | 362 | $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId) | |
363 | 363 | } | |
364 | 364 | } | |
365 | 365 | ||
366 | 366 | ||
367 | 367 | func moa (order) = { | |
368 | 368 | let cfg = gpc() | |
369 | 369 | let amtAsId = cfg[idxAmAsId] | |
370 | 370 | let prAsId = cfg[idxPrAsId] | |
371 | 371 | let sts = parseIntValue(cfg[idxPoolSt]) | |
372 | 372 | let amtAsDcm = parseIntValue(cfg[idxAmtAsDcm]) | |
373 | 373 | let prAsDcm = parseIntValue(cfg[idxPriceAsDcm]) | |
374 | 374 | let accAmtAsBalance = getAccBalance(amtAsId) | |
375 | 375 | let accPrAsBalance = getAccBalance(prAsId) | |
376 | 376 | let curPriceX18 = if ((order.orderType == Buy)) | |
377 | 377 | then pcp(amtAsDcm, prAsDcm, (accAmtAsBalance + order.amount), accPrAsBalance) | |
378 | 378 | else pcp(amtAsDcm, prAsDcm, (accAmtAsBalance - order.amount), accPrAsBalance) | |
379 | 379 | let curPrice = f1(curPriceX18, scale8) | |
380 | 380 | if (if (if (igs()) | |
381 | 381 | then true | |
382 | 382 | else (sts == PoolMatcherDis)) | |
383 | 383 | then true | |
384 | 384 | else (sts == PoolShutdown)) | |
385 | 385 | then throw("Admin blocked") | |
386 | 386 | else { | |
387 | 387 | let orAmtAsset = order.assetPair.amountAsset | |
388 | 388 | let orAmtAsStr = if ((orAmtAsset == unit)) | |
389 | 389 | then "WAVES" | |
390 | 390 | else toBase58String(value(orAmtAsset)) | |
391 | 391 | let orPrAsset = order.assetPair.priceAsset | |
392 | 392 | let orPrAsStr = if ((orPrAsset == unit)) | |
393 | 393 | then "WAVES" | |
394 | 394 | else toBase58String(value(orPrAsset)) | |
395 | 395 | if (if ((orAmtAsStr != amtAsId)) | |
396 | 396 | then true | |
397 | 397 | else (orPrAsStr != prAsId)) | |
398 | 398 | then throw("Wr assets") | |
399 | 399 | else { | |
400 | 400 | let orderPrice = order.price | |
401 | 401 | let priceDcm = fraction(scale8, prAsDcm, amtAsDcm) | |
402 | 402 | let castOrderPrice = ts(orderPrice, scale8, priceDcm) | |
403 | 403 | let isOrderPriceValid = if ((order.orderType == Buy)) | |
404 | 404 | then (curPrice >= castOrderPrice) | |
405 | 405 | else (castOrderPrice >= curPrice) | |
406 | 406 | true | |
407 | 407 | } | |
408 | 408 | } | |
409 | 409 | } | |
410 | 410 | ||
411 | 411 | ||
412 | 412 | func cg (i) = if ((size(i.payments) != 1)) | |
413 | 413 | then throw("1 pmnt exp") | |
414 | 414 | else { | |
415 | 415 | let pmt = value(i.payments[0]) | |
416 | 416 | let pmtAssetId = value(pmt.assetId) | |
417 | 417 | let pmtAmt = pmt.amount | |
418 | 418 | let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller) | |
419 | 419 | let outAmAmt = r._1 | |
420 | 420 | let outPrAmt = r._2 | |
421 | 421 | let sts = parseIntValue(r._9) | |
422 | 422 | let state = r._10 | |
423 | 423 | if (if (igs()) | |
424 | 424 | then true | |
425 | 425 | else (sts == PoolShutdown)) | |
426 | 426 | then throw(("Admin blocked: " + toString(sts))) | |
427 | 427 | else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state) | |
428 | 428 | } | |
429 | 429 | ||
430 | 430 | ||
431 | 431 | func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,pmtAmt,pmtId) = { | |
432 | 432 | let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, false, emitLp, isOneAsset, pmtAmt, pmtId) | |
433 | 433 | let sts = parseIntValue(r._8) | |
434 | 434 | if (if (if (igs()) | |
435 | 435 | then true | |
436 | 436 | else (sts == PoolPutDis)) | |
437 | 437 | then true | |
438 | 438 | else (sts == PoolShutdown)) | |
439 | 439 | then throw(("Blocked:" + toString(sts))) | |
440 | 440 | else r | |
441 | 441 | } | |
442 | 442 | ||
443 | 443 | ||
444 | 444 | func m () = match getString(mpk()) { | |
445 | 445 | case s: String => | |
446 | 446 | fromBase58String(s) | |
447 | 447 | case _: Unit => | |
448 | 448 | unit | |
449 | 449 | case _ => | |
450 | 450 | throw("Match error") | |
451 | 451 | } | |
452 | 452 | ||
453 | 453 | ||
454 | 454 | func pm () = match getString(pmpk()) { | |
455 | 455 | case s: String => | |
456 | 456 | fromBase58String(s) | |
457 | 457 | case _: Unit => | |
458 | 458 | unit | |
459 | 459 | case _ => | |
460 | 460 | throw("Match error") | |
461 | 461 | } | |
462 | 462 | ||
463 | 463 | ||
464 | 464 | let pd = throw("Permission denied") | |
465 | 465 | ||
466 | 466 | func mm (i) = match m() { | |
467 | 467 | case pk: ByteVector => | |
468 | 468 | if ((i.callerPublicKey == pk)) | |
469 | 469 | then true | |
470 | 470 | else pd | |
471 | 471 | case _: Unit => | |
472 | 472 | if ((i.caller == this)) | |
473 | 473 | then true | |
474 | 474 | else pd | |
475 | 475 | case _ => | |
476 | 476 | throw("Match error") | |
477 | 477 | } | |
478 | 478 | ||
479 | 479 | ||
480 | 480 | @Callable(i) | |
481 | 481 | func constructor (fc) = { | |
482 | 482 | let c = mm(i) | |
483 | 483 | if ((c == c)) | |
484 | 484 | then [StringEntry(fc(), fc)] | |
485 | 485 | else throw("Strict value is not equal to itself.") | |
486 | 486 | } | |
487 | 487 | ||
488 | 488 | ||
489 | 489 | ||
490 | 490 | @Callable(i) | |
491 | 491 | func setManager (pendingManagerPublicKey) = { | |
492 | 492 | let c = mm(i) | |
493 | 493 | if ((c == c)) | |
494 | 494 | then { | |
495 | 495 | let cm = fromBase58String(pendingManagerPublicKey) | |
496 | 496 | if ((cm == cm)) | |
497 | 497 | then [StringEntry(pmpk(), pendingManagerPublicKey)] | |
498 | 498 | else throw("Strict value is not equal to itself.") | |
499 | 499 | } | |
500 | 500 | else throw("Strict value is not equal to itself.") | |
501 | 501 | } | |
502 | 502 | ||
503 | 503 | ||
504 | 504 | ||
505 | 505 | @Callable(i) | |
506 | 506 | func confirmManager () = { | |
507 | 507 | let p = pm() | |
508 | 508 | let hpm = if (isDefined(p)) | |
509 | 509 | then true | |
510 | 510 | else throw("No pending manager") | |
511 | 511 | if ((hpm == hpm)) | |
512 | 512 | then { | |
513 | 513 | let cpm = if ((i.callerPublicKey == value(p))) | |
514 | 514 | then true | |
515 | 515 | else throw("You are not pending manager") | |
516 | 516 | if ((cpm == cpm)) | |
517 | 517 | then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())] | |
518 | 518 | else throw("Strict value is not equal to itself.") | |
519 | 519 | } | |
520 | 520 | else throw("Strict value is not equal to itself.") | |
521 | 521 | } | |
522 | 522 | ||
523 | 523 | ||
524 | 524 | ||
525 | 525 | @Callable(i) | |
526 | 526 | func put (slip,autoStake) = { | |
527 | 527 | let factCfg = gfc() | |
528 | 528 | let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr") | |
529 | 529 | let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr") | |
530 | 530 | if ((0 > slip)) | |
531 | 531 | then throw("Wrong slippage") | |
532 | 532 | else if ((size(i.payments) != 2)) | |
533 | 533 | then throw("2 pmnts expd") | |
534 | 534 | else { | |
535 | 535 | let e = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(value(i.payments[0]).assetId, value(i.payments[0]).amount), i.payments[1], slip, true, false, 0, "") | |
536 | 536 | let emitLpAmt = e._2 | |
537 | 537 | let lpAssetId = e._7 | |
538 | 538 | let state = e._9 | |
539 | 539 | let amDiff = e._10 | |
540 | 540 | let prDiff = e._11 | |
541 | 541 | let amId = e._12 | |
542 | 542 | let prId = e._13 | |
543 | 543 | let r = invoke(fca, "emit", [emitLpAmt], nil) | |
544 | 544 | if ((r == r)) | |
545 | 545 | then { | |
546 | 546 | let el = match r { | |
547 | 547 | case legacy: Address => | |
548 | 548 | invoke(legacy, "emit", [emitLpAmt], nil) | |
549 | 549 | case _ => | |
550 | 550 | unit | |
551 | 551 | } | |
552 | 552 | if ((el == el)) | |
553 | 553 | then { | |
554 | 554 | let sa = if ((amDiff > 0)) | |
555 | 555 | then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)]) | |
556 | 556 | else nil | |
557 | 557 | if ((sa == sa)) | |
558 | 558 | then { | |
559 | 559 | let sp = if ((prDiff > 0)) | |
560 | 560 | then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)]) | |
561 | 561 | else nil | |
562 | 562 | if ((sp == sp)) | |
563 | 563 | then { | |
564 | 564 | let lpTrnsfr = if (autoStake) | |
565 | 565 | then { | |
566 | 566 | let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)]) | |
567 | 567 | if ((ss == ss)) | |
568 | 568 | then nil | |
569 | 569 | else throw("Strict value is not equal to itself.") | |
570 | 570 | } | |
571 | 571 | else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)] | |
572 | 572 | (state ++ lpTrnsfr) | |
573 | 573 | } | |
574 | 574 | else throw("Strict value is not equal to itself.") | |
575 | 575 | } | |
576 | 576 | else throw("Strict value is not equal to itself.") | |
577 | 577 | } | |
578 | 578 | else throw("Strict value is not equal to itself.") | |
579 | 579 | } | |
580 | 580 | else throw("Strict value is not equal to itself.") | |
581 | 581 | } | |
582 | 582 | } | |
583 | 583 | ||
584 | 584 | ||
585 | 585 | ||
586 | 586 | @Callable(i) | |
587 | 587 | func putOneTkn (amAssetPart,prAssetPart,outLp,slippage,autoStake) = { | |
588 | 588 | let cfg = gfc() | |
589 | 589 | let stakingCntr = valueOrErrorMessage(addressFromString(cfg[idxFactStakCntr]), "Wr st addr") | |
590 | 590 | let slipCntr = valueOrErrorMessage(addressFromString(cfg[idxFactSlippCntr]), "Wr sl addr") | |
591 | 591 | let gwxCntr = valueOrErrorMessage(addressFromString(cfg[idxFactGwxRewCntr]), "Wr gwx addr") | |
592 | 592 | let poolCfg = gpc() | |
593 | 593 | let amId = poolCfg[idxAmAsId] | |
594 | 594 | let prId = poolCfg[idxPrAsId] | |
595 | 595 | let amDcm = parseIntValue(poolCfg[idxAmtAsDcm]) | |
596 | 596 | let prDcm = parseIntValue(poolCfg[idxPriceAsDcm]) | |
597 | 597 | let addon = valueOrElse(getString(this, ada()), "") | |
598 | 598 | let userAddress = if ((addon == toString(i.caller))) | |
599 | 599 | then i.originCaller | |
600 | 600 | else i.caller | |
601 | 601 | if (if (if (if ((0 >= slippage)) | |
602 | 602 | then true | |
603 | 603 | else (0 >= amAssetPart)) | |
604 | 604 | then true | |
605 | 605 | else (0 >= prAssetPart)) | |
606 | 606 | then true | |
607 | 607 | else (0 >= outLp)) | |
608 | 608 | then throw("Wrong params") | |
609 | 609 | else if ((size(i.payments) != 1)) | |
610 | 610 | then throw("1 pmnt expd") | |
611 | 611 | else { | |
612 | 612 | let pmt = value(i.payments[0]) | |
613 | 613 | let pmtAssetId = toBase58String(value(pmt.assetId)) | |
614 | 614 | let pmtDecimals = value(assetInfo(value(i.payments[0].assetId))).decimals | |
615 | 615 | let pmtAmt = pmt.amount | |
616 | 616 | let pmtAmtDefaultDecimals = ((pmtAmt * defaultDecimals) / pow(10, 0, pmtDecimals, 0, 0, DOWN)) | |
617 | 617 | if ((10000000 > pmtAmtDefaultDecimals)) | |
618 | 618 | then throw("Wrong pmt amt") | |
619 | 619 | else { | |
620 | 620 | let amBalance = getAccBalance(amId) | |
621 | 621 | let prBalance = getAccBalance(prId) | |
622 | - | let $ | |
622 | + | let $t02583626532 = if ((pmtAssetId == amId)) | |
623 | 623 | then if (if ((pmtAmtDefaultDecimals > amBalance)) | |
624 | 624 | then true | |
625 | 625 | else (amAssetPart > pmtAmtDefaultDecimals)) | |
626 | 626 | then throw("invalid payment amount") | |
627 | 627 | else $Tuple6((amBalance - pmtAmtDefaultDecimals), prBalance, (pmtAmtDefaultDecimals - amAssetPart), prAssetPart, 0, 0) | |
628 | 628 | else if ((pmtAssetId == prId)) | |
629 | 629 | then if (if ((pmtAmtDefaultDecimals > prBalance)) | |
630 | 630 | then true | |
631 | 631 | else (prAssetPart > pmtAmtDefaultDecimals)) | |
632 | 632 | then throw("invalid payment amount") | |
633 | 633 | else $Tuple6(amBalance, (prBalance - pmtAmtDefaultDecimals), 0, 0, (pmtAmtDefaultDecimals - prAssetPart), amAssetPart) | |
634 | 634 | else throw("wrong pmtAssetId") | |
635 | - | let amBalanceNow = $ | |
636 | - | let prBalanceNow = $ | |
637 | - | let virtSwapInAm = $ | |
638 | - | let virtSwapOutPr = $ | |
639 | - | let virtSwapInPr = $ | |
640 | - | let virtSwapOutAm = $ | |
635 | + | let amBalanceNow = $t02583626532._1 | |
636 | + | let prBalanceNow = $t02583626532._2 | |
637 | + | let virtSwapInAm = $t02583626532._3 | |
638 | + | let virtSwapOutPr = $t02583626532._4 | |
639 | + | let virtSwapInPr = $t02583626532._5 | |
640 | + | let virtSwapOutAm = $t02583626532._6 | |
641 | 641 | let D0 = invoke(gwxCntr, "calcD", [toString(amBalanceNow), toString(prBalanceNow), A, Amult, Dconv], nil) | |
642 | 642 | let D1 = invoke(gwxCntr, "calcD", [toString(toBigInt(((amBalanceNow + virtSwapInAm) - virtSwapOutAm))), toString(toBigInt(((prBalanceNow + virtSwapInPr) - virtSwapOutPr))), A, Amult, Dconv], nil) | |
643 | 643 | let D0vsD1 = vd(parseBigIntValue(str(D1)), parseBigIntValue(str(D0)), slippage4D) | |
644 | 644 | if ((D0vsD1 == D0vsD1)) | |
645 | 645 | then { | |
646 | 646 | let estPut = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(fromBase58String(amId), amAssetPart), AttachedPayment(fromBase58String(prId), prAssetPart), slippage, true, true, pmtAmt, pmtAssetId) | |
647 | 647 | let estimLP = estPut._2 | |
648 | 648 | let lpAssetId = estPut._7 | |
649 | 649 | let state = estPut._9 | |
650 | 650 | let amDiff = estPut._10 | |
651 | 651 | let prDiff = estPut._11 | |
652 | 652 | let lpCalcRes = vad(toBigInt(estimLP), toBigInt(outLp), toBigInt(slippage)) | |
653 | 653 | let emitLpAmt = toInt(lpCalcRes._2) | |
654 | 654 | let e = invoke(fca, "emit", [emitLpAmt], nil) | |
655 | 655 | if ((e == e)) | |
656 | 656 | then { | |
657 | 657 | let el = match e { | |
658 | 658 | case legacy: Address => | |
659 | 659 | invoke(legacy, "emit", [emitLpAmt], nil) | |
660 | 660 | case _ => | |
661 | 661 | unit | |
662 | 662 | } | |
663 | 663 | if ((el == el)) | |
664 | 664 | then { | |
665 | 665 | let sa = if ((amDiff > 0)) | |
666 | 666 | then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(amId), amDiff)]) | |
667 | 667 | else nil | |
668 | 668 | if ((sa == sa)) | |
669 | 669 | then { | |
670 | 670 | let sp = if ((prDiff > 0)) | |
671 | 671 | then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(prId), prDiff)]) | |
672 | 672 | else nil | |
673 | 673 | if ((sp == sp)) | |
674 | 674 | then { | |
675 | 675 | let lpTrnsfr = if (autoStake) | |
676 | 676 | then { | |
677 | 677 | let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)]) | |
678 | 678 | if ((ss == ss)) | |
679 | 679 | then nil | |
680 | 680 | else throw("Strict value is not equal to itself.") | |
681 | 681 | } | |
682 | 682 | else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)] | |
683 | 683 | (state ++ lpTrnsfr) | |
684 | 684 | } | |
685 | 685 | else throw("Strict value is not equal to itself.") | |
686 | 686 | } | |
687 | 687 | else throw("Strict value is not equal to itself.") | |
688 | 688 | } | |
689 | 689 | else throw("Strict value is not equal to itself.") | |
690 | 690 | } | |
691 | 691 | else throw("Strict value is not equal to itself.") | |
692 | 692 | } | |
693 | 693 | else throw("Strict value is not equal to itself.") | |
694 | 694 | } | |
695 | 695 | } | |
696 | 696 | } | |
697 | 697 | ||
698 | 698 | ||
699 | 699 | ||
700 | 700 | @Callable(i) | |
701 | 701 | func putForFree (maxSlpg) = if ((0 > maxSlpg)) | |
702 | 702 | then throw("Wrong slpg") | |
703 | 703 | else if ((size(i.payments) != 2)) | |
704 | 704 | then throw("2 pmnts expd") | |
705 | 705 | else { | |
706 | 706 | let estPut = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(value(i.payments[0]).assetId, value(i.payments[0]).amount), i.payments[1], maxSlpg, false, false, 0, "") | |
707 | 707 | estPut._9 | |
708 | 708 | } | |
709 | 709 | ||
710 | 710 | ||
711 | 711 | ||
712 | 712 | @Callable(i) | |
713 | 713 | func get () = { | |
714 | 714 | let r = cg(i) | |
715 | 715 | let outAmtAmt = r._1 | |
716 | 716 | let outPrAmt = r._2 | |
717 | 717 | let pmtAmt = r._3 | |
718 | 718 | let pmtAssetId = r._4 | |
719 | 719 | let state = r._5 | |
720 | 720 | let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
721 | 721 | if ((b == b)) | |
722 | 722 | then state | |
723 | 723 | else throw("Strict value is not equal to itself.") | |
724 | 724 | } | |
725 | 725 | ||
726 | 726 | ||
727 | 727 | ||
728 | 728 | @Callable(i) | |
729 | 729 | func getOneTkn (exchResult,notUsed,outAmount,outAssetId,slippage) = if ((size(i.payments) != 1)) | |
730 | 730 | then throw("1 pmnt expd") | |
731 | 731 | else { | |
732 | 732 | let cfg = gpc() | |
733 | 733 | let lpId = cfg[idxLPAsId] | |
734 | 734 | let amId = cfg[idxAmAsId] | |
735 | 735 | let prId = cfg[idxPrAsId] | |
736 | 736 | let amDcm = parseIntValue(cfg[idxAmtAsDcm]) | |
737 | 737 | let prDcm = parseIntValue(cfg[idxPriceAsDcm]) | |
738 | 738 | let sts = cfg[idxPoolSt] | |
739 | 739 | let factCfg = gfc() | |
740 | 740 | let gwxCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactGwxRewCntr]), "Wr sl addr") | |
741 | 741 | let pmt = value(i.payments[0]) | |
742 | 742 | let addon = valueOrElse(getString(this, ada()), "") | |
743 | 743 | let userAddress = if ((addon == toString(i.caller))) | |
744 | 744 | then i.originCaller | |
745 | 745 | else i.caller | |
746 | 746 | let txId58 = toBase58String(i.transactionId) | |
747 | 747 | let pmtAssetId = value(pmt.assetId) | |
748 | 748 | let pmtAmt = pmt.amount | |
749 | 749 | if ((1000000000 > pmtAmt)) | |
750 | 750 | then throw("Min pmt 10 LP") | |
751 | 751 | else if (if (if ((0 > slippage)) | |
752 | 752 | then true | |
753 | 753 | else (0 > exchResult)) | |
754 | 754 | then true | |
755 | 755 | else (0 > outAmount)) | |
756 | 756 | then throw("Wrong params") | |
757 | 757 | else if ((lpId != toBase58String(pmtAssetId))) | |
758 | 758 | then throw("Wrong LP") | |
759 | 759 | else { | |
760 | 760 | let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller) | |
761 | 761 | let estimAmAmt = r._1 | |
762 | 762 | let estimPrAmt = r._2 | |
763 | 763 | let amBalance = getAccBalance(amId) | |
764 | 764 | let prBalance = getAccBalance(prId) | |
765 | - | let $ | |
765 | + | let $t03131131768 = if ((outAssetId == amId)) | |
766 | 766 | then $Tuple7((amBalance - estimAmAmt), (prBalance - estimPrAmt), exchResult, estimPrAmt, 0, 0, (estimAmAmt + exchResult)) | |
767 | 767 | else if ((outAssetId == prId)) | |
768 | 768 | then $Tuple7((amBalance - estimAmAmt), (prBalance - estimPrAmt), 0, 0, exchResult, estimAmAmt, (estimPrAmt + exchResult)) | |
769 | 769 | else throw("wrong outAssetId") | |
770 | - | let amBalanceNow = $ | |
771 | - | let prBalanceNow = $ | |
772 | - | let virtSwapInAm = $ | |
773 | - | let virtSwapOutPr = $ | |
774 | - | let virtSwapInPr = $ | |
775 | - | let virtSwapOutAm = $ | |
776 | - | let totalGet = $ | |
770 | + | let amBalanceNow = $t03131131768._1 | |
771 | + | let prBalanceNow = $t03131131768._2 | |
772 | + | let virtSwapInAm = $t03131131768._3 | |
773 | + | let virtSwapOutPr = $t03131131768._4 | |
774 | + | let virtSwapInPr = $t03131131768._5 | |
775 | + | let virtSwapOutAm = $t03131131768._6 | |
776 | + | let totalGet = $t03131131768._7 | |
777 | 777 | if (if ((0 > virtSwapInAm)) | |
778 | 778 | then true | |
779 | 779 | else (0 > virtSwapInPr)) | |
780 | 780 | then throw("Wrong calc") | |
781 | 781 | else { | |
782 | 782 | let D0 = invoke(gwxCntr, "calcD", [toString(amBalanceNow), toString(prBalanceNow), A, Amult, Dconv], nil) | |
783 | 783 | let D1 = invoke(gwxCntr, "calcD", [toString(((amBalanceNow - virtSwapInAm) + virtSwapOutAm)), toString(((prBalanceNow + virtSwapOutPr) - virtSwapInPr)), A, Amult, Dconv], nil) | |
784 | 784 | let D0vsD1 = vd(parseBigIntValue(str(D1)), parseBigIntValue(str(D0)), slippage4D) | |
785 | 785 | if ((D0vsD1 == D0vsD1)) | |
786 | 786 | then { | |
787 | 787 | let finalRes = vad(toBigInt(totalGet), toBigInt(outAmount), toBigInt(slippage)) | |
788 | 788 | if ((finalRes == finalRes)) | |
789 | 789 | then { | |
790 | - | let $ | |
790 | + | let $t03247332577 = if ((outAssetId == amId)) | |
791 | 791 | then $Tuple2(toInt(finalRes._2), 0) | |
792 | 792 | else $Tuple2(0, toInt(finalRes._2)) | |
793 | - | let outAm = $ | |
794 | - | let outPr = $ | |
793 | + | let outAm = $t03247332577._1 | |
794 | + | let outPr = $t03247332577._2 | |
795 | 795 | let curPrX18 = cpbi(t1(prBalance, prDcm), t1(amBalance, amDcm)) | |
796 | 796 | let curPr = f1(curPrX18, scale8) | |
797 | 797 | let state = [ScriptTransfer(userAddress, (outAm + outPr), if ((outAssetId == "WAVES")) | |
798 | 798 | then unit | |
799 | 799 | else fromBase58String(outAssetId)), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAm, outPr, pmtAmt, curPr, height, lastBlock.timestamp)), IntegerEntry(pl(), curPr), IntegerEntry(ph(height, lastBlock.timestamp), curPr)] | |
800 | 800 | if ((state == state)) | |
801 | 801 | then { | |
802 | 802 | let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
803 | 803 | if ((burn == burn)) | |
804 | 804 | then state | |
805 | 805 | else throw("Strict value is not equal to itself.") | |
806 | 806 | } | |
807 | 807 | else throw("Strict value is not equal to itself.") | |
808 | 808 | } | |
809 | 809 | else throw("Strict value is not equal to itself.") | |
810 | 810 | } | |
811 | 811 | else throw("Strict value is not equal to itself.") | |
812 | 812 | } | |
813 | 813 | } | |
814 | 814 | } | |
815 | 815 | ||
816 | 816 | ||
817 | 817 | ||
818 | 818 | @Callable(i) | |
819 | 819 | func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = { | |
820 | 820 | let r = cg(i) | |
821 | 821 | let outAmAmt = r._1 | |
822 | 822 | let outPrAmt = r._2 | |
823 | 823 | let pmtAmt = r._3 | |
824 | 824 | let pmtAssetId = r._4 | |
825 | 825 | let state = r._5 | |
826 | 826 | if ((noLessThenAmtAsset > outAmAmt)) | |
827 | 827 | then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset))) | |
828 | 828 | else if ((noLessThenPriceAsset > outPrAmt)) | |
829 | 829 | then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset))) | |
830 | 830 | else { | |
831 | 831 | let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
832 | 832 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
833 | 833 | then state | |
834 | 834 | else throw("Strict value is not equal to itself.") | |
835 | 835 | } | |
836 | 836 | } | |
837 | 837 | ||
838 | 838 | ||
839 | 839 | ||
840 | 840 | @Callable(i) | |
841 | 841 | func unstakeAndGet (amount) = { | |
842 | 842 | let checkPayments = if ((size(i.payments) != 0)) | |
843 | 843 | then throw("No pmnts expd") | |
844 | 844 | else true | |
845 | 845 | if ((checkPayments == checkPayments)) | |
846 | 846 | then { | |
847 | 847 | let cfg = gpc() | |
848 | 848 | let factoryCfg = gfc() | |
849 | 849 | let lpAssetId = fromBase58String(cfg[idxLPAsId]) | |
850 | 850 | let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr") | |
851 | 851 | let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil) | |
852 | 852 | if ((unstakeInv == unstakeInv)) | |
853 | 853 | then { | |
854 | 854 | let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller) | |
855 | 855 | let sts = parseIntValue(r._9) | |
856 | 856 | let state = r._10 | |
857 | 857 | let v = if (if (igs()) | |
858 | 858 | then true | |
859 | 859 | else (sts == PoolShutdown)) | |
860 | 860 | then throw(("Blocked: " + toString(sts))) | |
861 | 861 | else true | |
862 | 862 | if ((v == v)) | |
863 | 863 | then { | |
864 | 864 | let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)]) | |
865 | 865 | if ((burnA == burnA)) | |
866 | 866 | then state | |
867 | 867 | else throw("Strict value is not equal to itself.") | |
868 | 868 | } | |
869 | 869 | else throw("Strict value is not equal to itself.") | |
870 | 870 | } | |
871 | 871 | else throw("Strict value is not equal to itself.") | |
872 | 872 | } | |
873 | 873 | else throw("Strict value is not equal to itself.") | |
874 | 874 | } | |
875 | 875 | ||
876 | 876 | ||
877 | 877 | ||
878 | 878 | @Callable(i) | |
879 | 879 | func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca))) | |
880 | 880 | then throw("denied") | |
881 | 881 | else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success") | |
882 | 882 | ||
883 | 883 | ||
884 | 884 | ||
885 | 885 | @Callable(i) | |
886 | 886 | func setS (k,v) = if ((toString(i.caller) != strf(this, ada()))) | |
887 | 887 | then pd | |
888 | 888 | else [StringEntry(k, v)] | |
889 | 889 | ||
890 | 890 | ||
891 | 891 | ||
892 | 892 | @Callable(i) | |
893 | 893 | func setI (k,v) = if ((toString(i.caller) != strf(this, ada()))) | |
894 | 894 | then pd | |
895 | 895 | else [IntegerEntry(k, v)] | |
896 | 896 | ||
897 | 897 | ||
898 | 898 | ||
899 | 899 | @Callable(i) | |
900 | 900 | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc()) | |
901 | 901 | ||
902 | 902 | ||
903 | 903 | ||
904 | 904 | @Callable(i) | |
905 | 905 | func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId)) | |
906 | 906 | ||
907 | 907 | ||
908 | 908 | ||
909 | 909 | @Callable(i) | |
910 | 910 | func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = { | |
911 | 911 | let pr = calcPrices(amAmt, prAmt, lpAmt) | |
912 | 912 | $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])]) | |
913 | 913 | } | |
914 | 914 | ||
915 | 915 | ||
916 | 916 | ||
917 | 917 | @Callable(i) | |
918 | 918 | func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult)) | |
919 | 919 | ||
920 | 920 | ||
921 | 921 | ||
922 | 922 | @Callable(i) | |
923 | 923 | func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult))) | |
924 | 924 | ||
925 | 925 | ||
926 | 926 | ||
927 | 927 | @Callable(i) | |
928 | 928 | func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18)))) | |
929 | 929 | ||
930 | 930 | ||
931 | 931 | ||
932 | 932 | @Callable(i) | |
933 | 933 | func estimatePutOperationWrapperREADONLY (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,usrAddr,isEval,emitLp) = $Tuple2(nil, epo(txId58, slippage, inAmAmt, inAmId, inPrAmt, inPrId, usrAddr, isEval, emitLp, false, 0, "")) | |
934 | 934 | ||
935 | 935 | ||
936 | 936 | ||
937 | 937 | @Callable(i) | |
938 | 938 | func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = { | |
939 | 939 | let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr)) | |
940 | 940 | $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10)) | |
941 | 941 | } | |
942 | 942 | ||
943 | 943 | ||
944 | 944 | @Verifier(tx) | |
945 | 945 | func verify () = { | |
946 | 946 | let targetPublicKey = match m() { | |
947 | 947 | case pk: ByteVector => | |
948 | 948 | pk | |
949 | 949 | case _: Unit => | |
950 | 950 | tx.senderPublicKey | |
951 | 951 | case _ => | |
952 | 952 | throw("Match error") | |
953 | 953 | } | |
954 | 954 | match tx { | |
955 | 955 | case order: Order => | |
956 | 956 | let matcherPub = mp() | |
957 | 957 | let orderValid = moa(order) | |
958 | 958 | let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey) | |
959 | 959 | let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub) | |
960 | 960 | if (if (if (orderValid) | |
961 | 961 | then senderValid | |
962 | 962 | else false) | |
963 | 963 | then matcherValid | |
964 | 964 | else false) | |
965 | 965 | then true | |
966 | 966 | else toe(orderValid, senderValid, matcherValid) | |
967 | 967 | case s: SetScriptTransaction => | |
968 | 968 | let newHash = blake2b256(value(s.script)) | |
969 | 969 | let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash()))) | |
970 | 970 | let currentHash = scriptHash(this) | |
971 | 971 | if (if ((allowedHash == newHash)) | |
972 | 972 | then (currentHash != newHash) | |
973 | 973 | else false) | |
974 | 974 | then true | |
975 | 975 | else sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
976 | 976 | case _ => | |
977 | 977 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
978 | 978 | } | |
979 | 979 | } | |
980 | 980 |
github/deemru/w8io/026f985 113.10 ms ◑