tx · 4DPD7nfTyXrocx8HxYNdS9LA6CuiztveyJH1ByJxgvAu

3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA:  -0.04100000 Waves

2023.05.05 11:41 [2564285] smart account 3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA > SELF 0.00000000 Waves

{ "type": 13, "id": "4DPD7nfTyXrocx8HxYNdS9LA6CuiztveyJH1ByJxgvAu", "fee": 4100000, "feeAssetId": null, "timestamp": 1683276023058, "version": 2, "chainId": 84, "sender": "3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA", "senderPublicKey": "35yd3qw1gxKDxKwGAykHN9fANbXNWwseaUwbWDj24o3x", "proofs": [ "fs2NBbXNBRzCSvaZDVzqvLfVGUH8XPL5fKKvC29A58xQXFWJZzwVQgLxwNF5EDWFFoY1hVsd8sKsAN9uNTz11qY" ], "script": "base64:BgK4LAgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgMKAQgSABIECgIBBBIECgIBBBIDCgEBEgASBAoCCAESABIECgIIARIECgIIARIECgIBARIDCgEBEgUKAwEBARIFCgMBCAESBAoCAQgSBAoCAQgSBAoCCAgSABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAIgZzY2FsZTgiDHNjYWxlOEJpZ0ludCIHc2NhbGUxOCIKemVyb0JpZ0ludCIEYmlnMCIEYmlnMSIEYmlnMiIEYmlnMyIEYmlnNCIKc2xpcHBhZ2U0RCILd2F2ZXNTdHJpbmciBUFtdWx0IgVEY29udiIDU0VQIgVFTVBUWSIKUG9vbEFjdGl2ZSIKUG9vbFB1dERpcyIOUG9vbE1hdGNoZXJEaXMiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiCWlkeFBvb2xTdCIJaWR4TFBBc0lkIglpZHhBbUFzSWQiCWlkeFByQXNJZCILaWR4QW10QXNEY20iDWlkeFByaWNlQXNEY20iC2lkeElBbXRBc0lkIg1pZHhJU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EY Next: GHgFLNSm2sKo2Nx79EUFqCFZBaY1YxVZm5SG7wZHjjQw Diff:
OldNewDifferences
2222 let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
2323
2424 let wavesString = "WAVES"
25-
26-let ampInitial = 50
2725
2826 let Amult = "100"
2927
234232 else toBase58String(value(input))
235233
236234
237-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]))
235+func parsePoolConfig (poolConfig) = $Tuple9(addressFromStringValue(poolConfig[idxPoolAddress]), parseIntValue(poolConfig[idxPoolSt]), fromBase58String(poolConfig[idxLPAsId]), parseAssetId(poolConfig[idxAmAsId]), parseAssetId(poolConfig[idxPrAsId]), parseIntValue(poolConfig[idxAmtAsDcm]), parseIntValue(poolConfig[idxPriceAsDcm]), fromBase58String(poolConfig[idxIAmtAsId]), fromBase58String(poolConfig[idxIPriceAsId]))
238236
239237
240238 let poolConfigParsed = parsePoolConfig(gpc())
241239
242-let $t080878273 = poolConfigParsed
240+let $t081658394 = poolConfigParsed
243241
244-let cfgPoolAddress = $t080878273._1
242+let cfgPoolAddress = $t081658394._1
245243
246-let cfgPoolStatus = $t080878273._2
244+let cfgPoolStatus = $t081658394._2
247245
248-let cfgLpAssetId = $t080878273._3
246+let cfgLpAssetId = $t081658394._3
249247
250-let cfgAmountAssetId = $t080878273._4
248+let cfgAmountAssetId = $t081658394._4
251249
252-let cfgPriceAssetId = $t080878273._5
250+let cfgPriceAssetId = $t081658394._5
253251
254-let cfgAmountAssetDecimals = $t080878273._6
252+let cfgAmountAssetDecimals = $t081658394._6
255253
256-let cfgPriceAssetDecimals = $t080878273._7
254+let cfgPriceAssetDecimals = $t081658394._7
255+
256+let cfgInAmountAssedId = $t081658394._8
257+
258+let cfgInPriceAssetId = $t081658394._9
257259
258260 func gfc () = split(strf(fca, fcfg()), SEP)
259261
374376 }
375377
376378 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
377- let $t01277812826 = {
379+ let $t01289912947 = {
378380 let $l = arr
379381 let $s = size($l)
380382 let $acc0 = $Tuple2(s, false)
388390
389391 $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)
390392 }
391- let d = $t01277812826._1
392- let found = $t01277812826._2
393+ let d = $t01289912947._1
394+ let found = $t01289912947._2
393395 if (found)
394396 then d
395397 else throw(("D calculation error, D = " + toString(d)))
436438 let lpId = cfgLpAssetId
437439 let amIdStr = toBase58String(value(cfgAmountAssetId))
438440 let prIdStr = toBase58String(value(cfgPriceAssetId))
441+ let inAmIdStr = cfgInAmountAssedId
442+ let inPrIdStr = cfgInPriceAssetId
439443 let amtDcm = cfgAmountAssetDecimals
440444 let priceDcm = cfgPriceAssetDecimals
441445 let sts = toString(cfgPoolStatus)
523527 else calcLpAmt
524528 let amDiff = (inAmAmt - calcAmAssetPmt)
525529 let prDiff = (inPrAmt - calcPrAssetPmt)
526- let $t02058820933 = if (if (isOneAsset)
530+ let $t02078621131 = if (if (isOneAsset)
527531 then (pmtId == amIdStr)
528532 else false)
529533 then $Tuple2(pmtAmt, 0)
532536 else false)
533537 then $Tuple2(0, pmtAmt)
534538 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
535- let writeAmAmt = $t02058820933._1
536- let writePrAmt = $t02058820933._2
539+ let writeAmAmt = $t02078621131._1
540+ let writePrAmt = $t02078621131._2
537541 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))]
538542 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
539543 }
552556 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
553557 let b = ((s + ((D * aPrecision) / ann)) - D)
554558 func calc (acc,cur) = {
555- let $t02212822148 = acc
556- let y = $t02212822148._1
557- let found = $t02212822148._2
559+ let $t02232622346 = acc
560+ let y = $t02232622346._1
561+ let found = $t02232622346._2
558562 if ((found != unit))
559563 then acc
560564 else {
567571 }
568572
569573 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
570- let $t02245522502 = {
574+ let $t02265322700 = {
571575 let $l = arr
572576 let $s = size($l)
573577 let $acc0 = $Tuple2(D, unit)
581585
582586 $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)
583587 }
584- let y = $t02245522502._1
585- let found = $t02245522502._2
588+ let y = $t02265322700._1
589+ let found = $t02265322700._2
586590 if ((found != unit))
587591 then y
588592 else throw(("Y calculation error, Y = " + toString(y)))
626630 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
627631 let amountAssetAmount = order.amount
628632 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
629- let $t02470024912 = if ((order.orderType == Buy))
633+ let $t02489825110 = if ((order.orderType == Buy))
630634 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
631635 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
632- let amountAssetBalanceDelta = $t02470024912._1
633- let priceAssetBalanceDelta = $t02470024912._2
636+ let amountAssetBalanceDelta = $t02489825110._1
637+ let priceAssetBalanceDelta = $t02489825110._2
634638 if (if (if (igs())
635639 then true
636640 else (cfgPoolStatus == PoolMatcherDis))
643647 then throw("Wr assets")
644648 else {
645649 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
646- let $t02525425354 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
647- let unusedActions = $t02525425354._1
648- let dLpNew = $t02525425354._2
650+ let $t02545225552 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
651+ let unusedActions = $t02545225552._1
652+ let dLpNew = $t02545225552._2
649653 let isOrderValid = (dLpNew >= dLp)
650654 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
651655 $Tuple2(isOrderValid, info)
699703 then {
700704 let amBalance = getAccBalance(amId)
701705 let prBalance = getAccBalance(prId)
702- let $t02801028472 = if ((txId == ""))
706+ let $t02820828670 = if ((txId == ""))
703707 then $Tuple2(amBalance, prBalance)
704708 else if ((pmtAssetId == amId))
705709 then if ((pmtAmtRaw > amBalance))
710714 then throw("invalid payment amount")
711715 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
712716 else throw("wrong pmtAssetId")
713- let amBalanceOld = $t02801028472._1
714- let prBalanceOld = $t02801028472._2
715- let $t02847828654 = if ((pmtAssetId == amId))
717+ let amBalanceOld = $t02820828670._1
718+ let prBalanceOld = $t02820828670._2
719+ let $t02867628852 = if ((pmtAssetId == amId))
716720 then $Tuple2(pmtAmtRaw, 0)
717721 else if ((pmtAssetId == prId))
718722 then $Tuple2(0, pmtAmtRaw)
719723 else throw("invalid payment")
720- let amAmountRaw = $t02847828654._1
721- let prAmountRaw = $t02847828654._2
722- let $t02865828912 = if (withTakeFee)
724+ let amAmountRaw = $t02867628852._1
725+ let prAmountRaw = $t02867628852._2
726+ let $t02885629110 = if (withTakeFee)
723727 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
724728 else $Tuple3(amAmountRaw, prAmountRaw, 0)
725- let amAmount = $t02865828912._1
726- let prAmount = $t02865828912._2
727- let feeAmount = $t02865828912._3
729+ let amAmount = $t02885629110._1
730+ let prAmount = $t02885629110._2
731+ let feeAmount = $t02885629110._3
728732 let amBalanceNew = (amBalanceOld + amAmount)
729733 let prBalanceNew = (prBalanceOld + prAmount)
730734 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
772776 else {
773777 let amBalance = getAccBalance(amId)
774778 let prBalance = getAccBalance(prId)
775- let $t03102431135 = {
779+ let $t03122231333 = {
776780 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
777781 if ($isInstanceOf(@, "(Int, Int)"))
778782 then @
779783 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
780784 }
781- if (($t03102431135 == $t03102431135))
785+ if (($t03122231333 == $t03122231333))
782786 then {
783- let feeAmount = $t03102431135._2
784- let totalGet = $t03102431135._1
787+ let feeAmount = $t03122231333._2
788+ let totalGet = $t03122231333._1
785789 let totalAmount = if (if ((minOutAmount > 0))
786790 then (minOutAmount > totalGet)
787791 else false)
788792 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
789793 else totalGet
790- let $t03132531632 = if ((outAssetId == amId))
794+ let $t03152331830 = if ((outAssetId == amId))
791795 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
792796 else if ((outAssetId == prId))
793797 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
794798 else throw("invalid out asset id")
795- let outAm = $t03132531632._1
796- let outPr = $t03132531632._2
797- let amBalanceNew = $t03132531632._3
798- let prBalanceNew = $t03132531632._4
799+ let outAm = $t03152331830._1
800+ let outPr = $t03152331830._2
801+ let amBalanceNew = $t03152331830._3
802+ let prBalanceNew = $t03152331830._4
799803 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
800804 let curPr = f1(curPrX18, scale8)
801805 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
810814 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
811815 if ((burn == burn))
812816 then {
813- let $t03241732767 = {
817+ let $t03261532965 = {
814818 let feeAmountForCalc = if ((this == feeCollectorAddress))
815819 then 0
816820 else feeAmount
821825 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
822826 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
823827 }
824- let amountAssetBalanceDelta = $t03241732767._1
825- let priceAssetBalanceDelta = $t03241732767._2
826- let $t03277032878 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
827- let refreshDLpActions = $t03277032878._1
828- let updatedDLp = $t03277032878._2
828+ let amountAssetBalanceDelta = $t03261532965._1
829+ let priceAssetBalanceDelta = $t03261532965._2
830+ let $t03296833076 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
831+ let refreshDLpActions = $t03296833076._1
832+ let updatedDLp = $t03296833076._2
829833 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
830834 if ((isUpdatedDLpValid == isUpdatedDLpValid))
831835 then $Tuple2((state ++ refreshDLpActions), totalAmount)
904908 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
905909 let b = ((s + ((D * aPrecision) / ann)) - D)
906910 func calc (acc,cur) = {
907- let $t03432534345 = acc
908- let y = $t03432534345._1
909- let found = $t03432534345._2
911+ let $t03452334543 = acc
912+ let y = $t03452334543._1
913+ let found = $t03452334543._2
910914 if ((found != unit))
911915 then acc
912916 else {
919923 }
920924
921925 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
922- let $t03467634723 = {
926+ let $t03487434921 = {
923927 let $l = arr
924928 let $s = size($l)
925929 let $acc0 = $Tuple2(D, unit)
933937
934938 $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)
935939 }
936- let y = $t03467634723._1
937- let found = $t03467634723._2
940+ let y = $t03487434921._1
941+ let found = $t03487434921._2
938942 if ((found != unit))
939943 then y
940944 else throw(("Y calculation error, Y = " + toString(y)))
946950
947951 @Callable(i)
948952 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
949- let $t03507535499 = if ((isReverse == false))
953+ let $t03527335697 = if ((isReverse == false))
950954 then {
951955 let assetOut = strf(this, pa())
952956 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
957961 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
958962 $Tuple2(assetOut, poolAmountInBalance)
959963 }
960- let assetOut = $t03507535499._1
961- let poolAmountInBalance = $t03507535499._2
964+ let assetOut = $t03527335697._1
965+ let poolAmountInBalance = $t03527335697._2
962966 let poolConfig = gpc()
963967 let amId = poolConfig[idxAmAsId]
964968 let prId = poolConfig[idxPrAsId]
9981002 then {
9991003 let pmt = value(i.payments[0])
10001004 let assetIn = assetIdToString(pmt.assetId)
1001- let $t03693537329 = if ((isReverse == false))
1005+ let $t03713337527 = if ((isReverse == false))
10021006 then {
10031007 let assetOut = strf(this, pa())
10041008 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10091013 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10101014 $Tuple2(assetOut, poolAmountInBalance)
10111015 }
1012- let assetOut = $t03693537329._1
1013- let poolAmountInBalance = $t03693537329._2
1016+ let assetOut = $t03713337527._1
1017+ let poolAmountInBalance = $t03713337527._2
10141018 let poolConfig = gpc()
10151019 let amId = poolConfig[idxAmAsId]
10161020 let prId = poolConfig[idxPrAsId]
11501154 else throw("Strict value is not equal to itself.")
11511155 }
11521156 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1153- let $t04194842090 = refreshDLpInternal(0, 0, 0)
1154- let refreshDLpActions = $t04194842090._1
1155- let updatedDLp = $t04194842090._2
1157+ let $t04214642288 = refreshDLpInternal(0, 0, 0)
1158+ let refreshDLpActions = $t04214642288._1
1159+ let updatedDLp = $t04214642288._2
11561160 let check = if ((updatedDLp >= currentDLp))
11571161 then true
11581162 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
12251229 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12261230 if ((currentDLp == currentDLp))
12271231 then {
1228- let $t04373143889 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1229- if (($t04373143889 == $t04373143889))
1232+ let $t04392944087 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1233+ if (($t04392944087 == $t04392944087))
12301234 then {
1231- let feeAmount = $t04373143889._3
1232- let state = $t04373143889._2
1233- let estimLP = $t04373143889._1
1235+ let feeAmount = $t04392944087._3
1236+ let state = $t04392944087._2
1237+ let estimLP = $t04392944087._1
12341238 let emitLpAmt = if (if ((minOutAmount > 0))
12351239 then (minOutAmount > estimLP)
12361240 else false)
12581262 let sendFeeToMatcher = if ((feeAmount > 0))
12591263 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12601264 else nil
1261- let $t04477445123 = if ((this == feeCollectorAddress))
1265+ let $t04497245321 = if ((this == feeCollectorAddress))
12621266 then $Tuple2(0, 0)
12631267 else {
12641268 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12681272 then $Tuple2(-(feeAmount), 0)
12691273 else $Tuple2(0, -(feeAmount))
12701274 }
1271- let amountAssetBalanceDelta = $t04477445123._1
1272- let priceAssetBalanceDelta = $t04477445123._2
1273- let $t04512645234 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1274- let refreshDLpActions = $t04512645234._1
1275- let updatedDLp = $t04512645234._2
1275+ let amountAssetBalanceDelta = $t04497245321._1
1276+ let priceAssetBalanceDelta = $t04497245321._2
1277+ let $t04532445432 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1278+ let refreshDLpActions = $t04532445432._1
1279+ let updatedDLp = $t04532445432._2
12761280 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12771281 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12781282 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
13041308 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
13051309 if ((currentDLp == currentDLp))
13061310 then {
1307- let $t04626446329 = refreshDLpInternal(0, 0, 0)
1308- let refreshDLpActions = $t04626446329._1
1309- let updatedDLp = $t04626446329._2
1311+ let $t04646246527 = refreshDLpInternal(0, 0, 0)
1312+ let refreshDLpActions = $t04646246527._1
1313+ let updatedDLp = $t04646246527._2
13101314 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13111315 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13121316 then (state ++ refreshDLpActions)
13311335 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13321336 if ((b == b))
13331337 then {
1334- let $t04750247584 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1335- let refreshDLpActions = $t04750247584._1
1336- let updatedDLp = $t04750247584._2
1338+ let $t04770047782 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1339+ let refreshDLpActions = $t04770047782._1
1340+ let updatedDLp = $t04770047782._2
13371341 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13381342 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13391343 then (state ++ refreshDLpActions)
13681372 else throwErr("exactly 1 payment are expected")]
13691373 if ((checks == checks))
13701374 then {
1371- let $t04820248357 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1372- let state = $t04820248357._1
1373- let totalAmount = $t04820248357._2
1375+ let $t04840048555 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1376+ let state = $t04840048555._1
1377+ let totalAmount = $t04840048555._2
13741378 $Tuple2(state, totalAmount)
13751379 }
13761380 else throw("Strict value is not equal to itself.")
13871391 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13881392 then {
13891393 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1390- let $t04888148945 = refreshDLpInternal(0, 0, 0)
1391- let dLpUpdateActions = $t04888148945._1
1392- let updatedDLp = $t04888148945._2
1394+ let $t04907949143 = refreshDLpInternal(0, 0, 0)
1395+ let dLpUpdateActions = $t04907949143._1
1396+ let updatedDLp = $t04907949143._2
13931397 let actions = if ((dLp != updatedDLp))
13941398 then dLpUpdateActions
13951399 else throwErr("nothing to refresh")
14171421 let newY = getYD(xp, index, D1)
14181422 let dy = (xp[index] - newY)
14191423 let totalGetRaw = max([0, toInt((dy - big1))])
1420- let $t04995550010 = takeFee(totalGetRaw, outFee)
1421- let totalGet = $t04995550010._1
1422- let feeAmount = $t04995550010._2
1424+ let $t05015350208 = takeFee(totalGetRaw, outFee)
1425+ let totalGet = $t05015350208._1
1426+ let feeAmount = $t05015350208._2
14231427 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14241428 }
14251429
14321436 let lpId = toBase58String(value(cfgLpAssetId))
14331437 let amBalance = getAccBalance(amId)
14341438 let prBalance = getAccBalance(prId)
1435- let $t05038550500 = {
1439+ let $t05058350698 = {
14361440 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14371441 if ($isInstanceOf(@, "(Int, Int)"))
14381442 then @
14391443 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14401444 }
1441- let totalGet = $t05038550500._1
1442- let feeAmount = $t05038550500._2
1445+ let totalGet = $t05058350698._1
1446+ let feeAmount = $t05058350698._2
14431447 let r = ego("", lpId, lpAssetAmount, this)
14441448 let outAmAmt = r._1
14451449 let outPrAmt = r._2
14731477 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14741478 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14751479 then {
1476- let $t05166651747 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1477- let refreshDLpActions = $t05166651747._1
1478- let updatedDLp = $t05166651747._2
1480+ let $t05186451945 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1481+ let refreshDLpActions = $t05186451945._1
1482+ let updatedDLp = $t05186451945._2
14791483 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14801484 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14811485 then (state ++ refreshDLpActions)
15201524 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15211525 if ((burnA == burnA))
15221526 then {
1523- let $t05277452855 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1524- let refreshDLpActions = $t05277452855._1
1525- let updatedDLp = $t05277452855._2
1527+ let $t05297253053 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1528+ let refreshDLpActions = $t05297253053._1
1529+ let updatedDLp = $t05297253053._2
15261530 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15271531 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15281532 then (state ++ refreshDLpActions)
15731577 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15741578 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15751579 then {
1576- let $t05410654187 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1577- let refreshDLpActions = $t05410654187._1
1578- let updatedDLp = $t05410654187._2
1580+ let $t05430454385 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1581+ let refreshDLpActions = $t05430454385._1
1582+ let updatedDLp = $t05430454385._2
15791583 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15801584 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15811585 then (state ++ refreshDLpActions)
16241628 let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
16251629 if ((unstakeInv == unstakeInv))
16261630 then {
1627- let $t05520955397 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1628- let state = $t05520955397._1
1629- let totalAmount = $t05520955397._2
1631+ let $t05540755595 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1632+ let state = $t05540755595._1
1633+ let totalAmount = $t05540755595._2
16301634 $Tuple2(state, totalAmount)
16311635 }
16321636 else throw("Strict value is not equal to itself.")
16381642
16391643 @Callable(i)
16401644 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1641- let $t05552555628 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1642- let lpAmount = $t05552555628._1
1643- let state = $t05552555628._2
1644- let feeAmount = $t05552555628._3
1645- let bonus = $t05552555628._4
1645+ let $t05572355826 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1646+ let lpAmount = $t05572355826._1
1647+ let state = $t05572355826._2
1648+ let feeAmount = $t05572355826._3
1649+ let bonus = $t05572355826._4
16461650 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16471651 }
16481652
16501654
16511655 @Callable(i)
16521656 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1653- let $t05577655880 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1654- let lpAmount = $t05577655880._1
1655- let state = $t05577655880._2
1656- let feeAmount = $t05577655880._3
1657- let bonus = $t05577655880._4
1657+ let $t05597456078 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1658+ let lpAmount = $t05597456078._1
1659+ let state = $t05597456078._2
1660+ let feeAmount = $t05597456078._3
1661+ let bonus = $t05597456078._4
16581662 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16591663 }
16601664
16631667 @Callable(i)
16641668 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
16651669 then throw("denied")
1666- else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr), StringEntry(amp(), toString(ampInitial))], "success")
1670+ else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
16671671
16681672
16691673
17161720 @Callable(i)
17171721 func changeAmp () = {
17181722 let cfg = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1719- let $t05828958488 = match cfg {
1723+ let $t05843258631 = match cfg {
17201724 case list: List[Any] =>
17211725 $Tuple3({
17221726 let @ = list[0]
17371741 case _ =>
17381742 throwErr("invalid entry type")
17391743 }
1740- let delay = $t05828958488._1
1741- let delta = $t05828958488._2
1742- let target = $t05828958488._3
1744+ let delay = $t05843258631._1
1745+ let delta = $t05843258631._2
1746+ let target = $t05843258631._3
17431747 let curAmp = parseIntValue(getStringValue(amp()))
17441748 let newAmpRaw = (curAmp + delta)
17451749 let newAmp = if ((0 > delta))
17751779 match tx {
17761780 case order: Order =>
17771781 let matcherPub = mp()
1778- let $t05940059517 = if (skipOrderValidation())
1782+ let $t05954359660 = if (skipOrderValidation())
17791783 then $Tuple2(true, "")
17801784 else validateMatcherOrderAllowed(order)
1781- let orderValid = $t05940059517._1
1782- let orderValidInfo = $t05940059517._2
1785+ let orderValid = $t05954359660._1
1786+ let orderValidInfo = $t05954359660._2
17831787 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17841788 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17851789 if (if (if (orderValid)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let scale8 = 100000000
55
66 let scale8BigInt = toBigInt(100000000)
77
88 let scale18 = toBigInt(1000000000000000000)
99
1010 let zeroBigInt = toBigInt(0)
1111
1212 let big0 = toBigInt(0)
1313
1414 let big1 = toBigInt(1)
1515
1616 let big2 = toBigInt(2)
1717
1818 let big3 = toBigInt(3)
1919
2020 let big4 = toBigInt(4)
2121
2222 let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
2323
2424 let wavesString = "WAVES"
25-
26-let ampInitial = 50
2725
2826 let Amult = "100"
2927
3028 let Dconv = "1"
3129
3230 let SEP = "__"
3331
3432 let EMPTY = ""
3533
3634 let PoolActive = 1
3735
3836 let PoolPutDis = 2
3937
4038 let PoolMatcherDis = 3
4139
4240 let PoolShutdown = 4
4341
4442 let idxPoolAddress = 1
4543
4644 let idxPoolSt = 2
4745
4846 let idxLPAsId = 3
4947
5048 let idxAmAsId = 4
5149
5250 let idxPrAsId = 5
5351
5452 let idxAmtAsDcm = 6
5553
5654 let idxPriceAsDcm = 7
5755
5856 let idxIAmtAsId = 8
5957
6058 let idxIPriceAsId = 9
6159
6260 let idxFactStakCntr = 1
6361
6462 let idxFactoryRestCntr = 6
6563
6664 let idxFactSlippCntr = 7
6765
6866 let idxFactGwxRewCntr = 10
6967
7068 let feeDefault = fraction(10, scale8, 10000)
7169
7270 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
7371
7472
7573 func t1BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult)
7674
7775
7876 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
7977
8078
8179 func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
8280
8381
8482 func t2 (origVal,origScaleMult) = fraction(origVal, scale18, toBigInt(origScaleMult))
8583
8684
8785 func f2 (val,resultScaleMult) = fraction(val, toBigInt(resultScaleMult), scale18)
8886
8987
9088 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
9189
9290
9391 func abs (val) = if ((zeroBigInt > val))
9492 then -(val)
9593 else val
9694
9795
9896 func absBigInt (val) = if ((zeroBigInt > val))
9997 then -(val)
10098 else val
10199
102100
103101 func fc () = "%s__factoryContract"
104102
105103
106104 func mpk () = "%s__managerPublicKey"
107105
108106
109107 func pmpk () = "%s__pendingManagerPublicKey"
110108
111109
112110 func pl () = "%s%s__price__last"
113111
114112
115113 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
116114
117115
118116 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
119117
120118
121119 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
122120
123121
124122 func aa () = "%s__amountAsset"
125123
126124
127125 func pa () = "%s__priceAsset"
128126
129127
130128 func amp () = "%s__amp"
131129
132130
133131 func keyAmpHistory (heightBlocks) = ("%s%d__amp__" + toString(heightBlocks))
134132
135133
136134 func keyChangeAmpLastCall () = "%s__changeAmpLastCall"
137135
138136
139137 let keyFee = "%s__fee"
140138
141139 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
142140
143141 let keyDLp = makeString(["%s", "dLp"], SEP)
144142
145143 let keyDLpRefreshedHeight = makeString(["%s", "dLpRefreshedHeight"], SEP)
146144
147145 let keyDLpRefreshDelay = makeString(["%s", "refreshDLpDelay"], SEP)
148146
149147 let dLpRefreshDelayDefault = 30
150148
151149 let dLpRefreshDelay = valueOrElse(getInteger(this, keyDLpRefreshDelay), dLpRefreshDelayDefault)
152150
153151 func fcfg () = "%s__factoryConfig"
154152
155153
156154 func mtpk () = "%s%s__matcher__publicKey"
157155
158156
159157 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
160158
161159
162160 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
163161
164162
165163 func aps () = "%s__shutdown"
166164
167165
168166 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
169167
170168
171169 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
172170
173171
174172 func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress)
175173
176174
177175 func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
178176
179177
180178 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
181179
182180
183181 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
184182
185183
186184 func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
187185
188186
189187 func fmtErr (msg) = makeString(["lp_stable.ride:", msg], " ")
190188
191189
192190 let fca = addressFromStringValue(strf(this, fc()))
193191
194192 let inFee = {
195193 let @ = invoke(fca, "getInFeeREADONLY", [toString(this)], nil)
196194 if ($isInstanceOf(@, "Int"))
197195 then @
198196 else throw(($getType(@) + " couldn't be cast to Int"))
199197 }
200198
201199 let outFee = {
202200 let @ = invoke(fca, "getOutFeeREADONLY", [toString(this)], nil)
203201 if ($isInstanceOf(@, "Int"))
204202 then @
205203 else throw(($getType(@) + " couldn't be cast to Int"))
206204 }
207205
208206 let A = strf(this, amp())
209207
210208 func igs () = valueOrElse(getBoolean(fca, aps()), false)
211209
212210
213211 func mp () = fromBase58String(strf(fca, mtpk()))
214212
215213
216214 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
217215
218216 func gpc () = {
219217 let amtAs = strf(this, aa())
220218 let priceAs = strf(this, pa())
221219 let iPriceAs = intf(fca, mba(priceAs))
222220 let iAmtAs = intf(fca, mba(amtAs))
223221 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
224222 }
225223
226224
227225 func parseAssetId (input) = if ((input == wavesString))
228226 then unit
229227 else fromBase58String(input)
230228
231229
232230 func assetIdToString (input) = if ((input == unit))
233231 then wavesString
234232 else toBase58String(value(input))
235233
236234
237-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]))
235+func parsePoolConfig (poolConfig) = $Tuple9(addressFromStringValue(poolConfig[idxPoolAddress]), parseIntValue(poolConfig[idxPoolSt]), fromBase58String(poolConfig[idxLPAsId]), parseAssetId(poolConfig[idxAmAsId]), parseAssetId(poolConfig[idxPrAsId]), parseIntValue(poolConfig[idxAmtAsDcm]), parseIntValue(poolConfig[idxPriceAsDcm]), fromBase58String(poolConfig[idxIAmtAsId]), fromBase58String(poolConfig[idxIPriceAsId]))
238236
239237
240238 let poolConfigParsed = parsePoolConfig(gpc())
241239
242-let $t080878273 = poolConfigParsed
240+let $t081658394 = poolConfigParsed
243241
244-let cfgPoolAddress = $t080878273._1
242+let cfgPoolAddress = $t081658394._1
245243
246-let cfgPoolStatus = $t080878273._2
244+let cfgPoolStatus = $t081658394._2
247245
248-let cfgLpAssetId = $t080878273._3
246+let cfgLpAssetId = $t081658394._3
249247
250-let cfgAmountAssetId = $t080878273._4
248+let cfgAmountAssetId = $t081658394._4
251249
252-let cfgPriceAssetId = $t080878273._5
250+let cfgPriceAssetId = $t081658394._5
253251
254-let cfgAmountAssetDecimals = $t080878273._6
252+let cfgAmountAssetDecimals = $t081658394._6
255253
256-let cfgPriceAssetDecimals = $t080878273._7
254+let cfgPriceAssetDecimals = $t081658394._7
255+
256+let cfgInAmountAssedId = $t081658394._8
257+
258+let cfgInPriceAssetId = $t081658394._9
257259
258260 func gfc () = split(strf(fca, fcfg()), SEP)
259261
260262
261263 let factoryConfig = gfc()
262264
263265 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
264266
265267 let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
266268
267269 let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
268270
269271 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
270272
271273 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)
272274
273275
274276 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)
275277
276278
277279 func getAccBalance (assetId) = if ((assetId == "WAVES"))
278280 then wavesBalance(this).available
279281 else assetBalance(this, fromBase58String(assetId))
280282
281283
282284 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
283285
284286
285287 func cpbir (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
286288
287289
288290 func vad (A1,A2,slippage) = {
289291 let diff = fraction((A1 - A2), scale8BigInt, A2)
290292 let pass = ((slippage - abs(diff)) > zeroBigInt)
291293 if (!(pass))
292294 then throw(("Big slpg: " + toString(diff)))
293295 else $Tuple2(pass, min([A1, A2]))
294296 }
295297
296298
297299 func vd (D1,D0,slpg) = {
298300 let diff = fraction(D0, scale8BigInt, D1)
299301 let fail = (slpg > diff)
300302 if (if (fail)
301303 then true
302304 else (D0 > D1))
303305 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
304306 else fail
305307 }
306308
307309
308310 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
309311 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
310312 let prAsAmtX18 = t1(prAmt, prAssetDcm)
311313 cpbi(prAsAmtX18, amtAsAmtX18)
312314 }
313315
314316
315317 func calcPrices (amAmt,prAmt,lpAmt) = {
316318 let amtAsDcm = cfgAmountAssetDecimals
317319 let prAsDcm = cfgPriceAssetDecimals
318320 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
319321 let amAmtX18 = t1(amAmt, amtAsDcm)
320322 let prAmtX18 = t1(prAmt, prAsDcm)
321323 let lpAmtX18 = t1(lpAmt, scale8)
322324 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
323325 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
324326 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
325327 }
326328
327329
328330 func calculatePrices (amAmt,prAmt,lpAmt) = {
329331 let p = calcPrices(amAmt, prAmt, lpAmt)
330332 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
331333 }
332334
333335
334336 func takeFee (amount,fee) = {
335337 let feeAmount = if ((fee == 0))
336338 then 0
337339 else fraction(amount, fee, scale8)
338340 $Tuple2((amount - feeAmount), feeAmount)
339341 }
340342
341343
342344 func getD (xp) = {
343345 let xp0 = xp[0]
344346 let xp1 = xp[1]
345347 let s = (xp0 + xp1)
346348 if ((s == big0))
347349 then big0
348350 else {
349351 let a = parseIntValue(A)
350352 let ann = (a * 2)
351353 let p = fraction(xp0, xp1, big1)
352354 let xp0_xp1_n_n = fraction(p, big4, big1)
353355 let ann_s = fraction(toBigInt(ann), s, big1)
354356 let ann_1 = toBigInt((ann - 1))
355357 func calcDNext (d) = {
356358 let dd = fraction(d, d, big1)
357359 let ddd = fraction(dd, d, big1)
358360 let dp = fraction(ddd, big1, xp0_xp1_n_n)
359361 fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)))
360362 }
361363
362364 func calc (acc,i) = if (acc._2)
363365 then acc
364366 else {
365367 let d = acc._1
366368 let dNext = calcDNext(d)
367369 let dDiffRaw = (dNext - value(d))
368370 let dDiff = if ((big0 > dDiffRaw))
369371 then -(dDiffRaw)
370372 else dDiffRaw
371373 if ((big1 >= dDiff))
372374 then $Tuple2(dNext, true)
373375 else $Tuple2(dNext, false)
374376 }
375377
376378 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
377- let $t01277812826 = {
379+ let $t01289912947 = {
378380 let $l = arr
379381 let $s = size($l)
380382 let $acc0 = $Tuple2(s, false)
381383 func $f0_1 ($a,$i) = if (($i >= $s))
382384 then $a
383385 else calc($a, $l[$i])
384386
385387 func $f0_2 ($a,$i) = if (($i >= $s))
386388 then $a
387389 else throw("List size exceeds 17")
388390
389391 $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)
390392 }
391- let d = $t01277812826._1
392- let found = $t01277812826._2
393+ let d = $t01289912947._1
394+ let found = $t01289912947._2
393395 if (found)
394396 then d
395397 else throw(("D calculation error, D = " + toString(d)))
396398 }
397399 }
398400
399401
400402 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
401403 let lpId = cfgLpAssetId
402404 let amId = toBase58String(value(cfgAmountAssetId))
403405 let prId = toBase58String(value(cfgPriceAssetId))
404406 let amDcm = cfgAmountAssetDecimals
405407 let prDcm = cfgPriceAssetDecimals
406408 let sts = toString(cfgPoolStatus)
407409 let lpEmiss = valueOrErrorMessage(assetInfo(lpId), "Wrong LP id").quantity
408410 if ((toBase58String(lpId) != pmtAssetId))
409411 then throw("Wrong pmt asset")
410412 else {
411413 let amBalance = getAccBalance(amId)
412414 let amBalanceX18 = t1(amBalance, amDcm)
413415 let prBalance = getAccBalance(prId)
414416 let prBalanceX18 = t1(prBalance, prDcm)
415417 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
416418 let curPrice = f1(curPriceX18, scale8)
417419 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
418420 let lpEmissX18 = t1(lpEmiss, scale8)
419421 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
420422 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
421423 let outAmAmt = fromX18Round(outAmAmtX18, amDcm, FLOOR)
422424 let outPrAmt = fromX18Round(outPrAmtX18, prDcm, FLOOR)
423425 let state = if ((txId58 == ""))
424426 then nil
425427 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
426428 then unit
427429 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
428430 then unit
429431 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)]
430432 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
431433 }
432434 }
433435
434436
435437 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
436438 let lpId = cfgLpAssetId
437439 let amIdStr = toBase58String(value(cfgAmountAssetId))
438440 let prIdStr = toBase58String(value(cfgPriceAssetId))
441+ let inAmIdStr = cfgInAmountAssedId
442+ let inPrIdStr = cfgInPriceAssetId
439443 let amtDcm = cfgAmountAssetDecimals
440444 let priceDcm = cfgPriceAssetDecimals
441445 let sts = toString(cfgPoolStatus)
442446 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
443447 let amBalance = if (isEval)
444448 then getAccBalance(amIdStr)
445449 else if (if (isOneAsset)
446450 then (pmtId == amIdStr)
447451 else false)
448452 then (getAccBalance(amIdStr) - pmtAmt)
449453 else if (isOneAsset)
450454 then getAccBalance(amIdStr)
451455 else (getAccBalance(amIdStr) - inAmAmt)
452456 let prBalance = if (isEval)
453457 then getAccBalance(prIdStr)
454458 else if (if (isOneAsset)
455459 then (pmtId == prIdStr)
456460 else false)
457461 then (getAccBalance(prIdStr) - pmtAmt)
458462 else if (isOneAsset)
459463 then getAccBalance(prIdStr)
460464 else (getAccBalance(prIdStr) - inPrAmt)
461465 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
462466 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
463467 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
464468 let amBalanceX18 = t1(amBalance, amtDcm)
465469 let prBalanceX18 = t1(prBalance, priceDcm)
466470 let D0 = getD([amBalanceX18, prBalanceX18])
467471 let r = if ((lpEm == 0))
468472 then {
469473 let D1 = getD([(amBalanceX18 + inAmAssetAmtX18), (prBalanceX18 + inPrAssetAmtX18)])
470474 let checkD = if ((D1 > D0))
471475 then true
472476 else throw("D1 should be greater than D0")
473477 if ((checkD == checkD))
474478 then {
475479 let curPriceX18 = zeroBigInt
476480 let slippageX18 = zeroBigInt
477481 let lpAmtX18 = D1
478482 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
479483 }
480484 else throw("Strict value is not equal to itself.")
481485 }
482486 else {
483487 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
484488 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
485489 let slippageX18 = t1(slippage, scale8)
486490 if (if (if (validateSlippage)
487491 then (curPriceX18 != zeroBigInt)
488492 else false)
489493 then (slippageRealX18 > slippageX18)
490494 else false)
491495 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
492496 else {
493497 let lpEmissionX18 = t1(lpEm, scale8)
494498 let prViaAmX18 = fraction(inAmAssetAmtX18, cpbir(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING)
495499 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, cpbir(prBalanceX18, amBalanceX18, FLOOR), CEILING)
496500 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
497501 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
498502 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
499503 let expAmtAssetAmtX18 = expectedAmts._1
500504 let expPriceAssetAmtX18 = expectedAmts._2
501505 let D1 = getD([(amBalanceX18 + expAmtAssetAmtX18), (prBalanceX18 + expPriceAssetAmtX18)])
502506 let checkD = if ((D1 > D0))
503507 then true
504508 else throw("D1 should be greater than D0")
505509 if ((checkD == checkD))
506510 then {
507511 let lpAmtX18 = fraction(lpEmissionX18, (D1 - D0), D0)
508512 $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18)
509513 }
510514 else throw("Strict value is not equal to itself.")
511515 }
512516 }
513517 let calcLpAmt = r._1
514518 let calcAmAssetPmt = r._2
515519 let calcPrAssetPmt = r._3
516520 let curPrice = f1(r._4, scale8)
517521 let slippageCalc = f1(r._5, scale8)
518522 if ((0 >= calcLpAmt))
519523 then throw("LP <= 0")
520524 else {
521525 let emitLpAmt = if (!(emitLp))
522526 then 0
523527 else calcLpAmt
524528 let amDiff = (inAmAmt - calcAmAssetPmt)
525529 let prDiff = (inPrAmt - calcPrAssetPmt)
526- let $t02058820933 = if (if (isOneAsset)
530+ let $t02078621131 = if (if (isOneAsset)
527531 then (pmtId == amIdStr)
528532 else false)
529533 then $Tuple2(pmtAmt, 0)
530534 else if (if (isOneAsset)
531535 then (pmtId == prIdStr)
532536 else false)
533537 then $Tuple2(0, pmtAmt)
534538 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
535- let writeAmAmt = $t02058820933._1
536- let writePrAmt = $t02058820933._2
539+ let writeAmAmt = $t02078621131._1
540+ let writePrAmt = $t02078621131._2
537541 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))]
538542 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
539543 }
540544 }
541545
542546
543547 func getYD (xp,i,D) = {
544548 let n = big2
545549 let x = xp[if ((i == 0))
546550 then 1
547551 else 0]
548552 let aPrecision = parseBigIntValue(Amult)
549553 let a = (parseBigIntValue(A) * aPrecision)
550554 let s = x
551555 let ann = (a * n)
552556 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
553557 let b = ((s + ((D * aPrecision) / ann)) - D)
554558 func calc (acc,cur) = {
555- let $t02212822148 = acc
556- let y = $t02212822148._1
557- let found = $t02212822148._2
559+ let $t02232622346 = acc
560+ let y = $t02232622346._1
561+ let found = $t02232622346._2
558562 if ((found != unit))
559563 then acc
560564 else {
561565 let yNext = (((y * y) + c) / ((big2 * y) + b))
562566 let yDiff = absBigInt((yNext - value(y)))
563567 if ((big1 >= yDiff))
564568 then $Tuple2(yNext, cur)
565569 else $Tuple2(yNext, unit)
566570 }
567571 }
568572
569573 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
570- let $t02245522502 = {
574+ let $t02265322700 = {
571575 let $l = arr
572576 let $s = size($l)
573577 let $acc0 = $Tuple2(D, unit)
574578 func $f0_1 ($a,$i) = if (($i >= $s))
575579 then $a
576580 else calc($a, $l[$i])
577581
578582 func $f0_2 ($a,$i) = if (($i >= $s))
579583 then $a
580584 else throw("List size exceeds 15")
581585
582586 $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)
583587 }
584- let y = $t02245522502._1
585- let found = $t02245522502._2
588+ let y = $t02265322700._1
589+ let found = $t02265322700._2
586590 if ((found != unit))
587591 then y
588592 else throw(("Y calculation error, Y = " + toString(y)))
589593 }
590594
591595
592596 func calcDLp (amountBalance,priceBalance,lpEmission) = {
593597 let updatedDLp = fraction(getD([t1BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals)), t1BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))]), scale18, lpEmission)
594598 if ((lpEmission == big0))
595599 then big0
596600 else updatedDLp
597601 }
598602
599603
600604 func calcCurrentDLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
601605 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
602606 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
603607 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
604608 let currentDLp = calcDLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
605609 currentDLp
606610 }
607611
608612
609613 func refreshDLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
610614 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
611615 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
612616 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
613617 let updatedDLp = calcDLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
614618 let actions = [IntegerEntry(keyDLpRefreshedHeight, height), StringEntry(keyDLp, toString(updatedDLp))]
615619 $Tuple2(actions, updatedDLp)
616620 }
617621
618622
619623 func validateUpdatedDLp (oldDLp,updatedDLp) = if ((updatedDLp >= oldDLp))
620624 then true
621625 else throwErr("updated DLp lower than current DLp")
622626
623627
624628 func validateMatcherOrderAllowed (order) = {
625629 let amountAssetBalance = getAccBalance(assetIdToString(cfgAmountAssetId))
626630 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
627631 let amountAssetAmount = order.amount
628632 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
629- let $t02470024912 = if ((order.orderType == Buy))
633+ let $t02489825110 = if ((order.orderType == Buy))
630634 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
631635 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
632- let amountAssetBalanceDelta = $t02470024912._1
633- let priceAssetBalanceDelta = $t02470024912._2
636+ let amountAssetBalanceDelta = $t02489825110._1
637+ let priceAssetBalanceDelta = $t02489825110._2
634638 if (if (if (igs())
635639 then true
636640 else (cfgPoolStatus == PoolMatcherDis))
637641 then true
638642 else (cfgPoolStatus == PoolShutdown))
639643 then throw("Admin blocked")
640644 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
641645 then true
642646 else (order.assetPair.priceAsset != cfgPriceAssetId))
643647 then throw("Wr assets")
644648 else {
645649 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
646- let $t02525425354 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
647- let unusedActions = $t02525425354._1
648- let dLpNew = $t02525425354._2
650+ let $t02545225552 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
651+ let unusedActions = $t02545225552._1
652+ let dLpNew = $t02545225552._2
649653 let isOrderValid = (dLpNew >= dLp)
650654 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
651655 $Tuple2(isOrderValid, info)
652656 }
653657 }
654658
655659
656660 func cg (i) = if ((size(i.payments) != 1))
657661 then throw("1 pmnt exp")
658662 else {
659663 let pmt = value(i.payments[0])
660664 let pmtAssetId = value(pmt.assetId)
661665 let pmtAmt = pmt.amount
662666 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
663667 let outAmAmt = r._1
664668 let outPrAmt = r._2
665669 let sts = parseIntValue(r._9)
666670 let state = r._10
667671 if (if (igs())
668672 then true
669673 else (sts == PoolShutdown))
670674 then throw(("Admin blocked: " + toString(sts)))
671675 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
672676 }
673677
674678
675679 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
676680 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
677681 let sts = parseIntValue(r._8)
678682 if (if (if (igs())
679683 then true
680684 else (sts == PoolPutDis))
681685 then true
682686 else (sts == PoolShutdown))
683687 then throw(("Blocked:" + toString(sts)))
684688 else r
685689 }
686690
687691
688692 func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = {
689693 let amId = toBase58String(value(cfgAmountAssetId))
690694 let prId = toBase58String(value(cfgPriceAssetId))
691695 let lpId = cfgLpAssetId
692696 let amtDcm = cfgAmountAssetDecimals
693697 let priceDcm = cfgPriceAssetDecimals
694698 let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(lpId), "invalid lp asset").quantity)
695699 let chechEmission = if ((lpAssetEmission > big0))
696700 then true
697701 else throw("initial deposit requires all coins")
698702 if ((chechEmission == chechEmission))
699703 then {
700704 let amBalance = getAccBalance(amId)
701705 let prBalance = getAccBalance(prId)
702- let $t02801028472 = if ((txId == ""))
706+ let $t02820828670 = if ((txId == ""))
703707 then $Tuple2(amBalance, prBalance)
704708 else if ((pmtAssetId == amId))
705709 then if ((pmtAmtRaw > amBalance))
706710 then throw("invalid payment amount")
707711 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
708712 else if ((pmtAssetId == prId))
709713 then if ((pmtAmtRaw > prBalance))
710714 then throw("invalid payment amount")
711715 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
712716 else throw("wrong pmtAssetId")
713- let amBalanceOld = $t02801028472._1
714- let prBalanceOld = $t02801028472._2
715- let $t02847828654 = if ((pmtAssetId == amId))
717+ let amBalanceOld = $t02820828670._1
718+ let prBalanceOld = $t02820828670._2
719+ let $t02867628852 = if ((pmtAssetId == amId))
716720 then $Tuple2(pmtAmtRaw, 0)
717721 else if ((pmtAssetId == prId))
718722 then $Tuple2(0, pmtAmtRaw)
719723 else throw("invalid payment")
720- let amAmountRaw = $t02847828654._1
721- let prAmountRaw = $t02847828654._2
722- let $t02865828912 = if (withTakeFee)
724+ let amAmountRaw = $t02867628852._1
725+ let prAmountRaw = $t02867628852._2
726+ let $t02885629110 = if (withTakeFee)
723727 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
724728 else $Tuple3(amAmountRaw, prAmountRaw, 0)
725- let amAmount = $t02865828912._1
726- let prAmount = $t02865828912._2
727- let feeAmount = $t02865828912._3
729+ let amAmount = $t02885629110._1
730+ let prAmount = $t02885629110._2
731+ let feeAmount = $t02885629110._3
728732 let amBalanceNew = (amBalanceOld + amAmount)
729733 let prBalanceNew = (prBalanceOld + prAmount)
730734 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
731735 let D1 = getD([t1(amBalanceNew, cfgAmountAssetDecimals), t1(prBalanceNew, cfgPriceAssetDecimals)])
732736 let checkD = if ((D1 > D0))
733737 then true
734738 else throw()
735739 if ((checkD == checkD))
736740 then {
737741 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0, FLOOR)
738742 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
739743 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))]
740744 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
741745 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
742746 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
743747 let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
744748 let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
745749 $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
746750 }
747751 else throw("Strict value is not equal to itself.")
748752 }
749753 else throw("Strict value is not equal to itself.")
750754 }
751755
752756
753757 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
754758 let lpId = toBase58String(value(cfgLpAssetId))
755759 let amId = toBase58String(value(cfgAmountAssetId))
756760 let prId = toBase58String(value(cfgPriceAssetId))
757761 let amDecimals = cfgAmountAssetDecimals
758762 let prDecimals = cfgPriceAssetDecimals
759763 let poolStatus = cfgPoolStatus
760764 let userAddress = if ((caller == restContract))
761765 then originCaller
762766 else caller
763767 let pmt = value(payments[0])
764768 let pmtAssetId = value(pmt.assetId)
765769 let pmtAmt = pmt.amount
766770 let currentDLp = calcCurrentDLp(big0, big0, big0)
767771 if ((currentDLp == currentDLp))
768772 then {
769773 let txId58 = toBase58String(transactionId)
770774 if ((lpId != toBase58String(pmtAssetId)))
771775 then throw("Wrong LP")
772776 else {
773777 let amBalance = getAccBalance(amId)
774778 let prBalance = getAccBalance(prId)
775- let $t03102431135 = {
779+ let $t03122231333 = {
776780 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
777781 if ($isInstanceOf(@, "(Int, Int)"))
778782 then @
779783 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
780784 }
781- if (($t03102431135 == $t03102431135))
785+ if (($t03122231333 == $t03122231333))
782786 then {
783- let feeAmount = $t03102431135._2
784- let totalGet = $t03102431135._1
787+ let feeAmount = $t03122231333._2
788+ let totalGet = $t03122231333._1
785789 let totalAmount = if (if ((minOutAmount > 0))
786790 then (minOutAmount > totalGet)
787791 else false)
788792 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
789793 else totalGet
790- let $t03132531632 = if ((outAssetId == amId))
794+ let $t03152331830 = if ((outAssetId == amId))
791795 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
792796 else if ((outAssetId == prId))
793797 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
794798 else throw("invalid out asset id")
795- let outAm = $t03132531632._1
796- let outPr = $t03132531632._2
797- let amBalanceNew = $t03132531632._3
798- let prBalanceNew = $t03132531632._4
799+ let outAm = $t03152331830._1
800+ let outPr = $t03152331830._2
801+ let amBalanceNew = $t03152331830._3
802+ let prBalanceNew = $t03152331830._4
799803 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
800804 let curPr = f1(curPrX18, scale8)
801805 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
802806 then unit
803807 else fromBase58String(outAssetId)
804808 let sendFeeToMatcher = if ((feeAmount > 0))
805809 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
806810 else nil
807811 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)
808812 if ((state == state))
809813 then {
810814 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
811815 if ((burn == burn))
812816 then {
813- let $t03241732767 = {
817+ let $t03261532965 = {
814818 let feeAmountForCalc = if ((this == feeCollectorAddress))
815819 then 0
816820 else feeAmount
817821 let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId))
818822 then true
819823 else false
820824 if (outInAmountAsset)
821825 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
822826 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
823827 }
824- let amountAssetBalanceDelta = $t03241732767._1
825- let priceAssetBalanceDelta = $t03241732767._2
826- let $t03277032878 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
827- let refreshDLpActions = $t03277032878._1
828- let updatedDLp = $t03277032878._2
828+ let amountAssetBalanceDelta = $t03261532965._1
829+ let priceAssetBalanceDelta = $t03261532965._2
830+ let $t03296833076 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
831+ let refreshDLpActions = $t03296833076._1
832+ let updatedDLp = $t03296833076._2
829833 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
830834 if ((isUpdatedDLpValid == isUpdatedDLpValid))
831835 then $Tuple2((state ++ refreshDLpActions), totalAmount)
832836 else throw("Strict value is not equal to itself.")
833837 }
834838 else throw("Strict value is not equal to itself.")
835839 }
836840 else throw("Strict value is not equal to itself.")
837841 }
838842 else throw("Strict value is not equal to itself.")
839843 }
840844 }
841845 else throw("Strict value is not equal to itself.")
842846 }
843847
844848
845849 func m () = match getString(mpk()) {
846850 case s: String =>
847851 fromBase58String(s)
848852 case _: Unit =>
849853 unit
850854 case _ =>
851855 throw("Match error")
852856 }
853857
854858
855859 func pm () = match getString(pmpk()) {
856860 case s: String =>
857861 fromBase58String(s)
858862 case _: Unit =>
859863 unit
860864 case _ =>
861865 throw("Match error")
862866 }
863867
864868
865869 let pd = throw("Permission denied")
866870
867871 func isManager (i) = match m() {
868872 case pk: ByteVector =>
869873 (i.callerPublicKey == pk)
870874 case _: Unit =>
871875 (i.caller == this)
872876 case _ =>
873877 throw("Match error")
874878 }
875879
876880
877881 func mm (i) = match m() {
878882 case pk: ByteVector =>
879883 if ((i.callerPublicKey == pk))
880884 then true
881885 else pd
882886 case _: Unit =>
883887 if ((i.caller == this))
884888 then true
885889 else pd
886890 case _ =>
887891 throw("Match error")
888892 }
889893
890894
891895 func getY (isReverse,D,poolAmountInBalance) = {
892896 let poolConfig = gpc()
893897 let amId = poolConfig[idxAmAsId]
894898 let prId = poolConfig[idxPrAsId]
895899 let n = big2
896900 let aPrecision = parseBigIntValue(Amult)
897901 let a = (parseBigIntValue(A) * aPrecision)
898902 let xp = if ((isReverse == false))
899903 then [(toBigInt(getAccBalance(amId)) + poolAmountInBalance), toBigInt(getAccBalance(prId))]
900904 else [(toBigInt(getAccBalance(prId)) + poolAmountInBalance), toBigInt(getAccBalance(amId))]
901905 let x = xp[0]
902906 let s = x
903907 let ann = (a * n)
904908 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
905909 let b = ((s + ((D * aPrecision) / ann)) - D)
906910 func calc (acc,cur) = {
907- let $t03432534345 = acc
908- let y = $t03432534345._1
909- let found = $t03432534345._2
911+ let $t03452334543 = acc
912+ let y = $t03452334543._1
913+ let found = $t03452334543._2
910914 if ((found != unit))
911915 then acc
912916 else {
913917 let yNext = (((y * y) + c) / ((big2 * y) + b))
914918 let yDiff = absBigInt((yNext - value(y)))
915919 if ((big1 >= yDiff))
916920 then $Tuple2(yNext, cur)
917921 else $Tuple2(yNext, unit)
918922 }
919923 }
920924
921925 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
922- let $t03467634723 = {
926+ let $t03487434921 = {
923927 let $l = arr
924928 let $s = size($l)
925929 let $acc0 = $Tuple2(D, unit)
926930 func $f0_1 ($a,$i) = if (($i >= $s))
927931 then $a
928932 else calc($a, $l[$i])
929933
930934 func $f0_2 ($a,$i) = if (($i >= $s))
931935 then $a
932936 else throw("List size exceeds 15")
933937
934938 $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)
935939 }
936- let y = $t03467634723._1
937- let found = $t03467634723._2
940+ let y = $t03487434921._1
941+ let found = $t03487434921._2
938942 if ((found != unit))
939943 then y
940944 else throw(("Y calculation error, Y = " + toString(y)))
941945 }
942946
943947
944948 func skipOrderValidation () = valueOrElse(getBoolean(fca, keySkipOrderValidation(toString(this))), false)
945949
946950
947951 @Callable(i)
948952 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
949- let $t03507535499 = if ((isReverse == false))
953+ let $t03527335697 = if ((isReverse == false))
950954 then {
951955 let assetOut = strf(this, pa())
952956 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
953957 $Tuple2(assetOut, poolAmountInBalance)
954958 }
955959 else {
956960 let assetOut = strf(this, aa())
957961 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
958962 $Tuple2(assetOut, poolAmountInBalance)
959963 }
960- let assetOut = $t03507535499._1
961- let poolAmountInBalance = $t03507535499._2
964+ let assetOut = $t03527335697._1
965+ let poolAmountInBalance = $t03527335697._2
962966 let poolConfig = gpc()
963967 let amId = poolConfig[idxAmAsId]
964968 let prId = poolConfig[idxPrAsId]
965969 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
966970 let D = getD(xp)
967971 let y = getY(isReverse, D, toBigInt(cleanAmountIn))
968972 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
969973 let totalGetRaw = max([0, toInt(dy)])
970974 let newXp = if ((isReverse == false))
971975 then [((toBigInt(getAccBalance(amId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
972976 else [(toBigInt(getAccBalance(amId)) - dy), ((toBigInt(getAccBalance(prId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount))]
973977 let newD = getD(newXp)
974978 let checkD = if ((newD >= D))
975979 then true
976980 else throw(makeString(["new D is fewer error", toString(D), toString(newD)], "__"))
977981 if ((checkD == checkD))
978982 then $Tuple2(nil, totalGetRaw)
979983 else throw("Strict value is not equal to itself.")
980984 }
981985
982986
983987
984988 @Callable(i)
985989 func calculateAmountOutForSwapAndSendTokens (cleanAmountIn,isReverse,amountOutMin,addressTo,feePoolAmount) = {
986990 let swapContact = {
987991 let @ = invoke(fca, "getSwapContractREADONLY", nil, nil)
988992 if ($isInstanceOf(@, "String"))
989993 then @
990994 else throw(($getType(@) + " couldn't be cast to String"))
991995 }
992996 let checks = [if ((value(i.payments[0]).amount >= cleanAmountIn))
993997 then true
994998 else throwErr("Wrong amount"), if ((i.caller == addressFromStringValue(swapContact)))
995999 then true
9961000 else throwErr("Permission denied")]
9971001 if ((checks == checks))
9981002 then {
9991003 let pmt = value(i.payments[0])
10001004 let assetIn = assetIdToString(pmt.assetId)
1001- let $t03693537329 = if ((isReverse == false))
1005+ let $t03713337527 = if ((isReverse == false))
10021006 then {
10031007 let assetOut = strf(this, pa())
10041008 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10051009 $Tuple2(assetOut, poolAmountInBalance)
10061010 }
10071011 else {
10081012 let assetOut = strf(this, aa())
10091013 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10101014 $Tuple2(assetOut, poolAmountInBalance)
10111015 }
1012- let assetOut = $t03693537329._1
1013- let poolAmountInBalance = $t03693537329._2
1016+ let assetOut = $t03713337527._1
1017+ let poolAmountInBalance = $t03713337527._2
10141018 let poolConfig = gpc()
10151019 let amId = poolConfig[idxAmAsId]
10161020 let prId = poolConfig[idxPrAsId]
10171021 let xp = if ((isReverse == false))
10181022 then [(toBigInt(getAccBalance(amId)) - toBigInt(value(i.payments[0]).amount)), toBigInt(getAccBalance(prId))]
10191023 else [toBigInt(getAccBalance(amId)), (toBigInt(getAccBalance(prId)) - toBigInt(value(i.payments[0]).amount))]
10201024 let D = getD(xp)
10211025 let y = getY(isReverse, D, toBigInt(0))
10221026 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
10231027 let totalGetRaw = max([0, toInt(dy)])
10241028 let checkMin = if ((totalGetRaw >= amountOutMin))
10251029 then true
10261030 else throw("Exchange result is fewer coins than expected")
10271031 if ((checkMin == checkMin))
10281032 then {
10291033 let newXp = if ((isReverse == false))
10301034 then [(toBigInt(getAccBalance(amId)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
10311035 else [(toBigInt(getAccBalance(amId)) - dy), (toBigInt(getAccBalance(prId)) + toBigInt(feePoolAmount))]
10321036 let newD = getD(newXp)
10331037 let checkD = if ((newD >= D))
10341038 then true
10351039 else throw("new D is fewer error")
10361040 if ((checkD == checkD))
10371041 then $Tuple2([ScriptTransfer(addressFromStringValue(addressTo), totalGetRaw, parseAssetId(assetOut))], totalGetRaw)
10381042 else throw("Strict value is not equal to itself.")
10391043 }
10401044 else throw("Strict value is not equal to itself.")
10411045 }
10421046 else throw("Strict value is not equal to itself.")
10431047 }
10441048
10451049
10461050
10471051 @Callable(i)
10481052 func constructor (fc) = {
10491053 let c = mm(i)
10501054 if ((c == c))
10511055 then [StringEntry(fc(), fc)]
10521056 else throw("Strict value is not equal to itself.")
10531057 }
10541058
10551059
10561060
10571061 @Callable(i)
10581062 func setManager (pendingManagerPublicKey) = {
10591063 let c = mm(i)
10601064 if ((c == c))
10611065 then {
10621066 let cm = fromBase58String(pendingManagerPublicKey)
10631067 if ((cm == cm))
10641068 then [StringEntry(pmpk(), pendingManagerPublicKey)]
10651069 else throw("Strict value is not equal to itself.")
10661070 }
10671071 else throw("Strict value is not equal to itself.")
10681072 }
10691073
10701074
10711075
10721076 @Callable(i)
10731077 func confirmManager () = {
10741078 let p = pm()
10751079 let hpm = if (isDefined(p))
10761080 then true
10771081 else throw("No pending manager")
10781082 if ((hpm == hpm))
10791083 then {
10801084 let cpm = if ((i.callerPublicKey == value(p)))
10811085 then true
10821086 else throw("You are not pending manager")
10831087 if ((cpm == cpm))
10841088 then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())]
10851089 else throw("Strict value is not equal to itself.")
10861090 }
10871091 else throw("Strict value is not equal to itself.")
10881092 }
10891093
10901094
10911095
10921096 @Callable(i)
10931097 func put (slip,autoStake) = {
10941098 let factCfg = gfc()
10951099 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
10961100 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
10971101 if ((0 > slip))
10981102 then throw("Wrong slippage")
10991103 else if ((size(i.payments) != 2))
11001104 then throw("2 pmnts expd")
11011105 else {
11021106 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
11031107 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
11041108 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amAssetPmt)
11051109 if ((amountAssetBalance == amountAssetBalance))
11061110 then {
11071111 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - prAssetPmt)
11081112 if ((priceAssetBalance == priceAssetBalance))
11091113 then {
11101114 let lpAssetEmission = toBigInt(value(assetInfo(cfgLpAssetId)).quantity)
11111115 if ((lpAssetEmission == lpAssetEmission))
11121116 then {
11131117 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
11141118 if ((currentDLp == currentDLp))
11151119 then {
11161120 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, "")
11171121 let emitLpAmt = e._2
11181122 let lpAssetId = e._7
11191123 let state = e._9
11201124 let amDiff = e._10
11211125 let prDiff = e._11
11221126 let amId = e._12
11231127 let prId = e._13
11241128 let r = invoke(fca, "emit", [emitLpAmt], nil)
11251129 if ((r == r))
11261130 then {
11271131 let el = match r {
11281132 case legacy: Address =>
11291133 invoke(legacy, "emit", [emitLpAmt], nil)
11301134 case _ =>
11311135 unit
11321136 }
11331137 if ((el == el))
11341138 then {
11351139 let sa = if ((amDiff > 0))
11361140 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
11371141 else nil
11381142 if ((sa == sa))
11391143 then {
11401144 let sp = if ((prDiff > 0))
11411145 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
11421146 else nil
11431147 if ((sp == sp))
11441148 then {
11451149 let lpTrnsfr = if (autoStake)
11461150 then {
11471151 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
11481152 if ((ss == ss))
11491153 then nil
11501154 else throw("Strict value is not equal to itself.")
11511155 }
11521156 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1153- let $t04194842090 = refreshDLpInternal(0, 0, 0)
1154- let refreshDLpActions = $t04194842090._1
1155- let updatedDLp = $t04194842090._2
1157+ let $t04214642288 = refreshDLpInternal(0, 0, 0)
1158+ let refreshDLpActions = $t04214642288._1
1159+ let updatedDLp = $t04214642288._2
11561160 let check = if ((updatedDLp >= currentDLp))
11571161 then true
11581162 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
11591163 if ((check == check))
11601164 then {
11611165 let lpAssetEmissionAfter = value(assetInfo(cfgLpAssetId)).quantity
11621166 if ((lpAssetEmissionAfter == lpAssetEmissionAfter))
11631167 then ((state ++ lpTrnsfr) ++ refreshDLpActions)
11641168 else throw("Strict value is not equal to itself.")
11651169 }
11661170 else throw("Strict value is not equal to itself.")
11671171 }
11681172 else throw("Strict value is not equal to itself.")
11691173 }
11701174 else throw("Strict value is not equal to itself.")
11711175 }
11721176 else throw("Strict value is not equal to itself.")
11731177 }
11741178 else throw("Strict value is not equal to itself.")
11751179 }
11761180 else throw("Strict value is not equal to itself.")
11771181 }
11781182 else throw("Strict value is not equal to itself.")
11791183 }
11801184 else throw("Strict value is not equal to itself.")
11811185 }
11821186 else throw("Strict value is not equal to itself.")
11831187 }
11841188 }
11851189
11861190
11871191
11881192 @Callable(i)
11891193 func putOneTknV2 (minOutAmount,autoStake) = {
11901194 let isPoolOneTokenOperationsDisabled = {
11911195 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
11921196 if ($isInstanceOf(@, "Boolean"))
11931197 then @
11941198 else throw(($getType(@) + " couldn't be cast to Boolean"))
11951199 }
11961200 let isPutDisabled = if (if (if (igs())
11971201 then true
11981202 else (cfgPoolStatus == PoolPutDis))
11991203 then true
12001204 else (cfgPoolStatus == PoolShutdown))
12011205 then true
12021206 else isPoolOneTokenOperationsDisabled
12031207 let checks = [if (if (!(isPutDisabled))
12041208 then true
12051209 else isManager(i))
12061210 then true
12071211 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
12081212 then true
12091213 else throwErr("exactly 1 payment are expected")]
12101214 if ((checks == checks))
12111215 then {
12121216 let amId = toBase58String(value(cfgAmountAssetId))
12131217 let prId = toBase58String(value(cfgPriceAssetId))
12141218 let lpId = cfgLpAssetId
12151219 let amDecimals = cfgAmountAssetDecimals
12161220 let prDecimals = cfgPriceAssetDecimals
12171221 let userAddress = if ((i.caller == this))
12181222 then i.originCaller
12191223 else i.caller
12201224 let pmt = value(i.payments[0])
12211225 let pmtAssetId = toBase58String(value(pmt.assetId))
12221226 let pmtAmt = pmt.amount
12231227 let currentDLp = if ((pmt.assetId == cfgAmountAssetId))
12241228 then calcCurrentDLp(toBigInt(pmtAmt), toBigInt(0), toBigInt(0))
12251229 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12261230 if ((currentDLp == currentDLp))
12271231 then {
1228- let $t04373143889 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1229- if (($t04373143889 == $t04373143889))
1232+ let $t04392944087 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1233+ if (($t04392944087 == $t04392944087))
12301234 then {
1231- let feeAmount = $t04373143889._3
1232- let state = $t04373143889._2
1233- let estimLP = $t04373143889._1
1235+ let feeAmount = $t04392944087._3
1236+ let state = $t04392944087._2
1237+ let estimLP = $t04392944087._1
12341238 let emitLpAmt = if (if ((minOutAmount > 0))
12351239 then (minOutAmount > estimLP)
12361240 else false)
12371241 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
12381242 else estimLP
12391243 let e = invoke(fca, "emit", [emitLpAmt], nil)
12401244 if ((e == e))
12411245 then {
12421246 let el = match e {
12431247 case legacy: Address =>
12441248 invoke(legacy, "emit", [emitLpAmt], nil)
12451249 case _ =>
12461250 unit
12471251 }
12481252 if ((el == el))
12491253 then {
12501254 let lpTrnsfr = if (autoStake)
12511255 then {
12521256 let ss = invoke(stakingContract, "stakeFor", [toString(i.caller)], [AttachedPayment(lpId, emitLpAmt)])
12531257 if ((ss == ss))
12541258 then nil
12551259 else throw("Strict value is not equal to itself.")
12561260 }
12571261 else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
12581262 let sendFeeToMatcher = if ((feeAmount > 0))
12591263 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12601264 else nil
1261- let $t04477445123 = if ((this == feeCollectorAddress))
1265+ let $t04497245321 = if ((this == feeCollectorAddress))
12621266 then $Tuple2(0, 0)
12631267 else {
12641268 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12651269 then true
12661270 else false
12671271 if (paymentInAmountAsset)
12681272 then $Tuple2(-(feeAmount), 0)
12691273 else $Tuple2(0, -(feeAmount))
12701274 }
1271- let amountAssetBalanceDelta = $t04477445123._1
1272- let priceAssetBalanceDelta = $t04477445123._2
1273- let $t04512645234 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1274- let refreshDLpActions = $t04512645234._1
1275- let updatedDLp = $t04512645234._2
1275+ let amountAssetBalanceDelta = $t04497245321._1
1276+ let priceAssetBalanceDelta = $t04497245321._2
1277+ let $t04532445432 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1278+ let refreshDLpActions = $t04532445432._1
1279+ let updatedDLp = $t04532445432._2
12761280 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12771281 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12781282 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
12791283 else throw("Strict value is not equal to itself.")
12801284 }
12811285 else throw("Strict value is not equal to itself.")
12821286 }
12831287 else throw("Strict value is not equal to itself.")
12841288 }
12851289 else throw("Strict value is not equal to itself.")
12861290 }
12871291 else throw("Strict value is not equal to itself.")
12881292 }
12891293 else throw("Strict value is not equal to itself.")
12901294 }
12911295
12921296
12931297
12941298 @Callable(i)
12951299 func putForFree (maxSlpg) = if ((0 > maxSlpg))
12961300 then throw("Wrong slpg")
12971301 else if ((size(i.payments) != 2))
12981302 then throw("2 pmnts expd")
12991303 else {
13001304 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, "")
13011305 let state = estPut._9
13021306 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
13031307 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
13041308 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
13051309 if ((currentDLp == currentDLp))
13061310 then {
1307- let $t04626446329 = refreshDLpInternal(0, 0, 0)
1308- let refreshDLpActions = $t04626446329._1
1309- let updatedDLp = $t04626446329._2
1311+ let $t04646246527 = refreshDLpInternal(0, 0, 0)
1312+ let refreshDLpActions = $t04646246527._1
1313+ let updatedDLp = $t04646246527._2
13101314 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13111315 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13121316 then (state ++ refreshDLpActions)
13131317 else throw("Strict value is not equal to itself.")
13141318 }
13151319 else throw("Strict value is not equal to itself.")
13161320 }
13171321
13181322
13191323
13201324 @Callable(i)
13211325 func get () = {
13221326 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
13231327 if ((currentDLp == currentDLp))
13241328 then {
13251329 let r = cg(i)
13261330 let outAmtAmt = r._1
13271331 let outPrAmt = r._2
13281332 let pmtAmt = r._3
13291333 let pmtAssetId = r._4
13301334 let state = r._5
13311335 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13321336 if ((b == b))
13331337 then {
1334- let $t04750247584 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1335- let refreshDLpActions = $t04750247584._1
1336- let updatedDLp = $t04750247584._2
1338+ let $t04770047782 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1339+ let refreshDLpActions = $t04770047782._1
1340+ let updatedDLp = $t04770047782._2
13371341 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13381342 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13391343 then (state ++ refreshDLpActions)
13401344 else throw("Strict value is not equal to itself.")
13411345 }
13421346 else throw("Strict value is not equal to itself.")
13431347 }
13441348 else throw("Strict value is not equal to itself.")
13451349 }
13461350
13471351
13481352
13491353 @Callable(i)
13501354 func getOneTknV2 (outAssetId,minOutAmount) = {
13511355 let isPoolOneTokenOperationsDisabled = {
13521356 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
13531357 if ($isInstanceOf(@, "Boolean"))
13541358 then @
13551359 else throw(($getType(@) + " couldn't be cast to Boolean"))
13561360 }
13571361 let isGetDisabled = if (if (igs())
13581362 then true
13591363 else (cfgPoolStatus == PoolShutdown))
13601364 then true
13611365 else isPoolOneTokenOperationsDisabled
13621366 let checks = [if (if (!(isGetDisabled))
13631367 then true
13641368 else isManager(i))
13651369 then true
13661370 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
13671371 then true
13681372 else throwErr("exactly 1 payment are expected")]
13691373 if ((checks == checks))
13701374 then {
1371- let $t04820248357 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1372- let state = $t04820248357._1
1373- let totalAmount = $t04820248357._2
1375+ let $t04840048555 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1376+ let state = $t04840048555._1
1377+ let totalAmount = $t04840048555._2
13741378 $Tuple2(state, totalAmount)
13751379 }
13761380 else throw("Strict value is not equal to itself.")
13771381 }
13781382
13791383
13801384
13811385 @Callable(i)
13821386 func refreshDLp () = {
13831387 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyDLpRefreshedHeight), 0)
13841388 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= dLpRefreshDelay))
13851389 then unit
13861390 else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], ""))
13871391 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13881392 then {
13891393 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1390- let $t04888148945 = refreshDLpInternal(0, 0, 0)
1391- let dLpUpdateActions = $t04888148945._1
1392- let updatedDLp = $t04888148945._2
1394+ let $t04907949143 = refreshDLpInternal(0, 0, 0)
1395+ let dLpUpdateActions = $t04907949143._1
1396+ let updatedDLp = $t04907949143._2
13931397 let actions = if ((dLp != updatedDLp))
13941398 then dLpUpdateActions
13951399 else throwErr("nothing to refresh")
13961400 $Tuple2(actions, toString(updatedDLp))
13971401 }
13981402 else throw("Strict value is not equal to itself.")
13991403 }
14001404
14011405
14021406
14031407 @Callable(i)
14041408 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
14051409 let amId = toBase58String(value(cfgAmountAssetId))
14061410 let prId = toBase58String(value(cfgPriceAssetId))
14071411 let lpId = toBase58String(value(cfgLpAssetId))
14081412 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
14091413 let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
14101414 let D0 = getD(xp)
14111415 let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
14121416 let index = if ((outAssetId == amId))
14131417 then 0
14141418 else if ((outAssetId == prId))
14151419 then 1
14161420 else throw("invalid out asset id")
14171421 let newY = getYD(xp, index, D1)
14181422 let dy = (xp[index] - newY)
14191423 let totalGetRaw = max([0, toInt((dy - big1))])
1420- let $t04995550010 = takeFee(totalGetRaw, outFee)
1421- let totalGet = $t04995550010._1
1422- let feeAmount = $t04995550010._2
1424+ let $t05015350208 = takeFee(totalGetRaw, outFee)
1425+ let totalGet = $t05015350208._1
1426+ let feeAmount = $t05015350208._2
14231427 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14241428 }
14251429
14261430
14271431
14281432 @Callable(i)
14291433 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
14301434 let amId = toBase58String(value(cfgAmountAssetId))
14311435 let prId = toBase58String(value(cfgPriceAssetId))
14321436 let lpId = toBase58String(value(cfgLpAssetId))
14331437 let amBalance = getAccBalance(amId)
14341438 let prBalance = getAccBalance(prId)
1435- let $t05038550500 = {
1439+ let $t05058350698 = {
14361440 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14371441 if ($isInstanceOf(@, "(Int, Int)"))
14381442 then @
14391443 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14401444 }
1441- let totalGet = $t05038550500._1
1442- let feeAmount = $t05038550500._2
1445+ let totalGet = $t05058350698._1
1446+ let feeAmount = $t05058350698._2
14431447 let r = ego("", lpId, lpAssetAmount, this)
14441448 let outAmAmt = r._1
14451449 let outPrAmt = r._2
14461450 let sumOfGetAssets = (outAmAmt + outPrAmt)
14471451 let bonus = if ((sumOfGetAssets == 0))
14481452 then if ((totalGet == 0))
14491453 then 0
14501454 else throw("bonus calculation error")
14511455 else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
14521456 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
14531457 }
14541458
14551459
14561460
14571461 @Callable(i)
14581462 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
14591463 let r = cg(i)
14601464 let outAmAmt = r._1
14611465 let outPrAmt = r._2
14621466 let pmtAmt = r._3
14631467 let pmtAssetId = r._4
14641468 let state = r._5
14651469 if ((noLessThenAmtAsset > outAmAmt))
14661470 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
14671471 else if ((noLessThenPriceAsset > outPrAmt))
14681472 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
14691473 else {
14701474 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14711475 if ((currentDLp == currentDLp))
14721476 then {
14731477 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14741478 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14751479 then {
1476- let $t05166651747 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1477- let refreshDLpActions = $t05166651747._1
1478- let updatedDLp = $t05166651747._2
1480+ let $t05186451945 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1481+ let refreshDLpActions = $t05186451945._1
1482+ let updatedDLp = $t05186451945._2
14791483 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14801484 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14811485 then (state ++ refreshDLpActions)
14821486 else throw("Strict value is not equal to itself.")
14831487 }
14841488 else throw("Strict value is not equal to itself.")
14851489 }
14861490 else throw("Strict value is not equal to itself.")
14871491 }
14881492 }
14891493
14901494
14911495
14921496 @Callable(i)
14931497 func unstakeAndGet (amount) = {
14941498 let checkPayments = if ((size(i.payments) != 0))
14951499 then throw("No pmnts expd")
14961500 else true
14971501 if ((checkPayments == checkPayments))
14981502 then {
14991503 let factoryCfg = gfc()
15001504 let lpAssetId = cfgLpAssetId
15011505 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
15021506 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15031507 if ((currentDLp == currentDLp))
15041508 then {
15051509 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
15061510 if ((unstakeInv == unstakeInv))
15071511 then {
15081512 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
15091513 let outAmAmt = r._1
15101514 let outPrAmt = r._2
15111515 let sts = parseIntValue(r._9)
15121516 let state = r._10
15131517 let v = if (if (igs())
15141518 then true
15151519 else (sts == PoolShutdown))
15161520 then throw(("Blocked: " + toString(sts)))
15171521 else true
15181522 if ((v == v))
15191523 then {
15201524 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15211525 if ((burnA == burnA))
15221526 then {
1523- let $t05277452855 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1524- let refreshDLpActions = $t05277452855._1
1525- let updatedDLp = $t05277452855._2
1527+ let $t05297253053 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1528+ let refreshDLpActions = $t05297253053._1
1529+ let updatedDLp = $t05297253053._2
15261530 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15271531 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15281532 then (state ++ refreshDLpActions)
15291533 else throw("Strict value is not equal to itself.")
15301534 }
15311535 else throw("Strict value is not equal to itself.")
15321536 }
15331537 else throw("Strict value is not equal to itself.")
15341538 }
15351539 else throw("Strict value is not equal to itself.")
15361540 }
15371541 else throw("Strict value is not equal to itself.")
15381542 }
15391543 else throw("Strict value is not equal to itself.")
15401544 }
15411545
15421546
15431547
15441548 @Callable(i)
15451549 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
15461550 let isGetDisabled = if (igs())
15471551 then true
15481552 else (cfgPoolStatus == PoolShutdown)
15491553 let checks = [if (!(isGetDisabled))
15501554 then true
15511555 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
15521556 then true
15531557 else throw("no payments are expected")]
15541558 if ((checks == checks))
15551559 then {
15561560 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15571561 if ((currentDLp == currentDLp))
15581562 then {
15591563 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
15601564 if ((unstakeInv == unstakeInv))
15611565 then {
15621566 let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
15631567 let outAmAmt = res._1
15641568 let outPrAmt = res._2
15651569 let state = res._10
15661570 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
15671571 then true
15681572 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
15691573 then true
15701574 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
15711575 if ((checkAmounts == checkAmounts))
15721576 then {
15731577 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15741578 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15751579 then {
1576- let $t05410654187 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1577- let refreshDLpActions = $t05410654187._1
1578- let updatedDLp = $t05410654187._2
1580+ let $t05430454385 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1581+ let refreshDLpActions = $t05430454385._1
1582+ let updatedDLp = $t05430454385._2
15791583 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15801584 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15811585 then (state ++ refreshDLpActions)
15821586 else throw("Strict value is not equal to itself.")
15831587 }
15841588 else throw("Strict value is not equal to itself.")
15851589 }
15861590 else throw("Strict value is not equal to itself.")
15871591 }
15881592 else throw("Strict value is not equal to itself.")
15891593 }
15901594 else throw("Strict value is not equal to itself.")
15911595 }
15921596 else throw("Strict value is not equal to itself.")
15931597 }
15941598
15951599
15961600
15971601 @Callable(i)
15981602 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
15991603 let isPoolOneTokenOperationsDisabled = {
16001604 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
16011605 if ($isInstanceOf(@, "Boolean"))
16021606 then @
16031607 else throw(($getType(@) + " couldn't be cast to Boolean"))
16041608 }
16051609 let isGetDisabled = if (if (igs())
16061610 then true
16071611 else (cfgPoolStatus == PoolShutdown))
16081612 then true
16091613 else isPoolOneTokenOperationsDisabled
16101614 let checks = [if (if (!(isGetDisabled))
16111615 then true
16121616 else isManager(i))
16131617 then true
16141618 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
16151619 then true
16161620 else throwErr("no payments are expected")]
16171621 if ((checks == checks))
16181622 then {
16191623 let factoryCfg = gfc()
16201624 let lpAssetId = cfgLpAssetId
16211625 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
16221626 let userAddress = i.caller
16231627 let lpAssetRecipientAddress = this
16241628 let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
16251629 if ((unstakeInv == unstakeInv))
16261630 then {
1627- let $t05520955397 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1628- let state = $t05520955397._1
1629- let totalAmount = $t05520955397._2
1631+ let $t05540755595 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1632+ let state = $t05540755595._1
1633+ let totalAmount = $t05540755595._2
16301634 $Tuple2(state, totalAmount)
16311635 }
16321636 else throw("Strict value is not equal to itself.")
16331637 }
16341638 else throw("Strict value is not equal to itself.")
16351639 }
16361640
16371641
16381642
16391643 @Callable(i)
16401644 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1641- let $t05552555628 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1642- let lpAmount = $t05552555628._1
1643- let state = $t05552555628._2
1644- let feeAmount = $t05552555628._3
1645- let bonus = $t05552555628._4
1645+ let $t05572355826 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1646+ let lpAmount = $t05572355826._1
1647+ let state = $t05572355826._2
1648+ let feeAmount = $t05572355826._3
1649+ let bonus = $t05572355826._4
16461650 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16471651 }
16481652
16491653
16501654
16511655 @Callable(i)
16521656 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1653- let $t05577655880 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1654- let lpAmount = $t05577655880._1
1655- let state = $t05577655880._2
1656- let feeAmount = $t05577655880._3
1657- let bonus = $t05577655880._4
1657+ let $t05597456078 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1658+ let lpAmount = $t05597456078._1
1659+ let state = $t05597456078._2
1660+ let feeAmount = $t05597456078._3
1661+ let bonus = $t05597456078._4
16581662 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16591663 }
16601664
16611665
16621666
16631667 @Callable(i)
16641668 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
16651669 then throw("denied")
1666- else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr), StringEntry(amp(), toString(ampInitial))], "success")
1670+ else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
16671671
16681672
16691673
16701674 @Callable(i)
16711675 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
16721676
16731677
16741678
16751679 @Callable(i)
16761680 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
16771681
16781682
16791683
16801684 @Callable(i)
16811685 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
16821686 let pr = calcPrices(amAmt, prAmt, lpAmt)
16831687 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
16841688 }
16851689
16861690
16871691
16881692 @Callable(i)
16891693 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
16901694
16911695
16921696
16931697 @Callable(i)
16941698 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
16951699
16961700
16971701
16981702 @Callable(i)
16991703 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
17001704
17011705
17021706
17031707 @Callable(i)
17041708 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, ""))
17051709
17061710
17071711
17081712 @Callable(i)
17091713 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
17101714 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
17111715 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
17121716 }
17131717
17141718
17151719
17161720 @Callable(i)
17171721 func changeAmp () = {
17181722 let cfg = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1719- let $t05828958488 = match cfg {
1723+ let $t05843258631 = match cfg {
17201724 case list: List[Any] =>
17211725 $Tuple3({
17221726 let @ = list[0]
17231727 if ($isInstanceOf(@, "Int"))
17241728 then @
17251729 else throw(($getType(@) + " couldn't be cast to Int"))
17261730 }, {
17271731 let @ = list[1]
17281732 if ($isInstanceOf(@, "Int"))
17291733 then @
17301734 else throw(($getType(@) + " couldn't be cast to Int"))
17311735 }, {
17321736 let @ = list[2]
17331737 if ($isInstanceOf(@, "Int"))
17341738 then @
17351739 else throw(($getType(@) + " couldn't be cast to Int"))
17361740 })
17371741 case _ =>
17381742 throwErr("invalid entry type")
17391743 }
1740- let delay = $t05828958488._1
1741- let delta = $t05828958488._2
1742- let target = $t05828958488._3
1744+ let delay = $t05843258631._1
1745+ let delta = $t05843258631._2
1746+ let target = $t05843258631._3
17431747 let curAmp = parseIntValue(getStringValue(amp()))
17441748 let newAmpRaw = (curAmp + delta)
17451749 let newAmp = if ((0 > delta))
17461750 then if ((target > newAmpRaw))
17471751 then target
17481752 else newAmpRaw
17491753 else if ((newAmpRaw > target))
17501754 then target
17511755 else newAmpRaw
17521756 let lastCall = valueOrElse(getInteger(keyChangeAmpLastCall()), 0)
17531757 let wait = (lastCall + delay)
17541758 let checks = [if ((height > wait))
17551759 then true
17561760 else throwErr("try again in few blocks"), if ((curAmp != newAmp))
17571761 then true
17581762 else throwErr("already reached target")]
17591763 if ((checks == checks))
17601764 then [IntegerEntry(keyChangeAmpLastCall(), height), StringEntry(amp(), toString(newAmp)), StringEntry(keyAmpHistory(height), toString(newAmp))]
17611765 else throw("Strict value is not equal to itself.")
17621766 }
17631767
17641768
17651769 @Verifier(tx)
17661770 func verify () = {
17671771 let targetPublicKey = match m() {
17681772 case pk: ByteVector =>
17691773 pk
17701774 case _: Unit =>
17711775 tx.senderPublicKey
17721776 case _ =>
17731777 throw("Match error")
17741778 }
17751779 match tx {
17761780 case order: Order =>
17771781 let matcherPub = mp()
1778- let $t05940059517 = if (skipOrderValidation())
1782+ let $t05954359660 = if (skipOrderValidation())
17791783 then $Tuple2(true, "")
17801784 else validateMatcherOrderAllowed(order)
1781- let orderValid = $t05940059517._1
1782- let orderValidInfo = $t05940059517._2
1785+ let orderValid = $t05954359660._1
1786+ let orderValidInfo = $t05954359660._2
17831787 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17841788 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17851789 if (if (if (orderValid)
17861790 then senderValid
17871791 else false)
17881792 then matcherValid
17891793 else false)
17901794 then true
17911795 else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
17921796 case s: SetScriptTransaction =>
17931797 if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
17941798 then true
17951799 else {
17961800 let newHash = blake2b256(value(s.script))
17971801 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
17981802 let currentHash = scriptHash(this)
17991803 if ((allowedHash == newHash))
18001804 then (currentHash != newHash)
18011805 else false
18021806 }
18031807 case _ =>
18041808 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
18051809 }
18061810 }
18071811

github/deemru/w8io/026f985 
246.19 ms