tx · 4tRWb6BEQW7y7wiFeqCMumeQQwWHB8Trtoj23RhxjxFz

3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA:  -0.04200000 Waves

2024.07.10 11:19 [3187677] smart account 3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA > SELF 0.00000000 Waves

{ "type": 13, "id": "4tRWb6BEQW7y7wiFeqCMumeQQwWHB8Trtoj23RhxjxFz", "fee": 4200000, "feeAssetId": null, "timestamp": 1720599577221, "version": 2, "chainId": 84, "sender": "3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA", "senderPublicKey": "35yd3qw1gxKDxKwGAykHN9fANbXNWwseaUwbWDj24o3x", "proofs": [ "3AYVviUNDRGvY4WnHcWkLsuSb8SbeqVg8MHmU9Gsgs6mBAhZYFAXEd7DTzmCsHYap4wje1CDcp8T487Sqqu67wtU" ], "script": "base64:BgLaLQgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgQKAgEEEgQKAgEEEgMKAQESABIECgIIARIAEgQKAggBEgQKAggBEgQKAgEBEgMKAQESBQoDAQEBEgUKAwEIARIECgIBCBIECgIBCBIECgIICBIAEgMKAQgSBQoDAQEBEgQKAggBEgQKAgEBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEIEgAiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgRiaWcwIgRiaWcxIgRiaWcyIgRiaWczIgRiaWc0IgpzbGlwcGFnZTREIgt3YXZlc1N0cmluZyIKYW1wSW5pdGlhbCIFQW11bHQiBURjb252IgNTRVAiBUVNUFRZIgpQb29sQWN0aXZlIgpQb29sUHV0RGlzIg5Qb29sTWF0Y2hlckRpcyIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyIJaWR4UG9vbFN0IglpZHhMUEFzSWQiCWlkeEFtQXNJZCIJaWR4UHJBc0lkIgtpZHhBbXRBc0RjbSINaWR4UHJpY2VBc0RjbSILaWR4SUFtdE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AIEVW5pdAgFAml6D3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yBAJhUAUCaXoDCQABAgUCYVACBU9yZGVyBAJmaQUCYVAEAmlDCQECYmsABAJpRAMJAQJnRwAJAJQKAgYCAAkBAmZoAQUCZmkEAmFLCAUCaUQCXzEEAmFMCAUCaUQCXzIEAmFNCQD0AwMIBQJmaQlib2R5Qnl0ZXMJAJEDAggFAmZpBnByb29mcwABBQJpQwMDBQJhSwUCYU0HBgkBAmFKAwUCYUsFAmFMBQJhTQMJAAECBQJhUAIUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAmFVBQJhUAMJAPQDAwgFAml6CWJvZHlCeXRlcwkAkQMCCAUCaXoGcHJvb2ZzAAAFAmlCBgQCaUUJAPYDAQkBBXZhbHVlAQgFAmFVBnNjcmlwdAQCaUYJANsEAQkBBXZhbHVlAQkAnQgCBQJhVAkBAmFGAAQCaUcJAPEHAQUEdGhpcwMJAAACBQJpRgUCaUUJAQIhPQIFAmlHBQJpRQcJAPQDAwgFAml6CWJvZHlCeXRlcwkAkQMCCAUCaXoGcHJvb2ZzAAAFAmlC7v3f4Q==", "height": 3187677, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4qZofDJBLEPkMoXc1kvDN1rwSUvG7BCAEWSqeZVXrG5h Next: none Diff:
OldNewDifferences
174174 func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress)
175175
176176
177-func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
177+func throwOrderError (orderValid,orderValidInfo,matcherValid) = throw((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " matcherValid=") + toString(matcherValid)))
178178
179179
180180 func addressFromStringOrThis (addressString) = match addressFromString(addressString) {
269269
270270 let poolConfigParsed = parsePoolConfig(gpc())
271271
272-let $t088369022 = poolConfigParsed
272+let $t087698955 = poolConfigParsed
273273
274-let cfgPoolAddress = $t088369022._1
274+let cfgPoolAddress = $t087698955._1
275275
276-let cfgPoolStatus = $t088369022._2
276+let cfgPoolStatus = $t087698955._2
277277
278-let cfgLpAssetId = $t088369022._3
278+let cfgLpAssetId = $t087698955._3
279279
280-let cfgAmountAssetId = $t088369022._4
280+let cfgAmountAssetId = $t087698955._4
281281
282-let cfgPriceAssetId = $t088369022._5
282+let cfgPriceAssetId = $t087698955._5
283283
284-let cfgAmountAssetDecimals = $t088369022._6
284+let cfgAmountAssetDecimals = $t087698955._6
285285
286-let cfgPriceAssetDecimals = $t088369022._7
286+let cfgPriceAssetDecimals = $t087698955._7
287287
288288 func gfc () = split(strf(fca, fcfg()), SEP)
289289
404404 }
405405
406406 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
407- let $t01352713575 = {
407+ let $t01346013508 = {
408408 let $l = arr
409409 let $s = size($l)
410410 let $acc0 = $Tuple2(s, false)
418418
419419 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17)
420420 }
421- let d = $t01352713575._1
422- let found = $t01352713575._2
421+ let d = $t01346013508._1
422+ let found = $t01346013508._2
423423 if (found)
424424 then d
425425 else throw(("D calculation error, D = " + toString(d)))
560560 else calcLpAmt
561561 let amDiff = (inAmAmt - calcAmAssetPmt)
562562 let prDiff = (inPrAmt - calcPrAssetPmt)
563- let $t02149821843 = if (if (isOneAsset)
563+ let $t02143121776 = if (if (isOneAsset)
564564 then (pmtId == amIdStr)
565565 else false)
566566 then $Tuple2(pmtAmt, 0)
569569 else false)
570570 then $Tuple2(0, pmtAmt)
571571 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
572- let writeAmAmt = $t02149821843._1
573- let writePrAmt = $t02149821843._2
572+ let writeAmAmt = $t02143121776._1
573+ let writePrAmt = $t02143121776._2
574574 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))]
575575 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
576576 }
591591 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
592592 let b = ((s + ((D * aPrecision) / ann)) - D)
593593 func calc (acc,cur) = {
594- let $t02303823058 = acc
595- let y = $t02303823058._1
596- let found = $t02303823058._2
594+ let $t02297122991 = acc
595+ let y = $t02297122991._1
596+ let found = $t02297122991._2
597597 if ((found != unit))
598598 then acc
599599 else {
606606 }
607607
608608 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
609- let $t02336523412 = {
609+ let $t02329823345 = {
610610 let $l = arr
611611 let $s = size($l)
612612 let $acc0 = $Tuple2(D, unit)
620620
621621 $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)
622622 }
623- let y = $t02336523412._1
624- let found = $t02336523412._2
623+ let y = $t02329823345._1
624+ let found = $t02329823345._2
625625 if ((found != unit))
626626 then y
627627 else throw(("Y calculation error, Y = " + toString(y)))
665665 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
666666 let amountAssetAmount = order.amount
667667 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
668- let $t02561025822 = if ((order.orderType == Buy))
668+ let $t02554325755 = if ((order.orderType == Buy))
669669 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
670670 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
671- let amountAssetBalanceDelta = $t02561025822._1
672- let priceAssetBalanceDelta = $t02561025822._2
671+ let amountAssetBalanceDelta = $t02554325755._1
672+ let priceAssetBalanceDelta = $t02554325755._2
673673 if (if (if (igs())
674674 then true
675675 else (cfgPoolStatus == PoolMatcherDis))
682682 then throw("Wr assets")
683683 else {
684684 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
685- let $t02616426264 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
686- let unusedActions = $t02616426264._1
687- let dLpNew = $t02616426264._2
685+ let $t02609726197 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
686+ let unusedActions = $t02609726197._1
687+ let dLpNew = $t02609726197._2
688688 let isOrderValid = (dLpNew >= dLp)
689689 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
690690 $Tuple2(isOrderValid, info)
744744 then {
745745 let amBalance = getAccBalance(amId)
746746 let prBalance = getAccBalance(prId)
747- let $t02912329585 = if ((txId == ""))
747+ let $t02905629518 = if ((txId == ""))
748748 then $Tuple2(amBalance, prBalance)
749749 else if ((pmtAssetId == amId))
750750 then if ((pmtAmtRaw > amBalance))
755755 then throw("invalid payment amount")
756756 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
757757 else throw("wrong pmtAssetId")
758- let amBalanceOld = $t02912329585._1
759- let prBalanceOld = $t02912329585._2
760- let $t02959129767 = if ((pmtAssetId == amId))
758+ let amBalanceOld = $t02905629518._1
759+ let prBalanceOld = $t02905629518._2
760+ let $t02952429700 = if ((pmtAssetId == amId))
761761 then $Tuple2(pmtAmtRaw, 0)
762762 else if ((pmtAssetId == prId))
763763 then $Tuple2(0, pmtAmtRaw)
764764 else throw("invalid payment")
765- let amAmountRaw = $t02959129767._1
766- let prAmountRaw = $t02959129767._2
767- let $t02977130025 = if (withTakeFee)
765+ let amAmountRaw = $t02952429700._1
766+ let prAmountRaw = $t02952429700._2
767+ let $t02970429958 = if (withTakeFee)
768768 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
769769 else $Tuple3(amAmountRaw, prAmountRaw, 0)
770- let amAmount = $t02977130025._1
771- let prAmount = $t02977130025._2
772- let feeAmount = $t02977130025._3
770+ let amAmount = $t02970429958._1
771+ let prAmount = $t02970429958._2
772+ let feeAmount = $t02970429958._3
773773 let amBalanceNew = (amBalanceOld + amAmount)
774774 let prBalanceNew = (prBalanceOld + prAmount)
775775 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
817817 else {
818818 let amBalance = getAccBalance(amId)
819819 let prBalance = getAccBalance(prId)
820- let $t03213732248 = {
820+ let $t03207032181 = {
821821 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
822822 if ($isInstanceOf(@, "(Int, Int)"))
823823 then @
824824 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
825825 }
826- if (($t03213732248 == $t03213732248))
826+ if (($t03207032181 == $t03207032181))
827827 then {
828- let feeAmount = $t03213732248._2
829- let totalGet = $t03213732248._1
828+ let feeAmount = $t03207032181._2
829+ let totalGet = $t03207032181._1
830830 let totalAmount = if (if ((minOutAmount > 0))
831831 then (minOutAmount > totalGet)
832832 else false)
833833 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
834834 else totalGet
835- let $t03243832745 = if ((outAssetId == amId))
835+ let $t03237132678 = if ((outAssetId == amId))
836836 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
837837 else if ((outAssetId == prId))
838838 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
839839 else throw("invalid out asset id")
840- let outAm = $t03243832745._1
841- let outPr = $t03243832745._2
842- let amBalanceNew = $t03243832745._3
843- let prBalanceNew = $t03243832745._4
840+ let outAm = $t03237132678._1
841+ let outPr = $t03237132678._2
842+ let amBalanceNew = $t03237132678._3
843+ let prBalanceNew = $t03237132678._4
844844 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
845845 let curPr = f1(curPrX18, scale8)
846846 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
855855 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
856856 if ((burn == burn))
857857 then {
858- let $t03353033880 = {
858+ let $t03346333813 = {
859859 let feeAmountForCalc = if ((this == feeCollectorAddress))
860860 then 0
861861 else feeAmount
866866 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
867867 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
868868 }
869- let amountAssetBalanceDelta = $t03353033880._1
870- let priceAssetBalanceDelta = $t03353033880._2
871- let $t03388333991 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
872- let refreshDLpActions = $t03388333991._1
873- let updatedDLp = $t03388333991._2
869+ let amountAssetBalanceDelta = $t03346333813._1
870+ let priceAssetBalanceDelta = $t03346333813._2
871+ let $t03381633924 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
872+ let refreshDLpActions = $t03381633924._1
873+ let updatedDLp = $t03381633924._2
874874 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
875875 if ((isUpdatedDLpValid == isUpdatedDLpValid))
876876 then $Tuple2((state ++ refreshDLpActions), totalAmount)
942942 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
943943 let b = ((s + ((D * aPrecision) / ann)) - D)
944944 func calc (acc,cur) = {
945- let $t03547835498 = acc
946- let y = $t03547835498._1
947- let found = $t03547835498._2
945+ let $t03541135431 = acc
946+ let y = $t03541135431._1
947+ let found = $t03541135431._2
948948 if ((found != unit))
949949 then acc
950950 else {
957957 }
958958
959959 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
960- let $t03582935876 = {
960+ let $t03576235809 = {
961961 let $l = arr
962962 let $s = size($l)
963963 let $acc0 = $Tuple2(D, unit)
971971
972972 $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)
973973 }
974- let y = $t03582935876._1
975- let found = $t03582935876._2
974+ let y = $t03576235809._1
975+ let found = $t03576235809._2
976976 if ((found != unit))
977977 then y
978978 else throw(("Y calculation error, Y = " + toString(y)))
984984
985985 @Callable(i)
986986 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
987- let $t03622836652 = if ((isReverse == false))
987+ let $t03616136585 = if ((isReverse == false))
988988 then {
989989 let assetOut = strf(this, pa())
990990 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
995995 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
996996 $Tuple2(assetOut, poolAmountInBalance)
997997 }
998- let assetOut = $t03622836652._1
999- let poolAmountInBalance = $t03622836652._2
998+ let assetOut = $t03616136585._1
999+ let poolAmountInBalance = $t03616136585._2
10001000 let poolConfig = gpc()
10011001 let amId = poolConfig[idxAmAsId]
10021002 let prId = poolConfig[idxPrAsId]
10531053 then {
10541054 let pmt = value(i.payments[0])
10551055 let assetIn = assetIdToString(pmt.assetId)
1056- let $t03842438818 = if ((isReverse == false))
1056+ let $t03835738751 = if ((isReverse == false))
10571057 then {
10581058 let assetOut = strf(this, pa())
10591059 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10641064 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10651065 $Tuple2(assetOut, poolAmountInBalance)
10661066 }
1067- let assetOut = $t03842438818._1
1068- let poolAmountInBalance = $t03842438818._2
1067+ let assetOut = $t03835738751._1
1068+ let poolAmountInBalance = $t03835738751._2
10691069 let poolConfig = gpc()
10701070 let amId = poolConfig[idxAmAsId]
10711071 let prId = poolConfig[idxPrAsId]
11811181 else throw("Strict value is not equal to itself.")
11821182 }
11831183 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1184- let $t04327343415 = refreshDLpInternal(0, 0, 0)
1185- let refreshDLpActions = $t04327343415._1
1186- let updatedDLp = $t04327343415._2
1184+ let $t04320643348 = refreshDLpInternal(0, 0, 0)
1185+ let refreshDLpActions = $t04320643348._1
1186+ let updatedDLp = $t04320643348._2
11871187 let check = if ((updatedDLp >= currentDLp))
11881188 then true
11891189 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
12581258 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12591259 if ((currentDLp == currentDLp))
12601260 then {
1261- let $t04509345251 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1262- if (($t04509345251 == $t04509345251))
1261+ let $t04502645184 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1262+ if (($t04502645184 == $t04502645184))
12631263 then {
1264- let feeAmount = $t04509345251._3
1265- let state = $t04509345251._2
1266- let estimLP = $t04509345251._1
1264+ let feeAmount = $t04502645184._3
1265+ let state = $t04502645184._2
1266+ let estimLP = $t04502645184._1
12671267 let emitLpAmt = if (if ((minOutAmount > 0))
12681268 then (minOutAmount > estimLP)
12691269 else false)
12911291 let sendFeeToMatcher = if ((feeAmount > 0))
12921292 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12931293 else nil
1294- let $t04613646485 = if ((this == feeCollectorAddress))
1294+ let $t04606946418 = if ((this == feeCollectorAddress))
12951295 then $Tuple2(0, 0)
12961296 else {
12971297 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
13011301 then $Tuple2(-(feeAmount), 0)
13021302 else $Tuple2(0, -(feeAmount))
13031303 }
1304- let amountAssetBalanceDelta = $t04613646485._1
1305- let priceAssetBalanceDelta = $t04613646485._2
1306- let $t04648846596 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1307- let refreshDLpActions = $t04648846596._1
1308- let updatedDLp = $t04648846596._2
1304+ let amountAssetBalanceDelta = $t04606946418._1
1305+ let priceAssetBalanceDelta = $t04606946418._2
1306+ let $t04642146529 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1307+ let refreshDLpActions = $t04642146529._1
1308+ let updatedDLp = $t04642146529._2
13091309 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13101310 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13111311 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
13371337 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
13381338 if ((currentDLp == currentDLp))
13391339 then {
1340- let $t04762647691 = refreshDLpInternal(0, 0, 0)
1341- let refreshDLpActions = $t04762647691._1
1342- let updatedDLp = $t04762647691._2
1340+ let $t04755947624 = refreshDLpInternal(0, 0, 0)
1341+ let refreshDLpActions = $t04755947624._1
1342+ let updatedDLp = $t04755947624._2
13431343 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13441344 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13451345 then (state ++ refreshDLpActions)
13641364 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13651365 if ((b == b))
13661366 then {
1367- let $t04886448946 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1368- let refreshDLpActions = $t04886448946._1
1369- let updatedDLp = $t04886448946._2
1367+ let $t04879748879 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1368+ let refreshDLpActions = $t04879748879._1
1369+ let updatedDLp = $t04879748879._2
13701370 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13711371 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13721372 then (state ++ refreshDLpActions)
14031403 else throwErr("exactly 1 payment are expected")]
14041404 if ((checks == checks))
14051405 then {
1406- let $t04960149756 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1407- let state = $t04960149756._1
1408- let totalAmount = $t04960149756._2
1406+ let $t04953449689 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1407+ let state = $t04953449689._1
1408+ let totalAmount = $t04953449689._2
14091409 $Tuple2(state, totalAmount)
14101410 }
14111411 else throw("Strict value is not equal to itself.")
14221422 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
14231423 then {
14241424 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1425- let $t05028050344 = refreshDLpInternal(0, 0, 0)
1426- let dLpUpdateActions = $t05028050344._1
1427- let updatedDLp = $t05028050344._2
1425+ let $t05021350277 = refreshDLpInternal(0, 0, 0)
1426+ let dLpUpdateActions = $t05021350277._1
1427+ let updatedDLp = $t05021350277._2
14281428 let actions = if ((dLp != updatedDLp))
14291429 then dLpUpdateActions
14301430 else throwErr("nothing to refresh")
14521452 let newY = getYD(xp, index, D1)
14531453 let dy = (xp[index] - newY)
14541454 let totalGetRaw = max([0, toInt((dy - big1))])
1455- let $t05135451409 = takeFee(totalGetRaw, outFee)
1456- let totalGet = $t05135451409._1
1457- let feeAmount = $t05135451409._2
1455+ let $t05128751342 = takeFee(totalGetRaw, outFee)
1456+ let totalGet = $t05128751342._1
1457+ let feeAmount = $t05128751342._2
14581458 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14591459 }
14601460
14671467 let lpId = toBase58String(value(cfgLpAssetId))
14681468 let amBalance = getAccBalance(amId)
14691469 let prBalance = getAccBalance(prId)
1470- let $t05178451899 = {
1470+ let $t05171751832 = {
14711471 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14721472 if ($isInstanceOf(@, "(Int, Int)"))
14731473 then @
14741474 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14751475 }
1476- let totalGet = $t05178451899._1
1477- let feeAmount = $t05178451899._2
1476+ let totalGet = $t05171751832._1
1477+ let feeAmount = $t05171751832._2
14781478 let r = ego("", lpId, lpAssetAmount, this)
14791479 let outAmAmt = r._1
14801480 let outPrAmt = r._2
15081508 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
15091509 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15101510 then {
1511- let $t05306553146 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1512- let refreshDLpActions = $t05306553146._1
1513- let updatedDLp = $t05306553146._2
1511+ let $t05299853079 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1512+ let refreshDLpActions = $t05299853079._1
1513+ let updatedDLp = $t05299853079._2
15141514 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15151515 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15161516 then (state ++ refreshDLpActions)
15581558 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15591559 if ((burnA == burnA))
15601560 then {
1561- let $t05425654337 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1562- let refreshDLpActions = $t05425654337._1
1563- let updatedDLp = $t05425654337._2
1561+ let $t05418954270 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1562+ let refreshDLpActions = $t05418954270._1
1563+ let updatedDLp = $t05418954270._2
15641564 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15651565 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15661566 then (state ++ refreshDLpActions)
16131613 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
16141614 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
16151615 then {
1616- let $t05562555706 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1617- let refreshDLpActions = $t05562555706._1
1618- let updatedDLp = $t05562555706._2
1616+ let $t05555855639 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1617+ let refreshDLpActions = $t05555855639._1
1618+ let updatedDLp = $t05555855639._2
16191619 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
16201620 if ((isUpdatedDLpValid == isUpdatedDLpValid))
16211621 then (state ++ refreshDLpActions)
16661666 let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
16671667 if ((unstakeInv == unstakeInv))
16681668 then {
1669- let $t05676556953 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1670- let state = $t05676556953._1
1671- let totalAmount = $t05676556953._2
1669+ let $t05669856886 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1670+ let state = $t05669856886._1
1671+ let totalAmount = $t05669856886._2
16721672 $Tuple2(state, totalAmount)
16731673 }
16741674 else throw("Strict value is not equal to itself.")
16801680
16811681 @Callable(i)
16821682 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1683- let $t05708157184 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1684- let lpAmount = $t05708157184._1
1685- let state = $t05708157184._2
1686- let feeAmount = $t05708157184._3
1687- let bonus = $t05708157184._4
1683+ let $t05701457117 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1684+ let lpAmount = $t05701457117._1
1685+ let state = $t05701457117._2
1686+ let feeAmount = $t05701457117._3
1687+ let bonus = $t05701457117._4
16881688 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16891689 }
16901690
16921692
16931693 @Callable(i)
16941694 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1695- let $t05733257436 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1696- let lpAmount = $t05733257436._1
1697- let state = $t05733257436._2
1698- let feeAmount = $t05733257436._3
1699- let bonus = $t05733257436._4
1695+ let $t05726557369 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1696+ let lpAmount = $t05726557369._1
1697+ let state = $t05726557369._2
1698+ let feeAmount = $t05726557369._3
1699+ let bonus = $t05726557369._4
17001700 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
17011701 }
17021702
17581758 @Callable(i)
17591759 func changeAmp () = {
17601760 let cfg = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1761- let $t05991660115 = match cfg {
1761+ let $t05984960048 = match cfg {
17621762 case list: List[Any] =>
17631763 $Tuple3({
17641764 let @ = list[0]
17791779 case _ =>
17801780 throwErr("invalid entry type")
17811781 }
1782- let delay = $t05991660115._1
1783- let delta = $t05991660115._2
1784- let target = $t05991660115._3
1782+ let delay = $t05984960048._1
1783+ let delta = $t05984960048._2
1784+ let target = $t05984960048._3
17851785 let curAmp = parseIntValue(getStringValue(amp()))
17861786 let newAmpRaw = (curAmp + delta)
17871787 let newAmp = if ((0 > delta))
18171817 match tx {
18181818 case order: Order =>
18191819 let matcherPub = mp()
1820- let $t06104861165 = if (skipOrderValidation())
1820+ let $t06098161209 = if (skipOrderValidation())
18211821 then $Tuple2(true, "")
18221822 else validateMatcherOrderAllowed(order)
1823- let orderValid = $t06104861165._1
1824- let orderValidInfo = $t06104861165._2
1825- let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
1823+ let orderValid = $t06098161209._1
1824+ let orderValidInfo = $t06098161209._2
18261825 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
1827- if (if (if (orderValid)
1828- then senderValid
1829- else false)
1826+ if (if (orderValid)
18301827 then matcherValid
18311828 else false)
18321829 then true
1833- else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
1830+ else throwOrderError(orderValid, orderValidInfo, matcherValid)
18341831 case s: SetScriptTransaction =>
18351832 if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
18361833 then true
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let scale8 = 100000000
55
66 let scale8BigInt = toBigInt(100000000)
77
88 let scale18 = toBigInt(1000000000000000000)
99
1010 let zeroBigInt = toBigInt(0)
1111
1212 let big0 = toBigInt(0)
1313
1414 let big1 = toBigInt(1)
1515
1616 let big2 = toBigInt(2)
1717
1818 let big3 = toBigInt(3)
1919
2020 let big4 = toBigInt(4)
2121
2222 let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
2323
2424 let wavesString = "WAVES"
2525
2626 let ampInitial = 50
2727
2828 let Amult = "100"
2929
3030 let Dconv = "1"
3131
3232 let SEP = "__"
3333
3434 let EMPTY = ""
3535
3636 let PoolActive = 1
3737
3838 let PoolPutDis = 2
3939
4040 let PoolMatcherDis = 3
4141
4242 let PoolShutdown = 4
4343
4444 let idxPoolAddress = 1
4545
4646 let idxPoolSt = 2
4747
4848 let idxLPAsId = 3
4949
5050 let idxAmAsId = 4
5151
5252 let idxPrAsId = 5
5353
5454 let idxAmtAsDcm = 6
5555
5656 let idxPriceAsDcm = 7
5757
5858 let idxIAmtAsId = 8
5959
6060 let idxIPriceAsId = 9
6161
6262 let idxFactStakCntr = 1
6363
6464 let idxFactoryRestCntr = 6
6565
6666 let idxFactSlippCntr = 7
6767
6868 let idxFactGwxRewCntr = 10
6969
7070 let feeDefault = fraction(10, scale8, 10000)
7171
7272 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
7373
7474
7575 func t1BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult)
7676
7777
7878 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
7979
8080
8181 func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
8282
8383
8484 func t2 (origVal,origScaleMult) = fraction(origVal, scale18, toBigInt(origScaleMult))
8585
8686
8787 func f2 (val,resultScaleMult) = fraction(val, toBigInt(resultScaleMult), scale18)
8888
8989
9090 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
9191
9292
9393 func abs (val) = if ((zeroBigInt > val))
9494 then -(val)
9595 else val
9696
9797
9898 func absBigInt (val) = if ((zeroBigInt > val))
9999 then -(val)
100100 else val
101101
102102
103103 func fc () = "%s__factoryContract"
104104
105105
106106 func keyManagerPublicKey () = "%s__managerPublicKey"
107107
108108
109109 func keyManagerVaultAddress () = "%s__managerVaultAddress"
110110
111111
112112 func pl () = "%s%s__price__last"
113113
114114
115115 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
116116
117117
118118 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
119119
120120
121121 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
122122
123123
124124 func aa () = "%s__amountAsset"
125125
126126
127127 func pa () = "%s__priceAsset"
128128
129129
130130 func amp () = "%s__amp"
131131
132132
133133 func keyAmpHistory (heightBlocks) = ("%s%d__amp__" + toString(heightBlocks))
134134
135135
136136 func keyChangeAmpLastCall () = "%s__changeAmpLastCall"
137137
138138
139139 let keyFee = "%s__fee"
140140
141141 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
142142
143143 let keyDLp = makeString(["%s", "dLp"], SEP)
144144
145145 let keyDLpRefreshedHeight = makeString(["%s", "dLpRefreshedHeight"], SEP)
146146
147147 let keyDLpRefreshDelay = makeString(["%s", "refreshDLpDelay"], SEP)
148148
149149 let dLpRefreshDelayDefault = 30
150150
151151 let dLpRefreshDelay = valueOrElse(getInteger(this, keyDLpRefreshDelay), dLpRefreshDelayDefault)
152152
153153 func fcfg () = "%s__factoryConfig"
154154
155155
156156 func mtpk () = "%s%s__matcher__publicKey"
157157
158158
159159 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
160160
161161
162162 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
163163
164164
165165 func aps () = "%s__shutdown"
166166
167167
168168 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
169169
170170
171171 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
172172
173173
174174 func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress)
175175
176176
177-func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
177+func throwOrderError (orderValid,orderValidInfo,matcherValid) = throw((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " matcherValid=") + toString(matcherValid)))
178178
179179
180180 func addressFromStringOrThis (addressString) = match addressFromString(addressString) {
181181 case a: Address =>
182182 a
183183 case _ =>
184184 this
185185 }
186186
187187
188188 func getManagerVaultAddressOrThis () = {
189189 let factoryAddress = match getString(fc()) {
190190 case fca: String =>
191191 addressFromStringOrThis(fca)
192192 case _ =>
193193 this
194194 }
195195 match getString(factoryAddress, keyManagerVaultAddress()) {
196196 case s: String =>
197197 addressFromStringOrThis(s)
198198 case _ =>
199199 this
200200 }
201201 }
202202
203203
204204 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
205205
206206
207207 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
208208
209209
210210 func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
211211
212212
213213 func fmtErr (msg) = makeString(["lp_stable.ride:", msg], " ")
214214
215215
216216 let fca = addressFromStringValue(strf(this, fc()))
217217
218218 let inFee = {
219219 let @ = invoke(fca, "getInFeeREADONLY", [toString(this)], nil)
220220 if ($isInstanceOf(@, "Int"))
221221 then @
222222 else throw(($getType(@) + " couldn't be cast to Int"))
223223 }
224224
225225 let outFee = {
226226 let @ = invoke(fca, "getOutFeeREADONLY", [toString(this)], nil)
227227 if ($isInstanceOf(@, "Int"))
228228 then @
229229 else throw(($getType(@) + " couldn't be cast to Int"))
230230 }
231231
232232 func keyAddressWhitelisted (address) = makeString(["%s%s", "whitelisted", toString(address)], SEP)
233233
234234
235235 func isAddressWhitelisted (address) = valueOrElse(getBoolean(fca, keyAddressWhitelisted(address)), false)
236236
237237
238238 let A = strf(this, amp())
239239
240240 func igs () = valueOrElse(getBoolean(fca, aps()), false)
241241
242242
243243 func mp () = fromBase58String(strf(fca, mtpk()))
244244
245245
246246 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
247247
248248 func gpc () = {
249249 let amtAs = strf(this, aa())
250250 let priceAs = strf(this, pa())
251251 let iPriceAs = intf(fca, mba(priceAs))
252252 let iAmtAs = intf(fca, mba(amtAs))
253253 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
254254 }
255255
256256
257257 func parseAssetId (input) = if ((input == wavesString))
258258 then unit
259259 else fromBase58String(input)
260260
261261
262262 func assetIdToString (input) = if ((input == unit))
263263 then wavesString
264264 else toBase58String(value(input))
265265
266266
267267 func parsePoolConfig (poolConfig) = $Tuple7(addressFromStringValue(poolConfig[idxPoolAddress]), parseIntValue(poolConfig[idxPoolSt]), fromBase58String(poolConfig[idxLPAsId]), parseAssetId(poolConfig[idxAmAsId]), parseAssetId(poolConfig[idxPrAsId]), parseIntValue(poolConfig[idxAmtAsDcm]), parseIntValue(poolConfig[idxPriceAsDcm]))
268268
269269
270270 let poolConfigParsed = parsePoolConfig(gpc())
271271
272-let $t088369022 = poolConfigParsed
272+let $t087698955 = poolConfigParsed
273273
274-let cfgPoolAddress = $t088369022._1
274+let cfgPoolAddress = $t087698955._1
275275
276-let cfgPoolStatus = $t088369022._2
276+let cfgPoolStatus = $t087698955._2
277277
278-let cfgLpAssetId = $t088369022._3
278+let cfgLpAssetId = $t087698955._3
279279
280-let cfgAmountAssetId = $t088369022._4
280+let cfgAmountAssetId = $t087698955._4
281281
282-let cfgPriceAssetId = $t088369022._5
282+let cfgPriceAssetId = $t087698955._5
283283
284-let cfgAmountAssetDecimals = $t088369022._6
284+let cfgAmountAssetDecimals = $t087698955._6
285285
286-let cfgPriceAssetDecimals = $t088369022._7
286+let cfgPriceAssetDecimals = $t087698955._7
287287
288288 func gfc () = split(strf(fca, fcfg()), SEP)
289289
290290
291291 let factoryConfig = gfc()
292292
293293 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
294294
295295 let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
296296
297297 let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
298298
299299 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
300300
301301 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)
302302
303303
304304 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)
305305
306306
307307 func getAccBalance (assetId) = if ((assetId == "WAVES"))
308308 then wavesBalance(this).available
309309 else assetBalance(this, fromBase58String(assetId))
310310
311311
312312 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
313313
314314
315315 func cpbir (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
316316
317317
318318 func vad (A1,A2,slippage) = {
319319 let diff = fraction((A1 - A2), scale8BigInt, A2)
320320 let pass = ((slippage - abs(diff)) > zeroBigInt)
321321 if (!(pass))
322322 then throw(("Big slpg: " + toString(diff)))
323323 else $Tuple2(pass, min([A1, A2]))
324324 }
325325
326326
327327 func vd (D1,D0,slpg) = {
328328 let diff = fraction(D0, scale8BigInt, D1)
329329 let fail = (slpg > diff)
330330 if (if (fail)
331331 then true
332332 else (D0 > D1))
333333 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
334334 else fail
335335 }
336336
337337
338338 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
339339 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
340340 let prAsAmtX18 = t1(prAmt, prAssetDcm)
341341 cpbi(prAsAmtX18, amtAsAmtX18)
342342 }
343343
344344
345345 func calcPrices (amAmt,prAmt,lpAmt) = {
346346 let amtAsDcm = cfgAmountAssetDecimals
347347 let prAsDcm = cfgPriceAssetDecimals
348348 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
349349 let amAmtX18 = t1(amAmt, amtAsDcm)
350350 let prAmtX18 = t1(prAmt, prAsDcm)
351351 let lpAmtX18 = t1(lpAmt, scale8)
352352 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
353353 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
354354 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
355355 }
356356
357357
358358 func calculatePrices (amAmt,prAmt,lpAmt) = {
359359 let p = calcPrices(amAmt, prAmt, lpAmt)
360360 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
361361 }
362362
363363
364364 func takeFee (amount,fee) = {
365365 let feeAmount = if ((fee == 0))
366366 then 0
367367 else fraction(amount, fee, scale8)
368368 $Tuple2((amount - feeAmount), feeAmount)
369369 }
370370
371371
372372 func getD (xp) = {
373373 let xp0 = xp[0]
374374 let xp1 = xp[1]
375375 let s = (xp0 + xp1)
376376 if ((s == big0))
377377 then big0
378378 else {
379379 let a = parseIntValue(A)
380380 let ann = (a * 2)
381381 let p = fraction(xp0, xp1, big1)
382382 let xp0_xp1_n_n = fraction(p, big4, big1)
383383 let ann_s = fraction(toBigInt(ann), s, big1)
384384 let ann_1 = toBigInt((ann - 1))
385385 func calcDNext (d) = {
386386 let dd = fraction(d, d, big1)
387387 let ddd = fraction(dd, d, big1)
388388 let dp = fraction(ddd, big1, xp0_xp1_n_n)
389389 fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)))
390390 }
391391
392392 func calc (acc,i) = if (acc._2)
393393 then acc
394394 else {
395395 let d = acc._1
396396 let dNext = calcDNext(d)
397397 let dDiffRaw = (dNext - value(d))
398398 let dDiff = if ((big0 > dDiffRaw))
399399 then -(dDiffRaw)
400400 else dDiffRaw
401401 if ((big1 >= dDiff))
402402 then $Tuple2(dNext, true)
403403 else $Tuple2(dNext, false)
404404 }
405405
406406 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
407- let $t01352713575 = {
407+ let $t01346013508 = {
408408 let $l = arr
409409 let $s = size($l)
410410 let $acc0 = $Tuple2(s, false)
411411 func $f0_1 ($a,$i) = if (($i >= $s))
412412 then $a
413413 else calc($a, $l[$i])
414414
415415 func $f0_2 ($a,$i) = if (($i >= $s))
416416 then $a
417417 else throw("List size exceeds 17")
418418
419419 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17)
420420 }
421- let d = $t01352713575._1
422- let found = $t01352713575._2
421+ let d = $t01346013508._1
422+ let found = $t01346013508._2
423423 if (found)
424424 then d
425425 else throw(("D calculation error, D = " + toString(d)))
426426 }
427427 }
428428
429429
430430 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
431431 let lpId = cfgLpAssetId
432432 let amId = toBase58String(value(cfgAmountAssetId))
433433 let prId = toBase58String(value(cfgPriceAssetId))
434434 let amDcm = cfgAmountAssetDecimals
435435 let prDcm = cfgPriceAssetDecimals
436436 let sts = toString(cfgPoolStatus)
437437 let lpEmiss = valueOrErrorMessage(assetInfo(lpId), "Wrong LP id").quantity
438438 if ((toBase58String(lpId) != pmtAssetId))
439439 then throw("Wrong pmt asset")
440440 else {
441441 let amBalance = getAccBalance(amId)
442442 let amBalanceX18 = t1(amBalance, amDcm)
443443 let prBalance = getAccBalance(prId)
444444 let prBalanceX18 = t1(prBalance, prDcm)
445445 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
446446 let curPrice = f1(curPriceX18, scale8)
447447 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
448448 let lpEmissX18 = t1(lpEmiss, scale8)
449449 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
450450 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
451451 let outAmAmt = fromX18Round(outAmAmtX18, amDcm, FLOOR)
452452 let outPrAmt = fromX18Round(outPrAmtX18, prDcm, FLOOR)
453453 let state = if ((txId58 == ""))
454454 then nil
455455 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
456456 then unit
457457 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
458458 then unit
459459 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)]
460460 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
461461 }
462462 }
463463
464464
465465 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
466466 let lpId = cfgLpAssetId
467467 let amIdStr = toBase58String(value(cfgAmountAssetId))
468468 let prIdStr = toBase58String(value(cfgPriceAssetId))
469469 let amtDcm = cfgAmountAssetDecimals
470470 let priceDcm = cfgPriceAssetDecimals
471471 let sts = toString(cfgPoolStatus)
472472 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
473473 let checkAssets = [if (if ((inAmId == parseAssetId(amIdStr)))
474474 then (inPrId == parseAssetId(prIdStr))
475475 else false)
476476 then true
477477 else throwErr("Invalid amt or price asset passed.")]
478478 if ((checkAssets == checkAssets))
479479 then {
480480 let amBalance = if (isEval)
481481 then getAccBalance(amIdStr)
482482 else if (if (isOneAsset)
483483 then (pmtId == amIdStr)
484484 else false)
485485 then (getAccBalance(amIdStr) - pmtAmt)
486486 else if (isOneAsset)
487487 then getAccBalance(amIdStr)
488488 else (getAccBalance(amIdStr) - inAmAmt)
489489 let prBalance = if (isEval)
490490 then getAccBalance(prIdStr)
491491 else if (if (isOneAsset)
492492 then (pmtId == prIdStr)
493493 else false)
494494 then (getAccBalance(prIdStr) - pmtAmt)
495495 else if (isOneAsset)
496496 then getAccBalance(prIdStr)
497497 else (getAccBalance(prIdStr) - inPrAmt)
498498 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
499499 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
500500 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
501501 let amBalanceX18 = t1(amBalance, amtDcm)
502502 let prBalanceX18 = t1(prBalance, priceDcm)
503503 let D0 = getD([amBalanceX18, prBalanceX18])
504504 let r = if ((lpEm == 0))
505505 then {
506506 let D1 = getD([(amBalanceX18 + inAmAssetAmtX18), (prBalanceX18 + inPrAssetAmtX18)])
507507 let checkD = if ((D1 > D0))
508508 then true
509509 else throw("D1 should be greater than D0")
510510 if ((checkD == checkD))
511511 then {
512512 let curPriceX18 = zeroBigInt
513513 let slippageX18 = zeroBigInt
514514 let lpAmtX18 = D1
515515 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
516516 }
517517 else throw("Strict value is not equal to itself.")
518518 }
519519 else {
520520 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
521521 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
522522 let slippageX18 = t1(slippage, scale8)
523523 if (if (if (validateSlippage)
524524 then (curPriceX18 != zeroBigInt)
525525 else false)
526526 then (slippageRealX18 > slippageX18)
527527 else false)
528528 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
529529 else {
530530 let lpEmissionX18 = t1(lpEm, scale8)
531531 let prViaAmX18 = fraction(inAmAssetAmtX18, cpbir(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING)
532532 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, cpbir(prBalanceX18, amBalanceX18, FLOOR), CEILING)
533533 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
534534 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
535535 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
536536 let expAmtAssetAmtX18 = expectedAmts._1
537537 let expPriceAssetAmtX18 = expectedAmts._2
538538 let D1 = getD([(amBalanceX18 + expAmtAssetAmtX18), (prBalanceX18 + expPriceAssetAmtX18)])
539539 let checkD = if ((D1 > D0))
540540 then true
541541 else throw("D1 should be greater than D0")
542542 if ((checkD == checkD))
543543 then {
544544 let lpAmtX18 = fraction(lpEmissionX18, (D1 - D0), D0)
545545 $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18)
546546 }
547547 else throw("Strict value is not equal to itself.")
548548 }
549549 }
550550 let calcLpAmt = r._1
551551 let calcAmAssetPmt = r._2
552552 let calcPrAssetPmt = r._3
553553 let curPrice = f1(r._4, scale8)
554554 let slippageCalc = f1(r._5, scale8)
555555 if ((0 >= calcLpAmt))
556556 then throw("LP <= 0")
557557 else {
558558 let emitLpAmt = if (!(emitLp))
559559 then 0
560560 else calcLpAmt
561561 let amDiff = (inAmAmt - calcAmAssetPmt)
562562 let prDiff = (inPrAmt - calcPrAssetPmt)
563- let $t02149821843 = if (if (isOneAsset)
563+ let $t02143121776 = if (if (isOneAsset)
564564 then (pmtId == amIdStr)
565565 else false)
566566 then $Tuple2(pmtAmt, 0)
567567 else if (if (isOneAsset)
568568 then (pmtId == prIdStr)
569569 else false)
570570 then $Tuple2(0, pmtAmt)
571571 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
572- let writeAmAmt = $t02149821843._1
573- let writePrAmt = $t02149821843._2
572+ let writeAmAmt = $t02143121776._1
573+ let writePrAmt = $t02143121776._2
574574 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))]
575575 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
576576 }
577577 }
578578 else throw("Strict value is not equal to itself.")
579579 }
580580
581581
582582 func getYD (xp,i,D) = {
583583 let n = big2
584584 let x = xp[if ((i == 0))
585585 then 1
586586 else 0]
587587 let aPrecision = parseBigIntValue(Amult)
588588 let a = (parseBigIntValue(A) * aPrecision)
589589 let s = x
590590 let ann = (a * n)
591591 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
592592 let b = ((s + ((D * aPrecision) / ann)) - D)
593593 func calc (acc,cur) = {
594- let $t02303823058 = acc
595- let y = $t02303823058._1
596- let found = $t02303823058._2
594+ let $t02297122991 = acc
595+ let y = $t02297122991._1
596+ let found = $t02297122991._2
597597 if ((found != unit))
598598 then acc
599599 else {
600600 let yNext = (((y * y) + c) / ((big2 * y) + b))
601601 let yDiff = absBigInt((yNext - value(y)))
602602 if ((big1 >= yDiff))
603603 then $Tuple2(yNext, cur)
604604 else $Tuple2(yNext, unit)
605605 }
606606 }
607607
608608 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
609- let $t02336523412 = {
609+ let $t02329823345 = {
610610 let $l = arr
611611 let $s = size($l)
612612 let $acc0 = $Tuple2(D, unit)
613613 func $f0_1 ($a,$i) = if (($i >= $s))
614614 then $a
615615 else calc($a, $l[$i])
616616
617617 func $f0_2 ($a,$i) = if (($i >= $s))
618618 then $a
619619 else throw("List size exceeds 15")
620620
621621 $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)
622622 }
623- let y = $t02336523412._1
624- let found = $t02336523412._2
623+ let y = $t02329823345._1
624+ let found = $t02329823345._2
625625 if ((found != unit))
626626 then y
627627 else throw(("Y calculation error, Y = " + toString(y)))
628628 }
629629
630630
631631 func calcDLp (amountBalance,priceBalance,lpEmission) = {
632632 let updatedDLp = fraction(getD([t1BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals)), t1BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))]), scale18, lpEmission)
633633 if ((lpEmission == big0))
634634 then big0
635635 else updatedDLp
636636 }
637637
638638
639639 func calcCurrentDLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
640640 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
641641 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
642642 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
643643 let currentDLp = calcDLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
644644 currentDLp
645645 }
646646
647647
648648 func refreshDLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
649649 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
650650 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
651651 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
652652 let updatedDLp = calcDLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
653653 let actions = [IntegerEntry(keyDLpRefreshedHeight, height), StringEntry(keyDLp, toString(updatedDLp))]
654654 $Tuple2(actions, updatedDLp)
655655 }
656656
657657
658658 func validateUpdatedDLp (oldDLp,updatedDLp) = if ((updatedDLp >= oldDLp))
659659 then true
660660 else throwErr("updated DLp lower than current DLp")
661661
662662
663663 func validateMatcherOrderAllowed (order) = {
664664 let amountAssetBalance = getAccBalance(assetIdToString(cfgAmountAssetId))
665665 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
666666 let amountAssetAmount = order.amount
667667 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
668- let $t02561025822 = if ((order.orderType == Buy))
668+ let $t02554325755 = if ((order.orderType == Buy))
669669 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
670670 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
671- let amountAssetBalanceDelta = $t02561025822._1
672- let priceAssetBalanceDelta = $t02561025822._2
671+ let amountAssetBalanceDelta = $t02554325755._1
672+ let priceAssetBalanceDelta = $t02554325755._2
673673 if (if (if (igs())
674674 then true
675675 else (cfgPoolStatus == PoolMatcherDis))
676676 then true
677677 else (cfgPoolStatus == PoolShutdown))
678678 then throw("Admin blocked")
679679 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
680680 then true
681681 else (order.assetPair.priceAsset != cfgPriceAssetId))
682682 then throw("Wr assets")
683683 else {
684684 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
685- let $t02616426264 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
686- let unusedActions = $t02616426264._1
687- let dLpNew = $t02616426264._2
685+ let $t02609726197 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
686+ let unusedActions = $t02609726197._1
687+ let dLpNew = $t02609726197._2
688688 let isOrderValid = (dLpNew >= dLp)
689689 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
690690 $Tuple2(isOrderValid, info)
691691 }
692692 }
693693
694694
695695 func cg (i) = if ((size(i.payments) != 1))
696696 then throw("1 pmnt exp")
697697 else {
698698 let pmt = value(i.payments[0])
699699 let pmtAssetId = value(pmt.assetId)
700700 let pmtAmt = pmt.amount
701701 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
702702 let outAmAmt = r._1
703703 let outPrAmt = r._2
704704 let sts = parseIntValue(r._9)
705705 let state = r._10
706706 let isGetDisabled = if (!(isAddressWhitelisted(i.caller)))
707707 then if (igs())
708708 then true
709709 else (cfgPoolStatus == PoolShutdown)
710710 else false
711711 if (isGetDisabled)
712712 then throw(("Admin blocked: " + toString(sts)))
713713 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
714714 }
715715
716716
717717 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
718718 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
719719 let sts = parseIntValue(r._8)
720720 let isPutDisabled = if (!(isAddressWhitelisted(addressFromStringValue(caller))))
721721 then if (if (igs())
722722 then true
723723 else (cfgPoolStatus == PoolShutdown))
724724 then true
725725 else (cfgPoolStatus == PoolPutDis)
726726 else false
727727 if (isPutDisabled)
728728 then throw(("Blocked:" + toString(sts)))
729729 else r
730730 }
731731
732732
733733 func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = {
734734 let amId = toBase58String(value(cfgAmountAssetId))
735735 let prId = toBase58String(value(cfgPriceAssetId))
736736 let lpId = cfgLpAssetId
737737 let amtDcm = cfgAmountAssetDecimals
738738 let priceDcm = cfgPriceAssetDecimals
739739 let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(lpId), "invalid lp asset").quantity)
740740 let chechEmission = if ((lpAssetEmission > big0))
741741 then true
742742 else throw("initial deposit requires all coins")
743743 if ((chechEmission == chechEmission))
744744 then {
745745 let amBalance = getAccBalance(amId)
746746 let prBalance = getAccBalance(prId)
747- let $t02912329585 = if ((txId == ""))
747+ let $t02905629518 = if ((txId == ""))
748748 then $Tuple2(amBalance, prBalance)
749749 else if ((pmtAssetId == amId))
750750 then if ((pmtAmtRaw > amBalance))
751751 then throw("invalid payment amount")
752752 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
753753 else if ((pmtAssetId == prId))
754754 then if ((pmtAmtRaw > prBalance))
755755 then throw("invalid payment amount")
756756 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
757757 else throw("wrong pmtAssetId")
758- let amBalanceOld = $t02912329585._1
759- let prBalanceOld = $t02912329585._2
760- let $t02959129767 = if ((pmtAssetId == amId))
758+ let amBalanceOld = $t02905629518._1
759+ let prBalanceOld = $t02905629518._2
760+ let $t02952429700 = if ((pmtAssetId == amId))
761761 then $Tuple2(pmtAmtRaw, 0)
762762 else if ((pmtAssetId == prId))
763763 then $Tuple2(0, pmtAmtRaw)
764764 else throw("invalid payment")
765- let amAmountRaw = $t02959129767._1
766- let prAmountRaw = $t02959129767._2
767- let $t02977130025 = if (withTakeFee)
765+ let amAmountRaw = $t02952429700._1
766+ let prAmountRaw = $t02952429700._2
767+ let $t02970429958 = if (withTakeFee)
768768 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
769769 else $Tuple3(amAmountRaw, prAmountRaw, 0)
770- let amAmount = $t02977130025._1
771- let prAmount = $t02977130025._2
772- let feeAmount = $t02977130025._3
770+ let amAmount = $t02970429958._1
771+ let prAmount = $t02970429958._2
772+ let feeAmount = $t02970429958._3
773773 let amBalanceNew = (amBalanceOld + amAmount)
774774 let prBalanceNew = (prBalanceOld + prAmount)
775775 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
776776 let D1 = getD([t1(amBalanceNew, cfgAmountAssetDecimals), t1(prBalanceNew, cfgPriceAssetDecimals)])
777777 let checkD = if ((D1 > D0))
778778 then true
779779 else throw()
780780 if ((checkD == checkD))
781781 then {
782782 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0, FLOOR)
783783 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
784784 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))]
785785 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
786786 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
787787 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
788788 let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
789789 let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
790790 $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
791791 }
792792 else throw("Strict value is not equal to itself.")
793793 }
794794 else throw("Strict value is not equal to itself.")
795795 }
796796
797797
798798 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
799799 let lpId = toBase58String(value(cfgLpAssetId))
800800 let amId = toBase58String(value(cfgAmountAssetId))
801801 let prId = toBase58String(value(cfgPriceAssetId))
802802 let amDecimals = cfgAmountAssetDecimals
803803 let prDecimals = cfgPriceAssetDecimals
804804 let poolStatus = cfgPoolStatus
805805 let userAddress = if ((caller == restContract))
806806 then originCaller
807807 else caller
808808 let pmt = value(payments[0])
809809 let pmtAssetId = value(pmt.assetId)
810810 let pmtAmt = pmt.amount
811811 let currentDLp = calcCurrentDLp(big0, big0, big0)
812812 if ((currentDLp == currentDLp))
813813 then {
814814 let txId58 = toBase58String(transactionId)
815815 if ((lpId != toBase58String(pmtAssetId)))
816816 then throw("Wrong LP")
817817 else {
818818 let amBalance = getAccBalance(amId)
819819 let prBalance = getAccBalance(prId)
820- let $t03213732248 = {
820+ let $t03207032181 = {
821821 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
822822 if ($isInstanceOf(@, "(Int, Int)"))
823823 then @
824824 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
825825 }
826- if (($t03213732248 == $t03213732248))
826+ if (($t03207032181 == $t03207032181))
827827 then {
828- let feeAmount = $t03213732248._2
829- let totalGet = $t03213732248._1
828+ let feeAmount = $t03207032181._2
829+ let totalGet = $t03207032181._1
830830 let totalAmount = if (if ((minOutAmount > 0))
831831 then (minOutAmount > totalGet)
832832 else false)
833833 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
834834 else totalGet
835- let $t03243832745 = if ((outAssetId == amId))
835+ let $t03237132678 = if ((outAssetId == amId))
836836 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
837837 else if ((outAssetId == prId))
838838 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
839839 else throw("invalid out asset id")
840- let outAm = $t03243832745._1
841- let outPr = $t03243832745._2
842- let amBalanceNew = $t03243832745._3
843- let prBalanceNew = $t03243832745._4
840+ let outAm = $t03237132678._1
841+ let outPr = $t03237132678._2
842+ let amBalanceNew = $t03237132678._3
843+ let prBalanceNew = $t03237132678._4
844844 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
845845 let curPr = f1(curPrX18, scale8)
846846 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
847847 then unit
848848 else fromBase58String(outAssetId)
849849 let sendFeeToMatcher = if ((feeAmount > 0))
850850 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
851851 else nil
852852 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)
853853 if ((state == state))
854854 then {
855855 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
856856 if ((burn == burn))
857857 then {
858- let $t03353033880 = {
858+ let $t03346333813 = {
859859 let feeAmountForCalc = if ((this == feeCollectorAddress))
860860 then 0
861861 else feeAmount
862862 let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId))
863863 then true
864864 else false
865865 if (outInAmountAsset)
866866 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
867867 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
868868 }
869- let amountAssetBalanceDelta = $t03353033880._1
870- let priceAssetBalanceDelta = $t03353033880._2
871- let $t03388333991 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
872- let refreshDLpActions = $t03388333991._1
873- let updatedDLp = $t03388333991._2
869+ let amountAssetBalanceDelta = $t03346333813._1
870+ let priceAssetBalanceDelta = $t03346333813._2
871+ let $t03381633924 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
872+ let refreshDLpActions = $t03381633924._1
873+ let updatedDLp = $t03381633924._2
874874 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
875875 if ((isUpdatedDLpValid == isUpdatedDLpValid))
876876 then $Tuple2((state ++ refreshDLpActions), totalAmount)
877877 else throw("Strict value is not equal to itself.")
878878 }
879879 else throw("Strict value is not equal to itself.")
880880 }
881881 else throw("Strict value is not equal to itself.")
882882 }
883883 else throw("Strict value is not equal to itself.")
884884 }
885885 }
886886 else throw("Strict value is not equal to itself.")
887887 }
888888
889889
890890 func managerPublicKeyOrUnit () = {
891891 let managerVaultAddress = getManagerVaultAddressOrThis()
892892 match getString(managerVaultAddress, keyManagerPublicKey()) {
893893 case s: String =>
894894 fromBase58String(s)
895895 case _: Unit =>
896896 unit
897897 case _ =>
898898 throw("Match error")
899899 }
900900 }
901901
902902
903903 let pd = throw("Permission denied")
904904
905905 func isManager (i) = match managerPublicKeyOrUnit() {
906906 case pk: ByteVector =>
907907 (i.callerPublicKey == pk)
908908 case _: Unit =>
909909 (i.caller == this)
910910 case _ =>
911911 throw("Match error")
912912 }
913913
914914
915915 func mustManager (i) = match managerPublicKeyOrUnit() {
916916 case pk: ByteVector =>
917917 if ((i.callerPublicKey == pk))
918918 then true
919919 else pd
920920 case _: Unit =>
921921 if ((i.caller == this))
922922 then true
923923 else pd
924924 case _ =>
925925 throw("Match error")
926926 }
927927
928928
929929 func getY (isReverse,D,poolAmountInBalance) = {
930930 let poolConfig = gpc()
931931 let amId = poolConfig[idxAmAsId]
932932 let prId = poolConfig[idxPrAsId]
933933 let n = big2
934934 let aPrecision = parseBigIntValue(Amult)
935935 let a = (parseBigIntValue(A) * aPrecision)
936936 let xp = if ((isReverse == false))
937937 then [(toBigInt(getAccBalance(amId)) + poolAmountInBalance), toBigInt(getAccBalance(prId))]
938938 else [(toBigInt(getAccBalance(prId)) + poolAmountInBalance), toBigInt(getAccBalance(amId))]
939939 let x = xp[0]
940940 let s = x
941941 let ann = (a * n)
942942 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
943943 let b = ((s + ((D * aPrecision) / ann)) - D)
944944 func calc (acc,cur) = {
945- let $t03547835498 = acc
946- let y = $t03547835498._1
947- let found = $t03547835498._2
945+ let $t03541135431 = acc
946+ let y = $t03541135431._1
947+ let found = $t03541135431._2
948948 if ((found != unit))
949949 then acc
950950 else {
951951 let yNext = (((y * y) + c) / ((big2 * y) + b))
952952 let yDiff = absBigInt((yNext - value(y)))
953953 if ((big1 >= yDiff))
954954 then $Tuple2(yNext, cur)
955955 else $Tuple2(yNext, unit)
956956 }
957957 }
958958
959959 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
960- let $t03582935876 = {
960+ let $t03576235809 = {
961961 let $l = arr
962962 let $s = size($l)
963963 let $acc0 = $Tuple2(D, unit)
964964 func $f0_1 ($a,$i) = if (($i >= $s))
965965 then $a
966966 else calc($a, $l[$i])
967967
968968 func $f0_2 ($a,$i) = if (($i >= $s))
969969 then $a
970970 else throw("List size exceeds 15")
971971
972972 $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)
973973 }
974- let y = $t03582935876._1
975- let found = $t03582935876._2
974+ let y = $t03576235809._1
975+ let found = $t03576235809._2
976976 if ((found != unit))
977977 then y
978978 else throw(("Y calculation error, Y = " + toString(y)))
979979 }
980980
981981
982982 func skipOrderValidation () = valueOrElse(getBoolean(fca, keySkipOrderValidation(toString(this))), false)
983983
984984
985985 @Callable(i)
986986 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
987- let $t03622836652 = if ((isReverse == false))
987+ let $t03616136585 = if ((isReverse == false))
988988 then {
989989 let assetOut = strf(this, pa())
990990 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
991991 $Tuple2(assetOut, poolAmountInBalance)
992992 }
993993 else {
994994 let assetOut = strf(this, aa())
995995 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
996996 $Tuple2(assetOut, poolAmountInBalance)
997997 }
998- let assetOut = $t03622836652._1
999- let poolAmountInBalance = $t03622836652._2
998+ let assetOut = $t03616136585._1
999+ let poolAmountInBalance = $t03616136585._2
10001000 let poolConfig = gpc()
10011001 let amId = poolConfig[idxAmAsId]
10021002 let prId = poolConfig[idxPrAsId]
10031003 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
10041004 let D = getD(xp)
10051005 let y = getY(isReverse, D, toBigInt(cleanAmountIn))
10061006 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
10071007 let totalGetRaw = max([0, toInt(dy)])
10081008 let newXp = if ((isReverse == false))
10091009 then [((toBigInt(getAccBalance(amId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
10101010 else [(toBigInt(getAccBalance(amId)) - dy), ((toBigInt(getAccBalance(prId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount))]
10111011 let newD = getD(newXp)
10121012 let checkD = if ((newD >= D))
10131013 then true
10141014 else throw(makeString(["new D is fewer error", toString(D), toString(newD)], "__"))
10151015 if ((checkD == checkD))
10161016 then $Tuple2(nil, totalGetRaw)
10171017 else throw("Strict value is not equal to itself.")
10181018 }
10191019
10201020
10211021
10221022 @Callable(i)
10231023 func calculateAmountOutForSwapAndSendTokens (cleanAmountIn,isReverse,amountOutMin,addressTo,feePoolAmount) = {
10241024 let swapContact = {
10251025 let @ = invoke(fca, "getSwapContractREADONLY", nil, nil)
10261026 if ($isInstanceOf(@, "String"))
10271027 then @
10281028 else throw(($getType(@) + " couldn't be cast to String"))
10291029 }
10301030 let isPoolSwapDisabled = {
10311031 let @ = invoke(fca, "isPoolSwapDisabledREADONLY", [toString(this)], nil)
10321032 if ($isInstanceOf(@, "Boolean"))
10331033 then @
10341034 else throw(($getType(@) + " couldn't be cast to Boolean"))
10351035 }
10361036 let isSwapDisabled = if (!(isAddressWhitelisted(i.caller)))
10371037 then if (if (igs())
10381038 then true
10391039 else (cfgPoolStatus == PoolShutdown))
10401040 then true
10411041 else isPoolSwapDisabled
10421042 else false
10431043 let checks = [if (if (!(isSwapDisabled))
10441044 then true
10451045 else isManager(i))
10461046 then true
10471047 else throwErr("swap operation is blocked by admin"), if ((value(i.payments[0]).amount >= cleanAmountIn))
10481048 then true
10491049 else throwErr("Wrong amount"), if ((i.caller == addressFromStringValue(swapContact)))
10501050 then true
10511051 else throwErr("Permission denied")]
10521052 if ((checks == checks))
10531053 then {
10541054 let pmt = value(i.payments[0])
10551055 let assetIn = assetIdToString(pmt.assetId)
1056- let $t03842438818 = if ((isReverse == false))
1056+ let $t03835738751 = if ((isReverse == false))
10571057 then {
10581058 let assetOut = strf(this, pa())
10591059 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10601060 $Tuple2(assetOut, poolAmountInBalance)
10611061 }
10621062 else {
10631063 let assetOut = strf(this, aa())
10641064 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10651065 $Tuple2(assetOut, poolAmountInBalance)
10661066 }
1067- let assetOut = $t03842438818._1
1068- let poolAmountInBalance = $t03842438818._2
1067+ let assetOut = $t03835738751._1
1068+ let poolAmountInBalance = $t03835738751._2
10691069 let poolConfig = gpc()
10701070 let amId = poolConfig[idxAmAsId]
10711071 let prId = poolConfig[idxPrAsId]
10721072 let xp = if ((isReverse == false))
10731073 then [(toBigInt(getAccBalance(amId)) - toBigInt(value(i.payments[0]).amount)), toBigInt(getAccBalance(prId))]
10741074 else [toBigInt(getAccBalance(amId)), (toBigInt(getAccBalance(prId)) - toBigInt(value(i.payments[0]).amount))]
10751075 let D = getD(xp)
10761076 let y = getY(isReverse, D, toBigInt(0))
10771077 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
10781078 let totalGetRaw = max([0, toInt(dy)])
10791079 let checkMin = if ((totalGetRaw >= amountOutMin))
10801080 then true
10811081 else throw("Exchange result is fewer coins than expected")
10821082 if ((checkMin == checkMin))
10831083 then {
10841084 let newXp = if ((isReverse == false))
10851085 then [(toBigInt(getAccBalance(amId)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
10861086 else [(toBigInt(getAccBalance(amId)) - dy), (toBigInt(getAccBalance(prId)) + toBigInt(feePoolAmount))]
10871087 let newD = getD(newXp)
10881088 let checkD = if ((newD >= D))
10891089 then true
10901090 else throw("new D is fewer error")
10911091 if ((checkD == checkD))
10921092 then {
10931093 let amountAssetBalanceDelta = if (isReverse)
10941094 then -(totalGetRaw)
10951095 else feePoolAmount
10961096 let priceAssetBalanceDelta = if (isReverse)
10971097 then feePoolAmount
10981098 else -(totalGetRaw)
10991099 let refreshDLpActions = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)._1
11001100 if ((refreshDLpActions == refreshDLpActions))
11011101 then $Tuple2([ScriptTransfer(addressFromStringValue(addressTo), totalGetRaw, parseAssetId(assetOut))], totalGetRaw)
11021102 else throw("Strict value is not equal to itself.")
11031103 }
11041104 else throw("Strict value is not equal to itself.")
11051105 }
11061106 else throw("Strict value is not equal to itself.")
11071107 }
11081108 else throw("Strict value is not equal to itself.")
11091109 }
11101110
11111111
11121112
11131113 @Callable(i)
11141114 func constructor (fc) = {
11151115 let c = mustManager(i)
11161116 if ((c == c))
11171117 then [StringEntry(fc(), fc)]
11181118 else throw("Strict value is not equal to itself.")
11191119 }
11201120
11211121
11221122
11231123 @Callable(i)
11241124 func put (slip,autoStake) = {
11251125 let factCfg = gfc()
11261126 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
11271127 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
11281128 if ((0 > slip))
11291129 then throw("Wrong slippage")
11301130 else if ((size(i.payments) != 2))
11311131 then throw("2 pmnts expd")
11321132 else {
11331133 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
11341134 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
11351135 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amAssetPmt)
11361136 if ((amountAssetBalance == amountAssetBalance))
11371137 then {
11381138 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - prAssetPmt)
11391139 if ((priceAssetBalance == priceAssetBalance))
11401140 then {
11411141 let lpAssetEmission = toBigInt(value(assetInfo(cfgLpAssetId)).quantity)
11421142 if ((lpAssetEmission == lpAssetEmission))
11431143 then {
11441144 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
11451145 if ((currentDLp == currentDLp))
11461146 then {
11471147 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, "")
11481148 let emitLpAmt = e._2
11491149 let lpAssetId = e._7
11501150 let state = e._9
11511151 let amDiff = e._10
11521152 let prDiff = e._11
11531153 let amId = e._12
11541154 let prId = e._13
11551155 let r = invoke(fca, "emit", [emitLpAmt], nil)
11561156 if ((r == r))
11571157 then {
11581158 let el = match r {
11591159 case legacy: Address =>
11601160 invoke(legacy, "emit", [emitLpAmt], nil)
11611161 case _ =>
11621162 unit
11631163 }
11641164 if ((el == el))
11651165 then {
11661166 let sa = if ((amDiff > 0))
11671167 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
11681168 else nil
11691169 if ((sa == sa))
11701170 then {
11711171 let sp = if ((prDiff > 0))
11721172 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
11731173 else nil
11741174 if ((sp == sp))
11751175 then {
11761176 let lpTrnsfr = if (autoStake)
11771177 then {
11781178 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
11791179 if ((ss == ss))
11801180 then nil
11811181 else throw("Strict value is not equal to itself.")
11821182 }
11831183 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1184- let $t04327343415 = refreshDLpInternal(0, 0, 0)
1185- let refreshDLpActions = $t04327343415._1
1186- let updatedDLp = $t04327343415._2
1184+ let $t04320643348 = refreshDLpInternal(0, 0, 0)
1185+ let refreshDLpActions = $t04320643348._1
1186+ let updatedDLp = $t04320643348._2
11871187 let check = if ((updatedDLp >= currentDLp))
11881188 then true
11891189 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
11901190 if ((check == check))
11911191 then {
11921192 let lpAssetEmissionAfter = value(assetInfo(cfgLpAssetId)).quantity
11931193 if ((lpAssetEmissionAfter == lpAssetEmissionAfter))
11941194 then ((state ++ lpTrnsfr) ++ refreshDLpActions)
11951195 else throw("Strict value is not equal to itself.")
11961196 }
11971197 else throw("Strict value is not equal to itself.")
11981198 }
11991199 else throw("Strict value is not equal to itself.")
12001200 }
12011201 else throw("Strict value is not equal to itself.")
12021202 }
12031203 else throw("Strict value is not equal to itself.")
12041204 }
12051205 else throw("Strict value is not equal to itself.")
12061206 }
12071207 else throw("Strict value is not equal to itself.")
12081208 }
12091209 else throw("Strict value is not equal to itself.")
12101210 }
12111211 else throw("Strict value is not equal to itself.")
12121212 }
12131213 else throw("Strict value is not equal to itself.")
12141214 }
12151215 }
12161216
12171217
12181218
12191219 @Callable(i)
12201220 func putOneTknV2 (minOutAmount,autoStake) = {
12211221 let isPoolOneTokenOperationsDisabled = {
12221222 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
12231223 if ($isInstanceOf(@, "Boolean"))
12241224 then @
12251225 else throw(($getType(@) + " couldn't be cast to Boolean"))
12261226 }
12271227 let isPutDisabled = if (!(isAddressWhitelisted(i.caller)))
12281228 then if (if (if (igs())
12291229 then true
12301230 else (cfgPoolStatus == PoolPutDis))
12311231 then true
12321232 else (cfgPoolStatus == PoolShutdown))
12331233 then true
12341234 else isPoolOneTokenOperationsDisabled
12351235 else false
12361236 let checks = [if (if (!(isPutDisabled))
12371237 then true
12381238 else isManager(i))
12391239 then true
12401240 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
12411241 then true
12421242 else throwErr("exactly 1 payment are expected")]
12431243 if ((checks == checks))
12441244 then {
12451245 let amId = toBase58String(value(cfgAmountAssetId))
12461246 let prId = toBase58String(value(cfgPriceAssetId))
12471247 let lpId = cfgLpAssetId
12481248 let amDecimals = cfgAmountAssetDecimals
12491249 let prDecimals = cfgPriceAssetDecimals
12501250 let userAddress = if ((i.caller == this))
12511251 then i.originCaller
12521252 else i.caller
12531253 let pmt = value(i.payments[0])
12541254 let pmtAssetId = toBase58String(value(pmt.assetId))
12551255 let pmtAmt = pmt.amount
12561256 let currentDLp = if ((pmt.assetId == cfgAmountAssetId))
12571257 then calcCurrentDLp(toBigInt(pmtAmt), toBigInt(0), toBigInt(0))
12581258 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12591259 if ((currentDLp == currentDLp))
12601260 then {
1261- let $t04509345251 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1262- if (($t04509345251 == $t04509345251))
1261+ let $t04502645184 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1262+ if (($t04502645184 == $t04502645184))
12631263 then {
1264- let feeAmount = $t04509345251._3
1265- let state = $t04509345251._2
1266- let estimLP = $t04509345251._1
1264+ let feeAmount = $t04502645184._3
1265+ let state = $t04502645184._2
1266+ let estimLP = $t04502645184._1
12671267 let emitLpAmt = if (if ((minOutAmount > 0))
12681268 then (minOutAmount > estimLP)
12691269 else false)
12701270 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
12711271 else estimLP
12721272 let e = invoke(fca, "emit", [emitLpAmt], nil)
12731273 if ((e == e))
12741274 then {
12751275 let el = match e {
12761276 case legacy: Address =>
12771277 invoke(legacy, "emit", [emitLpAmt], nil)
12781278 case _ =>
12791279 unit
12801280 }
12811281 if ((el == el))
12821282 then {
12831283 let lpTrnsfr = if (autoStake)
12841284 then {
12851285 let ss = invoke(stakingContract, "stakeFor", [toString(i.caller)], [AttachedPayment(lpId, emitLpAmt)])
12861286 if ((ss == ss))
12871287 then nil
12881288 else throw("Strict value is not equal to itself.")
12891289 }
12901290 else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
12911291 let sendFeeToMatcher = if ((feeAmount > 0))
12921292 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12931293 else nil
1294- let $t04613646485 = if ((this == feeCollectorAddress))
1294+ let $t04606946418 = if ((this == feeCollectorAddress))
12951295 then $Tuple2(0, 0)
12961296 else {
12971297 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12981298 then true
12991299 else false
13001300 if (paymentInAmountAsset)
13011301 then $Tuple2(-(feeAmount), 0)
13021302 else $Tuple2(0, -(feeAmount))
13031303 }
1304- let amountAssetBalanceDelta = $t04613646485._1
1305- let priceAssetBalanceDelta = $t04613646485._2
1306- let $t04648846596 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1307- let refreshDLpActions = $t04648846596._1
1308- let updatedDLp = $t04648846596._2
1304+ let amountAssetBalanceDelta = $t04606946418._1
1305+ let priceAssetBalanceDelta = $t04606946418._2
1306+ let $t04642146529 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1307+ let refreshDLpActions = $t04642146529._1
1308+ let updatedDLp = $t04642146529._2
13091309 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13101310 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13111311 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
13121312 else throw("Strict value is not equal to itself.")
13131313 }
13141314 else throw("Strict value is not equal to itself.")
13151315 }
13161316 else throw("Strict value is not equal to itself.")
13171317 }
13181318 else throw("Strict value is not equal to itself.")
13191319 }
13201320 else throw("Strict value is not equal to itself.")
13211321 }
13221322 else throw("Strict value is not equal to itself.")
13231323 }
13241324
13251325
13261326
13271327 @Callable(i)
13281328 func putForFree (maxSlpg) = if ((0 > maxSlpg))
13291329 then throw("Wrong slpg")
13301330 else if ((size(i.payments) != 2))
13311331 then throw("2 pmnts expd")
13321332 else {
13331333 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, "")
13341334 let state = estPut._9
13351335 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
13361336 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
13371337 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
13381338 if ((currentDLp == currentDLp))
13391339 then {
1340- let $t04762647691 = refreshDLpInternal(0, 0, 0)
1341- let refreshDLpActions = $t04762647691._1
1342- let updatedDLp = $t04762647691._2
1340+ let $t04755947624 = refreshDLpInternal(0, 0, 0)
1341+ let refreshDLpActions = $t04755947624._1
1342+ let updatedDLp = $t04755947624._2
13431343 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13441344 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13451345 then (state ++ refreshDLpActions)
13461346 else throw("Strict value is not equal to itself.")
13471347 }
13481348 else throw("Strict value is not equal to itself.")
13491349 }
13501350
13511351
13521352
13531353 @Callable(i)
13541354 func get () = {
13551355 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
13561356 if ((currentDLp == currentDLp))
13571357 then {
13581358 let r = cg(i)
13591359 let outAmtAmt = r._1
13601360 let outPrAmt = r._2
13611361 let pmtAmt = r._3
13621362 let pmtAssetId = r._4
13631363 let state = r._5
13641364 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13651365 if ((b == b))
13661366 then {
1367- let $t04886448946 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1368- let refreshDLpActions = $t04886448946._1
1369- let updatedDLp = $t04886448946._2
1367+ let $t04879748879 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1368+ let refreshDLpActions = $t04879748879._1
1369+ let updatedDLp = $t04879748879._2
13701370 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13711371 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13721372 then (state ++ refreshDLpActions)
13731373 else throw("Strict value is not equal to itself.")
13741374 }
13751375 else throw("Strict value is not equal to itself.")
13761376 }
13771377 else throw("Strict value is not equal to itself.")
13781378 }
13791379
13801380
13811381
13821382 @Callable(i)
13831383 func getOneTknV2 (outAssetId,minOutAmount) = {
13841384 let isPoolOneTokenOperationsDisabled = {
13851385 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
13861386 if ($isInstanceOf(@, "Boolean"))
13871387 then @
13881388 else throw(($getType(@) + " couldn't be cast to Boolean"))
13891389 }
13901390 let isGetDisabled = if (!(isAddressWhitelisted(i.caller)))
13911391 then if (if (igs())
13921392 then true
13931393 else (cfgPoolStatus == PoolShutdown))
13941394 then true
13951395 else isPoolOneTokenOperationsDisabled
13961396 else false
13971397 let checks = [if (if (!(isGetDisabled))
13981398 then true
13991399 else isManager(i))
14001400 then true
14011401 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
14021402 then true
14031403 else throwErr("exactly 1 payment are expected")]
14041404 if ((checks == checks))
14051405 then {
1406- let $t04960149756 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1407- let state = $t04960149756._1
1408- let totalAmount = $t04960149756._2
1406+ let $t04953449689 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1407+ let state = $t04953449689._1
1408+ let totalAmount = $t04953449689._2
14091409 $Tuple2(state, totalAmount)
14101410 }
14111411 else throw("Strict value is not equal to itself.")
14121412 }
14131413
14141414
14151415
14161416 @Callable(i)
14171417 func refreshDLp () = {
14181418 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyDLpRefreshedHeight), 0)
14191419 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= dLpRefreshDelay))
14201420 then unit
14211421 else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], ""))
14221422 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
14231423 then {
14241424 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1425- let $t05028050344 = refreshDLpInternal(0, 0, 0)
1426- let dLpUpdateActions = $t05028050344._1
1427- let updatedDLp = $t05028050344._2
1425+ let $t05021350277 = refreshDLpInternal(0, 0, 0)
1426+ let dLpUpdateActions = $t05021350277._1
1427+ let updatedDLp = $t05021350277._2
14281428 let actions = if ((dLp != updatedDLp))
14291429 then dLpUpdateActions
14301430 else throwErr("nothing to refresh")
14311431 $Tuple2(actions, toString(updatedDLp))
14321432 }
14331433 else throw("Strict value is not equal to itself.")
14341434 }
14351435
14361436
14371437
14381438 @Callable(i)
14391439 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
14401440 let amId = toBase58String(value(cfgAmountAssetId))
14411441 let prId = toBase58String(value(cfgPriceAssetId))
14421442 let lpId = toBase58String(value(cfgLpAssetId))
14431443 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
14441444 let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
14451445 let D0 = getD(xp)
14461446 let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
14471447 let index = if ((outAssetId == amId))
14481448 then 0
14491449 else if ((outAssetId == prId))
14501450 then 1
14511451 else throw("invalid out asset id")
14521452 let newY = getYD(xp, index, D1)
14531453 let dy = (xp[index] - newY)
14541454 let totalGetRaw = max([0, toInt((dy - big1))])
1455- let $t05135451409 = takeFee(totalGetRaw, outFee)
1456- let totalGet = $t05135451409._1
1457- let feeAmount = $t05135451409._2
1455+ let $t05128751342 = takeFee(totalGetRaw, outFee)
1456+ let totalGet = $t05128751342._1
1457+ let feeAmount = $t05128751342._2
14581458 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14591459 }
14601460
14611461
14621462
14631463 @Callable(i)
14641464 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
14651465 let amId = toBase58String(value(cfgAmountAssetId))
14661466 let prId = toBase58String(value(cfgPriceAssetId))
14671467 let lpId = toBase58String(value(cfgLpAssetId))
14681468 let amBalance = getAccBalance(amId)
14691469 let prBalance = getAccBalance(prId)
1470- let $t05178451899 = {
1470+ let $t05171751832 = {
14711471 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14721472 if ($isInstanceOf(@, "(Int, Int)"))
14731473 then @
14741474 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14751475 }
1476- let totalGet = $t05178451899._1
1477- let feeAmount = $t05178451899._2
1476+ let totalGet = $t05171751832._1
1477+ let feeAmount = $t05171751832._2
14781478 let r = ego("", lpId, lpAssetAmount, this)
14791479 let outAmAmt = r._1
14801480 let outPrAmt = r._2
14811481 let sumOfGetAssets = (outAmAmt + outPrAmt)
14821482 let bonus = if ((sumOfGetAssets == 0))
14831483 then if ((totalGet == 0))
14841484 then 0
14851485 else throw("bonus calculation error")
14861486 else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
14871487 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
14881488 }
14891489
14901490
14911491
14921492 @Callable(i)
14931493 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
14941494 let r = cg(i)
14951495 let outAmAmt = r._1
14961496 let outPrAmt = r._2
14971497 let pmtAmt = r._3
14981498 let pmtAssetId = r._4
14991499 let state = r._5
15001500 if ((noLessThenAmtAsset > outAmAmt))
15011501 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
15021502 else if ((noLessThenPriceAsset > outPrAmt))
15031503 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
15041504 else {
15051505 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15061506 if ((currentDLp == currentDLp))
15071507 then {
15081508 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
15091509 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15101510 then {
1511- let $t05306553146 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1512- let refreshDLpActions = $t05306553146._1
1513- let updatedDLp = $t05306553146._2
1511+ let $t05299853079 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1512+ let refreshDLpActions = $t05299853079._1
1513+ let updatedDLp = $t05299853079._2
15141514 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15151515 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15161516 then (state ++ refreshDLpActions)
15171517 else throw("Strict value is not equal to itself.")
15181518 }
15191519 else throw("Strict value is not equal to itself.")
15201520 }
15211521 else throw("Strict value is not equal to itself.")
15221522 }
15231523 }
15241524
15251525
15261526
15271527 @Callable(i)
15281528 func unstakeAndGet (amount) = {
15291529 let checkPayments = if ((size(i.payments) != 0))
15301530 then throw("No pmnts expd")
15311531 else true
15321532 if ((checkPayments == checkPayments))
15331533 then {
15341534 let factoryCfg = gfc()
15351535 let lpAssetId = cfgLpAssetId
15361536 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
15371537 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15381538 if ((currentDLp == currentDLp))
15391539 then {
15401540 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
15411541 if ((unstakeInv == unstakeInv))
15421542 then {
15431543 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
15441544 let outAmAmt = r._1
15451545 let outPrAmt = r._2
15461546 let sts = parseIntValue(r._9)
15471547 let state = r._10
15481548 let isGetDisabled = if (!(isAddressWhitelisted(i.caller)))
15491549 then if (igs())
15501550 then true
15511551 else (cfgPoolStatus == PoolShutdown)
15521552 else false
15531553 let v = if (isGetDisabled)
15541554 then throw(("Blocked: " + toString(sts)))
15551555 else true
15561556 if ((v == v))
15571557 then {
15581558 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15591559 if ((burnA == burnA))
15601560 then {
1561- let $t05425654337 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1562- let refreshDLpActions = $t05425654337._1
1563- let updatedDLp = $t05425654337._2
1561+ let $t05418954270 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1562+ let refreshDLpActions = $t05418954270._1
1563+ let updatedDLp = $t05418954270._2
15641564 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15651565 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15661566 then (state ++ refreshDLpActions)
15671567 else throw("Strict value is not equal to itself.")
15681568 }
15691569 else throw("Strict value is not equal to itself.")
15701570 }
15711571 else throw("Strict value is not equal to itself.")
15721572 }
15731573 else throw("Strict value is not equal to itself.")
15741574 }
15751575 else throw("Strict value is not equal to itself.")
15761576 }
15771577 else throw("Strict value is not equal to itself.")
15781578 }
15791579
15801580
15811581
15821582 @Callable(i)
15831583 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
15841584 let isGetDisabled = if (!(isAddressWhitelisted(i.caller)))
15851585 then if (igs())
15861586 then true
15871587 else (cfgPoolStatus == PoolShutdown)
15881588 else false
15891589 let checks = [if (!(isGetDisabled))
15901590 then true
15911591 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
15921592 then true
15931593 else throw("no payments are expected")]
15941594 if ((checks == checks))
15951595 then {
15961596 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15971597 if ((currentDLp == currentDLp))
15981598 then {
15991599 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
16001600 if ((unstakeInv == unstakeInv))
16011601 then {
16021602 let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
16031603 let outAmAmt = res._1
16041604 let outPrAmt = res._2
16051605 let state = res._10
16061606 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
16071607 then true
16081608 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
16091609 then true
16101610 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
16111611 if ((checkAmounts == checkAmounts))
16121612 then {
16131613 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
16141614 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
16151615 then {
1616- let $t05562555706 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1617- let refreshDLpActions = $t05562555706._1
1618- let updatedDLp = $t05562555706._2
1616+ let $t05555855639 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1617+ let refreshDLpActions = $t05555855639._1
1618+ let updatedDLp = $t05555855639._2
16191619 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
16201620 if ((isUpdatedDLpValid == isUpdatedDLpValid))
16211621 then (state ++ refreshDLpActions)
16221622 else throw("Strict value is not equal to itself.")
16231623 }
16241624 else throw("Strict value is not equal to itself.")
16251625 }
16261626 else throw("Strict value is not equal to itself.")
16271627 }
16281628 else throw("Strict value is not equal to itself.")
16291629 }
16301630 else throw("Strict value is not equal to itself.")
16311631 }
16321632 else throw("Strict value is not equal to itself.")
16331633 }
16341634
16351635
16361636
16371637 @Callable(i)
16381638 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
16391639 let isPoolOneTokenOperationsDisabled = {
16401640 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
16411641 if ($isInstanceOf(@, "Boolean"))
16421642 then @
16431643 else throw(($getType(@) + " couldn't be cast to Boolean"))
16441644 }
16451645 let isGetDisabled = if (!(isAddressWhitelisted(i.caller)))
16461646 then if (if (igs())
16471647 then true
16481648 else (cfgPoolStatus == PoolShutdown))
16491649 then true
16501650 else isPoolOneTokenOperationsDisabled
16511651 else false
16521652 let checks = [if (if (!(isGetDisabled))
16531653 then true
16541654 else isManager(i))
16551655 then true
16561656 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
16571657 then true
16581658 else throwErr("no payments are expected")]
16591659 if ((checks == checks))
16601660 then {
16611661 let factoryCfg = gfc()
16621662 let lpAssetId = cfgLpAssetId
16631663 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
16641664 let userAddress = i.caller
16651665 let lpAssetRecipientAddress = this
16661666 let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
16671667 if ((unstakeInv == unstakeInv))
16681668 then {
1669- let $t05676556953 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1670- let state = $t05676556953._1
1671- let totalAmount = $t05676556953._2
1669+ let $t05669856886 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1670+ let state = $t05669856886._1
1671+ let totalAmount = $t05669856886._2
16721672 $Tuple2(state, totalAmount)
16731673 }
16741674 else throw("Strict value is not equal to itself.")
16751675 }
16761676 else throw("Strict value is not equal to itself.")
16771677 }
16781678
16791679
16801680
16811681 @Callable(i)
16821682 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1683- let $t05708157184 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1684- let lpAmount = $t05708157184._1
1685- let state = $t05708157184._2
1686- let feeAmount = $t05708157184._3
1687- let bonus = $t05708157184._4
1683+ let $t05701457117 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1684+ let lpAmount = $t05701457117._1
1685+ let state = $t05701457117._2
1686+ let feeAmount = $t05701457117._3
1687+ let bonus = $t05701457117._4
16881688 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16891689 }
16901690
16911691
16921692
16931693 @Callable(i)
16941694 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1695- let $t05733257436 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1696- let lpAmount = $t05733257436._1
1697- let state = $t05733257436._2
1698- let feeAmount = $t05733257436._3
1699- let bonus = $t05733257436._4
1695+ let $t05726557369 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1696+ let lpAmount = $t05726557369._1
1697+ let state = $t05726557369._2
1698+ let feeAmount = $t05726557369._3
1699+ let bonus = $t05726557369._4
17001700 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
17011701 }
17021702
17031703
17041704
17051705 @Callable(i)
17061706 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
17071707 then throw("denied")
17081708 else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr), StringEntry(amp(), toString(ampInitial)), StringEntry(keyAmpHistory(height), toString(ampInitial))], "success")
17091709
17101710
17111711
17121712 @Callable(i)
17131713 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
17141714
17151715
17161716
17171717 @Callable(i)
17181718 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
17191719
17201720
17211721
17221722 @Callable(i)
17231723 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
17241724 let pr = calcPrices(amAmt, prAmt, lpAmt)
17251725 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
17261726 }
17271727
17281728
17291729
17301730 @Callable(i)
17311731 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
17321732
17331733
17341734
17351735 @Callable(i)
17361736 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
17371737
17381738
17391739
17401740 @Callable(i)
17411741 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
17421742
17431743
17441744
17451745 @Callable(i)
17461746 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, ""))
17471747
17481748
17491749
17501750 @Callable(i)
17511751 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
17521752 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
17531753 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
17541754 }
17551755
17561756
17571757
17581758 @Callable(i)
17591759 func changeAmp () = {
17601760 let cfg = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1761- let $t05991660115 = match cfg {
1761+ let $t05984960048 = match cfg {
17621762 case list: List[Any] =>
17631763 $Tuple3({
17641764 let @ = list[0]
17651765 if ($isInstanceOf(@, "Int"))
17661766 then @
17671767 else throw(($getType(@) + " couldn't be cast to Int"))
17681768 }, {
17691769 let @ = list[1]
17701770 if ($isInstanceOf(@, "Int"))
17711771 then @
17721772 else throw(($getType(@) + " couldn't be cast to Int"))
17731773 }, {
17741774 let @ = list[2]
17751775 if ($isInstanceOf(@, "Int"))
17761776 then @
17771777 else throw(($getType(@) + " couldn't be cast to Int"))
17781778 })
17791779 case _ =>
17801780 throwErr("invalid entry type")
17811781 }
1782- let delay = $t05991660115._1
1783- let delta = $t05991660115._2
1784- let target = $t05991660115._3
1782+ let delay = $t05984960048._1
1783+ let delta = $t05984960048._2
1784+ let target = $t05984960048._3
17851785 let curAmp = parseIntValue(getStringValue(amp()))
17861786 let newAmpRaw = (curAmp + delta)
17871787 let newAmp = if ((0 > delta))
17881788 then if ((target > newAmpRaw))
17891789 then target
17901790 else newAmpRaw
17911791 else if ((newAmpRaw > target))
17921792 then target
17931793 else newAmpRaw
17941794 let lastCall = valueOrElse(getInteger(keyChangeAmpLastCall()), 0)
17951795 let wait = (lastCall + delay)
17961796 let checks = [if ((height > wait))
17971797 then true
17981798 else throwErr("try again in few blocks"), if ((curAmp != newAmp))
17991799 then true
18001800 else throwErr("already reached target")]
18011801 if ((checks == checks))
18021802 then [IntegerEntry(keyChangeAmpLastCall(), height), StringEntry(amp(), toString(newAmp)), StringEntry(keyAmpHistory(height), toString(newAmp))]
18031803 else throw("Strict value is not equal to itself.")
18041804 }
18051805
18061806
18071807 @Verifier(tx)
18081808 func verify () = {
18091809 let targetPublicKey = match managerPublicKeyOrUnit() {
18101810 case pk: ByteVector =>
18111811 pk
18121812 case _: Unit =>
18131813 tx.senderPublicKey
18141814 case _ =>
18151815 throw("Match error")
18161816 }
18171817 match tx {
18181818 case order: Order =>
18191819 let matcherPub = mp()
1820- let $t06104861165 = if (skipOrderValidation())
1820+ let $t06098161209 = if (skipOrderValidation())
18211821 then $Tuple2(true, "")
18221822 else validateMatcherOrderAllowed(order)
1823- let orderValid = $t06104861165._1
1824- let orderValidInfo = $t06104861165._2
1825- let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
1823+ let orderValid = $t06098161209._1
1824+ let orderValidInfo = $t06098161209._2
18261825 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
1827- if (if (if (orderValid)
1828- then senderValid
1829- else false)
1826+ if (if (orderValid)
18301827 then matcherValid
18311828 else false)
18321829 then true
1833- else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
1830+ else throwOrderError(orderValid, orderValidInfo, matcherValid)
18341831 case s: SetScriptTransaction =>
18351832 if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
18361833 then true
18371834 else {
18381835 let newHash = blake2b256(value(s.script))
18391836 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
18401837 let currentHash = scriptHash(this)
18411838 if ((allowedHash == newHash))
18421839 then (currentHash != newHash)
18431840 else false
18441841 }
18451842 case _ =>
18461843 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
18471844 }
18481845 }
18491846

github/deemru/w8io/026f985 
250.54 ms