tx · 7x6iboFTkL424tAYvrX7d34eUgZe2JMyAM6u2maXdMGv

3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA:  -0.03600000 Waves

2022.12.16 12:17 [2362665] smart account 3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA > SELF 0.00000000 Waves

{ "type": 13, "id": "7x6iboFTkL424tAYvrX7d34eUgZe2JMyAM6u2maXdMGv", "fee": 3600000, "feeAssetId": null, "timestamp": 1671182155784, "version": 1, "sender": "3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA", "senderPublicKey": "35yd3qw1gxKDxKwGAykHN9fANbXNWwseaUwbWDj24o3x", "proofs": [ "FzJA6CTZQCfZwsnbQ4Up51AttkG8uK6vHVV6EyQTikLjUxR21WNk26EZ1mvnTgj692TU1JCwpmeubGpeo4FbrA4" ], "script": "base64:BgLNKAgCEgMKAQgSAwoBCBIAEgQKAgEEEgQKAgEEEgMKAQESABIECgIIARIAEgQKAggBEgQKAggBEgQKAgEBEgMKAQESBQoDAQEBEgUKAwEIARIECgIBCBIECgIBCBIECgIICBIECgIICBIECgIIARIAEgMKAQgSBQoDAQEBEgQKAggBEgQKAgEBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEIEgAiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgRiaWcwIgRiaWcxIgRiaWcyIgRiaWczIgRiaWc0IgpzbGlwcGFnZTREIgt3YXZlc1N0cmluZyIFQW11bHQiBURjb252IgNTRVAiBUVNUFRZIgpQb29sQWN0aXZlIgpQb29sUHV0RGlzIg5Qb29sTWF0Y2hlckRpcyIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyIJaWR4UG9vbFN0IglpZHhMUEFzSWQiCWlkeEFtQXNJZCIJaWR4UHJBc0lkIgtpZHhBbXRBc0RjbSINaWR4UHJpY2VBc0RjbSILaWR4SUFtdEFzSWQiDWlkeElQcmljZUFzSWQiD2lkeEZ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icationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Ggs7nRcTTQA3dSEFufoq7y44V4qCyG3NqTFGMJooTKw Next: 2hTmsaGUW3EFaABBUbkxfF9dPYX9UKq6MGd83K7jJHiE Diff:
OldNewDifferences
7171
7272
7373 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
74-
75-
76-func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
7774
7875
7976 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
216213
217214 let poolConfigParsed = parsePoolConfig(gpc())
218215
219-let $t074067592 = poolConfigParsed
216+let $t072557441 = poolConfigParsed
220217
221-let cfgPoolAddress = $t074067592._1
218+let cfgPoolAddress = $t072557441._1
222219
223-let cfgPoolStatus = $t074067592._2
220+let cfgPoolStatus = $t072557441._2
224221
225-let cfgLpAssetId = $t074067592._3
222+let cfgLpAssetId = $t072557441._3
226223
227-let cfgAmountAssetId = $t074067592._4
224+let cfgAmountAssetId = $t072557441._4
228225
229-let cfgPriceAssetId = $t074067592._5
226+let cfgPriceAssetId = $t072557441._5
230227
231-let cfgAmountAssetDecimals = $t074067592._6
228+let cfgAmountAssetDecimals = $t072557441._6
232229
233-let cfgPriceAssetDecimals = $t074067592._7
230+let cfgPriceAssetDecimals = $t072557441._7
234231
235232 func gfc () = split(strf(fca, fcfg()), SEP)
236233
334331 let lpEmissX18 = t1(lpEmiss, scale8)
335332 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
336333 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
337- let outAmAmt = fromX18Round(outAmAmtX18, amDcm, FLOOR)
338- let outPrAmt = fromX18Round(outPrAmtX18, prDcm, FLOOR)
334+ let outAmAmt = f1(outAmAmtX18, amDcm)
335+ let outPrAmt = f1(outPrAmtX18, prDcm)
339336 let state = if ((txId58 == ""))
340337 then nil
341338 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
409406 let expAmtAssetAmtX18 = expectedAmts._1
410407 let expPriceAssetAmtX18 = expectedAmts._2
411408 let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18)
412- $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18)
409+ $Tuple5(f1(lpAmtX18, scale8), f1(expAmtAssetAmtX18, amtDcm), f1(expPriceAssetAmtX18, priceDcm), curPriceX18, slippageX18)
413410 }
414411 }
415412 let calcLpAmt = r._1
425422 else calcLpAmt
426423 let amDiff = (inAmAmt - calcAmAssetPmt)
427424 let prDiff = (inPrAmt - calcPrAssetPmt)
428- let $t01811218457 = if (if (isOneAsset)
425+ let $t01787218217 = if (if (isOneAsset)
429426 then (pmtId == amIdStr)
430427 else false)
431428 then $Tuple2(pmtAmt, 0)
434431 else false)
435432 then $Tuple2(0, pmtAmt)
436433 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
437- let writeAmAmt = $t01811218457._1
438- let writePrAmt = $t01811218457._2
434+ let writeAmAmt = $t01787218217._1
435+ let writePrAmt = $t01787218217._2
439436 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))]
440437 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
441438 }
477474 }
478475
479476 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
480- let $t02038520433 = {
477+ let $t02014520193 = {
481478 let $l = arr
482479 let $s = size($l)
483480 let $acc0 = $Tuple2(s, false)
491488
492489 $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)
493490 }
494- let d = $t02038520433._1
495- let found = $t02038520433._2
491+ let d = $t02014520193._1
492+ let found = $t02014520193._2
496493 if (found)
497494 then d
498495 else throw(("D calculation error, D = " + toString(d)))
516513 let ann_aPrecision = (ann - aPrecision)
517514 let n1 = (n + big1)
518515 func calc (acc,cur) = {
519- let $t02106221082 = acc
520- let d = $t02106221082._1
521- let found = $t02106221082._2
516+ let $t02082220842 = acc
517+ let d = $t02082220842._1
518+ let found = $t02082220842._2
522519 if ((found != unit))
523520 then acc
524521 else {
532529 }
533530
534531 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
535- let $t02150321550 = {
532+ let $t02126321310 = {
536533 let $l = arr
537534 let $s = size($l)
538535 let $acc0 = $Tuple2(s, unit)
546543
547544 $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)
548545 }
549- let d = $t02150321550._1
550- let found = $t02150321550._2
546+ let d = $t02126321310._1
547+ let found = $t02126321310._2
551548 if ((found != unit))
552549 then d
553550 else throw(("D calculation error, D = " + toString(d)))
567564 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
568565 let b = ((s + ((D * aPrecision) / ann)) - D)
569566 func calc (acc,cur) = {
570- let $t02205022070 = acc
571- let y = $t02205022070._1
572- let found = $t02205022070._2
567+ let $t02181021830 = acc
568+ let y = $t02181021830._1
569+ let found = $t02181021830._2
573570 if ((found != unit))
574571 then acc
575572 else {
582579 }
583580
584581 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
585- let $t02237722424 = {
582+ let $t02213722184 = {
586583 let $l = arr
587584 let $s = size($l)
588585 let $acc0 = $Tuple2(D, unit)
596593
597594 $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)
598595 }
599- let y = $t02237722424._1
600- let found = $t02237722424._2
596+ let y = $t02213722184._1
597+ let found = $t02213722184._2
601598 if ((found != unit))
602599 then y
603600 else throw(("Y calculation error, Y = " + toString(y)))
639636 func validateMatcherOrderAllowed (order) = {
640637 let amountAssetAmount = order.amount
641638 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
642- let $t02436324575 = if ((order.orderType == Buy))
639+ let $t02412324335 = if ((order.orderType == Buy))
643640 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
644641 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
645- let amountAssetBalanceDelta = $t02436324575._1
646- let priceAssetBalanceDelta = $t02436324575._2
642+ let amountAssetBalanceDelta = $t02412324335._1
643+ let priceAssetBalanceDelta = $t02412324335._2
647644 if (if (if (igs())
648645 then true
649646 else (cfgPoolStatus == PoolMatcherDis))
656653 then throw("Wr assets")
657654 else {
658655 let dLp = parseBigIntValue(getStringValue(this, keyDLp))
659- let $t02490525005 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
660- let unusedActions = $t02490525005._1
661- let dLpNew = $t02490525005._2
656+ let $t02466524765 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
657+ let unusedActions = $t02466524765._1
658+ let dLpNew = $t02466524765._2
662659 let isOrderValid = (dLpNew >= dLp)
663660 isOrderValid
664661 }
712709 then {
713710 let amBalance = getAccBalance(amId)
714711 let prBalance = getAccBalance(prId)
715- let $t02732227784 = if ((txId == ""))
712+ let $t02708227544 = if ((txId == ""))
716713 then $Tuple2(amBalance, prBalance)
717714 else if ((pmtAssetId == amId))
718715 then if ((pmtAmtRaw > amBalance))
723720 then throw("invalid payment amount")
724721 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
725722 else throw("wrong pmtAssetId")
726- let amBalanceOld = $t02732227784._1
727- let prBalanceOld = $t02732227784._2
728- let $t02779027966 = if ((pmtAssetId == amId))
723+ let amBalanceOld = $t02708227544._1
724+ let prBalanceOld = $t02708227544._2
725+ let $t02755027726 = if ((pmtAssetId == amId))
729726 then $Tuple2(pmtAmtRaw, 0)
730727 else if ((pmtAssetId == prId))
731728 then $Tuple2(0, pmtAmtRaw)
732729 else throw("invalid payment")
733- let amAmountRaw = $t02779027966._1
734- let prAmountRaw = $t02779027966._2
735- let $t02797028209 = if (withTakeFee)
730+ let amAmountRaw = $t02755027726._1
731+ let prAmountRaw = $t02755027726._2
732+ let $t02773027969 = if (withTakeFee)
736733 then $Tuple3(takeFee(amAmountRaw)._1, takeFee(prAmountRaw)._1, takeFee(pmtAmtRaw)._2)
737734 else $Tuple3(amAmountRaw, prAmountRaw, 0)
738- let amAmount = $t02797028209._1
739- let prAmount = $t02797028209._2
740- let feeAmount = $t02797028209._3
735+ let amAmount = $t02773027969._1
736+ let prAmount = $t02773027969._2
737+ let feeAmount = $t02773027969._3
741738 let amBalanceNew = (amBalanceOld + amAmount)
742739 let prBalanceNew = (prBalanceOld + prAmount)
743740 let D0 = getD([toBigInt(amBalanceOld), toBigInt(prBalanceOld)])
777774 let pmt = value(payments[0])
778775 let pmtAssetId = value(pmt.assetId)
779776 let pmtAmt = pmt.amount
780- let currentDLp = calcCurrentDLp(big0, big0, toBigInt(pmtAmt))
777+ let currentDLp = calcCurrentDLp(big0, big0, big0)
781778 if ((currentDLp == currentDLp))
782779 then {
783780 let txId58 = toBase58String(transactionId)
786783 else {
787784 let amBalance = getAccBalance(amId)
788785 let prBalance = getAccBalance(prId)
789- let $t03028730398 = {
786+ let $t03003430145 = {
790787 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
791788 if ($isInstanceOf(@, "(Int, Int)"))
792789 then @
793790 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
794791 }
795- if (($t03028730398 == $t03028730398))
792+ if (($t03003430145 == $t03003430145))
796793 then {
797- let feeAmount = $t03028730398._2
798- let totalGet = $t03028730398._1
794+ let feeAmount = $t03003430145._2
795+ let totalGet = $t03003430145._1
799796 let totalAmount = if (if ((minOutAmount > 0))
800797 then (minOutAmount > totalGet)
801798 else false)
802799 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
803800 else totalGet
804- let $t03058830895 = if ((outAssetId == amId))
801+ let $t03033530642 = if ((outAssetId == amId))
805802 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
806803 else if ((outAssetId == prId))
807804 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
808805 else throw("invalid out asset id")
809- let outAm = $t03058830895._1
810- let outPr = $t03058830895._2
811- let amBalanceNew = $t03058830895._3
812- let prBalanceNew = $t03058830895._4
806+ let outAm = $t03033530642._1
807+ let outPr = $t03033530642._2
808+ let amBalanceNew = $t03033530642._3
809+ let prBalanceNew = $t03033530642._4
813810 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
814811 let curPr = f1(curPrX18, scale8)
815812 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
824821 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
825822 if ((burn == burn))
826823 then {
827- let $t03168032030 = {
824+ let $t03142731777 = {
828825 let feeAmountForCalc = if ((this == feeCollectorAddress))
829826 then 0
830827 else feeAmount
835832 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
836833 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
837834 }
838- let amountAssetBalanceDelta = $t03168032030._1
839- let priceAssetBalanceDelta = $t03168032030._2
840- let $t03203332141 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
841- let refreshDLpActions = $t03203332141._1
842- let updatedDLp = $t03203332141._2
835+ let amountAssetBalanceDelta = $t03142731777._1
836+ let priceAssetBalanceDelta = $t03142731777._2
837+ let $t03178031888 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
838+ let refreshDLpActions = $t03178031888._1
839+ let updatedDLp = $t03178031888._2
843840 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
844841 if ((isUpdatedDLpValid == isUpdatedDLpValid))
845842 then $Tuple2((state ++ refreshDLpActions), totalAmount)
959956 else {
960957 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
961958 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
962- let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amAssetPmt)
963- if ((amountAssetBalance == amountAssetBalance))
959+ let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
960+ if ((currentDLp == currentDLp))
964961 then {
965- let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - prAssetPmt)
966- if ((priceAssetBalance == priceAssetBalance))
962+ 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, "")
963+ let emitLpAmt = e._2
964+ let lpAssetId = e._7
965+ let state = e._9
966+ let amDiff = e._10
967+ let prDiff = e._11
968+ let amId = e._12
969+ let prId = e._13
970+ let r = invoke(fca, "emit", [emitLpAmt], nil)
971+ if ((r == r))
967972 then {
968- let lpAssetEmission = toBigInt(value(assetInfo(cfgLpAssetId)).quantity)
969- if ((lpAssetEmission == lpAssetEmission))
973+ let el = match r {
974+ case legacy: Address =>
975+ invoke(legacy, "emit", [emitLpAmt], nil)
976+ case _ =>
977+ unit
978+ }
979+ if ((el == el))
970980 then {
971- let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
972- if ((currentDLp == currentDLp))
981+ let sa = if ((amDiff > 0))
982+ then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
983+ else nil
984+ if ((sa == sa))
973985 then {
974- 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, "")
975- let emitLpAmt = e._2
976- let lpAssetId = e._7
977- let state = e._9
978- let amDiff = e._10
979- let prDiff = e._11
980- let amId = e._12
981- let prId = e._13
982- let r = invoke(fca, "emit", [emitLpAmt], nil)
983- if ((r == r))
986+ let sp = if ((prDiff > 0))
987+ then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
988+ else nil
989+ if ((sp == sp))
984990 then {
985- let el = match r {
986- case legacy: Address =>
987- invoke(legacy, "emit", [emitLpAmt], nil)
988- case _ =>
989- unit
990- }
991- if ((el == el))
991+ let lpTrnsfr = if (autoStake)
992992 then {
993- let sa = if ((amDiff > 0))
994- then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
995- else nil
996- if ((sa == sa))
997- then {
998- let sp = if ((prDiff > 0))
999- then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
1000- else nil
1001- if ((sp == sp))
1002- then {
1003- let lpTrnsfr = if (autoStake)
1004- then {
1005- let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
1006- if ((ss == ss))
1007- then nil
1008- else throw("Strict value is not equal to itself.")
1009- }
1010- else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1011- let $t03629036529 = refreshDLpInternal(0, 0, 0)
1012- let refreshDLpActions = $t03629036529._1
1013- let updatedDLp = $t03629036529._2
1014- let lpAssetEmissionAfter = value(assetInfo(cfgLpAssetId)).quantity
1015- if ((lpAssetEmissionAfter == lpAssetEmissionAfter))
1016- then {
1017- let error = if ((updatedDLp >= currentDLp))
1018- then true
1019- else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(emitLpAmt), toString(amDiff), toString(prDiff), toString(lpAssetEmission), toString(lpAssetEmissionAfter)], " "))
1020- if ((error == error))
1021- then ((state ++ lpTrnsfr) ++ refreshDLpActions)
1022- else throw("Strict value is not equal to itself.")
1023- }
1024- else throw("Strict value is not equal to itself.")
1025- }
1026- else throw("Strict value is not equal to itself.")
1027- }
993+ let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
994+ if ((ss == ss))
995+ then nil
1028996 else throw("Strict value is not equal to itself.")
1029997 }
998+ else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
999+ let $t03574435809 = refreshDLpInternal(0, 0, 0)
1000+ let refreshDLpActions = $t03574435809._1
1001+ let updatedDLp = $t03574435809._2
1002+ let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
1003+ if ((isUpdatedDLpValid == isUpdatedDLpValid))
1004+ then ((state ++ lpTrnsfr) ++ refreshDLpActions)
10301005 else throw("Strict value is not equal to itself.")
10311006 }
10321007 else throw("Strict value is not equal to itself.")
10791054 let pmt = value(i.payments[0])
10801055 let pmtAssetId = toBase58String(value(pmt.assetId))
10811056 let pmtAmt = pmt.amount
1082- let currentDLp = if ((pmt.assetId == cfgAmountAssetId))
1083- then calcCurrentDLp(toBigInt(pmtAmt), toBigInt(0), toBigInt(0))
1084- else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
1085- if ((currentDLp == currentDLp))
1057+ let $t03694637104 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1058+ if (($t03694637104 == $t03694637104))
10861059 then {
1087- let $t03832338481 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1088- if (($t03832338481 == $t03832338481))
1060+ let feeAmount = $t03694637104._3
1061+ let state = $t03694637104._2
1062+ let estimLP = $t03694637104._1
1063+ let emitLpAmt = if (if ((minOutAmount > 0))
1064+ then (minOutAmount > estimLP)
1065+ else false)
1066+ then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
1067+ else estimLP
1068+ let e = invoke(fca, "emit", [emitLpAmt], nil)
1069+ if ((e == e))
10891070 then {
1090- let feeAmount = $t03832338481._3
1091- let state = $t03832338481._2
1092- let estimLP = $t03832338481._1
1093- let emitLpAmt = if (if ((minOutAmount > 0))
1094- then (minOutAmount > estimLP)
1095- else false)
1096- then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
1097- else estimLP
1098- let e = invoke(fca, "emit", [emitLpAmt], nil)
1099- if ((e == e))
1071+ let el = match e {
1072+ case legacy: Address =>
1073+ invoke(legacy, "emit", [emitLpAmt], nil)
1074+ case _ =>
1075+ unit
1076+ }
1077+ if ((el == el))
11001078 then {
1101- let el = match e {
1102- case legacy: Address =>
1103- invoke(legacy, "emit", [emitLpAmt], nil)
1104- case _ =>
1105- unit
1106- }
1107- if ((el == el))
1079+ let lpTrnsfr = if (autoStake)
11081080 then {
1109- let lpTrnsfr = if (autoStake)
1110- then {
1111- let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)])
1112- if ((ss == ss))
1113- then nil
1114- else throw("Strict value is not equal to itself.")
1115- }
1116- else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
1117- let sendFeeToMatcher = if ((feeAmount > 0))
1118- then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
1119- else nil
1120- let $t03929639645 = if ((this == feeCollectorAddress))
1121- then $Tuple2(0, 0)
1122- else {
1123- let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
1124- then true
1125- else false
1126- if (paymentInAmountAsset)
1127- then $Tuple2(-(feeAmount), 0)
1128- else $Tuple2(0, -(feeAmount))
1129- }
1130- let amountAssetBalanceDelta = $t03929639645._1
1131- let priceAssetBalanceDelta = $t03929639645._2
1132- let $t03964839756 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1133- let refreshDLpActions = $t03964839756._1
1134- let updatedDLp = $t03964839756._2
1135- let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
1136- if ((isUpdatedDLpValid == isUpdatedDLpValid))
1137- then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
1081+ let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)])
1082+ if ((ss == ss))
1083+ then nil
11381084 else throw("Strict value is not equal to itself.")
11391085 }
1140- else throw("Strict value is not equal to itself.")
1086+ else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
1087+ let sendFeeToMatcher = if ((feeAmount > 0))
1088+ then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
1089+ else nil
1090+ let $t03791938268 = if ((this == feeCollectorAddress))
1091+ then $Tuple2(0, 0)
1092+ else {
1093+ let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
1094+ then true
1095+ else false
1096+ if (paymentInAmountAsset)
1097+ then $Tuple2(-(feeAmount), 0)
1098+ else $Tuple2(0, -(feeAmount))
1099+ }
1100+ let amountAssetBalanceDelta = $t03791938268._1
1101+ let priceAssetBalanceDelta = $t03791938268._2
1102+ let $t03827138379 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1103+ let refreshDLpActions = $t03827138379._1
1104+ let updatedDLp = $t03827138379._2
1105+ $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
11411106 }
11421107 else throw("Strict value is not equal to itself.")
11431108 }
11631128 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
11641129 if ((currentDLp == currentDLp))
11651130 then {
1166- let $t04078640851 = refreshDLpInternal(0, 0, 0)
1167- let refreshDLpActions = $t04078640851._1
1168- let updatedDLp = $t04078640851._2
1131+ let $t03933839403 = refreshDLpInternal(0, 0, 0)
1132+ let refreshDLpActions = $t03933839403._1
1133+ let updatedDLp = $t03933839403._2
11691134 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
11701135 if ((isUpdatedDLpValid == isUpdatedDLpValid))
11711136 then (state ++ refreshDLpActions)
11781143
11791144 @Callable(i)
11801145 func get () = {
1181- let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(value(i.payments[0]).amount))
1182- if ((currentDLp == currentDLp))
1146+ let r = cg(i)
1147+ let outAmtAmt = r._1
1148+ let outPrAmt = r._2
1149+ let pmtAmt = r._3
1150+ let pmtAssetId = r._4
1151+ let state = r._5
1152+ let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
1153+ if ((b == b))
11831154 then {
1184- let r = cg(i)
1185- let outAmtAmt = r._1
1186- let outPrAmt = r._2
1187- let pmtAmt = r._3
1188- let pmtAssetId = r._4
1189- let state = r._5
1190- let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
1191- if ((b == b))
1192- then {
1193- let $t04166541747 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1194- let refreshDLpActions = $t04166541747._1
1195- let updatedDLp = $t04166541747._2
1196- let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
1197- if ((isUpdatedDLpValid == isUpdatedDLpValid))
1198- then (state ++ refreshDLpActions)
1199- else throw("Strict value is not equal to itself.")
1200- }
1155+ let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(pmtAmt))
1156+ let $t04019240274 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1157+ let refreshDLpActions = $t04019240274._1
1158+ let updatedDLp = $t04019240274._2
1159+ let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
1160+ if ((isUpdatedDLpValid == isUpdatedDLpValid))
1161+ then (state ++ refreshDLpActions)
12011162 else throw("Strict value is not equal to itself.")
12021163 }
12031164 else throw("Strict value is not equal to itself.")
12271188 else throwErr("exactly 1 payment are expected")]
12281189 if ((checks == checks))
12291190 then {
1230- let $t04236542520 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1231- let state = $t04236542520._1
1232- let totalAmount = $t04236542520._2
1191+ let $t04089241047 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1192+ let state = $t04089241047._1
1193+ let totalAmount = $t04089241047._2
12331194 $Tuple2(state, totalAmount)
12341195 }
12351196 else throw("Strict value is not equal to itself.")
12461207 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
12471208 then {
12481209 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1249- let $t04304443108 = refreshDLpInternal(0, 0, 0)
1250- let dLpUpdateActions = $t04304443108._1
1251- let updatedDLp = $t04304443108._2
1210+ let $t04157141635 = refreshDLpInternal(0, 0, 0)
1211+ let dLpUpdateActions = $t04157141635._1
1212+ let updatedDLp = $t04157141635._2
12521213 let actions = if ((dLp != updatedDLp))
12531214 then dLpUpdateActions
12541215 else throwErr("nothing to refresh")
12771238 let newY = getYD(xp, index, D1)
12781239 let dy = (xp[index] - newY)
12791240 let totalGetRaw = max([0, toInt((dy - big1))])
1280- let $t04400844057 = takeFee(totalGetRaw)
1281- let totalGet = $t04400844057._1
1282- let feeAmount = $t04400844057._2
1241+ let $t04253542584 = takeFee(totalGetRaw)
1242+ let totalGet = $t04253542584._1
1243+ let feeAmount = $t04253542584._2
12831244 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
12841245 }
12851246
12931254 let lpId = poolConfig[idxLPAsId]
12941255 let amBalance = getAccBalance(amId)
12951256 let prBalance = getAccBalance(prId)
1296- let $t04440244517 = {
1257+ let $t04292943044 = {
12971258 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
12981259 if ($isInstanceOf(@, "(Int, Int)"))
12991260 then @
13001261 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
13011262 }
1302- let totalGet = $t04440244517._1
1303- let feeAmount = $t04440244517._2
1263+ let totalGet = $t04292943044._1
1264+ let feeAmount = $t04292943044._2
13041265 let r = ego("", lpId, lpAssetAmount, this)
13051266 let outAmAmt = r._1
13061267 let outPrAmt = r._2
13321293 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13331294 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
13341295 then {
1335- let $t04568545766 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1336- let refreshDLpActions = $t04568545766._1
1337- let updatedDLp = $t04568545766._2
1296+ let $t04421244293 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1297+ let refreshDLpActions = $t04421244293._1
1298+ let updatedDLp = $t04421244293._2
13381299 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13391300 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13401301 then (state ++ refreshDLpActions)
13761337 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
13771338 if ((burnA == burnA))
13781339 then {
1379- let $t04682946910 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1380- let refreshDLpActions = $t04682946910._1
1381- let updatedDLp = $t04682946910._2
1340+ let $t04535645437 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1341+ let refreshDLpActions = $t04535645437._1
1342+ let updatedDLp = $t04535645437._2
13821343 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13831344 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13841345 then (state ++ refreshDLpActions)
14251386 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
14261387 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14271388 then {
1428- let $t04815848239 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1429- let refreshDLpActions = $t04815848239._1
1430- let updatedDLp = $t04815848239._2
1389+ let $t04668546766 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1390+ let refreshDLpActions = $t04668546766._1
1391+ let updatedDLp = $t04668546766._2
14311392 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14321393 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14331394 then (state ++ refreshDLpActions)
14731434 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), unstakeAmount], nil)
14741435 if ((unstakeInv == unstakeInv))
14751436 then {
1476- let $t04917349361 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1477- let state = $t04917349361._1
1478- let totalAmount = $t04917349361._2
1437+ let $t04770047888 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1438+ let state = $t04770047888._1
1439+ let totalAmount = $t04770047888._2
14791440 $Tuple2(state, totalAmount)
14801441 }
14811442 else throw("Strict value is not equal to itself.")
14911452 let amId = poolConfig[idxAmAsId]
14921453 let prId = poolConfig[idxPrAsId]
14931454 let lpId = poolConfig[idxLPAsId]
1494- let $t04962049723 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1495- let lpAmount = $t04962049723._1
1496- let state = $t04962049723._2
1497- let feeAmount = $t04962049723._3
1498- let bonus = $t04962049723._4
1455+ let $t04814748250 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1456+ let lpAmount = $t04814748250._1
1457+ let state = $t04814748250._2
1458+ let feeAmount = $t04814748250._3
1459+ let bonus = $t04814748250._4
14991460 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
15001461 }
15011462
15071468 let amId = poolConfig[idxAmAsId]
15081469 let prId = poolConfig[idxPrAsId]
15091470 let lpId = poolConfig[idxLPAsId]
1510- let $t05000250106 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1511- let lpAmount = $t05000250106._1
1512- let state = $t05000250106._2
1513- let feeAmount = $t05000250106._3
1514- let bonus = $t05000250106._4
1471+ let $t04852948633 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1472+ let lpAmount = $t04852948633._1
1473+ let state = $t04852948633._2
1474+ let feeAmount = $t04852948633._3
1475+ let bonus = $t04852948633._4
15151476 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
15161477 }
15171478
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let scale8 = 100000000
55
66 let scale8BigInt = toBigInt(100000000)
77
88 let scale18 = toBigInt(1000000000000000000)
99
1010 let zeroBigInt = toBigInt(0)
1111
1212 let big0 = toBigInt(0)
1313
1414 let big1 = toBigInt(1)
1515
1616 let big2 = toBigInt(2)
1717
1818 let big3 = toBigInt(3)
1919
2020 let big4 = toBigInt(4)
2121
2222 let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
2323
2424 let wavesString = "WAVES"
2525
2626 let Amult = "100"
2727
2828 let Dconv = "1"
2929
3030 let SEP = "__"
3131
3232 let EMPTY = ""
3333
3434 let PoolActive = 1
3535
3636 let PoolPutDis = 2
3737
3838 let PoolMatcherDis = 3
3939
4040 let PoolShutdown = 4
4141
4242 let idxPoolAddress = 1
4343
4444 let idxPoolSt = 2
4545
4646 let idxLPAsId = 3
4747
4848 let idxAmAsId = 4
4949
5050 let idxPrAsId = 5
5151
5252 let idxAmtAsDcm = 6
5353
5454 let idxPriceAsDcm = 7
5555
5656 let idxIAmtAsId = 8
5757
5858 let idxIPriceAsId = 9
5959
6060 let idxFactStakCntr = 1
6161
6262 let idxFactoryRestCntr = 6
6363
6464 let idxFactSlippCntr = 7
6565
6666 let idxFactGwxRewCntr = 10
6767
6868 let feeDefault = fraction(10, scale8, 10000)
6969
7070 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
7171
7272
7373 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
74-
75-
76-func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
7774
7875
7976 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
8077
8178
8279 func abs (val) = if ((zeroBigInt > val))
8380 then -(val)
8481 else val
8582
8683
8784 func absBigInt (val) = if ((zeroBigInt > val))
8885 then -(val)
8986 else val
9087
9188
9289 func fc () = "%s__factoryContract"
9390
9491
9592 func mpk () = "%s__managerPublicKey"
9693
9794
9895 func pmpk () = "%s__pendingManagerPublicKey"
9996
10097
10198 func pl () = "%s%s__price__last"
10299
103100
104101 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
105102
106103
107104 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
108105
109106
110107 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
111108
112109
113110 func aa () = "%s__amountAsset"
114111
115112
116113 func pa () = "%s__priceAsset"
117114
118115
119116 func amp () = "%s__amp"
120117
121118
122119 func ada () = "%s__addonAddr"
123120
124121
125122 let keyFee = "%s__fee"
126123
127124 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
128125
129126 let keyDLp = makeString(["%s", "dLp"], SEP)
130127
131128 let keyDLpRefreshedHeight = makeString(["%s", "dLpRefreshedHeight"], SEP)
132129
133130 let keyDLpRefreshDelay = makeString(["%s", "refreshDLpDelay"], SEP)
134131
135132 let dLpRefreshDelayDefault = 1
136133
137134 let dLpRefreshDelay = valueOrElse(getInteger(this, keyDLpRefreshDelay), dLpRefreshDelayDefault)
138135
139136 func fcfg () = "%s__factoryConfig"
140137
141138
142139 func mtpk () = "%s%s__matcher__publicKey"
143140
144141
145142 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
146143
147144
148145 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
149146
150147
151148 func aps () = "%s__shutdown"
152149
153150
154151 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
155152
156153
157154 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
158155
159156
160157 func toe (orV,sendrV,matchV) = throw(((((("Failed: ordValid=" + toString(orV)) + " sndrValid=") + toString(sendrV)) + " mtchrValid=") + toString(matchV)))
161158
162159
163160 func str (val) = match val {
164161 case valStr: String =>
165162 valStr
166163 case _ =>
167164 throw("fail cast to String")
168165 }
169166
170167
171168 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
172169
173170
174171 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
175172
176173
177174 func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
178175
179176
180177 func fmtErr (msg) = makeString(["lp_stable.ride:", msg], " ")
181178
182179
183180 let fca = addressFromStringValue(strf(this, fc()))
184181
185182 let A = strf(this, amp())
186183
187184 func igs () = valueOrElse(getBoolean(fca, aps()), false)
188185
189186
190187 func mp () = fromBase58String(strf(fca, mtpk()))
191188
192189
193190 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
194191
195192 func gpc () = {
196193 let amtAs = strf(this, aa())
197194 let priceAs = strf(this, pa())
198195 let iPriceAs = intf(fca, mba(priceAs))
199196 let iAmtAs = intf(fca, mba(amtAs))
200197 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
201198 }
202199
203200
204201 func parseAssetId (input) = if ((input == wavesString))
205202 then unit
206203 else fromBase58String(input)
207204
208205
209206 func assetIdToString (input) = if ((input == unit))
210207 then wavesString
211208 else toBase58String(value(input))
212209
213210
214211 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]))
215212
216213
217214 let poolConfigParsed = parsePoolConfig(gpc())
218215
219-let $t074067592 = poolConfigParsed
216+let $t072557441 = poolConfigParsed
220217
221-let cfgPoolAddress = $t074067592._1
218+let cfgPoolAddress = $t072557441._1
222219
223-let cfgPoolStatus = $t074067592._2
220+let cfgPoolStatus = $t072557441._2
224221
225-let cfgLpAssetId = $t074067592._3
222+let cfgLpAssetId = $t072557441._3
226223
227-let cfgAmountAssetId = $t074067592._4
224+let cfgAmountAssetId = $t072557441._4
228225
229-let cfgPriceAssetId = $t074067592._5
226+let cfgPriceAssetId = $t072557441._5
230227
231-let cfgAmountAssetDecimals = $t074067592._6
228+let cfgAmountAssetDecimals = $t072557441._6
232229
233-let cfgPriceAssetDecimals = $t074067592._7
230+let cfgPriceAssetDecimals = $t072557441._7
234231
235232 func gfc () = split(strf(fca, fcfg()), SEP)
236233
237234
238235 let factoryConfig = gfc()
239236
240237 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
241238
242239 let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
243240
244241 let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
245242
246243 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
247244
248245 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)
249246
250247
251248 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)
252249
253250
254251 func getAccBalance (assetId) = if ((assetId == "WAVES"))
255252 then wavesBalance(this).available
256253 else assetBalance(this, fromBase58String(assetId))
257254
258255
259256 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
260257
261258
262259 func vad (A1,A2,slippage) = {
263260 let diff = fraction((A1 - A2), scale8BigInt, A2)
264261 let pass = ((slippage - abs(diff)) > zeroBigInt)
265262 if (!(pass))
266263 then throw(("Big slpg: " + toString(diff)))
267264 else $Tuple2(pass, min([A1, A2]))
268265 }
269266
270267
271268 func vd (D1,D0,slpg) = {
272269 let diff = fraction(D0, scale8BigInt, D1)
273270 let fail = (slpg > diff)
274271 if (if (fail)
275272 then true
276273 else (D0 > D1))
277274 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
278275 else fail
279276 }
280277
281278
282279 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
283280 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
284281 let prAsAmtX18 = t1(prAmt, prAssetDcm)
285282 cpbi(prAsAmtX18, amtAsAmtX18)
286283 }
287284
288285
289286 func calcPrices (amAmt,prAmt,lpAmt) = {
290287 let cfg = gpc()
291288 let amtAsDcm = parseIntValue(cfg[idxAmtAsDcm])
292289 let prAsDcm = parseIntValue(cfg[idxPriceAsDcm])
293290 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
294291 let amAmtX18 = t1(amAmt, amtAsDcm)
295292 let prAmtX18 = t1(prAmt, prAsDcm)
296293 let lpAmtX18 = t1(lpAmt, scale8)
297294 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
298295 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
299296 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
300297 }
301298
302299
303300 func calculatePrices (amAmt,prAmt,lpAmt) = {
304301 let p = calcPrices(amAmt, prAmt, lpAmt)
305302 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
306303 }
307304
308305
309306 func takeFee (amount) = {
310307 let feeAmount = fraction(amount, fee, scale8)
311308 $Tuple2((amount - feeAmount), feeAmount)
312309 }
313310
314311
315312 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
316313 let cfg = gpc()
317314 let lpId = cfg[idxLPAsId]
318315 let amId = cfg[idxAmAsId]
319316 let prId = cfg[idxPrAsId]
320317 let amDcm = parseIntValue(cfg[idxAmtAsDcm])
321318 let prDcm = parseIntValue(cfg[idxPriceAsDcm])
322319 let sts = cfg[idxPoolSt]
323320 let lpEmiss = valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "Wrong LP id").quantity
324321 if ((lpId != pmtAssetId))
325322 then throw("Wrong pmt asset")
326323 else {
327324 let amBalance = getAccBalance(amId)
328325 let amBalanceX18 = t1(amBalance, amDcm)
329326 let prBalance = getAccBalance(prId)
330327 let prBalanceX18 = t1(prBalance, prDcm)
331328 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
332329 let curPrice = f1(curPriceX18, scale8)
333330 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
334331 let lpEmissX18 = t1(lpEmiss, scale8)
335332 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
336333 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
337- let outAmAmt = fromX18Round(outAmAmtX18, amDcm, FLOOR)
338- let outPrAmt = fromX18Round(outPrAmtX18, prDcm, FLOOR)
334+ let outAmAmt = f1(outAmAmtX18, amDcm)
335+ let outPrAmt = f1(outPrAmtX18, prDcm)
339336 let state = if ((txId58 == ""))
340337 then nil
341338 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
342339 then unit
343340 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
344341 then unit
345342 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)]
346343 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
347344 }
348345 }
349346
350347
351348 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
352349 let cfg = gpc()
353350 let lpId = fromBase58String(cfg[idxLPAsId])
354351 let amIdStr = cfg[idxAmAsId]
355352 let prIdStr = cfg[idxPrAsId]
356353 let inAmIdStr = cfg[idxIAmtAsId]
357354 let inPrIdStr = cfg[idxIPriceAsId]
358355 let amtDcm = parseIntValue(cfg[idxAmtAsDcm])
359356 let priceDcm = parseIntValue(cfg[idxPriceAsDcm])
360357 let sts = cfg[idxPoolSt]
361358 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
362359 let amBalance = if (isEval)
363360 then getAccBalance(amIdStr)
364361 else if (if (isOneAsset)
365362 then (pmtId == amIdStr)
366363 else false)
367364 then (getAccBalance(amIdStr) - pmtAmt)
368365 else if (isOneAsset)
369366 then getAccBalance(amIdStr)
370367 else (getAccBalance(amIdStr) - inAmAmt)
371368 let prBalance = if (isEval)
372369 then getAccBalance(prIdStr)
373370 else if (if (isOneAsset)
374371 then (pmtId == prIdStr)
375372 else false)
376373 then (getAccBalance(prIdStr) - pmtAmt)
377374 else if (isOneAsset)
378375 then getAccBalance(prIdStr)
379376 else (getAccBalance(prIdStr) - inPrAmt)
380377 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
381378 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
382379 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
383380 let amBalanceX18 = t1(amBalance, amtDcm)
384381 let prBalanceX18 = t1(prBalance, priceDcm)
385382 let r = if ((lpEm == 0))
386383 then {
387384 let curPriceX18 = zeroBigInt
388385 let slippageX18 = zeroBigInt
389386 let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN)
390387 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
391388 }
392389 else {
393390 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
394391 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
395392 let slippageX18 = t1(slippage, scale8)
396393 if (if (if (validateSlippage)
397394 then (curPriceX18 != zeroBigInt)
398395 else false)
399396 then (slippageRealX18 > slippageX18)
400397 else false)
401398 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
402399 else {
403400 let lpEmissionX18 = t1(lpEm, scale8)
404401 let prViaAmX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
405402 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
406403 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
407404 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
408405 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
409406 let expAmtAssetAmtX18 = expectedAmts._1
410407 let expPriceAssetAmtX18 = expectedAmts._2
411408 let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18)
412- $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18)
409+ $Tuple5(f1(lpAmtX18, scale8), f1(expAmtAssetAmtX18, amtDcm), f1(expPriceAssetAmtX18, priceDcm), curPriceX18, slippageX18)
413410 }
414411 }
415412 let calcLpAmt = r._1
416413 let calcAmAssetPmt = r._2
417414 let calcPrAssetPmt = r._3
418415 let curPrice = f1(r._4, scale8)
419416 let slippageCalc = f1(r._5, scale8)
420417 if ((0 >= calcLpAmt))
421418 then throw("LP <= 0")
422419 else {
423420 let emitLpAmt = if (!(emitLp))
424421 then 0
425422 else calcLpAmt
426423 let amDiff = (inAmAmt - calcAmAssetPmt)
427424 let prDiff = (inPrAmt - calcPrAssetPmt)
428- let $t01811218457 = if (if (isOneAsset)
425+ let $t01787218217 = if (if (isOneAsset)
429426 then (pmtId == amIdStr)
430427 else false)
431428 then $Tuple2(pmtAmt, 0)
432429 else if (if (isOneAsset)
433430 then (pmtId == prIdStr)
434431 else false)
435432 then $Tuple2(0, pmtAmt)
436433 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
437- let writeAmAmt = $t01811218457._1
438- let writePrAmt = $t01811218457._2
434+ let writeAmAmt = $t01787218217._1
435+ let writePrAmt = $t01787218217._2
439436 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))]
440437 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
441438 }
442439 }
443440
444441
445442 func getD (xp) = {
446443 let xp0 = xp[0]
447444 let xp1 = xp[1]
448445 let s = (xp0 + xp1)
449446 if ((s == big0))
450447 then big0
451448 else {
452449 let a = parseIntValue(A)
453450 let ann = (a * 2)
454451 let p = fraction(xp0, xp1, big1)
455452 let xp0_xp1_n_n = fraction(p, big4, big1)
456453 let ann_s = fraction(toBigInt(ann), s, big1)
457454 let ann_1 = toBigInt((ann - 1))
458455 func calcDNext (d) = {
459456 let dd = fraction(d, d, big1)
460457 let ddd = fraction(dd, d, big1)
461458 let dp = fraction(ddd, big1, xp0_xp1_n_n)
462459 fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)), CEILING)
463460 }
464461
465462 func calc (acc,i) = if (acc._2)
466463 then acc
467464 else {
468465 let d = acc._1
469466 let dNext = calcDNext(d)
470467 let dDiffRaw = toInt((dNext - value(d)))
471468 let dDiff = if ((0 > dDiffRaw))
472469 then -(dDiffRaw)
473470 else dDiffRaw
474471 if ((1 >= dDiff))
475472 then $Tuple2(dNext, true)
476473 else $Tuple2(dNext, false)
477474 }
478475
479476 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
480- let $t02038520433 = {
477+ let $t02014520193 = {
481478 let $l = arr
482479 let $s = size($l)
483480 let $acc0 = $Tuple2(s, false)
484481 func $f0_1 ($a,$i) = if (($i >= $s))
485482 then $a
486483 else calc($a, $l[$i])
487484
488485 func $f0_2 ($a,$i) = if (($i >= $s))
489486 then $a
490487 else throw("List size exceeds 15")
491488
492489 $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)
493490 }
494- let d = $t02038520433._1
495- let found = $t02038520433._2
491+ let d = $t02014520193._1
492+ let found = $t02014520193._2
496493 if (found)
497494 then d
498495 else throw(("D calculation error, D = " + toString(d)))
499496 }
500497 }
501498
502499
503500 func getDOld (xp) = {
504501 let n = big2
505502 let xp0 = xp[0]
506503 let xp1 = xp[1]
507504 let aPrecision = parseBigIntValue(Amult)
508505 let a = (parseBigIntValue(A) * aPrecision)
509506 let s = (xp0 + xp1)
510507 if ((s == big0))
511508 then big0
512509 else {
513510 let ann = (a * n)
514511 let xp0_xp1_n_n = (((xp0 * xp1) * n) * n)
515512 let ann_s_aPrecision = ((ann * s) / aPrecision)
516513 let ann_aPrecision = (ann - aPrecision)
517514 let n1 = (n + big1)
518515 func calc (acc,cur) = {
519- let $t02106221082 = acc
520- let d = $t02106221082._1
521- let found = $t02106221082._2
516+ let $t02082220842 = acc
517+ let d = $t02082220842._1
518+ let found = $t02082220842._2
522519 if ((found != unit))
523520 then acc
524521 else {
525522 let dp = (((d * d) * d) / xp0_xp1_n_n)
526523 let dNext = (((ann_s_aPrecision + (dp * n)) * d) / (((ann_aPrecision * d) / aPrecision) + (n1 * dp)))
527524 let dDiff = absBigInt((dNext - value(d)))
528525 if ((big1 >= dDiff))
529526 then $Tuple2(dNext, cur)
530527 else $Tuple2(dNext, unit)
531528 }
532529 }
533530
534531 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
535- let $t02150321550 = {
532+ let $t02126321310 = {
536533 let $l = arr
537534 let $s = size($l)
538535 let $acc0 = $Tuple2(s, unit)
539536 func $f0_1 ($a,$i) = if (($i >= $s))
540537 then $a
541538 else calc($a, $l[$i])
542539
543540 func $f0_2 ($a,$i) = if (($i >= $s))
544541 then $a
545542 else throw("List size exceeds 15")
546543
547544 $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)
548545 }
549- let d = $t02150321550._1
550- let found = $t02150321550._2
546+ let d = $t02126321310._1
547+ let found = $t02126321310._2
551548 if ((found != unit))
552549 then d
553550 else throw(("D calculation error, D = " + toString(d)))
554551 }
555552 }
556553
557554
558555 func getYD (xp,i,D) = {
559556 let n = big2
560557 let x = xp[if ((i == 0))
561558 then 1
562559 else 0]
563560 let aPrecision = parseBigIntValue(Amult)
564561 let a = (parseBigIntValue(A) * aPrecision)
565562 let s = x
566563 let ann = (a * n)
567564 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
568565 let b = ((s + ((D * aPrecision) / ann)) - D)
569566 func calc (acc,cur) = {
570- let $t02205022070 = acc
571- let y = $t02205022070._1
572- let found = $t02205022070._2
567+ let $t02181021830 = acc
568+ let y = $t02181021830._1
569+ let found = $t02181021830._2
573570 if ((found != unit))
574571 then acc
575572 else {
576573 let yNext = (((y * y) + c) / ((big2 * y) + b))
577574 let yDiff = absBigInt((yNext - value(y)))
578575 if ((big1 >= yDiff))
579576 then $Tuple2(yNext, cur)
580577 else $Tuple2(yNext, unit)
581578 }
582579 }
583580
584581 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
585- let $t02237722424 = {
582+ let $t02213722184 = {
586583 let $l = arr
587584 let $s = size($l)
588585 let $acc0 = $Tuple2(D, unit)
589586 func $f0_1 ($a,$i) = if (($i >= $s))
590587 then $a
591588 else calc($a, $l[$i])
592589
593590 func $f0_2 ($a,$i) = if (($i >= $s))
594591 then $a
595592 else throw("List size exceeds 15")
596593
597594 $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)
598595 }
599- let y = $t02237722424._1
600- let found = $t02237722424._2
596+ let y = $t02213722184._1
597+ let found = $t02213722184._2
601598 if ((found != unit))
602599 then y
603600 else throw(("Y calculation error, Y = " + toString(y)))
604601 }
605602
606603
607604 func calcDLp (amountBalance,priceBalance,lpEmission) = {
608605 let updatedDLp = fraction(getD([amountBalance, priceBalance]), scale18, lpEmission)
609606 if ((lpEmission == big0))
610607 then big0
611608 else updatedDLp
612609 }
613610
614611
615612 func calcCurrentDLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
616613 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
617614 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
618615 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
619616 let currentDLp = calcDLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
620617 currentDLp
621618 }
622619
623620
624621 func refreshDLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
625622 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
626623 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
627624 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
628625 let updatedDLp = calcDLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
629626 let actions = [IntegerEntry(keyDLpRefreshedHeight, height), StringEntry(keyDLp, toString(updatedDLp))]
630627 $Tuple2(actions, updatedDLp)
631628 }
632629
633630
634631 func validateUpdatedDLp (oldDLp,updatedDLp) = if ((updatedDLp >= oldDLp))
635632 then true
636633 else throwErr("updated DLp lower than current DLp")
637634
638635
639636 func validateMatcherOrderAllowed (order) = {
640637 let amountAssetAmount = order.amount
641638 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
642- let $t02436324575 = if ((order.orderType == Buy))
639+ let $t02412324335 = if ((order.orderType == Buy))
643640 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
644641 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
645- let amountAssetBalanceDelta = $t02436324575._1
646- let priceAssetBalanceDelta = $t02436324575._2
642+ let amountAssetBalanceDelta = $t02412324335._1
643+ let priceAssetBalanceDelta = $t02412324335._2
647644 if (if (if (igs())
648645 then true
649646 else (cfgPoolStatus == PoolMatcherDis))
650647 then true
651648 else (cfgPoolStatus == PoolShutdown))
652649 then throw("Admin blocked")
653650 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
654651 then true
655652 else (order.assetPair.priceAsset != cfgPriceAssetId))
656653 then throw("Wr assets")
657654 else {
658655 let dLp = parseBigIntValue(getStringValue(this, keyDLp))
659- let $t02490525005 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
660- let unusedActions = $t02490525005._1
661- let dLpNew = $t02490525005._2
656+ let $t02466524765 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
657+ let unusedActions = $t02466524765._1
658+ let dLpNew = $t02466524765._2
662659 let isOrderValid = (dLpNew >= dLp)
663660 isOrderValid
664661 }
665662 }
666663
667664
668665 func cg (i) = if ((size(i.payments) != 1))
669666 then throw("1 pmnt exp")
670667 else {
671668 let pmt = value(i.payments[0])
672669 let pmtAssetId = value(pmt.assetId)
673670 let pmtAmt = pmt.amount
674671 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
675672 let outAmAmt = r._1
676673 let outPrAmt = r._2
677674 let sts = parseIntValue(r._9)
678675 let state = r._10
679676 if (if (igs())
680677 then true
681678 else (sts == PoolShutdown))
682679 then throw(("Admin blocked: " + toString(sts)))
683680 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
684681 }
685682
686683
687684 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
688685 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
689686 let sts = parseIntValue(r._8)
690687 if (if (if (igs())
691688 then true
692689 else (sts == PoolPutDis))
693690 then true
694691 else (sts == PoolShutdown))
695692 then throw(("Blocked:" + toString(sts)))
696693 else r
697694 }
698695
699696
700697 func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = {
701698 let poolConfig = gpc()
702699 let amId = poolConfig[idxAmAsId]
703700 let prId = poolConfig[idxPrAsId]
704701 let lpId = poolConfig[idxLPAsId]
705702 let amtDcm = parseIntValue(poolConfig[idxAmtAsDcm])
706703 let priceDcm = parseIntValue(poolConfig[idxPriceAsDcm])
707704 let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
708705 let chechEmission = if ((lpAssetEmission > big0))
709706 then true
710707 else throw("initial deposit requires all coins")
711708 if ((chechEmission == chechEmission))
712709 then {
713710 let amBalance = getAccBalance(amId)
714711 let prBalance = getAccBalance(prId)
715- let $t02732227784 = if ((txId == ""))
712+ let $t02708227544 = if ((txId == ""))
716713 then $Tuple2(amBalance, prBalance)
717714 else if ((pmtAssetId == amId))
718715 then if ((pmtAmtRaw > amBalance))
719716 then throw("invalid payment amount")
720717 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
721718 else if ((pmtAssetId == prId))
722719 then if ((pmtAmtRaw > prBalance))
723720 then throw("invalid payment amount")
724721 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
725722 else throw("wrong pmtAssetId")
726- let amBalanceOld = $t02732227784._1
727- let prBalanceOld = $t02732227784._2
728- let $t02779027966 = if ((pmtAssetId == amId))
723+ let amBalanceOld = $t02708227544._1
724+ let prBalanceOld = $t02708227544._2
725+ let $t02755027726 = if ((pmtAssetId == amId))
729726 then $Tuple2(pmtAmtRaw, 0)
730727 else if ((pmtAssetId == prId))
731728 then $Tuple2(0, pmtAmtRaw)
732729 else throw("invalid payment")
733- let amAmountRaw = $t02779027966._1
734- let prAmountRaw = $t02779027966._2
735- let $t02797028209 = if (withTakeFee)
730+ let amAmountRaw = $t02755027726._1
731+ let prAmountRaw = $t02755027726._2
732+ let $t02773027969 = if (withTakeFee)
736733 then $Tuple3(takeFee(amAmountRaw)._1, takeFee(prAmountRaw)._1, takeFee(pmtAmtRaw)._2)
737734 else $Tuple3(amAmountRaw, prAmountRaw, 0)
738- let amAmount = $t02797028209._1
739- let prAmount = $t02797028209._2
740- let feeAmount = $t02797028209._3
735+ let amAmount = $t02773027969._1
736+ let prAmount = $t02773027969._2
737+ let feeAmount = $t02773027969._3
741738 let amBalanceNew = (amBalanceOld + amAmount)
742739 let prBalanceNew = (prBalanceOld + prAmount)
743740 let D0 = getD([toBigInt(amBalanceOld), toBigInt(prBalanceOld)])
744741 let D1 = getD([toBigInt(amBalanceNew), toBigInt(prBalanceNew)])
745742 let checkD = if ((D1 > D0))
746743 then true
747744 else throw()
748745 if ((checkD == checkD))
749746 then {
750747 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0, FLOOR)
751748 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
752749 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))]
753750 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
754751 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
755752 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
756753 let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
757754 let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
758755 $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
759756 }
760757 else throw("Strict value is not equal to itself.")
761758 }
762759 else throw("Strict value is not equal to itself.")
763760 }
764761
765762
766763 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
767764 let poolConfig = gpc()
768765 let lpId = poolConfig[idxLPAsId]
769766 let amId = poolConfig[idxAmAsId]
770767 let prId = poolConfig[idxPrAsId]
771768 let amDecimals = parseIntValue(poolConfig[idxAmtAsDcm])
772769 let prDecimals = parseIntValue(poolConfig[idxPriceAsDcm])
773770 let poolStatus = poolConfig[idxPoolSt]
774771 let userAddress = if ((caller == restContract))
775772 then originCaller
776773 else caller
777774 let pmt = value(payments[0])
778775 let pmtAssetId = value(pmt.assetId)
779776 let pmtAmt = pmt.amount
780- let currentDLp = calcCurrentDLp(big0, big0, toBigInt(pmtAmt))
777+ let currentDLp = calcCurrentDLp(big0, big0, big0)
781778 if ((currentDLp == currentDLp))
782779 then {
783780 let txId58 = toBase58String(transactionId)
784781 if ((lpId != toBase58String(pmtAssetId)))
785782 then throw("Wrong LP")
786783 else {
787784 let amBalance = getAccBalance(amId)
788785 let prBalance = getAccBalance(prId)
789- let $t03028730398 = {
786+ let $t03003430145 = {
790787 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
791788 if ($isInstanceOf(@, "(Int, Int)"))
792789 then @
793790 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
794791 }
795- if (($t03028730398 == $t03028730398))
792+ if (($t03003430145 == $t03003430145))
796793 then {
797- let feeAmount = $t03028730398._2
798- let totalGet = $t03028730398._1
794+ let feeAmount = $t03003430145._2
795+ let totalGet = $t03003430145._1
799796 let totalAmount = if (if ((minOutAmount > 0))
800797 then (minOutAmount > totalGet)
801798 else false)
802799 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
803800 else totalGet
804- let $t03058830895 = if ((outAssetId == amId))
801+ let $t03033530642 = if ((outAssetId == amId))
805802 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
806803 else if ((outAssetId == prId))
807804 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
808805 else throw("invalid out asset id")
809- let outAm = $t03058830895._1
810- let outPr = $t03058830895._2
811- let amBalanceNew = $t03058830895._3
812- let prBalanceNew = $t03058830895._4
806+ let outAm = $t03033530642._1
807+ let outPr = $t03033530642._2
808+ let amBalanceNew = $t03033530642._3
809+ let prBalanceNew = $t03033530642._4
813810 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
814811 let curPr = f1(curPrX18, scale8)
815812 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
816813 then unit
817814 else fromBase58String(outAssetId)
818815 let sendFeeToMatcher = if ((feeAmount > 0))
819816 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
820817 else nil
821818 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)
822819 if ((state == state))
823820 then {
824821 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
825822 if ((burn == burn))
826823 then {
827- let $t03168032030 = {
824+ let $t03142731777 = {
828825 let feeAmountForCalc = if ((this == feeCollectorAddress))
829826 then 0
830827 else feeAmount
831828 let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId))
832829 then true
833830 else false
834831 if (outInAmountAsset)
835832 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
836833 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
837834 }
838- let amountAssetBalanceDelta = $t03168032030._1
839- let priceAssetBalanceDelta = $t03168032030._2
840- let $t03203332141 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
841- let refreshDLpActions = $t03203332141._1
842- let updatedDLp = $t03203332141._2
835+ let amountAssetBalanceDelta = $t03142731777._1
836+ let priceAssetBalanceDelta = $t03142731777._2
837+ let $t03178031888 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
838+ let refreshDLpActions = $t03178031888._1
839+ let updatedDLp = $t03178031888._2
843840 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
844841 if ((isUpdatedDLpValid == isUpdatedDLpValid))
845842 then $Tuple2((state ++ refreshDLpActions), totalAmount)
846843 else throw("Strict value is not equal to itself.")
847844 }
848845 else throw("Strict value is not equal to itself.")
849846 }
850847 else throw("Strict value is not equal to itself.")
851848 }
852849 else throw("Strict value is not equal to itself.")
853850 }
854851 }
855852 else throw("Strict value is not equal to itself.")
856853 }
857854
858855
859856 func m () = match getString(mpk()) {
860857 case s: String =>
861858 fromBase58String(s)
862859 case _: Unit =>
863860 unit
864861 case _ =>
865862 throw("Match error")
866863 }
867864
868865
869866 func pm () = match getString(pmpk()) {
870867 case s: String =>
871868 fromBase58String(s)
872869 case _: Unit =>
873870 unit
874871 case _ =>
875872 throw("Match error")
876873 }
877874
878875
879876 let pd = throw("Permission denied")
880877
881878 func isManager (i) = match m() {
882879 case pk: ByteVector =>
883880 (i.callerPublicKey == pk)
884881 case _: Unit =>
885882 (i.caller == this)
886883 case _ =>
887884 throw("Match error")
888885 }
889886
890887
891888 func mm (i) = match m() {
892889 case pk: ByteVector =>
893890 if ((i.callerPublicKey == pk))
894891 then true
895892 else pd
896893 case _: Unit =>
897894 if ((i.caller == this))
898895 then true
899896 else pd
900897 case _ =>
901898 throw("Match error")
902899 }
903900
904901
905902 @Callable(i)
906903 func constructor (fc) = {
907904 let c = mm(i)
908905 if ((c == c))
909906 then [StringEntry(fc(), fc)]
910907 else throw("Strict value is not equal to itself.")
911908 }
912909
913910
914911
915912 @Callable(i)
916913 func setManager (pendingManagerPublicKey) = {
917914 let c = mm(i)
918915 if ((c == c))
919916 then {
920917 let cm = fromBase58String(pendingManagerPublicKey)
921918 if ((cm == cm))
922919 then [StringEntry(pmpk(), pendingManagerPublicKey)]
923920 else throw("Strict value is not equal to itself.")
924921 }
925922 else throw("Strict value is not equal to itself.")
926923 }
927924
928925
929926
930927 @Callable(i)
931928 func confirmManager () = {
932929 let p = pm()
933930 let hpm = if (isDefined(p))
934931 then true
935932 else throw("No pending manager")
936933 if ((hpm == hpm))
937934 then {
938935 let cpm = if ((i.callerPublicKey == value(p)))
939936 then true
940937 else throw("You are not pending manager")
941938 if ((cpm == cpm))
942939 then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())]
943940 else throw("Strict value is not equal to itself.")
944941 }
945942 else throw("Strict value is not equal to itself.")
946943 }
947944
948945
949946
950947 @Callable(i)
951948 func put (slip,autoStake) = {
952949 let factCfg = gfc()
953950 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
954951 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
955952 if ((0 > slip))
956953 then throw("Wrong slippage")
957954 else if ((size(i.payments) != 2))
958955 then throw("2 pmnts expd")
959956 else {
960957 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
961958 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
962- let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amAssetPmt)
963- if ((amountAssetBalance == amountAssetBalance))
959+ let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
960+ if ((currentDLp == currentDLp))
964961 then {
965- let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - prAssetPmt)
966- if ((priceAssetBalance == priceAssetBalance))
962+ 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, "")
963+ let emitLpAmt = e._2
964+ let lpAssetId = e._7
965+ let state = e._9
966+ let amDiff = e._10
967+ let prDiff = e._11
968+ let amId = e._12
969+ let prId = e._13
970+ let r = invoke(fca, "emit", [emitLpAmt], nil)
971+ if ((r == r))
967972 then {
968- let lpAssetEmission = toBigInt(value(assetInfo(cfgLpAssetId)).quantity)
969- if ((lpAssetEmission == lpAssetEmission))
973+ let el = match r {
974+ case legacy: Address =>
975+ invoke(legacy, "emit", [emitLpAmt], nil)
976+ case _ =>
977+ unit
978+ }
979+ if ((el == el))
970980 then {
971- let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
972- if ((currentDLp == currentDLp))
981+ let sa = if ((amDiff > 0))
982+ then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
983+ else nil
984+ if ((sa == sa))
973985 then {
974- 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, "")
975- let emitLpAmt = e._2
976- let lpAssetId = e._7
977- let state = e._9
978- let amDiff = e._10
979- let prDiff = e._11
980- let amId = e._12
981- let prId = e._13
982- let r = invoke(fca, "emit", [emitLpAmt], nil)
983- if ((r == r))
986+ let sp = if ((prDiff > 0))
987+ then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
988+ else nil
989+ if ((sp == sp))
984990 then {
985- let el = match r {
986- case legacy: Address =>
987- invoke(legacy, "emit", [emitLpAmt], nil)
988- case _ =>
989- unit
990- }
991- if ((el == el))
991+ let lpTrnsfr = if (autoStake)
992992 then {
993- let sa = if ((amDiff > 0))
994- then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
995- else nil
996- if ((sa == sa))
997- then {
998- let sp = if ((prDiff > 0))
999- then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
1000- else nil
1001- if ((sp == sp))
1002- then {
1003- let lpTrnsfr = if (autoStake)
1004- then {
1005- let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
1006- if ((ss == ss))
1007- then nil
1008- else throw("Strict value is not equal to itself.")
1009- }
1010- else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1011- let $t03629036529 = refreshDLpInternal(0, 0, 0)
1012- let refreshDLpActions = $t03629036529._1
1013- let updatedDLp = $t03629036529._2
1014- let lpAssetEmissionAfter = value(assetInfo(cfgLpAssetId)).quantity
1015- if ((lpAssetEmissionAfter == lpAssetEmissionAfter))
1016- then {
1017- let error = if ((updatedDLp >= currentDLp))
1018- then true
1019- else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(emitLpAmt), toString(amDiff), toString(prDiff), toString(lpAssetEmission), toString(lpAssetEmissionAfter)], " "))
1020- if ((error == error))
1021- then ((state ++ lpTrnsfr) ++ refreshDLpActions)
1022- else throw("Strict value is not equal to itself.")
1023- }
1024- else throw("Strict value is not equal to itself.")
1025- }
1026- else throw("Strict value is not equal to itself.")
1027- }
993+ let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
994+ if ((ss == ss))
995+ then nil
1028996 else throw("Strict value is not equal to itself.")
1029997 }
998+ else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
999+ let $t03574435809 = refreshDLpInternal(0, 0, 0)
1000+ let refreshDLpActions = $t03574435809._1
1001+ let updatedDLp = $t03574435809._2
1002+ let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
1003+ if ((isUpdatedDLpValid == isUpdatedDLpValid))
1004+ then ((state ++ lpTrnsfr) ++ refreshDLpActions)
10301005 else throw("Strict value is not equal to itself.")
10311006 }
10321007 else throw("Strict value is not equal to itself.")
10331008 }
10341009 else throw("Strict value is not equal to itself.")
10351010 }
10361011 else throw("Strict value is not equal to itself.")
10371012 }
10381013 else throw("Strict value is not equal to itself.")
10391014 }
10401015 else throw("Strict value is not equal to itself.")
10411016 }
10421017 }
10431018
10441019
10451020
10461021 @Callable(i)
10471022 func putOneTknV2 (minOutAmount,autoStake) = {
10481023 let isPoolOneTokenOperationsDisabled = {
10491024 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
10501025 if ($isInstanceOf(@, "Boolean"))
10511026 then @
10521027 else throw(($getType(@) + " couldn't be cast to Boolean"))
10531028 }
10541029 let isPutDisabled = if (if (if (igs())
10551030 then true
10561031 else (cfgPoolStatus == PoolPutDis))
10571032 then true
10581033 else (cfgPoolStatus == PoolShutdown))
10591034 then true
10601035 else isPoolOneTokenOperationsDisabled
10611036 let checks = [if (if (!(isPutDisabled))
10621037 then true
10631038 else isManager(i))
10641039 then true
10651040 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
10661041 then true
10671042 else throwErr("exactly 1 payment are expected")]
10681043 if ((checks == checks))
10691044 then {
10701045 let poolConfig = gpc()
10711046 let amId = poolConfig[idxAmAsId]
10721047 let prId = poolConfig[idxPrAsId]
10731048 let lpId = fromBase58String(poolConfig[idxLPAsId])
10741049 let amDecimals = parseIntValue(poolConfig[idxAmtAsDcm])
10751050 let prDecimals = parseIntValue(poolConfig[idxPriceAsDcm])
10761051 let userAddress = if ((i.caller == this))
10771052 then i.originCaller
10781053 else i.caller
10791054 let pmt = value(i.payments[0])
10801055 let pmtAssetId = toBase58String(value(pmt.assetId))
10811056 let pmtAmt = pmt.amount
1082- let currentDLp = if ((pmt.assetId == cfgAmountAssetId))
1083- then calcCurrentDLp(toBigInt(pmtAmt), toBigInt(0), toBigInt(0))
1084- else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
1085- if ((currentDLp == currentDLp))
1057+ let $t03694637104 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1058+ if (($t03694637104 == $t03694637104))
10861059 then {
1087- let $t03832338481 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1088- if (($t03832338481 == $t03832338481))
1060+ let feeAmount = $t03694637104._3
1061+ let state = $t03694637104._2
1062+ let estimLP = $t03694637104._1
1063+ let emitLpAmt = if (if ((minOutAmount > 0))
1064+ then (minOutAmount > estimLP)
1065+ else false)
1066+ then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
1067+ else estimLP
1068+ let e = invoke(fca, "emit", [emitLpAmt], nil)
1069+ if ((e == e))
10891070 then {
1090- let feeAmount = $t03832338481._3
1091- let state = $t03832338481._2
1092- let estimLP = $t03832338481._1
1093- let emitLpAmt = if (if ((minOutAmount > 0))
1094- then (minOutAmount > estimLP)
1095- else false)
1096- then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
1097- else estimLP
1098- let e = invoke(fca, "emit", [emitLpAmt], nil)
1099- if ((e == e))
1071+ let el = match e {
1072+ case legacy: Address =>
1073+ invoke(legacy, "emit", [emitLpAmt], nil)
1074+ case _ =>
1075+ unit
1076+ }
1077+ if ((el == el))
11001078 then {
1101- let el = match e {
1102- case legacy: Address =>
1103- invoke(legacy, "emit", [emitLpAmt], nil)
1104- case _ =>
1105- unit
1106- }
1107- if ((el == el))
1079+ let lpTrnsfr = if (autoStake)
11081080 then {
1109- let lpTrnsfr = if (autoStake)
1110- then {
1111- let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)])
1112- if ((ss == ss))
1113- then nil
1114- else throw("Strict value is not equal to itself.")
1115- }
1116- else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
1117- let sendFeeToMatcher = if ((feeAmount > 0))
1118- then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
1119- else nil
1120- let $t03929639645 = if ((this == feeCollectorAddress))
1121- then $Tuple2(0, 0)
1122- else {
1123- let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
1124- then true
1125- else false
1126- if (paymentInAmountAsset)
1127- then $Tuple2(-(feeAmount), 0)
1128- else $Tuple2(0, -(feeAmount))
1129- }
1130- let amountAssetBalanceDelta = $t03929639645._1
1131- let priceAssetBalanceDelta = $t03929639645._2
1132- let $t03964839756 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1133- let refreshDLpActions = $t03964839756._1
1134- let updatedDLp = $t03964839756._2
1135- let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
1136- if ((isUpdatedDLpValid == isUpdatedDLpValid))
1137- then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
1081+ let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)])
1082+ if ((ss == ss))
1083+ then nil
11381084 else throw("Strict value is not equal to itself.")
11391085 }
1140- else throw("Strict value is not equal to itself.")
1086+ else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
1087+ let sendFeeToMatcher = if ((feeAmount > 0))
1088+ then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
1089+ else nil
1090+ let $t03791938268 = if ((this == feeCollectorAddress))
1091+ then $Tuple2(0, 0)
1092+ else {
1093+ let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
1094+ then true
1095+ else false
1096+ if (paymentInAmountAsset)
1097+ then $Tuple2(-(feeAmount), 0)
1098+ else $Tuple2(0, -(feeAmount))
1099+ }
1100+ let amountAssetBalanceDelta = $t03791938268._1
1101+ let priceAssetBalanceDelta = $t03791938268._2
1102+ let $t03827138379 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1103+ let refreshDLpActions = $t03827138379._1
1104+ let updatedDLp = $t03827138379._2
1105+ $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
11411106 }
11421107 else throw("Strict value is not equal to itself.")
11431108 }
11441109 else throw("Strict value is not equal to itself.")
11451110 }
11461111 else throw("Strict value is not equal to itself.")
11471112 }
11481113 else throw("Strict value is not equal to itself.")
11491114 }
11501115
11511116
11521117
11531118 @Callable(i)
11541119 func putForFree (maxSlpg) = if ((0 > maxSlpg))
11551120 then throw("Wrong slpg")
11561121 else if ((size(i.payments) != 2))
11571122 then throw("2 pmnts expd")
11581123 else {
11591124 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, "")
11601125 let state = estPut._9
11611126 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
11621127 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
11631128 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
11641129 if ((currentDLp == currentDLp))
11651130 then {
1166- let $t04078640851 = refreshDLpInternal(0, 0, 0)
1167- let refreshDLpActions = $t04078640851._1
1168- let updatedDLp = $t04078640851._2
1131+ let $t03933839403 = refreshDLpInternal(0, 0, 0)
1132+ let refreshDLpActions = $t03933839403._1
1133+ let updatedDLp = $t03933839403._2
11691134 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
11701135 if ((isUpdatedDLpValid == isUpdatedDLpValid))
11711136 then (state ++ refreshDLpActions)
11721137 else throw("Strict value is not equal to itself.")
11731138 }
11741139 else throw("Strict value is not equal to itself.")
11751140 }
11761141
11771142
11781143
11791144 @Callable(i)
11801145 func get () = {
1181- let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(value(i.payments[0]).amount))
1182- if ((currentDLp == currentDLp))
1146+ let r = cg(i)
1147+ let outAmtAmt = r._1
1148+ let outPrAmt = r._2
1149+ let pmtAmt = r._3
1150+ let pmtAssetId = r._4
1151+ let state = r._5
1152+ let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
1153+ if ((b == b))
11831154 then {
1184- let r = cg(i)
1185- let outAmtAmt = r._1
1186- let outPrAmt = r._2
1187- let pmtAmt = r._3
1188- let pmtAssetId = r._4
1189- let state = r._5
1190- let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
1191- if ((b == b))
1192- then {
1193- let $t04166541747 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1194- let refreshDLpActions = $t04166541747._1
1195- let updatedDLp = $t04166541747._2
1196- let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
1197- if ((isUpdatedDLpValid == isUpdatedDLpValid))
1198- then (state ++ refreshDLpActions)
1199- else throw("Strict value is not equal to itself.")
1200- }
1155+ let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(pmtAmt))
1156+ let $t04019240274 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1157+ let refreshDLpActions = $t04019240274._1
1158+ let updatedDLp = $t04019240274._2
1159+ let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
1160+ if ((isUpdatedDLpValid == isUpdatedDLpValid))
1161+ then (state ++ refreshDLpActions)
12011162 else throw("Strict value is not equal to itself.")
12021163 }
12031164 else throw("Strict value is not equal to itself.")
12041165 }
12051166
12061167
12071168
12081169 @Callable(i)
12091170 func getOneTknV2 (outAssetId,minOutAmount) = {
12101171 let isPoolOneTokenOperationsDisabled = {
12111172 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
12121173 if ($isInstanceOf(@, "Boolean"))
12131174 then @
12141175 else throw(($getType(@) + " couldn't be cast to Boolean"))
12151176 }
12161177 let isGetDisabled = if (if (igs())
12171178 then true
12181179 else (cfgPoolStatus == PoolShutdown))
12191180 then true
12201181 else isPoolOneTokenOperationsDisabled
12211182 let checks = [if (if (!(isGetDisabled))
12221183 then true
12231184 else isManager(i))
12241185 then true
12251186 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
12261187 then true
12271188 else throwErr("exactly 1 payment are expected")]
12281189 if ((checks == checks))
12291190 then {
1230- let $t04236542520 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1231- let state = $t04236542520._1
1232- let totalAmount = $t04236542520._2
1191+ let $t04089241047 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1192+ let state = $t04089241047._1
1193+ let totalAmount = $t04089241047._2
12331194 $Tuple2(state, totalAmount)
12341195 }
12351196 else throw("Strict value is not equal to itself.")
12361197 }
12371198
12381199
12391200
12401201 @Callable(i)
12411202 func refreshDLp () = {
12421203 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyDLpRefreshedHeight), 0)
12431204 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= dLpRefreshDelay))
12441205 then unit
12451206 else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], ""))
12461207 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
12471208 then {
12481209 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1249- let $t04304443108 = refreshDLpInternal(0, 0, 0)
1250- let dLpUpdateActions = $t04304443108._1
1251- let updatedDLp = $t04304443108._2
1210+ let $t04157141635 = refreshDLpInternal(0, 0, 0)
1211+ let dLpUpdateActions = $t04157141635._1
1212+ let updatedDLp = $t04157141635._2
12521213 let actions = if ((dLp != updatedDLp))
12531214 then dLpUpdateActions
12541215 else throwErr("nothing to refresh")
12551216 $Tuple2(actions, toString(updatedDLp))
12561217 }
12571218 else throw("Strict value is not equal to itself.")
12581219 }
12591220
12601221
12611222
12621223 @Callable(i)
12631224 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
12641225 let poolConfig = gpc()
12651226 let amId = poolConfig[idxAmAsId]
12661227 let prId = poolConfig[idxPrAsId]
12671228 let lpId = poolConfig[idxLPAsId]
12681229 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
12691230 let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
12701231 let D0 = getD(xp)
12711232 let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
12721233 let index = if ((outAssetId == amId))
12731234 then 0
12741235 else if ((outAssetId == prId))
12751236 then 1
12761237 else throw("invalid out asset id")
12771238 let newY = getYD(xp, index, D1)
12781239 let dy = (xp[index] - newY)
12791240 let totalGetRaw = max([0, toInt((dy - big1))])
1280- let $t04400844057 = takeFee(totalGetRaw)
1281- let totalGet = $t04400844057._1
1282- let feeAmount = $t04400844057._2
1241+ let $t04253542584 = takeFee(totalGetRaw)
1242+ let totalGet = $t04253542584._1
1243+ let feeAmount = $t04253542584._2
12831244 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
12841245 }
12851246
12861247
12871248
12881249 @Callable(i)
12891250 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
12901251 let poolConfig = gpc()
12911252 let amId = poolConfig[idxAmAsId]
12921253 let prId = poolConfig[idxPrAsId]
12931254 let lpId = poolConfig[idxLPAsId]
12941255 let amBalance = getAccBalance(amId)
12951256 let prBalance = getAccBalance(prId)
1296- let $t04440244517 = {
1257+ let $t04292943044 = {
12971258 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
12981259 if ($isInstanceOf(@, "(Int, Int)"))
12991260 then @
13001261 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
13011262 }
1302- let totalGet = $t04440244517._1
1303- let feeAmount = $t04440244517._2
1263+ let totalGet = $t04292943044._1
1264+ let feeAmount = $t04292943044._2
13041265 let r = ego("", lpId, lpAssetAmount, this)
13051266 let outAmAmt = r._1
13061267 let outPrAmt = r._2
13071268 let sumOfGetAssets = (outAmAmt + outPrAmt)
13081269 let bonus = if ((sumOfGetAssets == 0))
13091270 then if ((totalGet == 0))
13101271 then 0
13111272 else throw("bonus calculation error")
13121273 else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
13131274 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
13141275 }
13151276
13161277
13171278
13181279 @Callable(i)
13191280 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
13201281 let r = cg(i)
13211282 let outAmAmt = r._1
13221283 let outPrAmt = r._2
13231284 let pmtAmt = r._3
13241285 let pmtAssetId = r._4
13251286 let state = r._5
13261287 if ((noLessThenAmtAsset > outAmAmt))
13271288 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
13281289 else if ((noLessThenPriceAsset > outPrAmt))
13291290 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
13301291 else {
13311292 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(pmtAmt))
13321293 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13331294 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
13341295 then {
1335- let $t04568545766 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1336- let refreshDLpActions = $t04568545766._1
1337- let updatedDLp = $t04568545766._2
1296+ let $t04421244293 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1297+ let refreshDLpActions = $t04421244293._1
1298+ let updatedDLp = $t04421244293._2
13381299 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13391300 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13401301 then (state ++ refreshDLpActions)
13411302 else throw("Strict value is not equal to itself.")
13421303 }
13431304 else throw("Strict value is not equal to itself.")
13441305 }
13451306 }
13461307
13471308
13481309
13491310 @Callable(i)
13501311 func unstakeAndGet (amount) = {
13511312 let checkPayments = if ((size(i.payments) != 0))
13521313 then throw("No pmnts expd")
13531314 else true
13541315 if ((checkPayments == checkPayments))
13551316 then {
13561317 let cfg = gpc()
13571318 let factoryCfg = gfc()
13581319 let lpAssetId = fromBase58String(cfg[idxLPAsId])
13591320 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
13601321 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
13611322 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
13621323 if ((unstakeInv == unstakeInv))
13631324 then {
13641325 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
13651326 let outAmAmt = r._1
13661327 let outPrAmt = r._2
13671328 let sts = parseIntValue(r._9)
13681329 let state = r._10
13691330 let v = if (if (igs())
13701331 then true
13711332 else (sts == PoolShutdown))
13721333 then throw(("Blocked: " + toString(sts)))
13731334 else true
13741335 if ((v == v))
13751336 then {
13761337 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
13771338 if ((burnA == burnA))
13781339 then {
1379- let $t04682946910 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1380- let refreshDLpActions = $t04682946910._1
1381- let updatedDLp = $t04682946910._2
1340+ let $t04535645437 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1341+ let refreshDLpActions = $t04535645437._1
1342+ let updatedDLp = $t04535645437._2
13821343 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13831344 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13841345 then (state ++ refreshDLpActions)
13851346 else throw("Strict value is not equal to itself.")
13861347 }
13871348 else throw("Strict value is not equal to itself.")
13881349 }
13891350 else throw("Strict value is not equal to itself.")
13901351 }
13911352 else throw("Strict value is not equal to itself.")
13921353 }
13931354 else throw("Strict value is not equal to itself.")
13941355 }
13951356
13961357
13971358
13981359 @Callable(i)
13991360 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
14001361 let isGetDisabled = if (igs())
14011362 then true
14021363 else (cfgPoolStatus == PoolShutdown)
14031364 let checks = [if (!(isGetDisabled))
14041365 then true
14051366 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
14061367 then true
14071368 else throw("no payments are expected")]
14081369 if ((checks == checks))
14091370 then {
14101371 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14111372 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
14121373 if ((unstakeInv == unstakeInv))
14131374 then {
14141375 let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
14151376 let outAmAmt = res._1
14161377 let outPrAmt = res._2
14171378 let state = res._10
14181379 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
14191380 then true
14201381 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
14211382 then true
14221383 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
14231384 if ((checkAmounts == checkAmounts))
14241385 then {
14251386 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
14261387 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14271388 then {
1428- let $t04815848239 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1429- let refreshDLpActions = $t04815848239._1
1430- let updatedDLp = $t04815848239._2
1389+ let $t04668546766 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1390+ let refreshDLpActions = $t04668546766._1
1391+ let updatedDLp = $t04668546766._2
14311392 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14321393 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14331394 then (state ++ refreshDLpActions)
14341395 else throw("Strict value is not equal to itself.")
14351396 }
14361397 else throw("Strict value is not equal to itself.")
14371398 }
14381399 else throw("Strict value is not equal to itself.")
14391400 }
14401401 else throw("Strict value is not equal to itself.")
14411402 }
14421403 else throw("Strict value is not equal to itself.")
14431404 }
14441405
14451406
14461407
14471408 @Callable(i)
14481409 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
14491410 let isPoolOneTokenOperationsDisabled = {
14501411 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
14511412 if ($isInstanceOf(@, "Boolean"))
14521413 then @
14531414 else throw(($getType(@) + " couldn't be cast to Boolean"))
14541415 }
14551416 let isGetDisabled = if (if (igs())
14561417 then true
14571418 else (cfgPoolStatus == PoolShutdown))
14581419 then true
14591420 else isPoolOneTokenOperationsDisabled
14601421 let checks = [if (if (!(isGetDisabled))
14611422 then true
14621423 else isManager(i))
14631424 then true
14641425 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
14651426 then true
14661427 else throwErr("no payments are expected")]
14671428 if ((checks == checks))
14681429 then {
14691430 let cfg = gpc()
14701431 let factoryCfg = gfc()
14711432 let lpAssetId = fromBase58String(cfg[idxLPAsId])
14721433 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
14731434 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), unstakeAmount], nil)
14741435 if ((unstakeInv == unstakeInv))
14751436 then {
1476- let $t04917349361 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1477- let state = $t04917349361._1
1478- let totalAmount = $t04917349361._2
1437+ let $t04770047888 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1438+ let state = $t04770047888._1
1439+ let totalAmount = $t04770047888._2
14791440 $Tuple2(state, totalAmount)
14801441 }
14811442 else throw("Strict value is not equal to itself.")
14821443 }
14831444 else throw("Strict value is not equal to itself.")
14841445 }
14851446
14861447
14871448
14881449 @Callable(i)
14891450 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
14901451 let poolConfig = gpc()
14911452 let amId = poolConfig[idxAmAsId]
14921453 let prId = poolConfig[idxPrAsId]
14931454 let lpId = poolConfig[idxLPAsId]
1494- let $t04962049723 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1495- let lpAmount = $t04962049723._1
1496- let state = $t04962049723._2
1497- let feeAmount = $t04962049723._3
1498- let bonus = $t04962049723._4
1455+ let $t04814748250 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1456+ let lpAmount = $t04814748250._1
1457+ let state = $t04814748250._2
1458+ let feeAmount = $t04814748250._3
1459+ let bonus = $t04814748250._4
14991460 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
15001461 }
15011462
15021463
15031464
15041465 @Callable(i)
15051466 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
15061467 let poolConfig = gpc()
15071468 let amId = poolConfig[idxAmAsId]
15081469 let prId = poolConfig[idxPrAsId]
15091470 let lpId = poolConfig[idxLPAsId]
1510- let $t05000250106 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1511- let lpAmount = $t05000250106._1
1512- let state = $t05000250106._2
1513- let feeAmount = $t05000250106._3
1514- let bonus = $t05000250106._4
1471+ let $t04852948633 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1472+ let lpAmount = $t04852948633._1
1473+ let state = $t04852948633._2
1474+ let feeAmount = $t04852948633._3
1475+ let bonus = $t04852948633._4
15151476 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
15161477 }
15171478
15181479
15191480
15201481 @Callable(i)
15211482 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
15221483 then throw("denied")
15231484 else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
15241485
15251486
15261487
15271488 @Callable(i)
15281489 func setS (k,v) = if ((toString(i.caller) != strf(this, ada())))
15291490 then pd
15301491 else [StringEntry(k, v)]
15311492
15321493
15331494
15341495 @Callable(i)
15351496 func setI (k,v) = if ((toString(i.caller) != strf(this, ada())))
15361497 then pd
15371498 else [IntegerEntry(k, v)]
15381499
15391500
15401501
15411502 @Callable(i)
15421503 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
15431504
15441505
15451506
15461507 @Callable(i)
15471508 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
15481509
15491510
15501511
15511512 @Callable(i)
15521513 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
15531514 let pr = calcPrices(amAmt, prAmt, lpAmt)
15541515 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
15551516 }
15561517
15571518
15581519
15591520 @Callable(i)
15601521 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
15611522
15621523
15631524
15641525 @Callable(i)
15651526 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
15661527
15671528
15681529
15691530 @Callable(i)
15701531 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
15711532
15721533
15731534
15741535 @Callable(i)
15751536 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, ""))
15761537
15771538
15781539
15791540 @Callable(i)
15801541 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
15811542 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
15821543 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
15831544 }
15841545
15851546
15861547
15871548 @Callable(i)
15881549 func getFeeREADONLY () = $Tuple2(nil, fee)
15891550
15901551
15911552 @Verifier(tx)
15921553 func verify () = {
15931554 let targetPublicKey = match m() {
15941555 case pk: ByteVector =>
15951556 pk
15961557 case _: Unit =>
15971558 tx.senderPublicKey
15981559 case _ =>
15991560 throw("Match error")
16001561 }
16011562 match tx {
16021563 case order: Order =>
16031564 let matcherPub = mp()
16041565 let orderValid = validateMatcherOrderAllowed(order)
16051566 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
16061567 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
16071568 if (if (if (orderValid)
16081569 then senderValid
16091570 else false)
16101571 then matcherValid
16111572 else false)
16121573 then true
16131574 else toe(orderValid, senderValid, matcherValid)
16141575 case s: SetScriptTransaction =>
16151576 let newHash = blake2b256(value(s.script))
16161577 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
16171578 let currentHash = scriptHash(this)
16181579 if (if ((allowedHash == newHash))
16191580 then (currentHash != newHash)
16201581 else false)
16211582 then true
16221583 else sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
16231584 case _ =>
16241585 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
16251586 }
16261587 }
16271588

github/deemru/w8io/169f3d6 
204.81 ms