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