tx · 71xkSAXJ22iimyFGHFKUNYC9w1bgyd7tEqfSwaxCKLME

3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA:  -0.03600000 Waves

2023.01.20 14:24 [2413226] smart account 3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA > SELF 0.00000000 Waves

{ "type": 13, "id": "71xkSAXJ22iimyFGHFKUNYC9w1bgyd7tEqfSwaxCKLME", "fee": 3600000, "feeAssetId": null, "timestamp": 1674213939620, "version": 1, "sender": "3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA", "senderPublicKey": "35yd3qw1gxKDxKwGAykHN9fANbXNWwseaUwbWDj24o3x", "proofs": [ "5f69Ui8Z4VxiMEYxunSTE8CHhxFQpye564ZMxe9K5aA5Qtjc6df47vREzayDzZLzq1jW8e5Kc3qcd3s7rNwSaT69" ], "script": "base64:BgKJKQgCEgMKAQgSAwoBCBIAEgQKAgEEEgQKAgEEEgMKAQESABIECgIIARIAEgQKAggBEgQKAggBEgQKAgEBEgMKAQESBQoDAQEBEgUKAwEIARIECgIBCBIECgIBCBIECgIICBIECgIICBIECgIIARIAEgMKAQgSBQoDAQEBEgQKAggBEgQKAgEBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEIIgZzY2FsZTgiDHNjYWxlOEJpZ0ludCIHc2NhbGUxOCIKemVyb0JpZ0ludCIEYmlnMCIEYmlnMSIEYmlnMiIEYmlnMyIEYmlnNCIKc2xpcHBhZ2U0RCILd2F2ZXNTdHJpbmciBUFtdWx0IgVEY29udiIDU0VQIgVFTVBUWSIKUG9vbEFjdGl2ZSIKUG9vbFB1dERpcyIOUG9vbE1hdGNoZXJEaXMiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiCWlkeFBvb2xTdCIJaWR4TFBBc0lkIglpZHhBbUFzSWQiCWlkeFByQXNJZCILaWR4QW10QXNEY20iDWlkeFByaWNlQXNEY20iC2lkeElBbXRBc0lkIg1pZHhJUHJpY2VBc0l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AIKQnl0ZVZlY3RvcgQCZ3AFAmdsBQJncAMJAAECBQJnbAIEVW5pdAgFAmhRD3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yBAJnbAUCaFEDCQABAgUCZ2wCBU9yZGVyBAJlWgUCZ2wEAmhUCQECYVcABAJoVQkBAmVZAQUCZVoEAmFGCAUCaFUCXzEEAmFHCAUCaFUCXzIEAmFICQD0AwMIBQJlWglib2R5Qnl0ZXMJAJEDAggFAmVaBnByb29mcwAACAUCZVoPc2VuZGVyUHVibGljS2V5BAJhSQkA9AMDCAUCZVoJYm9keUJ5dGVzCQCRAwIIBQJlWgZwcm9vZnMAAQUCaFQDAwMFAmFGBQJhSAcFAmFJBwYJAQJhRQQFAmFGBQJhRwUCYUgFAmFJAwkAAQIFAmdsAhRTZXRTY3JpcHRUcmFuc2FjdGlvbgQCY0MFAmdsAwkA9AMDCAUCaFEJYm9keUJ5dGVzCQCRAwIIBQJoUQZwcm9vZnMAAAUCaFMGBAJoVgkA9gMBCQEFdmFsdWUBCAUCY0MGc2NyaXB0BAJoVwkA2wQBCQEFdmFsdWUBCQCdCAIFAmFRCQECYUMABAJoWAkA8QcBBQR0aGlzAwkAAAIFAmhXBQJoVgkBAiE9AgUCaFgFAmhWBwkA9AMDCAUCaFEJYm9keUJ5dGVzCQCRAwIIBQJoUQZwcm9vZnMAAAUCaFNP7bKc", "chainId": 84, "height": 2413226, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EEUA7MRyYeN4rfsuJ1TUjAmwrk8zBS4f9xsPRh8PnNQU Next: ADcQZgf6hwDqSmrYcYLdcpB1qXEL8oueK2UDM9GYVgrA Diff:
OldNewDifferences
1919
2020 let big4 = toBigInt(4)
2121
22+let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
23+
2224 let wavesString = "WAVES"
2325
2426 let Amult = "100"
2527
28+let Dconv = "1"
29+
2630 let SEP = "__"
31+
32+let EMPTY = ""
33+
34+let PoolActive = 1
2735
2836 let PoolPutDis = 2
2937
5563
5664 let idxFactSlippCntr = 7
5765
66+let idxFactGwxRewCntr = 10
67+
5868 let feeDefault = fraction(10, scale8, 10000)
5969
6070 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
6777
6878
6979 func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
80+
81+
82+func t2 (origVal,origScaleMult) = fraction(origVal, scale18, toBigInt(origScaleMult))
83+
84+
85+func f2 (val,resultScaleMult) = fraction(val, toBigInt(resultScaleMult), scale18)
86+
87+
88+func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
7089
7190
7291 func abs (val) = if ((zeroBigInt > val))
214233
215234 let $t079648193 = poolConfigParsed
216235
236+let cfgPoolAddress = $t079648193._1
237+
217238 let cfgPoolStatus = $t079648193._2
218239
219240 let cfgLpAssetId = $t079648193._3
237258
238259 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
239260
261+let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
262+
263+let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
264+
240265 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
241266
242267 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)
256281 func cpbir (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
257282
258283
284+func vad (A1,A2,slippage) = {
285+ let diff = fraction((A1 - A2), scale8BigInt, A2)
286+ let pass = ((slippage - abs(diff)) > zeroBigInt)
287+ if (!(pass))
288+ then throw(("Big slpg: " + toString(diff)))
289+ else $Tuple2(pass, min([A1, A2]))
290+ }
291+
292+
293+func vd (D1,D0,slpg) = {
294+ let diff = fraction(D0, scale8BigInt, D1)
295+ let fail = (slpg > diff)
296+ if (if (fail)
297+ then true
298+ else (D0 > D1))
299+ then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
300+ else fail
301+ }
302+
303+
259304 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
260305 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
261306 let prAsAmtX18 = t1(prAmt, prAssetDcm)
273318 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
274319 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
275320 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
321+ }
322+
323+
324+func calculatePrices (amAmt,prAmt,lpAmt) = {
325+ let p = calcPrices(amAmt, prAmt, lpAmt)
326+[f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
276327 }
277328
278329
421472 then {
422473 let curPriceX18 = zeroBigInt
423474 let slippageX18 = zeroBigInt
424- let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN)
475+ let lpAmtX18 = D1
425476 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
426477 }
427478 else throw("Strict value is not equal to itself.")
445496 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
446497 let expAmtAssetAmtX18 = expectedAmts._1
447498 let expPriceAssetAmtX18 = expectedAmts._2
448- let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18, FLOOR)
449- $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18)
499+ let D1 = getD([(amBalanceX18 + expAmtAssetAmtX18), (prBalanceX18 + expPriceAssetAmtX18)])
500+ let checkD = if ((D1 > D0))
501+ then true
502+ else throw("D1 should be greater than D0")
503+ if ((checkD == checkD))
504+ then {
505+ let lpAmtX18 = fraction(lpEmissionX18, (D1 - D0), D0)
506+ $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18)
507+ }
508+ else throw("Strict value is not equal to itself.")
450509 }
451510 }
452511 let calcLpAmt = r._1
462521 else calcLpAmt
463522 let amDiff = (inAmAmt - calcAmAssetPmt)
464523 let prDiff = (inPrAmt - calcPrAssetPmt)
465- let $t02058120926 = if (if (isOneAsset)
524+ let $t02057720922 = if (if (isOneAsset)
466525 then (pmtId == amIdStr)
467526 else false)
468527 then $Tuple2(pmtAmt, 0)
471530 else false)
472531 then $Tuple2(0, pmtAmt)
473532 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
474- let writeAmAmt = $t02058120926._1
475- let writePrAmt = $t02058120926._2
533+ let writeAmAmt = $t02057720922._1
534+ let writePrAmt = $t02057720922._2
476535 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))]
477536 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
478537 }
491550 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
492551 let b = ((s + ((D * aPrecision) / ann)) - D)
493552 func calc (acc,cur) = {
494- let $t02212122141 = acc
495- let y = $t02212122141._1
496- let found = $t02212122141._2
553+ let $t02211722137 = acc
554+ let y = $t02211722137._1
555+ let found = $t02211722137._2
497556 if ((found != unit))
498557 then acc
499558 else {
506565 }
507566
508567 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
509- let $t02244822495 = {
568+ let $t02244422491 = {
510569 let $l = arr
511570 let $s = size($l)
512571 let $acc0 = $Tuple2(D, unit)
520579
521580 $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)
522581 }
523- let y = $t02244822495._1
524- let found = $t02244822495._2
582+ let y = $t02244422491._1
583+ let found = $t02244422491._2
525584 if ((found != unit))
526585 then y
527586 else throw(("Y calculation error, Y = " + toString(y)))
563622 func validateMatcherOrderAllowed (order) = {
564623 let amountAssetAmount = order.amount
565624 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
566- let $t02453924751 = if ((order.orderType == Buy))
625+ let $t02453524747 = if ((order.orderType == Buy))
567626 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
568627 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
569- let amountAssetBalanceDelta = $t02453924751._1
570- let priceAssetBalanceDelta = $t02453924751._2
628+ let amountAssetBalanceDelta = $t02453524747._1
629+ let priceAssetBalanceDelta = $t02453524747._2
571630 if (if (if (igs())
572631 then true
573632 else (cfgPoolStatus == PoolMatcherDis))
580639 then throw("Wr assets")
581640 else {
582641 let dLp = parseBigIntValue(getStringValue(this, keyDLp))
583- let $t02508125181 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
584- let unusedActions = $t02508125181._1
585- let dLpNew = $t02508125181._2
642+ let $t02507725177 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
643+ let unusedActions = $t02507725177._1
644+ let dLpNew = $t02507725177._2
586645 let isOrderValid = (dLpNew >= dLp)
587646 let info = makeString([toString(dLp), toString(dLpNew)], " ")
588647 $Tuple2(isOrderValid, info)
636695 then {
637696 let amBalance = getAccBalance(amId)
638697 let prBalance = getAccBalance(prId)
639- let $t02753327995 = if ((txId == ""))
698+ let $t02752927991 = if ((txId == ""))
640699 then $Tuple2(amBalance, prBalance)
641700 else if ((pmtAssetId == amId))
642701 then if ((pmtAmtRaw > amBalance))
647706 then throw("invalid payment amount")
648707 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
649708 else throw("wrong pmtAssetId")
650- let amBalanceOld = $t02753327995._1
651- let prBalanceOld = $t02753327995._2
652- let $t02800128177 = if ((pmtAssetId == amId))
709+ let amBalanceOld = $t02752927991._1
710+ let prBalanceOld = $t02752927991._2
711+ let $t02799728173 = if ((pmtAssetId == amId))
653712 then $Tuple2(pmtAmtRaw, 0)
654713 else if ((pmtAssetId == prId))
655714 then $Tuple2(0, pmtAmtRaw)
656715 else throw("invalid payment")
657- let amAmountRaw = $t02800128177._1
658- let prAmountRaw = $t02800128177._2
659- let $t02818128435 = if (withTakeFee)
716+ let amAmountRaw = $t02799728173._1
717+ let prAmountRaw = $t02799728173._2
718+ let $t02817728431 = if (withTakeFee)
660719 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
661720 else $Tuple3(amAmountRaw, prAmountRaw, 0)
662- let amAmount = $t02818128435._1
663- let prAmount = $t02818128435._2
664- let feeAmount = $t02818128435._3
721+ let amAmount = $t02817728431._1
722+ let prAmount = $t02817728431._2
723+ let feeAmount = $t02817728431._3
665724 let amBalanceNew = (amBalanceOld + amAmount)
666725 let prBalanceNew = (prBalanceOld + prAmount)
667726 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
709768 else {
710769 let amBalance = getAccBalance(amId)
711770 let prBalance = getAccBalance(prId)
712- let $t03054730658 = {
771+ let $t03054330654 = {
713772 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
714773 if ($isInstanceOf(@, "(Int, Int)"))
715774 then @
716775 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
717776 }
718- if (($t03054730658 == $t03054730658))
777+ if (($t03054330654 == $t03054330654))
719778 then {
720- let feeAmount = $t03054730658._2
721- let totalGet = $t03054730658._1
779+ let feeAmount = $t03054330654._2
780+ let totalGet = $t03054330654._1
722781 let totalAmount = if (if ((minOutAmount > 0))
723782 then (minOutAmount > totalGet)
724783 else false)
725784 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
726785 else totalGet
727- let $t03084831155 = if ((outAssetId == amId))
786+ let $t03084431151 = if ((outAssetId == amId))
728787 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
729788 else if ((outAssetId == prId))
730789 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
731790 else throw("invalid out asset id")
732- let outAm = $t03084831155._1
733- let outPr = $t03084831155._2
734- let amBalanceNew = $t03084831155._3
735- let prBalanceNew = $t03084831155._4
791+ let outAm = $t03084431151._1
792+ let outPr = $t03084431151._2
793+ let amBalanceNew = $t03084431151._3
794+ let prBalanceNew = $t03084431151._4
736795 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
737796 let curPr = f1(curPrX18, scale8)
738797 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
747806 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
748807 if ((burn == burn))
749808 then {
750- let $t03194032290 = {
809+ let $t03193632286 = {
751810 let feeAmountForCalc = if ((this == feeCollectorAddress))
752811 then 0
753812 else feeAmount
758817 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
759818 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
760819 }
761- let amountAssetBalanceDelta = $t03194032290._1
762- let priceAssetBalanceDelta = $t03194032290._2
763- let $t03229332401 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
764- let refreshDLpActions = $t03229332401._1
765- let updatedDLp = $t03229332401._2
820+ let amountAssetBalanceDelta = $t03193632286._1
821+ let priceAssetBalanceDelta = $t03193632286._2
822+ let $t03228932397 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
823+ let refreshDLpActions = $t03228932397._1
824+ let updatedDLp = $t03228932397._2
766825 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
767826 if ((isUpdatedDLpValid == isUpdatedDLpValid))
768827 then $Tuple2((state ++ refreshDLpActions), totalAmount)
931990 else throw("Strict value is not equal to itself.")
932991 }
933992 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
934- let $t03655036692 = refreshDLpInternal(0, 0, 0)
935- let refreshDLpActions = $t03655036692._1
936- let updatedDLp = $t03655036692._2
993+ let $t03654636688 = refreshDLpInternal(0, 0, 0)
994+ let refreshDLpActions = $t03654636688._1
995+ let updatedDLp = $t03654636688._2
937996 let check = if ((updatedDLp >= currentDLp))
938997 then true
939998 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
10061065 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
10071066 if ((currentDLp == currentDLp))
10081067 then {
1009- let $t03833338491 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1010- if (($t03833338491 == $t03833338491))
1068+ let $t03832938487 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1069+ if (($t03832938487 == $t03832938487))
10111070 then {
1012- let feeAmount = $t03833338491._3
1013- let state = $t03833338491._2
1014- let estimLP = $t03833338491._1
1071+ let feeAmount = $t03832938487._3
1072+ let state = $t03832938487._2
1073+ let estimLP = $t03832938487._1
10151074 let emitLpAmt = if (if ((minOutAmount > 0))
10161075 then (minOutAmount > estimLP)
10171076 else false)
10391098 let sendFeeToMatcher = if ((feeAmount > 0))
10401099 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
10411100 else nil
1042- let $t03930639655 = if ((this == feeCollectorAddress))
1101+ let $t03930239651 = if ((this == feeCollectorAddress))
10431102 then $Tuple2(0, 0)
10441103 else {
10451104 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
10491108 then $Tuple2(-(feeAmount), 0)
10501109 else $Tuple2(0, -(feeAmount))
10511110 }
1052- let amountAssetBalanceDelta = $t03930639655._1
1053- let priceAssetBalanceDelta = $t03930639655._2
1054- let $t03965839766 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1055- let refreshDLpActions = $t03965839766._1
1056- let updatedDLp = $t03965839766._2
1111+ let amountAssetBalanceDelta = $t03930239651._1
1112+ let priceAssetBalanceDelta = $t03930239651._2
1113+ let $t03965439762 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1114+ let refreshDLpActions = $t03965439762._1
1115+ let updatedDLp = $t03965439762._2
10571116 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
10581117 if ((isUpdatedDLpValid == isUpdatedDLpValid))
10591118 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
10851144 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
10861145 if ((currentDLp == currentDLp))
10871146 then {
1088- let $t04079640861 = refreshDLpInternal(0, 0, 0)
1089- let refreshDLpActions = $t04079640861._1
1090- let updatedDLp = $t04079640861._2
1147+ let $t04079240857 = refreshDLpInternal(0, 0, 0)
1148+ let refreshDLpActions = $t04079240857._1
1149+ let updatedDLp = $t04079240857._2
10911150 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
10921151 if ((isUpdatedDLpValid == isUpdatedDLpValid))
10931152 then (state ++ refreshDLpActions)
11121171 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
11131172 if ((b == b))
11141173 then {
1115- let $t04203442116 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1116- let refreshDLpActions = $t04203442116._1
1117- let updatedDLp = $t04203442116._2
1174+ let $t04203042112 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1175+ let refreshDLpActions = $t04203042112._1
1176+ let updatedDLp = $t04203042112._2
11181177 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
11191178 if ((isUpdatedDLpValid == isUpdatedDLpValid))
11201179 then (state ++ refreshDLpActions)
11491208 else throwErr("exactly 1 payment are expected")]
11501209 if ((checks == checks))
11511210 then {
1152- let $t04273442889 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1153- let state = $t04273442889._1
1154- let totalAmount = $t04273442889._2
1211+ let $t04273042885 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1212+ let state = $t04273042885._1
1213+ let totalAmount = $t04273042885._2
11551214 $Tuple2(state, totalAmount)
11561215 }
11571216 else throw("Strict value is not equal to itself.")
11681227 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
11691228 then {
11701229 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1171- let $t04341343477 = refreshDLpInternal(0, 0, 0)
1172- let dLpUpdateActions = $t04341343477._1
1173- let updatedDLp = $t04341343477._2
1230+ let $t04340943473 = refreshDLpInternal(0, 0, 0)
1231+ let dLpUpdateActions = $t04340943473._1
1232+ let updatedDLp = $t04340943473._2
11741233 let actions = if ((dLp != updatedDLp))
11751234 then dLpUpdateActions
11761235 else throwErr("nothing to refresh")
11981257 let newY = getYD(xp, index, D1)
11991258 let dy = (xp[index] - newY)
12001259 let totalGetRaw = max([0, toInt((dy - big1))])
1201- let $t04440744462 = takeFee(totalGetRaw, outFee)
1202- let totalGet = $t04440744462._1
1203- let feeAmount = $t04440744462._2
1260+ let $t04440344458 = takeFee(totalGetRaw, outFee)
1261+ let totalGet = $t04440344458._1
1262+ let feeAmount = $t04440344458._2
12041263 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
12051264 }
12061265
12131272 let lpId = toBase58String(value(cfgLpAssetId))
12141273 let amBalance = getAccBalance(amId)
12151274 let prBalance = getAccBalance(prId)
1216- let $t04483744952 = {
1275+ let $t04483344948 = {
12171276 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
12181277 if ($isInstanceOf(@, "(Int, Int)"))
12191278 then @
12201279 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
12211280 }
1222- let totalGet = $t04483744952._1
1223- let feeAmount = $t04483744952._2
1281+ let totalGet = $t04483344948._1
1282+ let feeAmount = $t04483344948._2
12241283 let r = ego("", lpId, lpAssetAmount, this)
12251284 let outAmAmt = r._1
12261285 let outPrAmt = r._2
12541313 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
12551314 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
12561315 then {
1257- let $t04611846199 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1258- let refreshDLpActions = $t04611846199._1
1259- let updatedDLp = $t04611846199._2
1316+ let $t04611446195 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1317+ let refreshDLpActions = $t04611446195._1
1318+ let updatedDLp = $t04611446195._2
12601319 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12611320 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12621321 then (state ++ refreshDLpActions)
13011360 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
13021361 if ((burnA == burnA))
13031362 then {
1304- let $t04722647307 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1305- let refreshDLpActions = $t04722647307._1
1306- let updatedDLp = $t04722647307._2
1363+ let $t04722247303 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1364+ let refreshDLpActions = $t04722247303._1
1365+ let updatedDLp = $t04722247303._2
13071366 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13081367 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13091368 then (state ++ refreshDLpActions)
13541413 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
13551414 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
13561415 then {
1357- let $t04855848639 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1358- let refreshDLpActions = $t04855848639._1
1359- let updatedDLp = $t04855848639._2
1416+ let $t04855448635 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1417+ let refreshDLpActions = $t04855448635._1
1418+ let updatedDLp = $t04855448635._2
13601419 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13611420 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13621421 then (state ++ refreshDLpActions)
14031462 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), unstakeAmount], nil)
14041463 if ((unstakeInv == unstakeInv))
14051464 then {
1406- let $t04953449722 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1407- let state = $t04953449722._1
1408- let totalAmount = $t04953449722._2
1465+ let $t04953049718 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1466+ let state = $t04953049718._1
1467+ let totalAmount = $t04953049718._2
14091468 $Tuple2(state, totalAmount)
14101469 }
14111470 else throw("Strict value is not equal to itself.")
14171476
14181477 @Callable(i)
14191478 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1420- let $t04985049953 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1421- let lpAmount = $t04985049953._1
1422- let state = $t04985049953._2
1423- let feeAmount = $t04985049953._3
1424- let bonus = $t04985049953._4
1479+ let $t04984649949 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1480+ let lpAmount = $t04984649949._1
1481+ let state = $t04984649949._2
1482+ let feeAmount = $t04984649949._3
1483+ let bonus = $t04984649949._4
14251484 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
14261485 }
14271486
14291488
14301489 @Callable(i)
14311490 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1432- let $t05010150205 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1433- let lpAmount = $t05010150205._1
1434- let state = $t05010150205._2
1435- let feeAmount = $t05010150205._3
1436- let bonus = $t05010150205._4
1491+ let $t05009750201 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1492+ let lpAmount = $t05009750201._1
1493+ let state = $t05009750201._2
1494+ let feeAmount = $t05009750201._3
1495+ let bonus = $t05009750201._4
14371496 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
14381497 }
14391498
15181577 match tx {
15191578 case order: Order =>
15201579 let matcherPub = mp()
1521- let $t05299753066 = validateMatcherOrderAllowed(order)
1522- let orderValid = $t05299753066._1
1523- let orderValidInfo = $t05299753066._2
1580+ let $t05299353062 = validateMatcherOrderAllowed(order)
1581+ let orderValid = $t05299353062._1
1582+ let orderValidInfo = $t05299353062._2
15241583 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
15251584 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
15261585 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
22+let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
23+
2224 let wavesString = "WAVES"
2325
2426 let Amult = "100"
2527
28+let Dconv = "1"
29+
2630 let SEP = "__"
31+
32+let EMPTY = ""
33+
34+let PoolActive = 1
2735
2836 let PoolPutDis = 2
2937
3038 let PoolMatcherDis = 3
3139
3240 let PoolShutdown = 4
3341
3442 let idxPoolAddress = 1
3543
3644 let idxPoolSt = 2
3745
3846 let idxLPAsId = 3
3947
4048 let idxAmAsId = 4
4149
4250 let idxPrAsId = 5
4351
4452 let idxAmtAsDcm = 6
4553
4654 let idxPriceAsDcm = 7
4755
4856 let idxIAmtAsId = 8
4957
5058 let idxIPriceAsId = 9
5159
5260 let idxFactStakCntr = 1
5361
5462 let idxFactoryRestCntr = 6
5563
5664 let idxFactSlippCntr = 7
5765
66+let idxFactGwxRewCntr = 10
67+
5868 let feeDefault = fraction(10, scale8, 10000)
5969
6070 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
6171
6272
6373 func t1BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult)
6474
6575
6676 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
6777
6878
6979 func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
80+
81+
82+func t2 (origVal,origScaleMult) = fraction(origVal, scale18, toBigInt(origScaleMult))
83+
84+
85+func f2 (val,resultScaleMult) = fraction(val, toBigInt(resultScaleMult), scale18)
86+
87+
88+func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
7089
7190
7291 func abs (val) = if ((zeroBigInt > val))
7392 then -(val)
7493 else val
7594
7695
7796 func absBigInt (val) = if ((zeroBigInt > val))
7897 then -(val)
7998 else val
8099
81100
82101 func fc () = "%s__factoryContract"
83102
84103
85104 func mpk () = "%s__managerPublicKey"
86105
87106
88107 func pmpk () = "%s__pendingManagerPublicKey"
89108
90109
91110 func pl () = "%s%s__price__last"
92111
93112
94113 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
95114
96115
97116 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
98117
99118
100119 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
101120
102121
103122 func aa () = "%s__amountAsset"
104123
105124
106125 func pa () = "%s__priceAsset"
107126
108127
109128 func amp () = "%s__amp"
110129
111130
112131 func ada () = "%s__addonAddr"
113132
114133
115134 let keyFee = "%s__fee"
116135
117136 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
118137
119138 let keyDLp = makeString(["%s", "dLp"], SEP)
120139
121140 let keyDLpRefreshedHeight = makeString(["%s", "dLpRefreshedHeight"], SEP)
122141
123142 let keyDLpRefreshDelay = makeString(["%s", "refreshDLpDelay"], SEP)
124143
125144 let dLpRefreshDelayDefault = 1
126145
127146 let dLpRefreshDelay = valueOrElse(getInteger(this, keyDLpRefreshDelay), dLpRefreshDelayDefault)
128147
129148 func fcfg () = "%s__factoryConfig"
130149
131150
132151 func mtpk () = "%s%s__matcher__publicKey"
133152
134153
135154 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
136155
137156
138157 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
139158
140159
141160 func aps () = "%s__shutdown"
142161
143162
144163 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
145164
146165
147166 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
148167
149168
150169 func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
151170
152171
153172 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
154173
155174
156175 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
157176
158177
159178 func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
160179
161180
162181 func fmtErr (msg) = makeString(["lp_stable.ride:", msg], " ")
163182
164183
165184 let fca = addressFromStringValue(strf(this, fc()))
166185
167186 let inFee = {
168187 let @ = invoke(fca, "getInFeeREADONLY", [toString(this)], nil)
169188 if ($isInstanceOf(@, "Int"))
170189 then @
171190 else throw(($getType(@) + " couldn't be cast to Int"))
172191 }
173192
174193 let outFee = {
175194 let @ = invoke(fca, "getOutFeeREADONLY", [toString(this)], nil)
176195 if ($isInstanceOf(@, "Int"))
177196 then @
178197 else throw(($getType(@) + " couldn't be cast to Int"))
179198 }
180199
181200 let A = strf(this, amp())
182201
183202 func igs () = valueOrElse(getBoolean(fca, aps()), false)
184203
185204
186205 func mp () = fromBase58String(strf(fca, mtpk()))
187206
188207
189208 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
190209
191210 func gpc () = {
192211 let amtAs = strf(this, aa())
193212 let priceAs = strf(this, pa())
194213 let iPriceAs = intf(fca, mba(priceAs))
195214 let iAmtAs = intf(fca, mba(amtAs))
196215 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
197216 }
198217
199218
200219 func parseAssetId (input) = if ((input == wavesString))
201220 then unit
202221 else fromBase58String(input)
203222
204223
205224 func assetIdToString (input) = if ((input == unit))
206225 then wavesString
207226 else toBase58String(value(input))
208227
209228
210229 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]))
211230
212231
213232 let poolConfigParsed = parsePoolConfig(gpc())
214233
215234 let $t079648193 = poolConfigParsed
216235
236+let cfgPoolAddress = $t079648193._1
237+
217238 let cfgPoolStatus = $t079648193._2
218239
219240 let cfgLpAssetId = $t079648193._3
220241
221242 let cfgAmountAssetId = $t079648193._4
222243
223244 let cfgPriceAssetId = $t079648193._5
224245
225246 let cfgAmountAssetDecimals = $t079648193._6
226247
227248 let cfgPriceAssetDecimals = $t079648193._7
228249
229250 let cfgInAmountAssedId = $t079648193._8
230251
231252 let cfgInPriceAssetId = $t079648193._9
232253
233254 func gfc () = split(strf(fca, fcfg()), SEP)
234255
235256
236257 let factoryConfig = gfc()
237258
238259 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
239260
261+let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
262+
263+let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
264+
240265 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
241266
242267 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)
243268
244269
245270 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)
246271
247272
248273 func getAccBalance (assetId) = if ((assetId == "WAVES"))
249274 then wavesBalance(this).available
250275 else assetBalance(this, fromBase58String(assetId))
251276
252277
253278 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
254279
255280
256281 func cpbir (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
257282
258283
284+func vad (A1,A2,slippage) = {
285+ let diff = fraction((A1 - A2), scale8BigInt, A2)
286+ let pass = ((slippage - abs(diff)) > zeroBigInt)
287+ if (!(pass))
288+ then throw(("Big slpg: " + toString(diff)))
289+ else $Tuple2(pass, min([A1, A2]))
290+ }
291+
292+
293+func vd (D1,D0,slpg) = {
294+ let diff = fraction(D0, scale8BigInt, D1)
295+ let fail = (slpg > diff)
296+ if (if (fail)
297+ then true
298+ else (D0 > D1))
299+ then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
300+ else fail
301+ }
302+
303+
259304 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
260305 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
261306 let prAsAmtX18 = t1(prAmt, prAssetDcm)
262307 cpbi(prAsAmtX18, amtAsAmtX18)
263308 }
264309
265310
266311 func calcPrices (amAmt,prAmt,lpAmt) = {
267312 let amtAsDcm = cfgAmountAssetDecimals
268313 let prAsDcm = cfgPriceAssetDecimals
269314 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
270315 let amAmtX18 = t1(amAmt, amtAsDcm)
271316 let prAmtX18 = t1(prAmt, prAsDcm)
272317 let lpAmtX18 = t1(lpAmt, scale8)
273318 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
274319 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
275320 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
321+ }
322+
323+
324+func calculatePrices (amAmt,prAmt,lpAmt) = {
325+ let p = calcPrices(amAmt, prAmt, lpAmt)
326+[f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
276327 }
277328
278329
279330 func takeFee (amount,fee) = {
280331 let feeAmount = if ((fee == 0))
281332 then 0
282333 else fraction(amount, fee, scale8)
283334 $Tuple2((amount - feeAmount), feeAmount)
284335 }
285336
286337
287338 func getD (xp) = {
288339 let xp0 = xp[0]
289340 let xp1 = xp[1]
290341 let s = (xp0 + xp1)
291342 if ((s == big0))
292343 then big0
293344 else {
294345 let a = parseIntValue(A)
295346 let ann = (a * 2)
296347 let p = fraction(xp0, xp1, big1)
297348 let xp0_xp1_n_n = fraction(p, big4, big1)
298349 let ann_s = fraction(toBigInt(ann), s, big1)
299350 let ann_1 = toBigInt((ann - 1))
300351 func calcDNext (d) = {
301352 let dd = fraction(d, d, big1)
302353 let ddd = fraction(dd, d, big1)
303354 let dp = fraction(ddd, big1, xp0_xp1_n_n)
304355 fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)))
305356 }
306357
307358 func calc (acc,i) = if (acc._2)
308359 then acc
309360 else {
310361 let d = acc._1
311362 let dNext = calcDNext(d)
312363 let dDiffRaw = (dNext - value(d))
313364 let dDiff = if ((big0 > dDiffRaw))
314365 then -(dDiffRaw)
315366 else dDiffRaw
316367 if ((big1 >= dDiff))
317368 then $Tuple2(dNext, true)
318369 else $Tuple2(dNext, false)
319370 }
320371
321372 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
322373 let $t01269012738 = {
323374 let $l = arr
324375 let $s = size($l)
325376 let $acc0 = $Tuple2(s, false)
326377 func $f0_1 ($a,$i) = if (($i >= $s))
327378 then $a
328379 else calc($a, $l[$i])
329380
330381 func $f0_2 ($a,$i) = if (($i >= $s))
331382 then $a
332383 else throw("List size exceeds 15")
333384
334385 $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)
335386 }
336387 let d = $t01269012738._1
337388 let found = $t01269012738._2
338389 if (found)
339390 then d
340391 else throw(("D calculation error, D = " + toString(d)))
341392 }
342393 }
343394
344395
345396 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
346397 let lpId = cfgLpAssetId
347398 let amId = toBase58String(value(cfgAmountAssetId))
348399 let prId = toBase58String(value(cfgPriceAssetId))
349400 let amDcm = cfgAmountAssetDecimals
350401 let prDcm = cfgPriceAssetDecimals
351402 let sts = toString(cfgPoolStatus)
352403 let lpEmiss = valueOrErrorMessage(assetInfo(lpId), "Wrong LP id").quantity
353404 if ((toBase58String(lpId) != pmtAssetId))
354405 then throw("Wrong pmt asset")
355406 else {
356407 let amBalance = getAccBalance(amId)
357408 let amBalanceX18 = t1(amBalance, amDcm)
358409 let prBalance = getAccBalance(prId)
359410 let prBalanceX18 = t1(prBalance, prDcm)
360411 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
361412 let curPrice = f1(curPriceX18, scale8)
362413 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
363414 let lpEmissX18 = t1(lpEmiss, scale8)
364415 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
365416 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
366417 let outAmAmt = fromX18Round(outAmAmtX18, amDcm, FLOOR)
367418 let outPrAmt = fromX18Round(outPrAmtX18, prDcm, FLOOR)
368419 let state = if ((txId58 == ""))
369420 then nil
370421 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
371422 then unit
372423 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
373424 then unit
374425 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)]
375426 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
376427 }
377428 }
378429
379430
380431 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
381432 let lpId = cfgLpAssetId
382433 let amIdStr = toBase58String(value(cfgAmountAssetId))
383434 let prIdStr = toBase58String(value(cfgPriceAssetId))
384435 let inAmIdStr = cfgInAmountAssedId
385436 let inPrIdStr = cfgInPriceAssetId
386437 let amtDcm = cfgAmountAssetDecimals
387438 let priceDcm = cfgPriceAssetDecimals
388439 let sts = toString(cfgPoolStatus)
389440 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
390441 let amBalance = if (isEval)
391442 then getAccBalance(amIdStr)
392443 else if (if (isOneAsset)
393444 then (pmtId == amIdStr)
394445 else false)
395446 then (getAccBalance(amIdStr) - pmtAmt)
396447 else if (isOneAsset)
397448 then getAccBalance(amIdStr)
398449 else (getAccBalance(amIdStr) - inAmAmt)
399450 let prBalance = if (isEval)
400451 then getAccBalance(prIdStr)
401452 else if (if (isOneAsset)
402453 then (pmtId == prIdStr)
403454 else false)
404455 then (getAccBalance(prIdStr) - pmtAmt)
405456 else if (isOneAsset)
406457 then getAccBalance(prIdStr)
407458 else (getAccBalance(prIdStr) - inPrAmt)
408459 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
409460 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
410461 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
411462 let amBalanceX18 = t1(amBalance, amtDcm)
412463 let prBalanceX18 = t1(prBalance, priceDcm)
413464 let D0 = getD([amBalanceX18, prBalanceX18])
414465 let r = if ((lpEm == 0))
415466 then {
416467 let D1 = getD([(amBalanceX18 + inAmAssetAmtX18), (prBalanceX18 + inPrAssetAmtX18)])
417468 let checkD = if ((D1 > D0))
418469 then true
419470 else throw("D1 should be greater than D0")
420471 if ((checkD == checkD))
421472 then {
422473 let curPriceX18 = zeroBigInt
423474 let slippageX18 = zeroBigInt
424- let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN)
475+ let lpAmtX18 = D1
425476 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
426477 }
427478 else throw("Strict value is not equal to itself.")
428479 }
429480 else {
430481 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
431482 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
432483 let slippageX18 = t1(slippage, scale8)
433484 if (if (if (validateSlippage)
434485 then (curPriceX18 != zeroBigInt)
435486 else false)
436487 then (slippageRealX18 > slippageX18)
437488 else false)
438489 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
439490 else {
440491 let lpEmissionX18 = t1(lpEm, scale8)
441492 let prViaAmX18 = fraction(inAmAssetAmtX18, cpbir(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING)
442493 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, cpbir(prBalanceX18, amBalanceX18, FLOOR), CEILING)
443494 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
444495 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
445496 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
446497 let expAmtAssetAmtX18 = expectedAmts._1
447498 let expPriceAssetAmtX18 = expectedAmts._2
448- let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18, FLOOR)
449- $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18)
499+ let D1 = getD([(amBalanceX18 + expAmtAssetAmtX18), (prBalanceX18 + expPriceAssetAmtX18)])
500+ let checkD = if ((D1 > D0))
501+ then true
502+ else throw("D1 should be greater than D0")
503+ if ((checkD == checkD))
504+ then {
505+ let lpAmtX18 = fraction(lpEmissionX18, (D1 - D0), D0)
506+ $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18)
507+ }
508+ else throw("Strict value is not equal to itself.")
450509 }
451510 }
452511 let calcLpAmt = r._1
453512 let calcAmAssetPmt = r._2
454513 let calcPrAssetPmt = r._3
455514 let curPrice = f1(r._4, scale8)
456515 let slippageCalc = f1(r._5, scale8)
457516 if ((0 >= calcLpAmt))
458517 then throw("LP <= 0")
459518 else {
460519 let emitLpAmt = if (!(emitLp))
461520 then 0
462521 else calcLpAmt
463522 let amDiff = (inAmAmt - calcAmAssetPmt)
464523 let prDiff = (inPrAmt - calcPrAssetPmt)
465- let $t02058120926 = if (if (isOneAsset)
524+ let $t02057720922 = if (if (isOneAsset)
466525 then (pmtId == amIdStr)
467526 else false)
468527 then $Tuple2(pmtAmt, 0)
469528 else if (if (isOneAsset)
470529 then (pmtId == prIdStr)
471530 else false)
472531 then $Tuple2(0, pmtAmt)
473532 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
474- let writeAmAmt = $t02058120926._1
475- let writePrAmt = $t02058120926._2
533+ let writeAmAmt = $t02057720922._1
534+ let writePrAmt = $t02057720922._2
476535 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))]
477536 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
478537 }
479538 }
480539
481540
482541 func getYD (xp,i,D) = {
483542 let n = big2
484543 let x = xp[if ((i == 0))
485544 then 1
486545 else 0]
487546 let aPrecision = parseBigIntValue(Amult)
488547 let a = (parseBigIntValue(A) * aPrecision)
489548 let s = x
490549 let ann = (a * n)
491550 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
492551 let b = ((s + ((D * aPrecision) / ann)) - D)
493552 func calc (acc,cur) = {
494- let $t02212122141 = acc
495- let y = $t02212122141._1
496- let found = $t02212122141._2
553+ let $t02211722137 = acc
554+ let y = $t02211722137._1
555+ let found = $t02211722137._2
497556 if ((found != unit))
498557 then acc
499558 else {
500559 let yNext = (((y * y) + c) / ((big2 * y) + b))
501560 let yDiff = absBigInt((yNext - value(y)))
502561 if ((big1 >= yDiff))
503562 then $Tuple2(yNext, cur)
504563 else $Tuple2(yNext, unit)
505564 }
506565 }
507566
508567 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
509- let $t02244822495 = {
568+ let $t02244422491 = {
510569 let $l = arr
511570 let $s = size($l)
512571 let $acc0 = $Tuple2(D, unit)
513572 func $f0_1 ($a,$i) = if (($i >= $s))
514573 then $a
515574 else calc($a, $l[$i])
516575
517576 func $f0_2 ($a,$i) = if (($i >= $s))
518577 then $a
519578 else throw("List size exceeds 15")
520579
521580 $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)
522581 }
523- let y = $t02244822495._1
524- let found = $t02244822495._2
582+ let y = $t02244422491._1
583+ let found = $t02244422491._2
525584 if ((found != unit))
526585 then y
527586 else throw(("Y calculation error, Y = " + toString(y)))
528587 }
529588
530589
531590 func calcDLp (amountBalance,priceBalance,lpEmission) = {
532591 let updatedDLp = fraction(getD([t1BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals)), t1BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))]), scale18, lpEmission)
533592 if ((lpEmission == big0))
534593 then big0
535594 else updatedDLp
536595 }
537596
538597
539598 func calcCurrentDLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
540599 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
541600 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
542601 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
543602 let currentDLp = calcDLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
544603 currentDLp
545604 }
546605
547606
548607 func refreshDLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
549608 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
550609 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
551610 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
552611 let updatedDLp = calcDLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
553612 let actions = [IntegerEntry(keyDLpRefreshedHeight, height), StringEntry(keyDLp, toString(updatedDLp))]
554613 $Tuple2(actions, updatedDLp)
555614 }
556615
557616
558617 func validateUpdatedDLp (oldDLp,updatedDLp) = if ((updatedDLp >= oldDLp))
559618 then true
560619 else throwErr("updated DLp lower than current DLp")
561620
562621
563622 func validateMatcherOrderAllowed (order) = {
564623 let amountAssetAmount = order.amount
565624 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
566- let $t02453924751 = if ((order.orderType == Buy))
625+ let $t02453524747 = if ((order.orderType == Buy))
567626 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
568627 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
569- let amountAssetBalanceDelta = $t02453924751._1
570- let priceAssetBalanceDelta = $t02453924751._2
628+ let amountAssetBalanceDelta = $t02453524747._1
629+ let priceAssetBalanceDelta = $t02453524747._2
571630 if (if (if (igs())
572631 then true
573632 else (cfgPoolStatus == PoolMatcherDis))
574633 then true
575634 else (cfgPoolStatus == PoolShutdown))
576635 then throw("Admin blocked")
577636 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
578637 then true
579638 else (order.assetPair.priceAsset != cfgPriceAssetId))
580639 then throw("Wr assets")
581640 else {
582641 let dLp = parseBigIntValue(getStringValue(this, keyDLp))
583- let $t02508125181 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
584- let unusedActions = $t02508125181._1
585- let dLpNew = $t02508125181._2
642+ let $t02507725177 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
643+ let unusedActions = $t02507725177._1
644+ let dLpNew = $t02507725177._2
586645 let isOrderValid = (dLpNew >= dLp)
587646 let info = makeString([toString(dLp), toString(dLpNew)], " ")
588647 $Tuple2(isOrderValid, info)
589648 }
590649 }
591650
592651
593652 func cg (i) = if ((size(i.payments) != 1))
594653 then throw("1 pmnt exp")
595654 else {
596655 let pmt = value(i.payments[0])
597656 let pmtAssetId = value(pmt.assetId)
598657 let pmtAmt = pmt.amount
599658 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
600659 let outAmAmt = r._1
601660 let outPrAmt = r._2
602661 let sts = parseIntValue(r._9)
603662 let state = r._10
604663 if (if (igs())
605664 then true
606665 else (sts == PoolShutdown))
607666 then throw(("Admin blocked: " + toString(sts)))
608667 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
609668 }
610669
611670
612671 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
613672 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
614673 let sts = parseIntValue(r._8)
615674 if (if (if (igs())
616675 then true
617676 else (sts == PoolPutDis))
618677 then true
619678 else (sts == PoolShutdown))
620679 then throw(("Blocked:" + toString(sts)))
621680 else r
622681 }
623682
624683
625684 func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = {
626685 let amId = toBase58String(value(cfgAmountAssetId))
627686 let prId = toBase58String(value(cfgPriceAssetId))
628687 let lpId = cfgLpAssetId
629688 let amtDcm = cfgAmountAssetDecimals
630689 let priceDcm = cfgPriceAssetDecimals
631690 let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(lpId), "invalid lp asset").quantity)
632691 let chechEmission = if ((lpAssetEmission > big0))
633692 then true
634693 else throw("initial deposit requires all coins")
635694 if ((chechEmission == chechEmission))
636695 then {
637696 let amBalance = getAccBalance(amId)
638697 let prBalance = getAccBalance(prId)
639- let $t02753327995 = if ((txId == ""))
698+ let $t02752927991 = if ((txId == ""))
640699 then $Tuple2(amBalance, prBalance)
641700 else if ((pmtAssetId == amId))
642701 then if ((pmtAmtRaw > amBalance))
643702 then throw("invalid payment amount")
644703 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
645704 else if ((pmtAssetId == prId))
646705 then if ((pmtAmtRaw > prBalance))
647706 then throw("invalid payment amount")
648707 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
649708 else throw("wrong pmtAssetId")
650- let amBalanceOld = $t02753327995._1
651- let prBalanceOld = $t02753327995._2
652- let $t02800128177 = if ((pmtAssetId == amId))
709+ let amBalanceOld = $t02752927991._1
710+ let prBalanceOld = $t02752927991._2
711+ let $t02799728173 = if ((pmtAssetId == amId))
653712 then $Tuple2(pmtAmtRaw, 0)
654713 else if ((pmtAssetId == prId))
655714 then $Tuple2(0, pmtAmtRaw)
656715 else throw("invalid payment")
657- let amAmountRaw = $t02800128177._1
658- let prAmountRaw = $t02800128177._2
659- let $t02818128435 = if (withTakeFee)
716+ let amAmountRaw = $t02799728173._1
717+ let prAmountRaw = $t02799728173._2
718+ let $t02817728431 = if (withTakeFee)
660719 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
661720 else $Tuple3(amAmountRaw, prAmountRaw, 0)
662- let amAmount = $t02818128435._1
663- let prAmount = $t02818128435._2
664- let feeAmount = $t02818128435._3
721+ let amAmount = $t02817728431._1
722+ let prAmount = $t02817728431._2
723+ let feeAmount = $t02817728431._3
665724 let amBalanceNew = (amBalanceOld + amAmount)
666725 let prBalanceNew = (prBalanceOld + prAmount)
667726 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
668727 let D1 = getD([t1(amBalanceNew, cfgAmountAssetDecimals), t1(prBalanceNew, cfgPriceAssetDecimals)])
669728 let checkD = if ((D1 > D0))
670729 then true
671730 else throw()
672731 if ((checkD == checkD))
673732 then {
674733 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0, FLOOR)
675734 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
676735 let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId), dataPutActionInfo(amAmountRaw, prAmountRaw, toInt(lpAmount), curPrice, 0, 0, height, lastBlock.timestamp, 0, 0))]
677736 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
678737 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
679738 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
680739 let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
681740 let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
682741 $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
683742 }
684743 else throw("Strict value is not equal to itself.")
685744 }
686745 else throw("Strict value is not equal to itself.")
687746 }
688747
689748
690749 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
691750 let lpId = toBase58String(value(cfgLpAssetId))
692751 let amId = toBase58String(value(cfgAmountAssetId))
693752 let prId = toBase58String(value(cfgPriceAssetId))
694753 let amDecimals = cfgAmountAssetDecimals
695754 let prDecimals = cfgPriceAssetDecimals
696755 let poolStatus = cfgPoolStatus
697756 let userAddress = if ((caller == restContract))
698757 then originCaller
699758 else caller
700759 let pmt = value(payments[0])
701760 let pmtAssetId = value(pmt.assetId)
702761 let pmtAmt = pmt.amount
703762 let currentDLp = calcCurrentDLp(big0, big0, big0)
704763 if ((currentDLp == currentDLp))
705764 then {
706765 let txId58 = toBase58String(transactionId)
707766 if ((lpId != toBase58String(pmtAssetId)))
708767 then throw("Wrong LP")
709768 else {
710769 let amBalance = getAccBalance(amId)
711770 let prBalance = getAccBalance(prId)
712- let $t03054730658 = {
771+ let $t03054330654 = {
713772 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
714773 if ($isInstanceOf(@, "(Int, Int)"))
715774 then @
716775 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
717776 }
718- if (($t03054730658 == $t03054730658))
777+ if (($t03054330654 == $t03054330654))
719778 then {
720- let feeAmount = $t03054730658._2
721- let totalGet = $t03054730658._1
779+ let feeAmount = $t03054330654._2
780+ let totalGet = $t03054330654._1
722781 let totalAmount = if (if ((minOutAmount > 0))
723782 then (minOutAmount > totalGet)
724783 else false)
725784 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
726785 else totalGet
727- let $t03084831155 = if ((outAssetId == amId))
786+ let $t03084431151 = if ((outAssetId == amId))
728787 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
729788 else if ((outAssetId == prId))
730789 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
731790 else throw("invalid out asset id")
732- let outAm = $t03084831155._1
733- let outPr = $t03084831155._2
734- let amBalanceNew = $t03084831155._3
735- let prBalanceNew = $t03084831155._4
791+ let outAm = $t03084431151._1
792+ let outPr = $t03084431151._2
793+ let amBalanceNew = $t03084431151._3
794+ let prBalanceNew = $t03084431151._4
736795 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
737796 let curPr = f1(curPrX18, scale8)
738797 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
739798 then unit
740799 else fromBase58String(outAssetId)
741800 let sendFeeToMatcher = if ((feeAmount > 0))
742801 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
743802 else nil
744803 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)] ++ sendFeeToMatcher)
745804 if ((state == state))
746805 then {
747806 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
748807 if ((burn == burn))
749808 then {
750- let $t03194032290 = {
809+ let $t03193632286 = {
751810 let feeAmountForCalc = if ((this == feeCollectorAddress))
752811 then 0
753812 else feeAmount
754813 let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId))
755814 then true
756815 else false
757816 if (outInAmountAsset)
758817 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
759818 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
760819 }
761- let amountAssetBalanceDelta = $t03194032290._1
762- let priceAssetBalanceDelta = $t03194032290._2
763- let $t03229332401 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
764- let refreshDLpActions = $t03229332401._1
765- let updatedDLp = $t03229332401._2
820+ let amountAssetBalanceDelta = $t03193632286._1
821+ let priceAssetBalanceDelta = $t03193632286._2
822+ let $t03228932397 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
823+ let refreshDLpActions = $t03228932397._1
824+ let updatedDLp = $t03228932397._2
766825 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
767826 if ((isUpdatedDLpValid == isUpdatedDLpValid))
768827 then $Tuple2((state ++ refreshDLpActions), totalAmount)
769828 else throw("Strict value is not equal to itself.")
770829 }
771830 else throw("Strict value is not equal to itself.")
772831 }
773832 else throw("Strict value is not equal to itself.")
774833 }
775834 else throw("Strict value is not equal to itself.")
776835 }
777836 }
778837 else throw("Strict value is not equal to itself.")
779838 }
780839
781840
782841 func m () = match getString(mpk()) {
783842 case s: String =>
784843 fromBase58String(s)
785844 case _: Unit =>
786845 unit
787846 case _ =>
788847 throw("Match error")
789848 }
790849
791850
792851 func pm () = match getString(pmpk()) {
793852 case s: String =>
794853 fromBase58String(s)
795854 case _: Unit =>
796855 unit
797856 case _ =>
798857 throw("Match error")
799858 }
800859
801860
802861 let pd = throw("Permission denied")
803862
804863 func isManager (i) = match m() {
805864 case pk: ByteVector =>
806865 (i.callerPublicKey == pk)
807866 case _: Unit =>
808867 (i.caller == this)
809868 case _ =>
810869 throw("Match error")
811870 }
812871
813872
814873 func mm (i) = match m() {
815874 case pk: ByteVector =>
816875 if ((i.callerPublicKey == pk))
817876 then true
818877 else pd
819878 case _: Unit =>
820879 if ((i.caller == this))
821880 then true
822881 else pd
823882 case _ =>
824883 throw("Match error")
825884 }
826885
827886
828887 @Callable(i)
829888 func constructor (fc) = {
830889 let c = mm(i)
831890 if ((c == c))
832891 then [StringEntry(fc(), fc)]
833892 else throw("Strict value is not equal to itself.")
834893 }
835894
836895
837896
838897 @Callable(i)
839898 func setManager (pendingManagerPublicKey) = {
840899 let c = mm(i)
841900 if ((c == c))
842901 then {
843902 let cm = fromBase58String(pendingManagerPublicKey)
844903 if ((cm == cm))
845904 then [StringEntry(pmpk(), pendingManagerPublicKey)]
846905 else throw("Strict value is not equal to itself.")
847906 }
848907 else throw("Strict value is not equal to itself.")
849908 }
850909
851910
852911
853912 @Callable(i)
854913 func confirmManager () = {
855914 let p = pm()
856915 let hpm = if (isDefined(p))
857916 then true
858917 else throw("No pending manager")
859918 if ((hpm == hpm))
860919 then {
861920 let cpm = if ((i.callerPublicKey == value(p)))
862921 then true
863922 else throw("You are not pending manager")
864923 if ((cpm == cpm))
865924 then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())]
866925 else throw("Strict value is not equal to itself.")
867926 }
868927 else throw("Strict value is not equal to itself.")
869928 }
870929
871930
872931
873932 @Callable(i)
874933 func put (slip,autoStake) = {
875934 let factCfg = gfc()
876935 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
877936 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
878937 if ((0 > slip))
879938 then throw("Wrong slippage")
880939 else if ((size(i.payments) != 2))
881940 then throw("2 pmnts expd")
882941 else {
883942 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
884943 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
885944 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amAssetPmt)
886945 if ((amountAssetBalance == amountAssetBalance))
887946 then {
888947 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - prAssetPmt)
889948 if ((priceAssetBalance == priceAssetBalance))
890949 then {
891950 let lpAssetEmission = toBigInt(value(assetInfo(cfgLpAssetId)).quantity)
892951 if ((lpAssetEmission == lpAssetEmission))
893952 then {
894953 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
895954 if ((currentDLp == currentDLp))
896955 then {
897956 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, "")
898957 let emitLpAmt = e._2
899958 let lpAssetId = e._7
900959 let state = e._9
901960 let amDiff = e._10
902961 let prDiff = e._11
903962 let amId = e._12
904963 let prId = e._13
905964 let r = invoke(fca, "emit", [emitLpAmt], nil)
906965 if ((r == r))
907966 then {
908967 let el = match r {
909968 case legacy: Address =>
910969 invoke(legacy, "emit", [emitLpAmt], nil)
911970 case _ =>
912971 unit
913972 }
914973 if ((el == el))
915974 then {
916975 let sa = if ((amDiff > 0))
917976 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
918977 else nil
919978 if ((sa == sa))
920979 then {
921980 let sp = if ((prDiff > 0))
922981 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
923982 else nil
924983 if ((sp == sp))
925984 then {
926985 let lpTrnsfr = if (autoStake)
927986 then {
928987 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
929988 if ((ss == ss))
930989 then nil
931990 else throw("Strict value is not equal to itself.")
932991 }
933992 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
934- let $t03655036692 = refreshDLpInternal(0, 0, 0)
935- let refreshDLpActions = $t03655036692._1
936- let updatedDLp = $t03655036692._2
993+ let $t03654636688 = refreshDLpInternal(0, 0, 0)
994+ let refreshDLpActions = $t03654636688._1
995+ let updatedDLp = $t03654636688._2
937996 let check = if ((updatedDLp >= currentDLp))
938997 then true
939998 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
940999 if ((check == check))
9411000 then {
9421001 let lpAssetEmissionAfter = value(assetInfo(cfgLpAssetId)).quantity
9431002 if ((lpAssetEmissionAfter == lpAssetEmissionAfter))
9441003 then ((state ++ lpTrnsfr) ++ refreshDLpActions)
9451004 else throw("Strict value is not equal to itself.")
9461005 }
9471006 else throw("Strict value is not equal to itself.")
9481007 }
9491008 else throw("Strict value is not equal to itself.")
9501009 }
9511010 else throw("Strict value is not equal to itself.")
9521011 }
9531012 else throw("Strict value is not equal to itself.")
9541013 }
9551014 else throw("Strict value is not equal to itself.")
9561015 }
9571016 else throw("Strict value is not equal to itself.")
9581017 }
9591018 else throw("Strict value is not equal to itself.")
9601019 }
9611020 else throw("Strict value is not equal to itself.")
9621021 }
9631022 else throw("Strict value is not equal to itself.")
9641023 }
9651024 }
9661025
9671026
9681027
9691028 @Callable(i)
9701029 func putOneTknV2 (minOutAmount,autoStake) = {
9711030 let isPoolOneTokenOperationsDisabled = {
9721031 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
9731032 if ($isInstanceOf(@, "Boolean"))
9741033 then @
9751034 else throw(($getType(@) + " couldn't be cast to Boolean"))
9761035 }
9771036 let isPutDisabled = if (if (if (igs())
9781037 then true
9791038 else (cfgPoolStatus == PoolPutDis))
9801039 then true
9811040 else (cfgPoolStatus == PoolShutdown))
9821041 then true
9831042 else isPoolOneTokenOperationsDisabled
9841043 let checks = [if (if (!(isPutDisabled))
9851044 then true
9861045 else isManager(i))
9871046 then true
9881047 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
9891048 then true
9901049 else throwErr("exactly 1 payment are expected")]
9911050 if ((checks == checks))
9921051 then {
9931052 let amId = toBase58String(value(cfgAmountAssetId))
9941053 let prId = toBase58String(value(cfgPriceAssetId))
9951054 let lpId = cfgLpAssetId
9961055 let amDecimals = cfgAmountAssetDecimals
9971056 let prDecimals = cfgPriceAssetDecimals
9981057 let userAddress = if ((i.caller == this))
9991058 then i.originCaller
10001059 else i.caller
10011060 let pmt = value(i.payments[0])
10021061 let pmtAssetId = toBase58String(value(pmt.assetId))
10031062 let pmtAmt = pmt.amount
10041063 let currentDLp = if ((pmt.assetId == cfgAmountAssetId))
10051064 then calcCurrentDLp(toBigInt(pmtAmt), toBigInt(0), toBigInt(0))
10061065 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
10071066 if ((currentDLp == currentDLp))
10081067 then {
1009- let $t03833338491 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1010- if (($t03833338491 == $t03833338491))
1068+ let $t03832938487 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1069+ if (($t03832938487 == $t03832938487))
10111070 then {
1012- let feeAmount = $t03833338491._3
1013- let state = $t03833338491._2
1014- let estimLP = $t03833338491._1
1071+ let feeAmount = $t03832938487._3
1072+ let state = $t03832938487._2
1073+ let estimLP = $t03832938487._1
10151074 let emitLpAmt = if (if ((minOutAmount > 0))
10161075 then (minOutAmount > estimLP)
10171076 else false)
10181077 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
10191078 else estimLP
10201079 let e = invoke(fca, "emit", [emitLpAmt], nil)
10211080 if ((e == e))
10221081 then {
10231082 let el = match e {
10241083 case legacy: Address =>
10251084 invoke(legacy, "emit", [emitLpAmt], nil)
10261085 case _ =>
10271086 unit
10281087 }
10291088 if ((el == el))
10301089 then {
10311090 let lpTrnsfr = if (autoStake)
10321091 then {
10331092 let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)])
10341093 if ((ss == ss))
10351094 then nil
10361095 else throw("Strict value is not equal to itself.")
10371096 }
10381097 else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
10391098 let sendFeeToMatcher = if ((feeAmount > 0))
10401099 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
10411100 else nil
1042- let $t03930639655 = if ((this == feeCollectorAddress))
1101+ let $t03930239651 = if ((this == feeCollectorAddress))
10431102 then $Tuple2(0, 0)
10441103 else {
10451104 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
10461105 then true
10471106 else false
10481107 if (paymentInAmountAsset)
10491108 then $Tuple2(-(feeAmount), 0)
10501109 else $Tuple2(0, -(feeAmount))
10511110 }
1052- let amountAssetBalanceDelta = $t03930639655._1
1053- let priceAssetBalanceDelta = $t03930639655._2
1054- let $t03965839766 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1055- let refreshDLpActions = $t03965839766._1
1056- let updatedDLp = $t03965839766._2
1111+ let amountAssetBalanceDelta = $t03930239651._1
1112+ let priceAssetBalanceDelta = $t03930239651._2
1113+ let $t03965439762 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1114+ let refreshDLpActions = $t03965439762._1
1115+ let updatedDLp = $t03965439762._2
10571116 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
10581117 if ((isUpdatedDLpValid == isUpdatedDLpValid))
10591118 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
10601119 else throw("Strict value is not equal to itself.")
10611120 }
10621121 else throw("Strict value is not equal to itself.")
10631122 }
10641123 else throw("Strict value is not equal to itself.")
10651124 }
10661125 else throw("Strict value is not equal to itself.")
10671126 }
10681127 else throw("Strict value is not equal to itself.")
10691128 }
10701129 else throw("Strict value is not equal to itself.")
10711130 }
10721131
10731132
10741133
10751134 @Callable(i)
10761135 func putForFree (maxSlpg) = if ((0 > maxSlpg))
10771136 then throw("Wrong slpg")
10781137 else if ((size(i.payments) != 2))
10791138 then throw("2 pmnts expd")
10801139 else {
10811140 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, "")
10821141 let state = estPut._9
10831142 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
10841143 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
10851144 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
10861145 if ((currentDLp == currentDLp))
10871146 then {
1088- let $t04079640861 = refreshDLpInternal(0, 0, 0)
1089- let refreshDLpActions = $t04079640861._1
1090- let updatedDLp = $t04079640861._2
1147+ let $t04079240857 = refreshDLpInternal(0, 0, 0)
1148+ let refreshDLpActions = $t04079240857._1
1149+ let updatedDLp = $t04079240857._2
10911150 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
10921151 if ((isUpdatedDLpValid == isUpdatedDLpValid))
10931152 then (state ++ refreshDLpActions)
10941153 else throw("Strict value is not equal to itself.")
10951154 }
10961155 else throw("Strict value is not equal to itself.")
10971156 }
10981157
10991158
11001159
11011160 @Callable(i)
11021161 func get () = {
11031162 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
11041163 if ((currentDLp == currentDLp))
11051164 then {
11061165 let r = cg(i)
11071166 let outAmtAmt = r._1
11081167 let outPrAmt = r._2
11091168 let pmtAmt = r._3
11101169 let pmtAssetId = r._4
11111170 let state = r._5
11121171 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
11131172 if ((b == b))
11141173 then {
1115- let $t04203442116 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1116- let refreshDLpActions = $t04203442116._1
1117- let updatedDLp = $t04203442116._2
1174+ let $t04203042112 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1175+ let refreshDLpActions = $t04203042112._1
1176+ let updatedDLp = $t04203042112._2
11181177 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
11191178 if ((isUpdatedDLpValid == isUpdatedDLpValid))
11201179 then (state ++ refreshDLpActions)
11211180 else throw("Strict value is not equal to itself.")
11221181 }
11231182 else throw("Strict value is not equal to itself.")
11241183 }
11251184 else throw("Strict value is not equal to itself.")
11261185 }
11271186
11281187
11291188
11301189 @Callable(i)
11311190 func getOneTknV2 (outAssetId,minOutAmount) = {
11321191 let isPoolOneTokenOperationsDisabled = {
11331192 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
11341193 if ($isInstanceOf(@, "Boolean"))
11351194 then @
11361195 else throw(($getType(@) + " couldn't be cast to Boolean"))
11371196 }
11381197 let isGetDisabled = if (if (igs())
11391198 then true
11401199 else (cfgPoolStatus == PoolShutdown))
11411200 then true
11421201 else isPoolOneTokenOperationsDisabled
11431202 let checks = [if (if (!(isGetDisabled))
11441203 then true
11451204 else isManager(i))
11461205 then true
11471206 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
11481207 then true
11491208 else throwErr("exactly 1 payment are expected")]
11501209 if ((checks == checks))
11511210 then {
1152- let $t04273442889 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1153- let state = $t04273442889._1
1154- let totalAmount = $t04273442889._2
1211+ let $t04273042885 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1212+ let state = $t04273042885._1
1213+ let totalAmount = $t04273042885._2
11551214 $Tuple2(state, totalAmount)
11561215 }
11571216 else throw("Strict value is not equal to itself.")
11581217 }
11591218
11601219
11611220
11621221 @Callable(i)
11631222 func refreshDLp () = {
11641223 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyDLpRefreshedHeight), 0)
11651224 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= dLpRefreshDelay))
11661225 then unit
11671226 else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], ""))
11681227 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
11691228 then {
11701229 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1171- let $t04341343477 = refreshDLpInternal(0, 0, 0)
1172- let dLpUpdateActions = $t04341343477._1
1173- let updatedDLp = $t04341343477._2
1230+ let $t04340943473 = refreshDLpInternal(0, 0, 0)
1231+ let dLpUpdateActions = $t04340943473._1
1232+ let updatedDLp = $t04340943473._2
11741233 let actions = if ((dLp != updatedDLp))
11751234 then dLpUpdateActions
11761235 else throwErr("nothing to refresh")
11771236 $Tuple2(actions, toString(updatedDLp))
11781237 }
11791238 else throw("Strict value is not equal to itself.")
11801239 }
11811240
11821241
11831242
11841243 @Callable(i)
11851244 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
11861245 let amId = toBase58String(value(cfgAmountAssetId))
11871246 let prId = toBase58String(value(cfgPriceAssetId))
11881247 let lpId = toBase58String(value(cfgLpAssetId))
11891248 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
11901249 let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
11911250 let D0 = getD(xp)
11921251 let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
11931252 let index = if ((outAssetId == amId))
11941253 then 0
11951254 else if ((outAssetId == prId))
11961255 then 1
11971256 else throw("invalid out asset id")
11981257 let newY = getYD(xp, index, D1)
11991258 let dy = (xp[index] - newY)
12001259 let totalGetRaw = max([0, toInt((dy - big1))])
1201- let $t04440744462 = takeFee(totalGetRaw, outFee)
1202- let totalGet = $t04440744462._1
1203- let feeAmount = $t04440744462._2
1260+ let $t04440344458 = takeFee(totalGetRaw, outFee)
1261+ let totalGet = $t04440344458._1
1262+ let feeAmount = $t04440344458._2
12041263 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
12051264 }
12061265
12071266
12081267
12091268 @Callable(i)
12101269 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
12111270 let amId = toBase58String(value(cfgAmountAssetId))
12121271 let prId = toBase58String(value(cfgPriceAssetId))
12131272 let lpId = toBase58String(value(cfgLpAssetId))
12141273 let amBalance = getAccBalance(amId)
12151274 let prBalance = getAccBalance(prId)
1216- let $t04483744952 = {
1275+ let $t04483344948 = {
12171276 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
12181277 if ($isInstanceOf(@, "(Int, Int)"))
12191278 then @
12201279 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
12211280 }
1222- let totalGet = $t04483744952._1
1223- let feeAmount = $t04483744952._2
1281+ let totalGet = $t04483344948._1
1282+ let feeAmount = $t04483344948._2
12241283 let r = ego("", lpId, lpAssetAmount, this)
12251284 let outAmAmt = r._1
12261285 let outPrAmt = r._2
12271286 let sumOfGetAssets = (outAmAmt + outPrAmt)
12281287 let bonus = if ((sumOfGetAssets == 0))
12291288 then if ((totalGet == 0))
12301289 then 0
12311290 else throw("bonus calculation error")
12321291 else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
12331292 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
12341293 }
12351294
12361295
12371296
12381297 @Callable(i)
12391298 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
12401299 let r = cg(i)
12411300 let outAmAmt = r._1
12421301 let outPrAmt = r._2
12431302 let pmtAmt = r._3
12441303 let pmtAssetId = r._4
12451304 let state = r._5
12461305 if ((noLessThenAmtAsset > outAmAmt))
12471306 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
12481307 else if ((noLessThenPriceAsset > outPrAmt))
12491308 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
12501309 else {
12511310 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
12521311 if ((currentDLp == currentDLp))
12531312 then {
12541313 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
12551314 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
12561315 then {
1257- let $t04611846199 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1258- let refreshDLpActions = $t04611846199._1
1259- let updatedDLp = $t04611846199._2
1316+ let $t04611446195 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1317+ let refreshDLpActions = $t04611446195._1
1318+ let updatedDLp = $t04611446195._2
12601319 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12611320 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12621321 then (state ++ refreshDLpActions)
12631322 else throw("Strict value is not equal to itself.")
12641323 }
12651324 else throw("Strict value is not equal to itself.")
12661325 }
12671326 else throw("Strict value is not equal to itself.")
12681327 }
12691328 }
12701329
12711330
12721331
12731332 @Callable(i)
12741333 func unstakeAndGet (amount) = {
12751334 let checkPayments = if ((size(i.payments) != 0))
12761335 then throw("No pmnts expd")
12771336 else true
12781337 if ((checkPayments == checkPayments))
12791338 then {
12801339 let factoryCfg = gfc()
12811340 let lpAssetId = cfgLpAssetId
12821341 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
12831342 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
12841343 if ((currentDLp == currentDLp))
12851344 then {
12861345 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
12871346 if ((unstakeInv == unstakeInv))
12881347 then {
12891348 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
12901349 let outAmAmt = r._1
12911350 let outPrAmt = r._2
12921351 let sts = parseIntValue(r._9)
12931352 let state = r._10
12941353 let v = if (if (igs())
12951354 then true
12961355 else (sts == PoolShutdown))
12971356 then throw(("Blocked: " + toString(sts)))
12981357 else true
12991358 if ((v == v))
13001359 then {
13011360 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
13021361 if ((burnA == burnA))
13031362 then {
1304- let $t04722647307 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1305- let refreshDLpActions = $t04722647307._1
1306- let updatedDLp = $t04722647307._2
1363+ let $t04722247303 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1364+ let refreshDLpActions = $t04722247303._1
1365+ let updatedDLp = $t04722247303._2
13071366 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13081367 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13091368 then (state ++ refreshDLpActions)
13101369 else throw("Strict value is not equal to itself.")
13111370 }
13121371 else throw("Strict value is not equal to itself.")
13131372 }
13141373 else throw("Strict value is not equal to itself.")
13151374 }
13161375 else throw("Strict value is not equal to itself.")
13171376 }
13181377 else throw("Strict value is not equal to itself.")
13191378 }
13201379 else throw("Strict value is not equal to itself.")
13211380 }
13221381
13231382
13241383
13251384 @Callable(i)
13261385 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
13271386 let isGetDisabled = if (igs())
13281387 then true
13291388 else (cfgPoolStatus == PoolShutdown)
13301389 let checks = [if (!(isGetDisabled))
13311390 then true
13321391 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
13331392 then true
13341393 else throw("no payments are expected")]
13351394 if ((checks == checks))
13361395 then {
13371396 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
13381397 if ((currentDLp == currentDLp))
13391398 then {
13401399 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
13411400 if ((unstakeInv == unstakeInv))
13421401 then {
13431402 let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
13441403 let outAmAmt = res._1
13451404 let outPrAmt = res._2
13461405 let state = res._10
13471406 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
13481407 then true
13491408 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
13501409 then true
13511410 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
13521411 if ((checkAmounts == checkAmounts))
13531412 then {
13541413 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
13551414 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
13561415 then {
1357- let $t04855848639 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1358- let refreshDLpActions = $t04855848639._1
1359- let updatedDLp = $t04855848639._2
1416+ let $t04855448635 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1417+ let refreshDLpActions = $t04855448635._1
1418+ let updatedDLp = $t04855448635._2
13601419 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13611420 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13621421 then (state ++ refreshDLpActions)
13631422 else throw("Strict value is not equal to itself.")
13641423 }
13651424 else throw("Strict value is not equal to itself.")
13661425 }
13671426 else throw("Strict value is not equal to itself.")
13681427 }
13691428 else throw("Strict value is not equal to itself.")
13701429 }
13711430 else throw("Strict value is not equal to itself.")
13721431 }
13731432 else throw("Strict value is not equal to itself.")
13741433 }
13751434
13761435
13771436
13781437 @Callable(i)
13791438 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
13801439 let isPoolOneTokenOperationsDisabled = {
13811440 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
13821441 if ($isInstanceOf(@, "Boolean"))
13831442 then @
13841443 else throw(($getType(@) + " couldn't be cast to Boolean"))
13851444 }
13861445 let isGetDisabled = if (if (igs())
13871446 then true
13881447 else (cfgPoolStatus == PoolShutdown))
13891448 then true
13901449 else isPoolOneTokenOperationsDisabled
13911450 let checks = [if (if (!(isGetDisabled))
13921451 then true
13931452 else isManager(i))
13941453 then true
13951454 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
13961455 then true
13971456 else throwErr("no payments are expected")]
13981457 if ((checks == checks))
13991458 then {
14001459 let factoryCfg = gfc()
14011460 let lpAssetId = cfgLpAssetId
14021461 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
14031462 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), unstakeAmount], nil)
14041463 if ((unstakeInv == unstakeInv))
14051464 then {
1406- let $t04953449722 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1407- let state = $t04953449722._1
1408- let totalAmount = $t04953449722._2
1465+ let $t04953049718 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1466+ let state = $t04953049718._1
1467+ let totalAmount = $t04953049718._2
14091468 $Tuple2(state, totalAmount)
14101469 }
14111470 else throw("Strict value is not equal to itself.")
14121471 }
14131472 else throw("Strict value is not equal to itself.")
14141473 }
14151474
14161475
14171476
14181477 @Callable(i)
14191478 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1420- let $t04985049953 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1421- let lpAmount = $t04985049953._1
1422- let state = $t04985049953._2
1423- let feeAmount = $t04985049953._3
1424- let bonus = $t04985049953._4
1479+ let $t04984649949 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1480+ let lpAmount = $t04984649949._1
1481+ let state = $t04984649949._2
1482+ let feeAmount = $t04984649949._3
1483+ let bonus = $t04984649949._4
14251484 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
14261485 }
14271486
14281487
14291488
14301489 @Callable(i)
14311490 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1432- let $t05010150205 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1433- let lpAmount = $t05010150205._1
1434- let state = $t05010150205._2
1435- let feeAmount = $t05010150205._3
1436- let bonus = $t05010150205._4
1491+ let $t05009750201 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1492+ let lpAmount = $t05009750201._1
1493+ let state = $t05009750201._2
1494+ let feeAmount = $t05009750201._3
1495+ let bonus = $t05009750201._4
14371496 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
14381497 }
14391498
14401499
14411500
14421501 @Callable(i)
14431502 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
14441503 then throw("denied")
14451504 else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
14461505
14471506
14481507
14491508 @Callable(i)
14501509 func setS (k,v) = if ((toString(i.caller) != strf(this, ada())))
14511510 then pd
14521511 else [StringEntry(k, v)]
14531512
14541513
14551514
14561515 @Callable(i)
14571516 func setI (k,v) = if ((toString(i.caller) != strf(this, ada())))
14581517 then pd
14591518 else [IntegerEntry(k, v)]
14601519
14611520
14621521
14631522 @Callable(i)
14641523 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
14651524
14661525
14671526
14681527 @Callable(i)
14691528 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
14701529
14711530
14721531
14731532 @Callable(i)
14741533 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
14751534 let pr = calcPrices(amAmt, prAmt, lpAmt)
14761535 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
14771536 }
14781537
14791538
14801539
14811540 @Callable(i)
14821541 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
14831542
14841543
14851544
14861545 @Callable(i)
14871546 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
14881547
14891548
14901549
14911550 @Callable(i)
14921551 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
14931552
14941553
14951554
14961555 @Callable(i)
14971556 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, ""))
14981557
14991558
15001559
15011560 @Callable(i)
15021561 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
15031562 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
15041563 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
15051564 }
15061565
15071566
15081567 @Verifier(tx)
15091568 func verify () = {
15101569 let targetPublicKey = match m() {
15111570 case pk: ByteVector =>
15121571 pk
15131572 case _: Unit =>
15141573 tx.senderPublicKey
15151574 case _ =>
15161575 throw("Match error")
15171576 }
15181577 match tx {
15191578 case order: Order =>
15201579 let matcherPub = mp()
1521- let $t05299753066 = validateMatcherOrderAllowed(order)
1522- let orderValid = $t05299753066._1
1523- let orderValidInfo = $t05299753066._2
1580+ let $t05299353062 = validateMatcherOrderAllowed(order)
1581+ let orderValid = $t05299353062._1
1582+ let orderValidInfo = $t05299353062._2
15241583 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
15251584 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
15261585 if (if (if (orderValid)
15271586 then senderValid
15281587 else false)
15291588 then matcherValid
15301589 else false)
15311590 then true
15321591 else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
15331592 case s: SetScriptTransaction =>
15341593 if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
15351594 then true
15361595 else {
15371596 let newHash = blake2b256(value(s.script))
15381597 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
15391598 let currentHash = scriptHash(this)
15401599 if ((allowedHash == newHash))
15411600 then (currentHash != newHash)
15421601 else false
15431602 }
15441603 case _ =>
15451604 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
15461605 }
15471606 }
15481607

github/deemru/w8io/026f985 
219.12 ms