tx · 5zAWw6N25D1HJAMVcqZbViGPZyYp4vjZFx2FemwKESDN

3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA:  -0.04200000 Waves

2023.03.22 16:14 [2501268] smart account 3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA > SELF 0.00000000 Waves

{ "type": 13, "id": "5zAWw6N25D1HJAMVcqZbViGPZyYp4vjZFx2FemwKESDN", "fee": 4200000, "feeAssetId": null, "timestamp": 1679490898407, "version": 2, "chainId": 84, "sender": "3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA", "senderPublicKey": "35yd3qw1gxKDxKwGAykHN9fANbXNWwseaUwbWDj24o3x", "proofs": [ "2Gq42EphgYnzUSBHvdMyg8hKF2druaZckPxY3ZfFr2fWnXNKh1eBScGp5LZUxdUTbyztKv9Z6pbWB8EumR6aA7os" ], "script": "base64:BgKrLAgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgMKAQgSABIECgIBBBIECgIBBBIDCgEBEgASBAoCCAESABIECgIIARIECgIIARIECgIBARIDCgEBEgUKAwEBARIFCgMBCAESBAoCAQgSBAoCAQgSBAoCCAgSBAoCCAgSBAoCCAESABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAIgZzY2FsZTgiDHNjYWxlOEJpZ0ludCIHc2NhbGUxOCIKemVyb0JpZ0ludCIEYmlnMCIEYmlnMSIEYmlnMiIEYmlnMyIEYmlnNCIKc2xpcHBhZ2U0RCILd2F2ZXNTdHJpbmciBUFtdWx0IgVEY29udiIDU0VQIgVFTVBUWSIKUG9vbEFjdGl2ZSIKUG9vbFB1dERpcyIOUG9vbE1hdGNoZXJEaXMiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiCWlkeFBvb2xTdCIJaWR4TFBBc0lkIglpZHhBbUFzSWQiCWlkeFByQXNJZCILaWR4QW10QXNEY20iDWlkeFByaWNlQXNEY20iC2lkeElBbXRBc0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AIFAmFWCQECYUYABAJpRAkA8QcBBQR0aGlzAwkAAAIFAmlDBQJpQgkBAiE9AgUCaUQFAmlCBwkA9AMDCAUCaXcJYm9keUJ5dGVzCQCRAwIIBQJpdwZwcm9vZnMAAAUCaXn0SHqW", "height": 2501268, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HtsspLxEeNzwKA9f3jLpczEPCENRLQwrB31XjV9Fusx7 Next: CzRazU7s3f2z2txF37skcsiDGhMnhHz7zZasTdRh1SxN Diff:
OldNewDifferences
17421742 then @
17431743 else throw(($getType(@) + " couldn't be cast to List[Any]"))
17441744 }
1745- let delay = {
1746- let @ = cfg[0]
1747- if ($isInstanceOf(@, "Int"))
1748- then @
1749- else throw(($getType(@) + " couldn't be cast to Int"))
1750- }
1751- let delta = {
1752- let @ = cfg[1]
1753- if ($isInstanceOf(@, "Int"))
1754- then @
1755- else throw(($getType(@) + " couldn't be cast to Int"))
1756- }
1757- let target = {
1758- let @ = cfg[2]
1759- if ($isInstanceOf(@, "Int"))
1760- then @
1761- else throw(($getType(@) + " couldn't be cast to Int"))
1762- }
1763- let curAmp = parseIntValue(getStringValue(amp()))
1764- let lastCall = valueOrElse(getInteger(keyChangeAmpLastCall()), 0)
1765- let t = throw(makeString([("lastCall=" + toString(lastCall)), ("delay=" + toString(delay)), ("height=" + toString(an)), ("curAmp=" + toString(curAmp)), ("target=" + toString(target))], " "))
1766- if ((t == t))
1745+ if ((cfg == cfg))
17671746 then {
1747+ let delay = {
1748+ let @ = cfg[0]
1749+ if ($isInstanceOf(@, "Int"))
1750+ then @
1751+ else throw(($getType(@) + " couldn't be cast to Int"))
1752+ }
1753+ let delta = {
1754+ let @ = cfg[1]
1755+ if ($isInstanceOf(@, "Int"))
1756+ then @
1757+ else throw(($getType(@) + " couldn't be cast to Int"))
1758+ }
1759+ let target = {
1760+ let @ = cfg[2]
1761+ if ($isInstanceOf(@, "Int"))
1762+ then @
1763+ else throw(($getType(@) + " couldn't be cast to Int"))
1764+ }
1765+ let curAmp = parseIntValue(getStringValue(amp()))
1766+ let lastCall = valueOrElse(getInteger(keyChangeAmpLastCall()), 0)
17681767 let checks = [if ((an > (lastCall + delay)))
17691768 then true
17701769 else throwErr("try again in few blocks"), if ((curAmp != target))
18011800 match tx {
18021801 case order: Order =>
18031802 let matcherPub = mp()
1804- let $t05998060097 = if (skipOrderValidation())
1803+ let $t05998460101 = if (skipOrderValidation())
18051804 then $Tuple2(true, "")
18061805 else validateMatcherOrderAllowed(order)
1807- let orderValid = $t05998060097._1
1808- let orderValidInfo = $t05998060097._2
1806+ let orderValid = $t05998460101._1
1807+ let orderValidInfo = $t05998460101._2
18091808 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
18101809 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
18111810 if (if (if (orderValid)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let scale8 = 100000000
55
66 let scale8BigInt = toBigInt(100000000)
77
88 let scale18 = toBigInt(1000000000000000000)
99
1010 let zeroBigInt = toBigInt(0)
1111
1212 let big0 = toBigInt(0)
1313
1414 let big1 = toBigInt(1)
1515
1616 let big2 = toBigInt(2)
1717
1818 let big3 = toBigInt(3)
1919
2020 let big4 = toBigInt(4)
2121
2222 let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
2323
2424 let wavesString = "WAVES"
2525
2626 let Amult = "100"
2727
2828 let Dconv = "1"
2929
3030 let SEP = "__"
3131
3232 let EMPTY = ""
3333
3434 let PoolActive = 1
3535
3636 let PoolPutDis = 2
3737
3838 let PoolMatcherDis = 3
3939
4040 let PoolShutdown = 4
4141
4242 let idxPoolAddress = 1
4343
4444 let idxPoolSt = 2
4545
4646 let idxLPAsId = 3
4747
4848 let idxAmAsId = 4
4949
5050 let idxPrAsId = 5
5151
5252 let idxAmtAsDcm = 6
5353
5454 let idxPriceAsDcm = 7
5555
5656 let idxIAmtAsId = 8
5757
5858 let idxIPriceAsId = 9
5959
6060 let idxFactStakCntr = 1
6161
6262 let idxFactoryRestCntr = 6
6363
6464 let idxFactSlippCntr = 7
6565
6666 let idxFactGwxRewCntr = 10
6767
6868 let feeDefault = fraction(10, scale8, 10000)
6969
7070 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
7171
7272
7373 func t1BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult)
7474
7575
7676 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
7777
7878
7979 func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
8080
8181
8282 func t2 (origVal,origScaleMult) = fraction(origVal, scale18, toBigInt(origScaleMult))
8383
8484
8585 func f2 (val,resultScaleMult) = fraction(val, toBigInt(resultScaleMult), scale18)
8686
8787
8888 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
8989
9090
9191 func abs (val) = if ((zeroBigInt > val))
9292 then -(val)
9393 else val
9494
9595
9696 func absBigInt (val) = if ((zeroBigInt > val))
9797 then -(val)
9898 else val
9999
100100
101101 func fc () = "%s__factoryContract"
102102
103103
104104 func mpk () = "%s__managerPublicKey"
105105
106106
107107 func pmpk () = "%s__pendingManagerPublicKey"
108108
109109
110110 func pl () = "%s%s__price__last"
111111
112112
113113 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
114114
115115
116116 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
117117
118118
119119 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
120120
121121
122122 func aa () = "%s__amountAsset"
123123
124124
125125 func pa () = "%s__priceAsset"
126126
127127
128128 func amp () = "%s__amp"
129129
130130
131131 func keyAmpHistory (height) = ("%s%d__amp__" + toString(height))
132132
133133
134134 func ada () = "%s__addonAddr"
135135
136136
137137 func keyChangeAmpLastCall () = "%s__changeAmpLastCall"
138138
139139
140140 let keyFee = "%s__fee"
141141
142142 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
143143
144144 let keyDLp = makeString(["%s", "dLp"], SEP)
145145
146146 let keyDLpRefreshedHeight = makeString(["%s", "dLpRefreshedHeight"], SEP)
147147
148148 let keyDLpRefreshDelay = makeString(["%s", "refreshDLpDelay"], SEP)
149149
150150 let dLpRefreshDelayDefault = 30
151151
152152 let dLpRefreshDelay = valueOrElse(getInteger(this, keyDLpRefreshDelay), dLpRefreshDelayDefault)
153153
154154 func fcfg () = "%s__factoryConfig"
155155
156156
157157 func mtpk () = "%s%s__matcher__publicKey"
158158
159159
160160 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
161161
162162
163163 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
164164
165165
166166 func aps () = "%s__shutdown"
167167
168168
169169 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
170170
171171
172172 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
173173
174174
175175 func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress)
176176
177177
178178 func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
179179
180180
181181 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
182182
183183
184184 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
185185
186186
187187 func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
188188
189189
190190 func fmtErr (msg) = makeString(["lp_stable.ride:", msg], " ")
191191
192192
193193 let fca = addressFromStringValue(strf(this, fc()))
194194
195195 let inFee = {
196196 let @ = invoke(fca, "getInFeeREADONLY", [toString(this)], nil)
197197 if ($isInstanceOf(@, "Int"))
198198 then @
199199 else throw(($getType(@) + " couldn't be cast to Int"))
200200 }
201201
202202 let outFee = {
203203 let @ = invoke(fca, "getOutFeeREADONLY", [toString(this)], nil)
204204 if ($isInstanceOf(@, "Int"))
205205 then @
206206 else throw(($getType(@) + " couldn't be cast to Int"))
207207 }
208208
209209 let A = strf(this, amp())
210210
211211 func igs () = valueOrElse(getBoolean(fca, aps()), false)
212212
213213
214214 func mp () = fromBase58String(strf(fca, mtpk()))
215215
216216
217217 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
218218
219219 func gpc () = {
220220 let amtAs = strf(this, aa())
221221 let priceAs = strf(this, pa())
222222 let iPriceAs = intf(fca, mba(priceAs))
223223 let iAmtAs = intf(fca, mba(amtAs))
224224 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
225225 }
226226
227227
228228 func parseAssetId (input) = if ((input == wavesString))
229229 then unit
230230 else fromBase58String(input)
231231
232232
233233 func assetIdToString (input) = if ((input == unit))
234234 then wavesString
235235 else toBase58String(value(input))
236236
237237
238238 func parsePoolConfig (poolConfig) = $Tuple9(addressFromStringValue(poolConfig[idxPoolAddress]), parseIntValue(poolConfig[idxPoolSt]), fromBase58String(poolConfig[idxLPAsId]), parseAssetId(poolConfig[idxAmAsId]), parseAssetId(poolConfig[idxPrAsId]), parseIntValue(poolConfig[idxAmtAsDcm]), parseIntValue(poolConfig[idxPriceAsDcm]), fromBase58String(poolConfig[idxIAmtAsId]), fromBase58String(poolConfig[idxIPriceAsId]))
239239
240240
241241 let poolConfigParsed = parsePoolConfig(gpc())
242242
243243 let $t081828411 = poolConfigParsed
244244
245245 let cfgPoolAddress = $t081828411._1
246246
247247 let cfgPoolStatus = $t081828411._2
248248
249249 let cfgLpAssetId = $t081828411._3
250250
251251 let cfgAmountAssetId = $t081828411._4
252252
253253 let cfgPriceAssetId = $t081828411._5
254254
255255 let cfgAmountAssetDecimals = $t081828411._6
256256
257257 let cfgPriceAssetDecimals = $t081828411._7
258258
259259 let cfgInAmountAssedId = $t081828411._8
260260
261261 let cfgInPriceAssetId = $t081828411._9
262262
263263 func gfc () = split(strf(fca, fcfg()), SEP)
264264
265265
266266 let factoryConfig = gfc()
267267
268268 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
269269
270270 let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
271271
272272 let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
273273
274274 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
275275
276276 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)
277277
278278
279279 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)
280280
281281
282282 func getAccBalance (assetId) = if ((assetId == "WAVES"))
283283 then wavesBalance(this).available
284284 else assetBalance(this, fromBase58String(assetId))
285285
286286
287287 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
288288
289289
290290 func cpbir (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
291291
292292
293293 func vad (A1,A2,slippage) = {
294294 let diff = fraction((A1 - A2), scale8BigInt, A2)
295295 let pass = ((slippage - abs(diff)) > zeroBigInt)
296296 if (!(pass))
297297 then throw(("Big slpg: " + toString(diff)))
298298 else $Tuple2(pass, min([A1, A2]))
299299 }
300300
301301
302302 func vd (D1,D0,slpg) = {
303303 let diff = fraction(D0, scale8BigInt, D1)
304304 let fail = (slpg > diff)
305305 if (if (fail)
306306 then true
307307 else (D0 > D1))
308308 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
309309 else fail
310310 }
311311
312312
313313 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
314314 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
315315 let prAsAmtX18 = t1(prAmt, prAssetDcm)
316316 cpbi(prAsAmtX18, amtAsAmtX18)
317317 }
318318
319319
320320 func calcPrices (amAmt,prAmt,lpAmt) = {
321321 let amtAsDcm = cfgAmountAssetDecimals
322322 let prAsDcm = cfgPriceAssetDecimals
323323 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
324324 let amAmtX18 = t1(amAmt, amtAsDcm)
325325 let prAmtX18 = t1(prAmt, prAsDcm)
326326 let lpAmtX18 = t1(lpAmt, scale8)
327327 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
328328 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
329329 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
330330 }
331331
332332
333333 func calculatePrices (amAmt,prAmt,lpAmt) = {
334334 let p = calcPrices(amAmt, prAmt, lpAmt)
335335 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
336336 }
337337
338338
339339 func takeFee (amount,fee) = {
340340 let feeAmount = if ((fee == 0))
341341 then 0
342342 else fraction(amount, fee, scale8)
343343 $Tuple2((amount - feeAmount), feeAmount)
344344 }
345345
346346
347347 func getD (xp) = {
348348 let xp0 = xp[0]
349349 let xp1 = xp[1]
350350 let s = (xp0 + xp1)
351351 if ((s == big0))
352352 then big0
353353 else {
354354 let a = parseIntValue(A)
355355 let ann = (a * 2)
356356 let p = fraction(xp0, xp1, big1)
357357 let xp0_xp1_n_n = fraction(p, big4, big1)
358358 let ann_s = fraction(toBigInt(ann), s, big1)
359359 let ann_1 = toBigInt((ann - 1))
360360 func calcDNext (d) = {
361361 let dd = fraction(d, d, big1)
362362 let ddd = fraction(dd, d, big1)
363363 let dp = fraction(ddd, big1, xp0_xp1_n_n)
364364 fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)))
365365 }
366366
367367 func calc (acc,i) = if (acc._2)
368368 then acc
369369 else {
370370 let d = acc._1
371371 let dNext = calcDNext(d)
372372 let dDiffRaw = (dNext - value(d))
373373 let dDiff = if ((big0 > dDiffRaw))
374374 then -(dDiffRaw)
375375 else dDiffRaw
376376 if ((big1 >= dDiff))
377377 then $Tuple2(dNext, true)
378378 else $Tuple2(dNext, false)
379379 }
380380
381381 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
382382 let $t01291612964 = {
383383 let $l = arr
384384 let $s = size($l)
385385 let $acc0 = $Tuple2(s, false)
386386 func $f0_1 ($a,$i) = if (($i >= $s))
387387 then $a
388388 else calc($a, $l[$i])
389389
390390 func $f0_2 ($a,$i) = if (($i >= $s))
391391 then $a
392392 else throw("List size exceeds 17")
393393
394394 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17)
395395 }
396396 let d = $t01291612964._1
397397 let found = $t01291612964._2
398398 if (found)
399399 then d
400400 else throw(("D calculation error, D = " + toString(d)))
401401 }
402402 }
403403
404404
405405 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
406406 let lpId = cfgLpAssetId
407407 let amId = toBase58String(value(cfgAmountAssetId))
408408 let prId = toBase58String(value(cfgPriceAssetId))
409409 let amDcm = cfgAmountAssetDecimals
410410 let prDcm = cfgPriceAssetDecimals
411411 let sts = toString(cfgPoolStatus)
412412 let lpEmiss = valueOrErrorMessage(assetInfo(lpId), "Wrong LP id").quantity
413413 if ((toBase58String(lpId) != pmtAssetId))
414414 then throw("Wrong pmt asset")
415415 else {
416416 let amBalance = getAccBalance(amId)
417417 let amBalanceX18 = t1(amBalance, amDcm)
418418 let prBalance = getAccBalance(prId)
419419 let prBalanceX18 = t1(prBalance, prDcm)
420420 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
421421 let curPrice = f1(curPriceX18, scale8)
422422 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
423423 let lpEmissX18 = t1(lpEmiss, scale8)
424424 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
425425 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
426426 let outAmAmt = fromX18Round(outAmAmtX18, amDcm, FLOOR)
427427 let outPrAmt = fromX18Round(outPrAmtX18, prDcm, FLOOR)
428428 let state = if ((txId58 == ""))
429429 then nil
430430 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
431431 then unit
432432 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
433433 then unit
434434 else fromBase58String(prId)), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAmAmt, outPrAmt, pmtLpAmt, curPrice, an, lastBlock.timestamp)), IntegerEntry(pl(), curPrice), IntegerEntry(ph(an, lastBlock.timestamp), curPrice)]
435435 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
436436 }
437437 }
438438
439439
440440 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
441441 let lpId = cfgLpAssetId
442442 let amIdStr = toBase58String(value(cfgAmountAssetId))
443443 let prIdStr = toBase58String(value(cfgPriceAssetId))
444444 let inAmIdStr = cfgInAmountAssedId
445445 let inPrIdStr = cfgInPriceAssetId
446446 let amtDcm = cfgAmountAssetDecimals
447447 let priceDcm = cfgPriceAssetDecimals
448448 let sts = toString(cfgPoolStatus)
449449 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
450450 let amBalance = if (isEval)
451451 then getAccBalance(amIdStr)
452452 else if (if (isOneAsset)
453453 then (pmtId == amIdStr)
454454 else false)
455455 then (getAccBalance(amIdStr) - pmtAmt)
456456 else if (isOneAsset)
457457 then getAccBalance(amIdStr)
458458 else (getAccBalance(amIdStr) - inAmAmt)
459459 let prBalance = if (isEval)
460460 then getAccBalance(prIdStr)
461461 else if (if (isOneAsset)
462462 then (pmtId == prIdStr)
463463 else false)
464464 then (getAccBalance(prIdStr) - pmtAmt)
465465 else if (isOneAsset)
466466 then getAccBalance(prIdStr)
467467 else (getAccBalance(prIdStr) - inPrAmt)
468468 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
469469 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
470470 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
471471 let amBalanceX18 = t1(amBalance, amtDcm)
472472 let prBalanceX18 = t1(prBalance, priceDcm)
473473 let D0 = getD([amBalanceX18, prBalanceX18])
474474 let r = if ((lpEm == 0))
475475 then {
476476 let D1 = getD([(amBalanceX18 + inAmAssetAmtX18), (prBalanceX18 + inPrAssetAmtX18)])
477477 let checkD = if ((D1 > D0))
478478 then true
479479 else throw("D1 should be greater than D0")
480480 if ((checkD == checkD))
481481 then {
482482 let curPriceX18 = zeroBigInt
483483 let slippageX18 = zeroBigInt
484484 let lpAmtX18 = D1
485485 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
486486 }
487487 else throw("Strict value is not equal to itself.")
488488 }
489489 else {
490490 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
491491 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
492492 let slippageX18 = t1(slippage, scale8)
493493 if (if (if (validateSlippage)
494494 then (curPriceX18 != zeroBigInt)
495495 else false)
496496 then (slippageRealX18 > slippageX18)
497497 else false)
498498 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
499499 else {
500500 let lpEmissionX18 = t1(lpEm, scale8)
501501 let prViaAmX18 = fraction(inAmAssetAmtX18, cpbir(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING)
502502 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, cpbir(prBalanceX18, amBalanceX18, FLOOR), CEILING)
503503 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
504504 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
505505 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
506506 let expAmtAssetAmtX18 = expectedAmts._1
507507 let expPriceAssetAmtX18 = expectedAmts._2
508508 let D1 = getD([(amBalanceX18 + expAmtAssetAmtX18), (prBalanceX18 + expPriceAssetAmtX18)])
509509 let checkD = if ((D1 > D0))
510510 then true
511511 else throw("D1 should be greater than D0")
512512 if ((checkD == checkD))
513513 then {
514514 let lpAmtX18 = fraction(lpEmissionX18, (D1 - D0), D0)
515515 $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18)
516516 }
517517 else throw("Strict value is not equal to itself.")
518518 }
519519 }
520520 let calcLpAmt = r._1
521521 let calcAmAssetPmt = r._2
522522 let calcPrAssetPmt = r._3
523523 let curPrice = f1(r._4, scale8)
524524 let slippageCalc = f1(r._5, scale8)
525525 if ((0 >= calcLpAmt))
526526 then throw("LP <= 0")
527527 else {
528528 let emitLpAmt = if (!(emitLp))
529529 then 0
530530 else calcLpAmt
531531 let amDiff = (inAmAmt - calcAmAssetPmt)
532532 let prDiff = (inPrAmt - calcPrAssetPmt)
533533 let $t02080321148 = if (if (isOneAsset)
534534 then (pmtId == amIdStr)
535535 else false)
536536 then $Tuple2(pmtAmt, 0)
537537 else if (if (isOneAsset)
538538 then (pmtId == prIdStr)
539539 else false)
540540 then $Tuple2(0, pmtAmt)
541541 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
542542 let writeAmAmt = $t02080321148._1
543543 let writePrAmt = $t02080321148._2
544544 let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(an, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId58), dataPutActionInfo(writeAmAmt, writePrAmt, emitLpAmt, curPrice, slippage, slippageCalc, an, lastBlock.timestamp, amDiff, prDiff))]
545545 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
546546 }
547547 }
548548
549549
550550 func getYD (xp,i,D) = {
551551 let n = big2
552552 let x = xp[if ((i == 0))
553553 then 1
554554 else 0]
555555 let aPrecision = parseBigIntValue(Amult)
556556 let a = (parseBigIntValue(A) * aPrecision)
557557 let s = x
558558 let ann = (a * n)
559559 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
560560 let b = ((s + ((D * aPrecision) / ann)) - D)
561561 func calc (acc,cur) = {
562562 let $t02234322363 = acc
563563 let y = $t02234322363._1
564564 let found = $t02234322363._2
565565 if ((found != unit))
566566 then acc
567567 else {
568568 let yNext = (((y * y) + c) / ((big2 * y) + b))
569569 let yDiff = absBigInt((yNext - value(y)))
570570 if ((big1 >= yDiff))
571571 then $Tuple2(yNext, cur)
572572 else $Tuple2(yNext, unit)
573573 }
574574 }
575575
576576 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
577577 let $t02267022717 = {
578578 let $l = arr
579579 let $s = size($l)
580580 let $acc0 = $Tuple2(D, unit)
581581 func $f0_1 ($a,$i) = if (($i >= $s))
582582 then $a
583583 else calc($a, $l[$i])
584584
585585 func $f0_2 ($a,$i) = if (($i >= $s))
586586 then $a
587587 else throw("List size exceeds 15")
588588
589589 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
590590 }
591591 let y = $t02267022717._1
592592 let found = $t02267022717._2
593593 if ((found != unit))
594594 then y
595595 else throw(("Y calculation error, Y = " + toString(y)))
596596 }
597597
598598
599599 func calcDLp (amountBalance,priceBalance,lpEmission) = {
600600 let updatedDLp = fraction(getD([t1BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals)), t1BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))]), scale18, lpEmission)
601601 if ((lpEmission == big0))
602602 then big0
603603 else updatedDLp
604604 }
605605
606606
607607 func calcCurrentDLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
608608 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
609609 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
610610 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
611611 let currentDLp = calcDLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
612612 currentDLp
613613 }
614614
615615
616616 func refreshDLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
617617 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
618618 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
619619 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
620620 let updatedDLp = calcDLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
621621 let actions = [IntegerEntry(keyDLpRefreshedHeight, an), StringEntry(keyDLp, toString(updatedDLp))]
622622 $Tuple2(actions, updatedDLp)
623623 }
624624
625625
626626 func validateUpdatedDLp (oldDLp,updatedDLp) = if ((updatedDLp >= oldDLp))
627627 then true
628628 else throwErr("updated DLp lower than current DLp")
629629
630630
631631 func validateMatcherOrderAllowed (order) = {
632632 let amountAssetBalance = getAccBalance(assetIdToString(cfgAmountAssetId))
633633 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
634634 let amountAssetAmount = order.amount
635635 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
636636 let $t02491525127 = if ((order.orderType == Buy))
637637 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
638638 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
639639 let amountAssetBalanceDelta = $t02491525127._1
640640 let priceAssetBalanceDelta = $t02491525127._2
641641 if (if (if (igs())
642642 then true
643643 else (cfgPoolStatus == PoolMatcherDis))
644644 then true
645645 else (cfgPoolStatus == PoolShutdown))
646646 then throw("Admin blocked")
647647 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
648648 then true
649649 else (order.assetPair.priceAsset != cfgPriceAssetId))
650650 then throw("Wr assets")
651651 else {
652652 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
653653 let $t02546925569 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
654654 let unusedActions = $t02546925569._1
655655 let dLpNew = $t02546925569._2
656656 let isOrderValid = (dLpNew >= dLp)
657657 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(an)], "")
658658 $Tuple2(isOrderValid, info)
659659 }
660660 }
661661
662662
663663 func cg (i) = if ((size(i.payments) != 1))
664664 then throw("1 pmnt exp")
665665 else {
666666 let pmt = value(i.payments[0])
667667 let pmtAssetId = value(pmt.assetId)
668668 let pmtAmt = pmt.amount
669669 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
670670 let outAmAmt = r._1
671671 let outPrAmt = r._2
672672 let sts = parseIntValue(r._9)
673673 let state = r._10
674674 if (if (igs())
675675 then true
676676 else (sts == PoolShutdown))
677677 then throw(("Admin blocked: " + toString(sts)))
678678 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
679679 }
680680
681681
682682 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
683683 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
684684 let sts = parseIntValue(r._8)
685685 if (if (if (igs())
686686 then true
687687 else (sts == PoolPutDis))
688688 then true
689689 else (sts == PoolShutdown))
690690 then throw(("Blocked:" + toString(sts)))
691691 else r
692692 }
693693
694694
695695 func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = {
696696 let amId = toBase58String(value(cfgAmountAssetId))
697697 let prId = toBase58String(value(cfgPriceAssetId))
698698 let lpId = cfgLpAssetId
699699 let amtDcm = cfgAmountAssetDecimals
700700 let priceDcm = cfgPriceAssetDecimals
701701 let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(lpId), "invalid lp asset").quantity)
702702 let chechEmission = if ((lpAssetEmission > big0))
703703 then true
704704 else throw("initial deposit requires all coins")
705705 if ((chechEmission == chechEmission))
706706 then {
707707 let amBalance = getAccBalance(amId)
708708 let prBalance = getAccBalance(prId)
709709 let $t02822528687 = if ((txId == ""))
710710 then $Tuple2(amBalance, prBalance)
711711 else if ((pmtAssetId == amId))
712712 then if ((pmtAmtRaw > amBalance))
713713 then throw("invalid payment amount")
714714 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
715715 else if ((pmtAssetId == prId))
716716 then if ((pmtAmtRaw > prBalance))
717717 then throw("invalid payment amount")
718718 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
719719 else throw("wrong pmtAssetId")
720720 let amBalanceOld = $t02822528687._1
721721 let prBalanceOld = $t02822528687._2
722722 let $t02869328869 = if ((pmtAssetId == amId))
723723 then $Tuple2(pmtAmtRaw, 0)
724724 else if ((pmtAssetId == prId))
725725 then $Tuple2(0, pmtAmtRaw)
726726 else throw("invalid payment")
727727 let amAmountRaw = $t02869328869._1
728728 let prAmountRaw = $t02869328869._2
729729 let $t02887329127 = if (withTakeFee)
730730 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
731731 else $Tuple3(amAmountRaw, prAmountRaw, 0)
732732 let amAmount = $t02887329127._1
733733 let prAmount = $t02887329127._2
734734 let feeAmount = $t02887329127._3
735735 let amBalanceNew = (amBalanceOld + amAmount)
736736 let prBalanceNew = (prBalanceOld + prAmount)
737737 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
738738 let D1 = getD([t1(amBalanceNew, cfgAmountAssetDecimals), t1(prBalanceNew, cfgPriceAssetDecimals)])
739739 let checkD = if ((D1 > D0))
740740 then true
741741 else throw()
742742 if ((checkD == checkD))
743743 then {
744744 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0, FLOOR)
745745 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
746746 let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(an, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId), dataPutActionInfo(amAmountRaw, prAmountRaw, toInt(lpAmount), curPrice, 0, 0, an, lastBlock.timestamp, 0, 0))]
747747 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
748748 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
749749 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
750750 let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
751751 let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
752752 $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
753753 }
754754 else throw("Strict value is not equal to itself.")
755755 }
756756 else throw("Strict value is not equal to itself.")
757757 }
758758
759759
760760 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
761761 let lpId = toBase58String(value(cfgLpAssetId))
762762 let amId = toBase58String(value(cfgAmountAssetId))
763763 let prId = toBase58String(value(cfgPriceAssetId))
764764 let amDecimals = cfgAmountAssetDecimals
765765 let prDecimals = cfgPriceAssetDecimals
766766 let poolStatus = cfgPoolStatus
767767 let userAddress = if ((caller == restContract))
768768 then originCaller
769769 else caller
770770 let pmt = value(payments[0])
771771 let pmtAssetId = value(pmt.assetId)
772772 let pmtAmt = pmt.amount
773773 let currentDLp = calcCurrentDLp(big0, big0, big0)
774774 if ((currentDLp == currentDLp))
775775 then {
776776 let txId58 = toBase58String(transactionId)
777777 if ((lpId != toBase58String(pmtAssetId)))
778778 then throw("Wrong LP")
779779 else {
780780 let amBalance = getAccBalance(amId)
781781 let prBalance = getAccBalance(prId)
782782 let $t03123931350 = {
783783 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
784784 if ($isInstanceOf(@, "(Int, Int)"))
785785 then @
786786 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
787787 }
788788 if (($t03123931350 == $t03123931350))
789789 then {
790790 let feeAmount = $t03123931350._2
791791 let totalGet = $t03123931350._1
792792 let totalAmount = if (if ((minOutAmount > 0))
793793 then (minOutAmount > totalGet)
794794 else false)
795795 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
796796 else totalGet
797797 let $t03154031847 = if ((outAssetId == amId))
798798 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
799799 else if ((outAssetId == prId))
800800 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
801801 else throw("invalid out asset id")
802802 let outAm = $t03154031847._1
803803 let outPr = $t03154031847._2
804804 let amBalanceNew = $t03154031847._3
805805 let prBalanceNew = $t03154031847._4
806806 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
807807 let curPr = f1(curPrX18, scale8)
808808 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
809809 then unit
810810 else fromBase58String(outAssetId)
811811 let sendFeeToMatcher = if ((feeAmount > 0))
812812 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
813813 else nil
814814 let state = ([ScriptTransfer(userAddress, totalAmount, outAssetIdOrWaves), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAm, outPr, pmtAmt, curPr, an, lastBlock.timestamp)), IntegerEntry(pl(), curPr), IntegerEntry(ph(an, lastBlock.timestamp), curPr)] ++ sendFeeToMatcher)
815815 if ((state == state))
816816 then {
817817 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
818818 if ((burn == burn))
819819 then {
820820 let $t03263232982 = {
821821 let feeAmountForCalc = if ((this == feeCollectorAddress))
822822 then 0
823823 else feeAmount
824824 let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId))
825825 then true
826826 else false
827827 if (outInAmountAsset)
828828 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
829829 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
830830 }
831831 let amountAssetBalanceDelta = $t03263232982._1
832832 let priceAssetBalanceDelta = $t03263232982._2
833833 let $t03298533093 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
834834 let refreshDLpActions = $t03298533093._1
835835 let updatedDLp = $t03298533093._2
836836 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
837837 if ((isUpdatedDLpValid == isUpdatedDLpValid))
838838 then $Tuple2((state ++ refreshDLpActions), totalAmount)
839839 else throw("Strict value is not equal to itself.")
840840 }
841841 else throw("Strict value is not equal to itself.")
842842 }
843843 else throw("Strict value is not equal to itself.")
844844 }
845845 else throw("Strict value is not equal to itself.")
846846 }
847847 }
848848 else throw("Strict value is not equal to itself.")
849849 }
850850
851851
852852 func m () = match getString(mpk()) {
853853 case s: String =>
854854 fromBase58String(s)
855855 case _: Unit =>
856856 unit
857857 case _ =>
858858 throw("Match error")
859859 }
860860
861861
862862 func pm () = match getString(pmpk()) {
863863 case s: String =>
864864 fromBase58String(s)
865865 case _: Unit =>
866866 unit
867867 case _ =>
868868 throw("Match error")
869869 }
870870
871871
872872 let pd = throw("Permission denied")
873873
874874 func isManager (i) = match m() {
875875 case pk: ByteVector =>
876876 (i.callerPublicKey == pk)
877877 case _: Unit =>
878878 (i.caller == this)
879879 case _ =>
880880 throw("Match error")
881881 }
882882
883883
884884 func mm (i) = match m() {
885885 case pk: ByteVector =>
886886 if ((i.callerPublicKey == pk))
887887 then true
888888 else pd
889889 case _: Unit =>
890890 if ((i.caller == this))
891891 then true
892892 else pd
893893 case _ =>
894894 throw("Match error")
895895 }
896896
897897
898898 func getY (isReverse,D,poolAmountInBalance) = {
899899 let poolConfig = gpc()
900900 let amId = poolConfig[idxAmAsId]
901901 let prId = poolConfig[idxPrAsId]
902902 let n = big2
903903 let aPrecision = parseBigIntValue(Amult)
904904 let a = (parseBigIntValue(A) * aPrecision)
905905 let xp = if ((isReverse == false))
906906 then [(toBigInt(getAccBalance(amId)) + poolAmountInBalance), toBigInt(getAccBalance(prId))]
907907 else [(toBigInt(getAccBalance(prId)) + poolAmountInBalance), toBigInt(getAccBalance(amId))]
908908 let x = xp[0]
909909 let s = x
910910 let ann = (a * n)
911911 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
912912 let b = ((s + ((D * aPrecision) / ann)) - D)
913913 func calc (acc,cur) = {
914914 let $t03454034560 = acc
915915 let y = $t03454034560._1
916916 let found = $t03454034560._2
917917 if ((found != unit))
918918 then acc
919919 else {
920920 let yNext = (((y * y) + c) / ((big2 * y) + b))
921921 let yDiff = absBigInt((yNext - value(y)))
922922 if ((big1 >= yDiff))
923923 then $Tuple2(yNext, cur)
924924 else $Tuple2(yNext, unit)
925925 }
926926 }
927927
928928 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
929929 let $t03489134938 = {
930930 let $l = arr
931931 let $s = size($l)
932932 let $acc0 = $Tuple2(D, unit)
933933 func $f0_1 ($a,$i) = if (($i >= $s))
934934 then $a
935935 else calc($a, $l[$i])
936936
937937 func $f0_2 ($a,$i) = if (($i >= $s))
938938 then $a
939939 else throw("List size exceeds 15")
940940
941941 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
942942 }
943943 let y = $t03489134938._1
944944 let found = $t03489134938._2
945945 if ((found != unit))
946946 then y
947947 else throw(("Y calculation error, Y = " + toString(y)))
948948 }
949949
950950
951951 func skipOrderValidation () = valueOrElse(getBoolean(fca, keySkipOrderValidation(toString(this))), false)
952952
953953
954954 @Callable(i)
955955 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
956956 let $t03529035714 = if ((isReverse == false))
957957 then {
958958 let assetOut = strf(this, pa())
959959 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
960960 $Tuple2(assetOut, poolAmountInBalance)
961961 }
962962 else {
963963 let assetOut = strf(this, aa())
964964 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
965965 $Tuple2(assetOut, poolAmountInBalance)
966966 }
967967 let assetOut = $t03529035714._1
968968 let poolAmountInBalance = $t03529035714._2
969969 let poolConfig = gpc()
970970 let amId = poolConfig[idxAmAsId]
971971 let prId = poolConfig[idxPrAsId]
972972 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
973973 let D = getD(xp)
974974 let y = getY(isReverse, D, toBigInt(cleanAmountIn))
975975 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
976976 let totalGetRaw = max([0, toInt(dy)])
977977 let newXp = if ((isReverse == false))
978978 then [((toBigInt(getAccBalance(amId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
979979 else [(toBigInt(getAccBalance(amId)) - dy), ((toBigInt(getAccBalance(prId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount))]
980980 let newD = getD(newXp)
981981 let checkD = if ((newD >= D))
982982 then true
983983 else throw(makeString(["new D is fewer error", toString(D), toString(newD)], "__"))
984984 if ((checkD == checkD))
985985 then $Tuple2(nil, totalGetRaw)
986986 else throw("Strict value is not equal to itself.")
987987 }
988988
989989
990990
991991 @Callable(i)
992992 func calculateAmountOutForSwapAndSendTokens (cleanAmountIn,isReverse,amountOutMin,addressTo,feePoolAmount) = {
993993 let swapContact = {
994994 let @ = invoke(fca, "getSwapContractREADONLY", nil, nil)
995995 if ($isInstanceOf(@, "String"))
996996 then @
997997 else throw(($getType(@) + " couldn't be cast to String"))
998998 }
999999 let checks = [if ((value(i.payments[0]).amount >= cleanAmountIn))
10001000 then true
10011001 else throwErr("Wrong amount"), if ((i.caller == addressFromStringValue(swapContact)))
10021002 then true
10031003 else throwErr("Permission denied")]
10041004 if ((checks == checks))
10051005 then {
10061006 let pmt = value(i.payments[0])
10071007 let assetIn = assetIdToString(pmt.assetId)
10081008 let $t03715037544 = if ((isReverse == false))
10091009 then {
10101010 let assetOut = strf(this, pa())
10111011 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10121012 $Tuple2(assetOut, poolAmountInBalance)
10131013 }
10141014 else {
10151015 let assetOut = strf(this, aa())
10161016 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10171017 $Tuple2(assetOut, poolAmountInBalance)
10181018 }
10191019 let assetOut = $t03715037544._1
10201020 let poolAmountInBalance = $t03715037544._2
10211021 let poolConfig = gpc()
10221022 let amId = poolConfig[idxAmAsId]
10231023 let prId = poolConfig[idxPrAsId]
10241024 let xp = if ((isReverse == false))
10251025 then [(toBigInt(getAccBalance(amId)) - toBigInt(value(i.payments[0]).amount)), toBigInt(getAccBalance(prId))]
10261026 else [toBigInt(getAccBalance(amId)), (toBigInt(getAccBalance(prId)) - toBigInt(value(i.payments[0]).amount))]
10271027 let D = getD(xp)
10281028 let y = getY(isReverse, D, toBigInt(0))
10291029 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
10301030 let totalGetRaw = max([0, toInt(dy)])
10311031 let checkMin = if ((totalGetRaw >= amountOutMin))
10321032 then true
10331033 else throw("Exchange result is fewer coins than expected")
10341034 if ((checkMin == checkMin))
10351035 then {
10361036 let newXp = if ((isReverse == false))
10371037 then [(toBigInt(getAccBalance(amId)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
10381038 else [(toBigInt(getAccBalance(amId)) - dy), (toBigInt(getAccBalance(prId)) + toBigInt(feePoolAmount))]
10391039 let newD = getD(newXp)
10401040 let checkD = if ((newD >= D))
10411041 then true
10421042 else throw("new D is fewer error")
10431043 if ((checkD == checkD))
10441044 then $Tuple2([ScriptTransfer(addressFromStringValue(addressTo), totalGetRaw, parseAssetId(assetOut))], totalGetRaw)
10451045 else throw("Strict value is not equal to itself.")
10461046 }
10471047 else throw("Strict value is not equal to itself.")
10481048 }
10491049 else throw("Strict value is not equal to itself.")
10501050 }
10511051
10521052
10531053
10541054 @Callable(i)
10551055 func constructor (fc) = {
10561056 let c = mm(i)
10571057 if ((c == c))
10581058 then [StringEntry(fc(), fc)]
10591059 else throw("Strict value is not equal to itself.")
10601060 }
10611061
10621062
10631063
10641064 @Callable(i)
10651065 func setManager (pendingManagerPublicKey) = {
10661066 let c = mm(i)
10671067 if ((c == c))
10681068 then {
10691069 let cm = fromBase58String(pendingManagerPublicKey)
10701070 if ((cm == cm))
10711071 then [StringEntry(pmpk(), pendingManagerPublicKey)]
10721072 else throw("Strict value is not equal to itself.")
10731073 }
10741074 else throw("Strict value is not equal to itself.")
10751075 }
10761076
10771077
10781078
10791079 @Callable(i)
10801080 func confirmManager () = {
10811081 let p = pm()
10821082 let hpm = if (isDefined(p))
10831083 then true
10841084 else throw("No pending manager")
10851085 if ((hpm == hpm))
10861086 then {
10871087 let cpm = if ((i.callerPublicKey == value(p)))
10881088 then true
10891089 else throw("You are not pending manager")
10901090 if ((cpm == cpm))
10911091 then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())]
10921092 else throw("Strict value is not equal to itself.")
10931093 }
10941094 else throw("Strict value is not equal to itself.")
10951095 }
10961096
10971097
10981098
10991099 @Callable(i)
11001100 func put (slip,autoStake) = {
11011101 let factCfg = gfc()
11021102 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
11031103 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
11041104 if ((0 > slip))
11051105 then throw("Wrong slippage")
11061106 else if ((size(i.payments) != 2))
11071107 then throw("2 pmnts expd")
11081108 else {
11091109 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
11101110 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
11111111 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amAssetPmt)
11121112 if ((amountAssetBalance == amountAssetBalance))
11131113 then {
11141114 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - prAssetPmt)
11151115 if ((priceAssetBalance == priceAssetBalance))
11161116 then {
11171117 let lpAssetEmission = toBigInt(value(assetInfo(cfgLpAssetId)).quantity)
11181118 if ((lpAssetEmission == lpAssetEmission))
11191119 then {
11201120 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
11211121 if ((currentDLp == currentDLp))
11221122 then {
11231123 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, true, 0, "")
11241124 let emitLpAmt = e._2
11251125 let lpAssetId = e._7
11261126 let state = e._9
11271127 let amDiff = e._10
11281128 let prDiff = e._11
11291129 let amId = e._12
11301130 let prId = e._13
11311131 let r = invoke(fca, "emit", [emitLpAmt], nil)
11321132 if ((r == r))
11331133 then {
11341134 let el = match r {
11351135 case legacy: Address =>
11361136 invoke(legacy, "emit", [emitLpAmt], nil)
11371137 case _ =>
11381138 unit
11391139 }
11401140 if ((el == el))
11411141 then {
11421142 let sa = if ((amDiff > 0))
11431143 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
11441144 else nil
11451145 if ((sa == sa))
11461146 then {
11471147 let sp = if ((prDiff > 0))
11481148 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
11491149 else nil
11501150 if ((sp == sp))
11511151 then {
11521152 let lpTrnsfr = if (autoStake)
11531153 then {
11541154 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
11551155 if ((ss == ss))
11561156 then nil
11571157 else throw("Strict value is not equal to itself.")
11581158 }
11591159 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
11601160 let $t04216342305 = refreshDLpInternal(0, 0, 0)
11611161 let refreshDLpActions = $t04216342305._1
11621162 let updatedDLp = $t04216342305._2
11631163 let check = if ((updatedDLp >= currentDLp))
11641164 then true
11651165 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
11661166 if ((check == check))
11671167 then {
11681168 let lpAssetEmissionAfter = value(assetInfo(cfgLpAssetId)).quantity
11691169 if ((lpAssetEmissionAfter == lpAssetEmissionAfter))
11701170 then ((state ++ lpTrnsfr) ++ refreshDLpActions)
11711171 else throw("Strict value is not equal to itself.")
11721172 }
11731173 else throw("Strict value is not equal to itself.")
11741174 }
11751175 else throw("Strict value is not equal to itself.")
11761176 }
11771177 else throw("Strict value is not equal to itself.")
11781178 }
11791179 else throw("Strict value is not equal to itself.")
11801180 }
11811181 else throw("Strict value is not equal to itself.")
11821182 }
11831183 else throw("Strict value is not equal to itself.")
11841184 }
11851185 else throw("Strict value is not equal to itself.")
11861186 }
11871187 else throw("Strict value is not equal to itself.")
11881188 }
11891189 else throw("Strict value is not equal to itself.")
11901190 }
11911191 }
11921192
11931193
11941194
11951195 @Callable(i)
11961196 func putOneTknV2 (minOutAmount,autoStake) = {
11971197 let isPoolOneTokenOperationsDisabled = {
11981198 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
11991199 if ($isInstanceOf(@, "Boolean"))
12001200 then @
12011201 else throw(($getType(@) + " couldn't be cast to Boolean"))
12021202 }
12031203 let isPutDisabled = if (if (if (igs())
12041204 then true
12051205 else (cfgPoolStatus == PoolPutDis))
12061206 then true
12071207 else (cfgPoolStatus == PoolShutdown))
12081208 then true
12091209 else isPoolOneTokenOperationsDisabled
12101210 let checks = [if (if (!(isPutDisabled))
12111211 then true
12121212 else isManager(i))
12131213 then true
12141214 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
12151215 then true
12161216 else throwErr("exactly 1 payment are expected")]
12171217 if ((checks == checks))
12181218 then {
12191219 let amId = toBase58String(value(cfgAmountAssetId))
12201220 let prId = toBase58String(value(cfgPriceAssetId))
12211221 let lpId = cfgLpAssetId
12221222 let amDecimals = cfgAmountAssetDecimals
12231223 let prDecimals = cfgPriceAssetDecimals
12241224 let userAddress = if ((i.caller == this))
12251225 then i.originCaller
12261226 else i.caller
12271227 let pmt = value(i.payments[0])
12281228 let pmtAssetId = toBase58String(value(pmt.assetId))
12291229 let pmtAmt = pmt.amount
12301230 let currentDLp = if ((pmt.assetId == cfgAmountAssetId))
12311231 then calcCurrentDLp(toBigInt(pmtAmt), toBigInt(0), toBigInt(0))
12321232 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12331233 if ((currentDLp == currentDLp))
12341234 then {
12351235 let $t04394644104 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
12361236 if (($t04394644104 == $t04394644104))
12371237 then {
12381238 let feeAmount = $t04394644104._3
12391239 let state = $t04394644104._2
12401240 let estimLP = $t04394644104._1
12411241 let emitLpAmt = if (if ((minOutAmount > 0))
12421242 then (minOutAmount > estimLP)
12431243 else false)
12441244 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
12451245 else estimLP
12461246 let e = invoke(fca, "emit", [emitLpAmt], nil)
12471247 if ((e == e))
12481248 then {
12491249 let el = match e {
12501250 case legacy: Address =>
12511251 invoke(legacy, "emit", [emitLpAmt], nil)
12521252 case _ =>
12531253 unit
12541254 }
12551255 if ((el == el))
12561256 then {
12571257 let lpTrnsfr = if (autoStake)
12581258 then {
12591259 let ss = invoke(stakingContract, "stakeFor", [toString(i.caller)], [AttachedPayment(lpId, emitLpAmt)])
12601260 if ((ss == ss))
12611261 then nil
12621262 else throw("Strict value is not equal to itself.")
12631263 }
12641264 else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
12651265 let sendFeeToMatcher = if ((feeAmount > 0))
12661266 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12671267 else nil
12681268 let $t04498945338 = if ((this == feeCollectorAddress))
12691269 then $Tuple2(0, 0)
12701270 else {
12711271 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12721272 then true
12731273 else false
12741274 if (paymentInAmountAsset)
12751275 then $Tuple2(-(feeAmount), 0)
12761276 else $Tuple2(0, -(feeAmount))
12771277 }
12781278 let amountAssetBalanceDelta = $t04498945338._1
12791279 let priceAssetBalanceDelta = $t04498945338._2
12801280 let $t04534145449 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
12811281 let refreshDLpActions = $t04534145449._1
12821282 let updatedDLp = $t04534145449._2
12831283 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12841284 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12851285 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
12861286 else throw("Strict value is not equal to itself.")
12871287 }
12881288 else throw("Strict value is not equal to itself.")
12891289 }
12901290 else throw("Strict value is not equal to itself.")
12911291 }
12921292 else throw("Strict value is not equal to itself.")
12931293 }
12941294 else throw("Strict value is not equal to itself.")
12951295 }
12961296 else throw("Strict value is not equal to itself.")
12971297 }
12981298
12991299
13001300
13011301 @Callable(i)
13021302 func putForFree (maxSlpg) = if ((0 > maxSlpg))
13031303 then throw("Wrong slpg")
13041304 else if ((size(i.payments) != 2))
13051305 then throw("2 pmnts expd")
13061306 else {
13071307 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, true, 0, "")
13081308 let state = estPut._9
13091309 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
13101310 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
13111311 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
13121312 if ((currentDLp == currentDLp))
13131313 then {
13141314 let $t04647946544 = refreshDLpInternal(0, 0, 0)
13151315 let refreshDLpActions = $t04647946544._1
13161316 let updatedDLp = $t04647946544._2
13171317 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13181318 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13191319 then (state ++ refreshDLpActions)
13201320 else throw("Strict value is not equal to itself.")
13211321 }
13221322 else throw("Strict value is not equal to itself.")
13231323 }
13241324
13251325
13261326
13271327 @Callable(i)
13281328 func get () = {
13291329 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
13301330 if ((currentDLp == currentDLp))
13311331 then {
13321332 let r = cg(i)
13331333 let outAmtAmt = r._1
13341334 let outPrAmt = r._2
13351335 let pmtAmt = r._3
13361336 let pmtAssetId = r._4
13371337 let state = r._5
13381338 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13391339 if ((b == b))
13401340 then {
13411341 let $t04771747799 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
13421342 let refreshDLpActions = $t04771747799._1
13431343 let updatedDLp = $t04771747799._2
13441344 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13451345 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13461346 then (state ++ refreshDLpActions)
13471347 else throw("Strict value is not equal to itself.")
13481348 }
13491349 else throw("Strict value is not equal to itself.")
13501350 }
13511351 else throw("Strict value is not equal to itself.")
13521352 }
13531353
13541354
13551355
13561356 @Callable(i)
13571357 func getOneTknV2 (outAssetId,minOutAmount) = {
13581358 let isPoolOneTokenOperationsDisabled = {
13591359 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
13601360 if ($isInstanceOf(@, "Boolean"))
13611361 then @
13621362 else throw(($getType(@) + " couldn't be cast to Boolean"))
13631363 }
13641364 let isGetDisabled = if (if (igs())
13651365 then true
13661366 else (cfgPoolStatus == PoolShutdown))
13671367 then true
13681368 else isPoolOneTokenOperationsDisabled
13691369 let checks = [if (if (!(isGetDisabled))
13701370 then true
13711371 else isManager(i))
13721372 then true
13731373 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
13741374 then true
13751375 else throwErr("exactly 1 payment are expected")]
13761376 if ((checks == checks))
13771377 then {
13781378 let $t04841748572 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
13791379 let state = $t04841748572._1
13801380 let totalAmount = $t04841748572._2
13811381 $Tuple2(state, totalAmount)
13821382 }
13831383 else throw("Strict value is not equal to itself.")
13841384 }
13851385
13861386
13871387
13881388 @Callable(i)
13891389 func refreshDLp () = {
13901390 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyDLpRefreshedHeight), 0)
13911391 let checkLastRefreshedBlockHeight = if (((an - lastRefreshedBlockHeight) >= dLpRefreshDelay))
13921392 then unit
13931393 else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], ""))
13941394 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13951395 then {
13961396 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
13971397 let $t04909649160 = refreshDLpInternal(0, 0, 0)
13981398 let dLpUpdateActions = $t04909649160._1
13991399 let updatedDLp = $t04909649160._2
14001400 let actions = if ((dLp != updatedDLp))
14011401 then dLpUpdateActions
14021402 else throwErr("nothing to refresh")
14031403 $Tuple2(actions, toString(updatedDLp))
14041404 }
14051405 else throw("Strict value is not equal to itself.")
14061406 }
14071407
14081408
14091409
14101410 @Callable(i)
14111411 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
14121412 let amId = toBase58String(value(cfgAmountAssetId))
14131413 let prId = toBase58String(value(cfgPriceAssetId))
14141414 let lpId = toBase58String(value(cfgLpAssetId))
14151415 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
14161416 let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
14171417 let D0 = getD(xp)
14181418 let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
14191419 let index = if ((outAssetId == amId))
14201420 then 0
14211421 else if ((outAssetId == prId))
14221422 then 1
14231423 else throw("invalid out asset id")
14241424 let newY = getYD(xp, index, D1)
14251425 let dy = (xp[index] - newY)
14261426 let totalGetRaw = max([0, toInt((dy - big1))])
14271427 let $t05017050225 = takeFee(totalGetRaw, outFee)
14281428 let totalGet = $t05017050225._1
14291429 let feeAmount = $t05017050225._2
14301430 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14311431 }
14321432
14331433
14341434
14351435 @Callable(i)
14361436 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
14371437 let amId = toBase58String(value(cfgAmountAssetId))
14381438 let prId = toBase58String(value(cfgPriceAssetId))
14391439 let lpId = toBase58String(value(cfgLpAssetId))
14401440 let amBalance = getAccBalance(amId)
14411441 let prBalance = getAccBalance(prId)
14421442 let $t05060050715 = {
14431443 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14441444 if ($isInstanceOf(@, "(Int, Int)"))
14451445 then @
14461446 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14471447 }
14481448 let totalGet = $t05060050715._1
14491449 let feeAmount = $t05060050715._2
14501450 let r = ego("", lpId, lpAssetAmount, this)
14511451 let outAmAmt = r._1
14521452 let outPrAmt = r._2
14531453 let sumOfGetAssets = (outAmAmt + outPrAmt)
14541454 let bonus = if ((sumOfGetAssets == 0))
14551455 then if ((totalGet == 0))
14561456 then 0
14571457 else throw("bonus calculation error")
14581458 else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
14591459 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
14601460 }
14611461
14621462
14631463
14641464 @Callable(i)
14651465 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
14661466 let r = cg(i)
14671467 let outAmAmt = r._1
14681468 let outPrAmt = r._2
14691469 let pmtAmt = r._3
14701470 let pmtAssetId = r._4
14711471 let state = r._5
14721472 if ((noLessThenAmtAsset > outAmAmt))
14731473 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
14741474 else if ((noLessThenPriceAsset > outPrAmt))
14751475 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
14761476 else {
14771477 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14781478 if ((currentDLp == currentDLp))
14791479 then {
14801480 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14811481 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14821482 then {
14831483 let $t05188151962 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
14841484 let refreshDLpActions = $t05188151962._1
14851485 let updatedDLp = $t05188151962._2
14861486 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14871487 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14881488 then (state ++ refreshDLpActions)
14891489 else throw("Strict value is not equal to itself.")
14901490 }
14911491 else throw("Strict value is not equal to itself.")
14921492 }
14931493 else throw("Strict value is not equal to itself.")
14941494 }
14951495 }
14961496
14971497
14981498
14991499 @Callable(i)
15001500 func unstakeAndGet (amount) = {
15011501 let checkPayments = if ((size(i.payments) != 0))
15021502 then throw("No pmnts expd")
15031503 else true
15041504 if ((checkPayments == checkPayments))
15051505 then {
15061506 let factoryCfg = gfc()
15071507 let lpAssetId = cfgLpAssetId
15081508 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
15091509 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15101510 if ((currentDLp == currentDLp))
15111511 then {
15121512 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
15131513 if ((unstakeInv == unstakeInv))
15141514 then {
15151515 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
15161516 let outAmAmt = r._1
15171517 let outPrAmt = r._2
15181518 let sts = parseIntValue(r._9)
15191519 let state = r._10
15201520 let v = if (if (igs())
15211521 then true
15221522 else (sts == PoolShutdown))
15231523 then throw(("Blocked: " + toString(sts)))
15241524 else true
15251525 if ((v == v))
15261526 then {
15271527 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15281528 if ((burnA == burnA))
15291529 then {
15301530 let $t05298953070 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
15311531 let refreshDLpActions = $t05298953070._1
15321532 let updatedDLp = $t05298953070._2
15331533 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15341534 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15351535 then (state ++ refreshDLpActions)
15361536 else throw("Strict value is not equal to itself.")
15371537 }
15381538 else throw("Strict value is not equal to itself.")
15391539 }
15401540 else throw("Strict value is not equal to itself.")
15411541 }
15421542 else throw("Strict value is not equal to itself.")
15431543 }
15441544 else throw("Strict value is not equal to itself.")
15451545 }
15461546 else throw("Strict value is not equal to itself.")
15471547 }
15481548
15491549
15501550
15511551 @Callable(i)
15521552 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
15531553 let isGetDisabled = if (igs())
15541554 then true
15551555 else (cfgPoolStatus == PoolShutdown)
15561556 let checks = [if (!(isGetDisabled))
15571557 then true
15581558 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
15591559 then true
15601560 else throw("no payments are expected")]
15611561 if ((checks == checks))
15621562 then {
15631563 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15641564 if ((currentDLp == currentDLp))
15651565 then {
15661566 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
15671567 if ((unstakeInv == unstakeInv))
15681568 then {
15691569 let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
15701570 let outAmAmt = res._1
15711571 let outPrAmt = res._2
15721572 let state = res._10
15731573 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
15741574 then true
15751575 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
15761576 then true
15771577 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
15781578 if ((checkAmounts == checkAmounts))
15791579 then {
15801580 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15811581 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15821582 then {
15831583 let $t05432154402 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
15841584 let refreshDLpActions = $t05432154402._1
15851585 let updatedDLp = $t05432154402._2
15861586 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15871587 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15881588 then (state ++ refreshDLpActions)
15891589 else throw("Strict value is not equal to itself.")
15901590 }
15911591 else throw("Strict value is not equal to itself.")
15921592 }
15931593 else throw("Strict value is not equal to itself.")
15941594 }
15951595 else throw("Strict value is not equal to itself.")
15961596 }
15971597 else throw("Strict value is not equal to itself.")
15981598 }
15991599 else throw("Strict value is not equal to itself.")
16001600 }
16011601
16021602
16031603
16041604 @Callable(i)
16051605 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
16061606 let isPoolOneTokenOperationsDisabled = {
16071607 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
16081608 if ($isInstanceOf(@, "Boolean"))
16091609 then @
16101610 else throw(($getType(@) + " couldn't be cast to Boolean"))
16111611 }
16121612 let isGetDisabled = if (if (igs())
16131613 then true
16141614 else (cfgPoolStatus == PoolShutdown))
16151615 then true
16161616 else isPoolOneTokenOperationsDisabled
16171617 let checks = [if (if (!(isGetDisabled))
16181618 then true
16191619 else isManager(i))
16201620 then true
16211621 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
16221622 then true
16231623 else throwErr("no payments are expected")]
16241624 if ((checks == checks))
16251625 then {
16261626 let factoryCfg = gfc()
16271627 let lpAssetId = cfgLpAssetId
16281628 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
16291629 let userAddress = i.caller
16301630 let lpAssetRecipientAddress = this
16311631 let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
16321632 if ((unstakeInv == unstakeInv))
16331633 then {
16341634 let $t05542455612 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
16351635 let state = $t05542455612._1
16361636 let totalAmount = $t05542455612._2
16371637 $Tuple2(state, totalAmount)
16381638 }
16391639 else throw("Strict value is not equal to itself.")
16401640 }
16411641 else throw("Strict value is not equal to itself.")
16421642 }
16431643
16441644
16451645
16461646 @Callable(i)
16471647 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
16481648 let $t05574055843 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
16491649 let lpAmount = $t05574055843._1
16501650 let state = $t05574055843._2
16511651 let feeAmount = $t05574055843._3
16521652 let bonus = $t05574055843._4
16531653 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16541654 }
16551655
16561656
16571657
16581658 @Callable(i)
16591659 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
16601660 let $t05599156095 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
16611661 let lpAmount = $t05599156095._1
16621662 let state = $t05599156095._2
16631663 let feeAmount = $t05599156095._3
16641664 let bonus = $t05599156095._4
16651665 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16661666 }
16671667
16681668
16691669
16701670 @Callable(i)
16711671 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
16721672 then throw("denied")
16731673 else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
16741674
16751675
16761676
16771677 @Callable(i)
16781678 func setS (k,v) = if ((toString(i.caller) != strf(this, ada())))
16791679 then pd
16801680 else [StringEntry(k, v)]
16811681
16821682
16831683
16841684 @Callable(i)
16851685 func setI (k,v) = if ((toString(i.caller) != strf(this, ada())))
16861686 then pd
16871687 else [IntegerEntry(k, v)]
16881688
16891689
16901690
16911691 @Callable(i)
16921692 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
16931693
16941694
16951695
16961696 @Callable(i)
16971697 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
16981698
16991699
17001700
17011701 @Callable(i)
17021702 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
17031703 let pr = calcPrices(amAmt, prAmt, lpAmt)
17041704 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
17051705 }
17061706
17071707
17081708
17091709 @Callable(i)
17101710 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
17111711
17121712
17131713
17141714 @Callable(i)
17151715 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
17161716
17171717
17181718
17191719 @Callable(i)
17201720 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
17211721
17221722
17231723
17241724 @Callable(i)
17251725 func estimatePutOperationWrapperREADONLY (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,usrAddr,isEval,emitLp) = $Tuple2(nil, epo(txId58, slippage, inAmAmt, inAmId, inPrAmt, inPrId, usrAddr, isEval, emitLp, true, false, 0, ""))
17261726
17271727
17281728
17291729 @Callable(i)
17301730 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
17311731 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
17321732 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
17331733 }
17341734
17351735
17361736
17371737 @Callable(i)
17381738 func changeAmp () = {
17391739 let cfg = {
17401740 let @ = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
17411741 if ($isInstanceOf(@, "List[Any]"))
17421742 then @
17431743 else throw(($getType(@) + " couldn't be cast to List[Any]"))
17441744 }
1745- let delay = {
1746- let @ = cfg[0]
1747- if ($isInstanceOf(@, "Int"))
1748- then @
1749- else throw(($getType(@) + " couldn't be cast to Int"))
1750- }
1751- let delta = {
1752- let @ = cfg[1]
1753- if ($isInstanceOf(@, "Int"))
1754- then @
1755- else throw(($getType(@) + " couldn't be cast to Int"))
1756- }
1757- let target = {
1758- let @ = cfg[2]
1759- if ($isInstanceOf(@, "Int"))
1760- then @
1761- else throw(($getType(@) + " couldn't be cast to Int"))
1762- }
1763- let curAmp = parseIntValue(getStringValue(amp()))
1764- let lastCall = valueOrElse(getInteger(keyChangeAmpLastCall()), 0)
1765- let t = throw(makeString([("lastCall=" + toString(lastCall)), ("delay=" + toString(delay)), ("height=" + toString(an)), ("curAmp=" + toString(curAmp)), ("target=" + toString(target))], " "))
1766- if ((t == t))
1745+ if ((cfg == cfg))
17671746 then {
1747+ let delay = {
1748+ let @ = cfg[0]
1749+ if ($isInstanceOf(@, "Int"))
1750+ then @
1751+ else throw(($getType(@) + " couldn't be cast to Int"))
1752+ }
1753+ let delta = {
1754+ let @ = cfg[1]
1755+ if ($isInstanceOf(@, "Int"))
1756+ then @
1757+ else throw(($getType(@) + " couldn't be cast to Int"))
1758+ }
1759+ let target = {
1760+ let @ = cfg[2]
1761+ if ($isInstanceOf(@, "Int"))
1762+ then @
1763+ else throw(($getType(@) + " couldn't be cast to Int"))
1764+ }
1765+ let curAmp = parseIntValue(getStringValue(amp()))
1766+ let lastCall = valueOrElse(getInteger(keyChangeAmpLastCall()), 0)
17681767 let checks = [if ((an > (lastCall + delay)))
17691768 then true
17701769 else throwErr("try again in few blocks"), if ((curAmp != target))
17711770 then true
17721771 else throwErr("already reached target")]
17731772 if ((checks == checks))
17741773 then {
17751774 let newAmpRaw = (curAmp + delta)
17761775 let newAmp = if ((0 > delta))
17771776 then if ((target > newAmpRaw))
17781777 then target
17791778 else newAmpRaw
17801779 else if ((newAmpRaw > target))
17811780 then target
17821781 else newAmpRaw
17831782 [IntegerEntry(keyChangeAmpLastCall(), an), StringEntry(amp(), toString(newAmp)), StringEntry(keyAmpHistory(an), toString(newAmp))]
17841783 }
17851784 else throw("Strict value is not equal to itself.")
17861785 }
17871786 else throw("Strict value is not equal to itself.")
17881787 }
17891788
17901789
17911790 @Verifier(tx)
17921791 func verify () = {
17931792 let targetPublicKey = match m() {
17941793 case pk: ByteVector =>
17951794 pk
17961795 case _: Unit =>
17971796 tx.senderPublicKey
17981797 case _ =>
17991798 throw("Match error")
18001799 }
18011800 match tx {
18021801 case order: Order =>
18031802 let matcherPub = mp()
1804- let $t05998060097 = if (skipOrderValidation())
1803+ let $t05998460101 = if (skipOrderValidation())
18051804 then $Tuple2(true, "")
18061805 else validateMatcherOrderAllowed(order)
1807- let orderValid = $t05998060097._1
1808- let orderValidInfo = $t05998060097._2
1806+ let orderValid = $t05998460101._1
1807+ let orderValidInfo = $t05998460101._2
18091808 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
18101809 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
18111810 if (if (if (orderValid)
18121811 then senderValid
18131812 else false)
18141813 then matcherValid
18151814 else false)
18161815 then true
18171816 else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
18181817 case s: SetScriptTransaction =>
18191818 if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
18201819 then true
18211820 else {
18221821 let newHash = blake2b256(value(s.script))
18231822 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
18241823 let currentHash = scriptHash(this)
18251824 if ((allowedHash == newHash))
18261825 then (currentHash != newHash)
18271826 else false
18281827 }
18291828 case _ =>
18301829 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
18311830 }
18321831 }
18331832

github/deemru/w8io/026f985 
161.01 ms