tx · 9yi73B8L9tyhLcBjCmEBiMe291ZPiqL75Y7odWKPVeup

3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA:  -0.04100000 Waves

2023.03.22 10:52 [2500954] smart account 3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA > SELF 0.00000000 Waves

{ "type": 13, "id": "9yi73B8L9tyhLcBjCmEBiMe291ZPiqL75Y7odWKPVeup", "fee": 4100000, "feeAssetId": null, "timestamp": 1679471545489, "version": 2, "chainId": 84, "sender": "3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA", "senderPublicKey": "35yd3qw1gxKDxKwGAykHN9fANbXNWwseaUwbWDj24o3x", "proofs": [ "5G1DSsqknRMRoit6Y5GpnBGH4FiYZrKxc43687J44XwPCozm66D2hUg4prLzfPe9jy7c7bnHvVattuKtyHhvWe9h" ], "script": "base64:BgK8KwgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgMKAQgSABIECgIBBBIECgIBBBIDCgEBEgASBAoCCAESABIECgIIARIECgIIARIECgIBARIDCgEBEgUKAwEBARIFCgMBCAESBAoCAQgSBAoCAQgSBAoCCAgSBAoCCAgSBAoCCAESABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCCIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiBGJpZzMiBGJpZzQiCnNsaXBwYWdlNEQiC3dhdmVzU3RyaW5nIgVBbXVsdCIFRGNvbnYiA1NFUCIFRU1QVFkiClBvb2xBY3RpdmUiClBvb2xQdXREaXMiDlBvb2xNYXRjaGVyRGlzIgxQb29sU2h1dGRvd24iDmlkeFBvb2xBZGRyZXNzIglpZHhQb29sU3QiCWlkeExQQXNJZCIJaWR4QW1Bc0lkIglpZHhQckFzSWQiC2lkeEFtdEFzRGNtIg1pZHhQcmljZUFzRGNtIgtpZHhJQW10QXNJZCINaWR4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CXzMIBQJkWgJfNAgFAmRaAl81CAUCZFoCXzYIBQJkWgJfNwkApgMBCAUCZFoCXzgIBQJkWgJfOQgFAmRaA18xMAECaWwBAmltAAQCaW4EAmduCQECZ20AAwkAAQIFAmduAgpCeXRlVmVjdG9yBAJncgUCZ24FAmdyAwkAAQIFAmduAgRVbml0CAUCaWwPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IEAmduBQJpbAMJAAECBQJnbgIFT3JkZXIEAmZiBQJnbgQCaW8JAQJhWQAEAmlwAwkBAmd5AAkAlAoCBgIACQECZmEBBQJmYgQCYUgIBQJpcAJfMQQCYUkIBQJpcAJfMgQCYUoJAPQDAwgFAmZiCWJvZHlCeXRlcwkAkQMCCAUCZmIGcHJvb2ZzAAAIBQJmYg9zZW5kZXJQdWJsaWNLZXkEAmFLCQD0AwMIBQJmYglib2R5Qnl0ZXMJAJEDAggFAmZiBnByb29mcwABBQJpbwMDAwUCYUgFAmFKBwUCYUsHBgkBAmFHBAUCYUgFAmFJBQJhSgUCYUsDCQABAgUCZ24CFFNldFNjcmlwdFRyYW5zYWN0aW9uBAJjRQUCZ24DCQD0AwMIBQJpbAlib2R5Qnl0ZXMJAJEDAggFAmlsBnByb29mcwAABQJpbgYEAmlxCQD2AwEJAQV2YWx1ZQEIBQJjRQZzY3JpcHQEAmlyCQDbBAEJAQV2YWx1ZQEJAJ0IAgUCYVMJAQJhQwAEAmlzCQDxBwEFBHRoaXMDCQAAAgUCaXIFAmlxCQECIT0CBQJpcwUCaXEHCQD0AwMIBQJpbAlib2R5Qnl0ZXMJAJEDAggFAmlsBnByb29mcwAABQJpbutAyXM=", "height": 2500954, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DVkNzFG2fUoCdDn9ihzsgnYQGviE43mQBtwAkEdQHc24 Next: EZMvj2m1oh5YJpKww5WieUP77CjQgxPQpbLSXbNQyq4 Diff:
OldNewDifferences
166166 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
167167
168168
169+func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress)
170+
171+
169172 func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
170173
171174
231234
232235 let poolConfigParsed = parsePoolConfig(gpc())
233236
234-let $t079658194 = poolConfigParsed
237+let $t080608289 = poolConfigParsed
235238
236-let cfgPoolAddress = $t079658194._1
239+let cfgPoolAddress = $t080608289._1
237240
238-let cfgPoolStatus = $t079658194._2
241+let cfgPoolStatus = $t080608289._2
239242
240-let cfgLpAssetId = $t079658194._3
243+let cfgLpAssetId = $t080608289._3
241244
242-let cfgAmountAssetId = $t079658194._4
245+let cfgAmountAssetId = $t080608289._4
243246
244-let cfgPriceAssetId = $t079658194._5
247+let cfgPriceAssetId = $t080608289._5
245248
246-let cfgAmountAssetDecimals = $t079658194._6
249+let cfgAmountAssetDecimals = $t080608289._6
247250
248-let cfgPriceAssetDecimals = $t079658194._7
251+let cfgPriceAssetDecimals = $t080608289._7
249252
250-let cfgInAmountAssedId = $t079658194._8
253+let cfgInAmountAssedId = $t080608289._8
251254
252-let cfgInPriceAssetId = $t079658194._9
255+let cfgInPriceAssetId = $t080608289._9
253256
254257 func gfc () = split(strf(fca, fcfg()), SEP)
255258
369372 else $Tuple2(dNext, false)
370373 }
371374
372- let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
373- let $t01270312751 = {
375+ let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
376+ let $t01279412842 = {
374377 let $l = arr
375378 let $s = size($l)
376379 let $acc0 = $Tuple2(s, false)
380383
381384 func $f0_2 ($a,$i) = if (($i >= $s))
382385 then $a
383- else throw("List size exceeds 18")
386+ else throw("List size exceeds 17")
384387
385- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18)
388+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17)
386389 }
387- let d = $t01270312751._1
388- let found = $t01270312751._2
390+ let d = $t01279412842._1
391+ let found = $t01279412842._2
389392 if (found)
390393 then d
391394 else throw(("D calculation error, D = " + toString(d)))
521524 else calcLpAmt
522525 let amDiff = (inAmAmt - calcAmAssetPmt)
523526 let prDiff = (inPrAmt - calcPrAssetPmt)
524- let $t02059020935 = if (if (isOneAsset)
527+ let $t02068121026 = if (if (isOneAsset)
525528 then (pmtId == amIdStr)
526529 else false)
527530 then $Tuple2(pmtAmt, 0)
530533 else false)
531534 then $Tuple2(0, pmtAmt)
532535 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
533- let writeAmAmt = $t02059020935._1
534- let writePrAmt = $t02059020935._2
536+ let writeAmAmt = $t02068121026._1
537+ let writePrAmt = $t02068121026._2
535538 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))]
536539 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
537540 }
550553 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
551554 let b = ((s + ((D * aPrecision) / ann)) - D)
552555 func calc (acc,cur) = {
553- let $t02213022150 = acc
554- let y = $t02213022150._1
555- let found = $t02213022150._2
556+ let $t02222122241 = acc
557+ let y = $t02222122241._1
558+ let found = $t02222122241._2
556559 if ((found != unit))
557560 then acc
558561 else {
565568 }
566569
567570 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
568- let $t02245722504 = {
571+ let $t02254822595 = {
569572 let $l = arr
570573 let $s = size($l)
571574 let $acc0 = $Tuple2(D, unit)
579582
580583 $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)
581584 }
582- let y = $t02245722504._1
583- let found = $t02245722504._2
585+ let y = $t02254822595._1
586+ let found = $t02254822595._2
584587 if ((found != unit))
585588 then y
586589 else throw(("Y calculation error, Y = " + toString(y)))
624627 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
625628 let amountAssetAmount = order.amount
626629 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
627- let $t02470224914 = if ((order.orderType == Buy))
630+ let $t02479325005 = if ((order.orderType == Buy))
628631 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
629632 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
630- let amountAssetBalanceDelta = $t02470224914._1
631- let priceAssetBalanceDelta = $t02470224914._2
633+ let amountAssetBalanceDelta = $t02479325005._1
634+ let priceAssetBalanceDelta = $t02479325005._2
632635 if (if (if (igs())
633636 then true
634637 else (cfgPoolStatus == PoolMatcherDis))
641644 then throw("Wr assets")
642645 else {
643646 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
644- let $t02525625356 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
645- let unusedActions = $t02525625356._1
646- let dLpNew = $t02525625356._2
647+ let $t02534725447 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
648+ let unusedActions = $t02534725447._1
649+ let dLpNew = $t02534725447._2
647650 let isOrderValid = (dLpNew >= dLp)
648651 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
649652 $Tuple2(isOrderValid, info)
697700 then {
698701 let amBalance = getAccBalance(amId)
699702 let prBalance = getAccBalance(prId)
700- let $t02801228474 = if ((txId == ""))
703+ let $t02810328565 = if ((txId == ""))
701704 then $Tuple2(amBalance, prBalance)
702705 else if ((pmtAssetId == amId))
703706 then if ((pmtAmtRaw > amBalance))
708711 then throw("invalid payment amount")
709712 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
710713 else throw("wrong pmtAssetId")
711- let amBalanceOld = $t02801228474._1
712- let prBalanceOld = $t02801228474._2
713- let $t02848028656 = if ((pmtAssetId == amId))
714+ let amBalanceOld = $t02810328565._1
715+ let prBalanceOld = $t02810328565._2
716+ let $t02857128747 = if ((pmtAssetId == amId))
714717 then $Tuple2(pmtAmtRaw, 0)
715718 else if ((pmtAssetId == prId))
716719 then $Tuple2(0, pmtAmtRaw)
717720 else throw("invalid payment")
718- let amAmountRaw = $t02848028656._1
719- let prAmountRaw = $t02848028656._2
720- let $t02866028914 = if (withTakeFee)
721+ let amAmountRaw = $t02857128747._1
722+ let prAmountRaw = $t02857128747._2
723+ let $t02875129005 = if (withTakeFee)
721724 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
722725 else $Tuple3(amAmountRaw, prAmountRaw, 0)
723- let amAmount = $t02866028914._1
724- let prAmount = $t02866028914._2
725- let feeAmount = $t02866028914._3
726+ let amAmount = $t02875129005._1
727+ let prAmount = $t02875129005._2
728+ let feeAmount = $t02875129005._3
726729 let amBalanceNew = (amBalanceOld + amAmount)
727730 let prBalanceNew = (prBalanceOld + prAmount)
728731 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
770773 else {
771774 let amBalance = getAccBalance(amId)
772775 let prBalance = getAccBalance(prId)
773- let $t03102631137 = {
776+ let $t03111731228 = {
774777 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
775778 if ($isInstanceOf(@, "(Int, Int)"))
776779 then @
777780 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
778781 }
779- if (($t03102631137 == $t03102631137))
782+ if (($t03111731228 == $t03111731228))
780783 then {
781- let feeAmount = $t03102631137._2
782- let totalGet = $t03102631137._1
784+ let feeAmount = $t03111731228._2
785+ let totalGet = $t03111731228._1
783786 let totalAmount = if (if ((minOutAmount > 0))
784787 then (minOutAmount > totalGet)
785788 else false)
786789 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
787790 else totalGet
788- let $t03132731634 = if ((outAssetId == amId))
791+ let $t03141831725 = if ((outAssetId == amId))
789792 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
790793 else if ((outAssetId == prId))
791794 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
792795 else throw("invalid out asset id")
793- let outAm = $t03132731634._1
794- let outPr = $t03132731634._2
795- let amBalanceNew = $t03132731634._3
796- let prBalanceNew = $t03132731634._4
796+ let outAm = $t03141831725._1
797+ let outPr = $t03141831725._2
798+ let amBalanceNew = $t03141831725._3
799+ let prBalanceNew = $t03141831725._4
797800 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
798801 let curPr = f1(curPrX18, scale8)
799802 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
808811 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
809812 if ((burn == burn))
810813 then {
811- let $t03241932769 = {
814+ let $t03251032860 = {
812815 let feeAmountForCalc = if ((this == feeCollectorAddress))
813816 then 0
814817 else feeAmount
819822 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
820823 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
821824 }
822- let amountAssetBalanceDelta = $t03241932769._1
823- let priceAssetBalanceDelta = $t03241932769._2
824- let $t03277232880 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
825- let refreshDLpActions = $t03277232880._1
826- let updatedDLp = $t03277232880._2
825+ let amountAssetBalanceDelta = $t03251032860._1
826+ let priceAssetBalanceDelta = $t03251032860._2
827+ let $t03286332971 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
828+ let refreshDLpActions = $t03286332971._1
829+ let updatedDLp = $t03286332971._2
827830 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
828831 if ((isUpdatedDLpValid == isUpdatedDLpValid))
829832 then $Tuple2((state ++ refreshDLpActions), totalAmount)
902905 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
903906 let b = ((s + ((D * aPrecision) / ann)) - D)
904907 func calc (acc,cur) = {
905- let $t03432734347 = acc
906- let y = $t03432734347._1
907- let found = $t03432734347._2
908+ let $t03441834438 = acc
909+ let y = $t03441834438._1
910+ let found = $t03441834438._2
908911 if ((found != unit))
909912 then acc
910913 else {
917920 }
918921
919922 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
920- let $t03467834725 = {
923+ let $t03476934816 = {
921924 let $l = arr
922925 let $s = size($l)
923926 let $acc0 = $Tuple2(D, unit)
931934
932935 $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)
933936 }
934- let y = $t03467834725._1
935- let found = $t03467834725._2
937+ let y = $t03476934816._1
938+ let found = $t03476934816._2
936939 if ((found != unit))
937940 then y
938941 else throw(("Y calculation error, Y = " + toString(y)))
939942 }
940943
941944
945+func skipOrderValidation () = valueOrElse(getBoolean(fca, keySkipOrderValidation(toString(this))), false)
946+
947+
942948 @Callable(i)
943949 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
944- let $t03496635390 = if ((isReverse == false))
950+ let $t03516835592 = if ((isReverse == false))
945951 then {
946952 let assetOut = strf(this, pa())
947953 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
952958 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
953959 $Tuple2(assetOut, poolAmountInBalance)
954960 }
955- let assetOut = $t03496635390._1
956- let poolAmountInBalance = $t03496635390._2
961+ let assetOut = $t03516835592._1
962+ let poolAmountInBalance = $t03516835592._2
957963 let poolConfig = gpc()
958964 let amId = poolConfig[idxAmAsId]
959965 let prId = poolConfig[idxPrAsId]
993999 then {
9941000 let pmt = value(i.payments[0])
9951001 let assetIn = assetIdToString(pmt.assetId)
996- let $t03682637220 = if ((isReverse == false))
1002+ let $t03702837422 = if ((isReverse == false))
9971003 then {
9981004 let assetOut = strf(this, pa())
9991005 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10041010 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10051011 $Tuple2(assetOut, poolAmountInBalance)
10061012 }
1007- let assetOut = $t03682637220._1
1008- let poolAmountInBalance = $t03682637220._2
1013+ let assetOut = $t03702837422._1
1014+ let poolAmountInBalance = $t03702837422._2
10091015 let poolConfig = gpc()
10101016 let amId = poolConfig[idxAmAsId]
10111017 let prId = poolConfig[idxPrAsId]
11451151 else throw("Strict value is not equal to itself.")
11461152 }
11471153 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1148- let $t04183941981 = refreshDLpInternal(0, 0, 0)
1149- let refreshDLpActions = $t04183941981._1
1150- let updatedDLp = $t04183941981._2
1154+ let $t04204142183 = refreshDLpInternal(0, 0, 0)
1155+ let refreshDLpActions = $t04204142183._1
1156+ let updatedDLp = $t04204142183._2
11511157 let check = if ((updatedDLp >= currentDLp))
11521158 then true
11531159 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
12201226 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12211227 if ((currentDLp == currentDLp))
12221228 then {
1223- let $t04362243780 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1224- if (($t04362243780 == $t04362243780))
1229+ let $t04382443982 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1230+ if (($t04382443982 == $t04382443982))
12251231 then {
1226- let feeAmount = $t04362243780._3
1227- let state = $t04362243780._2
1228- let estimLP = $t04362243780._1
1232+ let feeAmount = $t04382443982._3
1233+ let state = $t04382443982._2
1234+ let estimLP = $t04382443982._1
12291235 let emitLpAmt = if (if ((minOutAmount > 0))
12301236 then (minOutAmount > estimLP)
12311237 else false)
12441250 then {
12451251 let lpTrnsfr = if (autoStake)
12461252 then {
1247- let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)])
1253+ let ss = invoke(stakingContract, "stakeFor", [toString(i.caller)], [AttachedPayment(lpId, emitLpAmt)])
12481254 if ((ss == ss))
12491255 then nil
12501256 else throw("Strict value is not equal to itself.")
12531259 let sendFeeToMatcher = if ((feeAmount > 0))
12541260 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12551261 else nil
1256- let $t04459544944 = if ((this == feeCollectorAddress))
1262+ let $t04486745216 = if ((this == feeCollectorAddress))
12571263 then $Tuple2(0, 0)
12581264 else {
12591265 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12631269 then $Tuple2(-(feeAmount), 0)
12641270 else $Tuple2(0, -(feeAmount))
12651271 }
1266- let amountAssetBalanceDelta = $t04459544944._1
1267- let priceAssetBalanceDelta = $t04459544944._2
1268- let $t04494745055 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1269- let refreshDLpActions = $t04494745055._1
1270- let updatedDLp = $t04494745055._2
1272+ let amountAssetBalanceDelta = $t04486745216._1
1273+ let priceAssetBalanceDelta = $t04486745216._2
1274+ let $t04521945327 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1275+ let refreshDLpActions = $t04521945327._1
1276+ let updatedDLp = $t04521945327._2
12711277 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12721278 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12731279 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
12991305 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
13001306 if ((currentDLp == currentDLp))
13011307 then {
1302- let $t04608546150 = refreshDLpInternal(0, 0, 0)
1303- let refreshDLpActions = $t04608546150._1
1304- let updatedDLp = $t04608546150._2
1308+ let $t04635746422 = refreshDLpInternal(0, 0, 0)
1309+ let refreshDLpActions = $t04635746422._1
1310+ let updatedDLp = $t04635746422._2
13051311 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13061312 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13071313 then (state ++ refreshDLpActions)
13261332 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13271333 if ((b == b))
13281334 then {
1329- let $t04732347405 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1330- let refreshDLpActions = $t04732347405._1
1331- let updatedDLp = $t04732347405._2
1335+ let $t04759547677 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1336+ let refreshDLpActions = $t04759547677._1
1337+ let updatedDLp = $t04759547677._2
13321338 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13331339 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13341340 then (state ++ refreshDLpActions)
13631369 else throwErr("exactly 1 payment are expected")]
13641370 if ((checks == checks))
13651371 then {
1366- let $t04802348178 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1367- let state = $t04802348178._1
1368- let totalAmount = $t04802348178._2
1372+ let $t04829548450 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1373+ let state = $t04829548450._1
1374+ let totalAmount = $t04829548450._2
13691375 $Tuple2(state, totalAmount)
13701376 }
13711377 else throw("Strict value is not equal to itself.")
13821388 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13831389 then {
13841390 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1385- let $t04870248766 = refreshDLpInternal(0, 0, 0)
1386- let dLpUpdateActions = $t04870248766._1
1387- let updatedDLp = $t04870248766._2
1391+ let $t04897449038 = refreshDLpInternal(0, 0, 0)
1392+ let dLpUpdateActions = $t04897449038._1
1393+ let updatedDLp = $t04897449038._2
13881394 let actions = if ((dLp != updatedDLp))
13891395 then dLpUpdateActions
13901396 else throwErr("nothing to refresh")
14121418 let newY = getYD(xp, index, D1)
14131419 let dy = (xp[index] - newY)
14141420 let totalGetRaw = max([0, toInt((dy - big1))])
1415- let $t04977649831 = takeFee(totalGetRaw, outFee)
1416- let totalGet = $t04977649831._1
1417- let feeAmount = $t04977649831._2
1421+ let $t05004850103 = takeFee(totalGetRaw, outFee)
1422+ let totalGet = $t05004850103._1
1423+ let feeAmount = $t05004850103._2
14181424 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14191425 }
14201426
14271433 let lpId = toBase58String(value(cfgLpAssetId))
14281434 let amBalance = getAccBalance(amId)
14291435 let prBalance = getAccBalance(prId)
1430- let $t05020650321 = {
1436+ let $t05047850593 = {
14311437 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14321438 if ($isInstanceOf(@, "(Int, Int)"))
14331439 then @
14341440 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14351441 }
1436- let totalGet = $t05020650321._1
1437- let feeAmount = $t05020650321._2
1442+ let totalGet = $t05047850593._1
1443+ let feeAmount = $t05047850593._2
14381444 let r = ego("", lpId, lpAssetAmount, this)
14391445 let outAmAmt = r._1
14401446 let outPrAmt = r._2
14681474 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14691475 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14701476 then {
1471- let $t05148751568 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1472- let refreshDLpActions = $t05148751568._1
1473- let updatedDLp = $t05148751568._2
1477+ let $t05175951840 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1478+ let refreshDLpActions = $t05175951840._1
1479+ let updatedDLp = $t05175951840._2
14741480 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14751481 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14761482 then (state ++ refreshDLpActions)
15151521 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15161522 if ((burnA == burnA))
15171523 then {
1518- let $t05259552676 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1519- let refreshDLpActions = $t05259552676._1
1520- let updatedDLp = $t05259552676._2
1524+ let $t05286752948 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1525+ let refreshDLpActions = $t05286752948._1
1526+ let updatedDLp = $t05286752948._2
15211527 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15221528 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15231529 then (state ++ refreshDLpActions)
15681574 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15691575 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15701576 then {
1571- let $t05392754008 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1572- let refreshDLpActions = $t05392754008._1
1573- let updatedDLp = $t05392754008._2
1577+ let $t05419954280 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1578+ let refreshDLpActions = $t05419954280._1
1579+ let updatedDLp = $t05419954280._2
15741580 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15751581 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15761582 then (state ++ refreshDLpActions)
16191625 let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
16201626 if ((unstakeInv == unstakeInv))
16211627 then {
1622- let $t05503055218 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1623- let state = $t05503055218._1
1624- let totalAmount = $t05503055218._2
1628+ let $t05530255490 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1629+ let state = $t05530255490._1
1630+ let totalAmount = $t05530255490._2
16251631 $Tuple2(state, totalAmount)
16261632 }
16271633 else throw("Strict value is not equal to itself.")
16331639
16341640 @Callable(i)
16351641 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1636- let $t05534655449 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1637- let lpAmount = $t05534655449._1
1638- let state = $t05534655449._2
1639- let feeAmount = $t05534655449._3
1640- let bonus = $t05534655449._4
1642+ let $t05561855721 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1643+ let lpAmount = $t05561855721._1
1644+ let state = $t05561855721._2
1645+ let feeAmount = $t05561855721._3
1646+ let bonus = $t05561855721._4
16411647 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16421648 }
16431649
16451651
16461652 @Callable(i)
16471653 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1648- let $t05559755701 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1649- let lpAmount = $t05559755701._1
1650- let state = $t05559755701._2
1651- let feeAmount = $t05559755701._3
1652- let bonus = $t05559755701._4
1654+ let $t05586955973 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1655+ let lpAmount = $t05586955973._1
1656+ let state = $t05586955973._2
1657+ let feeAmount = $t05586955973._3
1658+ let bonus = $t05586955973._4
16531659 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16541660 }
16551661
17341740 match tx {
17351741 case order: Order =>
17361742 let matcherPub = mp()
1737- let $t05849358562 = validateMatcherOrderAllowed(order)
1738- let orderValid = $t05849358562._1
1739- let orderValidInfo = $t05849358562._2
1743+ let $t05876558882 = if (skipOrderValidation())
1744+ then $Tuple2(true, "")
1745+ else validateMatcherOrderAllowed(order)
1746+ let orderValid = $t05876558882._1
1747+ let orderValidInfo = $t05876558882._2
17401748 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17411749 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17421750 if (if (if (orderValid)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let scale8 = 100000000
55
66 let scale8BigInt = toBigInt(100000000)
77
88 let scale18 = toBigInt(1000000000000000000)
99
1010 let zeroBigInt = toBigInt(0)
1111
1212 let big0 = toBigInt(0)
1313
1414 let big1 = toBigInt(1)
1515
1616 let big2 = toBigInt(2)
1717
1818 let big3 = toBigInt(3)
1919
2020 let big4 = toBigInt(4)
2121
2222 let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
2323
2424 let wavesString = "WAVES"
2525
2626 let Amult = "100"
2727
2828 let Dconv = "1"
2929
3030 let SEP = "__"
3131
3232 let EMPTY = ""
3333
3434 let PoolActive = 1
3535
3636 let PoolPutDis = 2
3737
3838 let PoolMatcherDis = 3
3939
4040 let PoolShutdown = 4
4141
4242 let idxPoolAddress = 1
4343
4444 let idxPoolSt = 2
4545
4646 let idxLPAsId = 3
4747
4848 let idxAmAsId = 4
4949
5050 let idxPrAsId = 5
5151
5252 let idxAmtAsDcm = 6
5353
5454 let idxPriceAsDcm = 7
5555
5656 let idxIAmtAsId = 8
5757
5858 let idxIPriceAsId = 9
5959
6060 let idxFactStakCntr = 1
6161
6262 let idxFactoryRestCntr = 6
6363
6464 let idxFactSlippCntr = 7
6565
6666 let idxFactGwxRewCntr = 10
6767
6868 let feeDefault = fraction(10, scale8, 10000)
6969
7070 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
7171
7272
7373 func t1BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult)
7474
7575
7676 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
7777
7878
7979 func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
8080
8181
8282 func t2 (origVal,origScaleMult) = fraction(origVal, scale18, toBigInt(origScaleMult))
8383
8484
8585 func f2 (val,resultScaleMult) = fraction(val, toBigInt(resultScaleMult), scale18)
8686
8787
8888 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
8989
9090
9191 func abs (val) = if ((zeroBigInt > val))
9292 then -(val)
9393 else val
9494
9595
9696 func absBigInt (val) = if ((zeroBigInt > val))
9797 then -(val)
9898 else val
9999
100100
101101 func fc () = "%s__factoryContract"
102102
103103
104104 func mpk () = "%s__managerPublicKey"
105105
106106
107107 func pmpk () = "%s__pendingManagerPublicKey"
108108
109109
110110 func pl () = "%s%s__price__last"
111111
112112
113113 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
114114
115115
116116 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
117117
118118
119119 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
120120
121121
122122 func aa () = "%s__amountAsset"
123123
124124
125125 func pa () = "%s__priceAsset"
126126
127127
128128 func amp () = "%s__amp"
129129
130130
131131 func ada () = "%s__addonAddr"
132132
133133
134134 let keyFee = "%s__fee"
135135
136136 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
137137
138138 let keyDLp = makeString(["%s", "dLp"], SEP)
139139
140140 let keyDLpRefreshedHeight = makeString(["%s", "dLpRefreshedHeight"], SEP)
141141
142142 let keyDLpRefreshDelay = makeString(["%s", "refreshDLpDelay"], SEP)
143143
144144 let dLpRefreshDelayDefault = 30
145145
146146 let dLpRefreshDelay = valueOrElse(getInteger(this, keyDLpRefreshDelay), dLpRefreshDelayDefault)
147147
148148 func fcfg () = "%s__factoryConfig"
149149
150150
151151 func mtpk () = "%s%s__matcher__publicKey"
152152
153153
154154 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
155155
156156
157157 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
158158
159159
160160 func aps () = "%s__shutdown"
161161
162162
163163 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
164164
165165
166166 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
167167
168168
169+func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress)
170+
171+
169172 func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
170173
171174
172175 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
173176
174177
175178 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
176179
177180
178181 func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
179182
180183
181184 func fmtErr (msg) = makeString(["lp_stable.ride:", msg], " ")
182185
183186
184187 let fca = addressFromStringValue(strf(this, fc()))
185188
186189 let inFee = {
187190 let @ = invoke(fca, "getInFeeREADONLY", [toString(this)], nil)
188191 if ($isInstanceOf(@, "Int"))
189192 then @
190193 else throw(($getType(@) + " couldn't be cast to Int"))
191194 }
192195
193196 let outFee = {
194197 let @ = invoke(fca, "getOutFeeREADONLY", [toString(this)], nil)
195198 if ($isInstanceOf(@, "Int"))
196199 then @
197200 else throw(($getType(@) + " couldn't be cast to Int"))
198201 }
199202
200203 let A = strf(this, amp())
201204
202205 func igs () = valueOrElse(getBoolean(fca, aps()), false)
203206
204207
205208 func mp () = fromBase58String(strf(fca, mtpk()))
206209
207210
208211 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
209212
210213 func gpc () = {
211214 let amtAs = strf(this, aa())
212215 let priceAs = strf(this, pa())
213216 let iPriceAs = intf(fca, mba(priceAs))
214217 let iAmtAs = intf(fca, mba(amtAs))
215218 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
216219 }
217220
218221
219222 func parseAssetId (input) = if ((input == wavesString))
220223 then unit
221224 else fromBase58String(input)
222225
223226
224227 func assetIdToString (input) = if ((input == unit))
225228 then wavesString
226229 else toBase58String(value(input))
227230
228231
229232 func parsePoolConfig (poolConfig) = $Tuple9(addressFromStringValue(poolConfig[idxPoolAddress]), parseIntValue(poolConfig[idxPoolSt]), fromBase58String(poolConfig[idxLPAsId]), parseAssetId(poolConfig[idxAmAsId]), parseAssetId(poolConfig[idxPrAsId]), parseIntValue(poolConfig[idxAmtAsDcm]), parseIntValue(poolConfig[idxPriceAsDcm]), fromBase58String(poolConfig[idxIAmtAsId]), fromBase58String(poolConfig[idxIPriceAsId]))
230233
231234
232235 let poolConfigParsed = parsePoolConfig(gpc())
233236
234-let $t079658194 = poolConfigParsed
237+let $t080608289 = poolConfigParsed
235238
236-let cfgPoolAddress = $t079658194._1
239+let cfgPoolAddress = $t080608289._1
237240
238-let cfgPoolStatus = $t079658194._2
241+let cfgPoolStatus = $t080608289._2
239242
240-let cfgLpAssetId = $t079658194._3
243+let cfgLpAssetId = $t080608289._3
241244
242-let cfgAmountAssetId = $t079658194._4
245+let cfgAmountAssetId = $t080608289._4
243246
244-let cfgPriceAssetId = $t079658194._5
247+let cfgPriceAssetId = $t080608289._5
245248
246-let cfgAmountAssetDecimals = $t079658194._6
249+let cfgAmountAssetDecimals = $t080608289._6
247250
248-let cfgPriceAssetDecimals = $t079658194._7
251+let cfgPriceAssetDecimals = $t080608289._7
249252
250-let cfgInAmountAssedId = $t079658194._8
253+let cfgInAmountAssedId = $t080608289._8
251254
252-let cfgInPriceAssetId = $t079658194._9
255+let cfgInPriceAssetId = $t080608289._9
253256
254257 func gfc () = split(strf(fca, fcfg()), SEP)
255258
256259
257260 let factoryConfig = gfc()
258261
259262 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
260263
261264 let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
262265
263266 let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
264267
265268 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
266269
267270 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)
268271
269272
270273 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)
271274
272275
273276 func getAccBalance (assetId) = if ((assetId == "WAVES"))
274277 then wavesBalance(this).available
275278 else assetBalance(this, fromBase58String(assetId))
276279
277280
278281 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
279282
280283
281284 func cpbir (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
282285
283286
284287 func vad (A1,A2,slippage) = {
285288 let diff = fraction((A1 - A2), scale8BigInt, A2)
286289 let pass = ((slippage - abs(diff)) > zeroBigInt)
287290 if (!(pass))
288291 then throw(("Big slpg: " + toString(diff)))
289292 else $Tuple2(pass, min([A1, A2]))
290293 }
291294
292295
293296 func vd (D1,D0,slpg) = {
294297 let diff = fraction(D0, scale8BigInt, D1)
295298 let fail = (slpg > diff)
296299 if (if (fail)
297300 then true
298301 else (D0 > D1))
299302 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
300303 else fail
301304 }
302305
303306
304307 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
305308 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
306309 let prAsAmtX18 = t1(prAmt, prAssetDcm)
307310 cpbi(prAsAmtX18, amtAsAmtX18)
308311 }
309312
310313
311314 func calcPrices (amAmt,prAmt,lpAmt) = {
312315 let amtAsDcm = cfgAmountAssetDecimals
313316 let prAsDcm = cfgPriceAssetDecimals
314317 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
315318 let amAmtX18 = t1(amAmt, amtAsDcm)
316319 let prAmtX18 = t1(prAmt, prAsDcm)
317320 let lpAmtX18 = t1(lpAmt, scale8)
318321 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
319322 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
320323 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
321324 }
322325
323326
324327 func calculatePrices (amAmt,prAmt,lpAmt) = {
325328 let p = calcPrices(amAmt, prAmt, lpAmt)
326329 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
327330 }
328331
329332
330333 func takeFee (amount,fee) = {
331334 let feeAmount = if ((fee == 0))
332335 then 0
333336 else fraction(amount, fee, scale8)
334337 $Tuple2((amount - feeAmount), feeAmount)
335338 }
336339
337340
338341 func getD (xp) = {
339342 let xp0 = xp[0]
340343 let xp1 = xp[1]
341344 let s = (xp0 + xp1)
342345 if ((s == big0))
343346 then big0
344347 else {
345348 let a = parseIntValue(A)
346349 let ann = (a * 2)
347350 let p = fraction(xp0, xp1, big1)
348351 let xp0_xp1_n_n = fraction(p, big4, big1)
349352 let ann_s = fraction(toBigInt(ann), s, big1)
350353 let ann_1 = toBigInt((ann - 1))
351354 func calcDNext (d) = {
352355 let dd = fraction(d, d, big1)
353356 let ddd = fraction(dd, d, big1)
354357 let dp = fraction(ddd, big1, xp0_xp1_n_n)
355358 fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)))
356359 }
357360
358361 func calc (acc,i) = if (acc._2)
359362 then acc
360363 else {
361364 let d = acc._1
362365 let dNext = calcDNext(d)
363366 let dDiffRaw = (dNext - value(d))
364367 let dDiff = if ((big0 > dDiffRaw))
365368 then -(dDiffRaw)
366369 else dDiffRaw
367370 if ((big1 >= dDiff))
368371 then $Tuple2(dNext, true)
369372 else $Tuple2(dNext, false)
370373 }
371374
372- let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
373- let $t01270312751 = {
375+ let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
376+ let $t01279412842 = {
374377 let $l = arr
375378 let $s = size($l)
376379 let $acc0 = $Tuple2(s, false)
377380 func $f0_1 ($a,$i) = if (($i >= $s))
378381 then $a
379382 else calc($a, $l[$i])
380383
381384 func $f0_2 ($a,$i) = if (($i >= $s))
382385 then $a
383- else throw("List size exceeds 18")
386+ else throw("List size exceeds 17")
384387
385- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18)
388+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17)
386389 }
387- let d = $t01270312751._1
388- let found = $t01270312751._2
390+ let d = $t01279412842._1
391+ let found = $t01279412842._2
389392 if (found)
390393 then d
391394 else throw(("D calculation error, D = " + toString(d)))
392395 }
393396 }
394397
395398
396399 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
397400 let lpId = cfgLpAssetId
398401 let amId = toBase58String(value(cfgAmountAssetId))
399402 let prId = toBase58String(value(cfgPriceAssetId))
400403 let amDcm = cfgAmountAssetDecimals
401404 let prDcm = cfgPriceAssetDecimals
402405 let sts = toString(cfgPoolStatus)
403406 let lpEmiss = valueOrErrorMessage(assetInfo(lpId), "Wrong LP id").quantity
404407 if ((toBase58String(lpId) != pmtAssetId))
405408 then throw("Wrong pmt asset")
406409 else {
407410 let amBalance = getAccBalance(amId)
408411 let amBalanceX18 = t1(amBalance, amDcm)
409412 let prBalance = getAccBalance(prId)
410413 let prBalanceX18 = t1(prBalance, prDcm)
411414 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
412415 let curPrice = f1(curPriceX18, scale8)
413416 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
414417 let lpEmissX18 = t1(lpEmiss, scale8)
415418 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
416419 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
417420 let outAmAmt = fromX18Round(outAmAmtX18, amDcm, FLOOR)
418421 let outPrAmt = fromX18Round(outPrAmtX18, prDcm, FLOOR)
419422 let state = if ((txId58 == ""))
420423 then nil
421424 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
422425 then unit
423426 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
424427 then unit
425428 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)]
426429 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
427430 }
428431 }
429432
430433
431434 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
432435 let lpId = cfgLpAssetId
433436 let amIdStr = toBase58String(value(cfgAmountAssetId))
434437 let prIdStr = toBase58String(value(cfgPriceAssetId))
435438 let inAmIdStr = cfgInAmountAssedId
436439 let inPrIdStr = cfgInPriceAssetId
437440 let amtDcm = cfgAmountAssetDecimals
438441 let priceDcm = cfgPriceAssetDecimals
439442 let sts = toString(cfgPoolStatus)
440443 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
441444 let amBalance = if (isEval)
442445 then getAccBalance(amIdStr)
443446 else if (if (isOneAsset)
444447 then (pmtId == amIdStr)
445448 else false)
446449 then (getAccBalance(amIdStr) - pmtAmt)
447450 else if (isOneAsset)
448451 then getAccBalance(amIdStr)
449452 else (getAccBalance(amIdStr) - inAmAmt)
450453 let prBalance = if (isEval)
451454 then getAccBalance(prIdStr)
452455 else if (if (isOneAsset)
453456 then (pmtId == prIdStr)
454457 else false)
455458 then (getAccBalance(prIdStr) - pmtAmt)
456459 else if (isOneAsset)
457460 then getAccBalance(prIdStr)
458461 else (getAccBalance(prIdStr) - inPrAmt)
459462 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
460463 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
461464 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
462465 let amBalanceX18 = t1(amBalance, amtDcm)
463466 let prBalanceX18 = t1(prBalance, priceDcm)
464467 let D0 = getD([amBalanceX18, prBalanceX18])
465468 let r = if ((lpEm == 0))
466469 then {
467470 let D1 = getD([(amBalanceX18 + inAmAssetAmtX18), (prBalanceX18 + inPrAssetAmtX18)])
468471 let checkD = if ((D1 > D0))
469472 then true
470473 else throw("D1 should be greater than D0")
471474 if ((checkD == checkD))
472475 then {
473476 let curPriceX18 = zeroBigInt
474477 let slippageX18 = zeroBigInt
475478 let lpAmtX18 = D1
476479 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
477480 }
478481 else throw("Strict value is not equal to itself.")
479482 }
480483 else {
481484 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
482485 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
483486 let slippageX18 = t1(slippage, scale8)
484487 if (if (if (validateSlippage)
485488 then (curPriceX18 != zeroBigInt)
486489 else false)
487490 then (slippageRealX18 > slippageX18)
488491 else false)
489492 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
490493 else {
491494 let lpEmissionX18 = t1(lpEm, scale8)
492495 let prViaAmX18 = fraction(inAmAssetAmtX18, cpbir(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING)
493496 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, cpbir(prBalanceX18, amBalanceX18, FLOOR), CEILING)
494497 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
495498 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
496499 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
497500 let expAmtAssetAmtX18 = expectedAmts._1
498501 let expPriceAssetAmtX18 = expectedAmts._2
499502 let D1 = getD([(amBalanceX18 + expAmtAssetAmtX18), (prBalanceX18 + expPriceAssetAmtX18)])
500503 let checkD = if ((D1 > D0))
501504 then true
502505 else throw("D1 should be greater than D0")
503506 if ((checkD == checkD))
504507 then {
505508 let lpAmtX18 = fraction(lpEmissionX18, (D1 - D0), D0)
506509 $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18)
507510 }
508511 else throw("Strict value is not equal to itself.")
509512 }
510513 }
511514 let calcLpAmt = r._1
512515 let calcAmAssetPmt = r._2
513516 let calcPrAssetPmt = r._3
514517 let curPrice = f1(r._4, scale8)
515518 let slippageCalc = f1(r._5, scale8)
516519 if ((0 >= calcLpAmt))
517520 then throw("LP <= 0")
518521 else {
519522 let emitLpAmt = if (!(emitLp))
520523 then 0
521524 else calcLpAmt
522525 let amDiff = (inAmAmt - calcAmAssetPmt)
523526 let prDiff = (inPrAmt - calcPrAssetPmt)
524- let $t02059020935 = if (if (isOneAsset)
527+ let $t02068121026 = if (if (isOneAsset)
525528 then (pmtId == amIdStr)
526529 else false)
527530 then $Tuple2(pmtAmt, 0)
528531 else if (if (isOneAsset)
529532 then (pmtId == prIdStr)
530533 else false)
531534 then $Tuple2(0, pmtAmt)
532535 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
533- let writeAmAmt = $t02059020935._1
534- let writePrAmt = $t02059020935._2
536+ let writeAmAmt = $t02068121026._1
537+ let writePrAmt = $t02068121026._2
535538 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))]
536539 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
537540 }
538541 }
539542
540543
541544 func getYD (xp,i,D) = {
542545 let n = big2
543546 let x = xp[if ((i == 0))
544547 then 1
545548 else 0]
546549 let aPrecision = parseBigIntValue(Amult)
547550 let a = (parseBigIntValue(A) * aPrecision)
548551 let s = x
549552 let ann = (a * n)
550553 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
551554 let b = ((s + ((D * aPrecision) / ann)) - D)
552555 func calc (acc,cur) = {
553- let $t02213022150 = acc
554- let y = $t02213022150._1
555- let found = $t02213022150._2
556+ let $t02222122241 = acc
557+ let y = $t02222122241._1
558+ let found = $t02222122241._2
556559 if ((found != unit))
557560 then acc
558561 else {
559562 let yNext = (((y * y) + c) / ((big2 * y) + b))
560563 let yDiff = absBigInt((yNext - value(y)))
561564 if ((big1 >= yDiff))
562565 then $Tuple2(yNext, cur)
563566 else $Tuple2(yNext, unit)
564567 }
565568 }
566569
567570 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
568- let $t02245722504 = {
571+ let $t02254822595 = {
569572 let $l = arr
570573 let $s = size($l)
571574 let $acc0 = $Tuple2(D, unit)
572575 func $f0_1 ($a,$i) = if (($i >= $s))
573576 then $a
574577 else calc($a, $l[$i])
575578
576579 func $f0_2 ($a,$i) = if (($i >= $s))
577580 then $a
578581 else throw("List size exceeds 15")
579582
580583 $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)
581584 }
582- let y = $t02245722504._1
583- let found = $t02245722504._2
585+ let y = $t02254822595._1
586+ let found = $t02254822595._2
584587 if ((found != unit))
585588 then y
586589 else throw(("Y calculation error, Y = " + toString(y)))
587590 }
588591
589592
590593 func calcDLp (amountBalance,priceBalance,lpEmission) = {
591594 let updatedDLp = fraction(getD([t1BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals)), t1BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))]), scale18, lpEmission)
592595 if ((lpEmission == big0))
593596 then big0
594597 else updatedDLp
595598 }
596599
597600
598601 func calcCurrentDLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
599602 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
600603 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
601604 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
602605 let currentDLp = calcDLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
603606 currentDLp
604607 }
605608
606609
607610 func refreshDLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
608611 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
609612 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
610613 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
611614 let updatedDLp = calcDLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
612615 let actions = [IntegerEntry(keyDLpRefreshedHeight, height), StringEntry(keyDLp, toString(updatedDLp))]
613616 $Tuple2(actions, updatedDLp)
614617 }
615618
616619
617620 func validateUpdatedDLp (oldDLp,updatedDLp) = if ((updatedDLp >= oldDLp))
618621 then true
619622 else throwErr("updated DLp lower than current DLp")
620623
621624
622625 func validateMatcherOrderAllowed (order) = {
623626 let amountAssetBalance = getAccBalance(assetIdToString(cfgAmountAssetId))
624627 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
625628 let amountAssetAmount = order.amount
626629 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
627- let $t02470224914 = if ((order.orderType == Buy))
630+ let $t02479325005 = if ((order.orderType == Buy))
628631 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
629632 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
630- let amountAssetBalanceDelta = $t02470224914._1
631- let priceAssetBalanceDelta = $t02470224914._2
633+ let amountAssetBalanceDelta = $t02479325005._1
634+ let priceAssetBalanceDelta = $t02479325005._2
632635 if (if (if (igs())
633636 then true
634637 else (cfgPoolStatus == PoolMatcherDis))
635638 then true
636639 else (cfgPoolStatus == PoolShutdown))
637640 then throw("Admin blocked")
638641 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
639642 then true
640643 else (order.assetPair.priceAsset != cfgPriceAssetId))
641644 then throw("Wr assets")
642645 else {
643646 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
644- let $t02525625356 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
645- let unusedActions = $t02525625356._1
646- let dLpNew = $t02525625356._2
647+ let $t02534725447 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
648+ let unusedActions = $t02534725447._1
649+ let dLpNew = $t02534725447._2
647650 let isOrderValid = (dLpNew >= dLp)
648651 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
649652 $Tuple2(isOrderValid, info)
650653 }
651654 }
652655
653656
654657 func cg (i) = if ((size(i.payments) != 1))
655658 then throw("1 pmnt exp")
656659 else {
657660 let pmt = value(i.payments[0])
658661 let pmtAssetId = value(pmt.assetId)
659662 let pmtAmt = pmt.amount
660663 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
661664 let outAmAmt = r._1
662665 let outPrAmt = r._2
663666 let sts = parseIntValue(r._9)
664667 let state = r._10
665668 if (if (igs())
666669 then true
667670 else (sts == PoolShutdown))
668671 then throw(("Admin blocked: " + toString(sts)))
669672 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
670673 }
671674
672675
673676 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
674677 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
675678 let sts = parseIntValue(r._8)
676679 if (if (if (igs())
677680 then true
678681 else (sts == PoolPutDis))
679682 then true
680683 else (sts == PoolShutdown))
681684 then throw(("Blocked:" + toString(sts)))
682685 else r
683686 }
684687
685688
686689 func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = {
687690 let amId = toBase58String(value(cfgAmountAssetId))
688691 let prId = toBase58String(value(cfgPriceAssetId))
689692 let lpId = cfgLpAssetId
690693 let amtDcm = cfgAmountAssetDecimals
691694 let priceDcm = cfgPriceAssetDecimals
692695 let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(lpId), "invalid lp asset").quantity)
693696 let chechEmission = if ((lpAssetEmission > big0))
694697 then true
695698 else throw("initial deposit requires all coins")
696699 if ((chechEmission == chechEmission))
697700 then {
698701 let amBalance = getAccBalance(amId)
699702 let prBalance = getAccBalance(prId)
700- let $t02801228474 = if ((txId == ""))
703+ let $t02810328565 = if ((txId == ""))
701704 then $Tuple2(amBalance, prBalance)
702705 else if ((pmtAssetId == amId))
703706 then if ((pmtAmtRaw > amBalance))
704707 then throw("invalid payment amount")
705708 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
706709 else if ((pmtAssetId == prId))
707710 then if ((pmtAmtRaw > prBalance))
708711 then throw("invalid payment amount")
709712 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
710713 else throw("wrong pmtAssetId")
711- let amBalanceOld = $t02801228474._1
712- let prBalanceOld = $t02801228474._2
713- let $t02848028656 = if ((pmtAssetId == amId))
714+ let amBalanceOld = $t02810328565._1
715+ let prBalanceOld = $t02810328565._2
716+ let $t02857128747 = if ((pmtAssetId == amId))
714717 then $Tuple2(pmtAmtRaw, 0)
715718 else if ((pmtAssetId == prId))
716719 then $Tuple2(0, pmtAmtRaw)
717720 else throw("invalid payment")
718- let amAmountRaw = $t02848028656._1
719- let prAmountRaw = $t02848028656._2
720- let $t02866028914 = if (withTakeFee)
721+ let amAmountRaw = $t02857128747._1
722+ let prAmountRaw = $t02857128747._2
723+ let $t02875129005 = if (withTakeFee)
721724 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
722725 else $Tuple3(amAmountRaw, prAmountRaw, 0)
723- let amAmount = $t02866028914._1
724- let prAmount = $t02866028914._2
725- let feeAmount = $t02866028914._3
726+ let amAmount = $t02875129005._1
727+ let prAmount = $t02875129005._2
728+ let feeAmount = $t02875129005._3
726729 let amBalanceNew = (amBalanceOld + amAmount)
727730 let prBalanceNew = (prBalanceOld + prAmount)
728731 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
729732 let D1 = getD([t1(amBalanceNew, cfgAmountAssetDecimals), t1(prBalanceNew, cfgPriceAssetDecimals)])
730733 let checkD = if ((D1 > D0))
731734 then true
732735 else throw()
733736 if ((checkD == checkD))
734737 then {
735738 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0, FLOOR)
736739 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
737740 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))]
738741 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
739742 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
740743 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
741744 let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
742745 let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
743746 $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
744747 }
745748 else throw("Strict value is not equal to itself.")
746749 }
747750 else throw("Strict value is not equal to itself.")
748751 }
749752
750753
751754 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
752755 let lpId = toBase58String(value(cfgLpAssetId))
753756 let amId = toBase58String(value(cfgAmountAssetId))
754757 let prId = toBase58String(value(cfgPriceAssetId))
755758 let amDecimals = cfgAmountAssetDecimals
756759 let prDecimals = cfgPriceAssetDecimals
757760 let poolStatus = cfgPoolStatus
758761 let userAddress = if ((caller == restContract))
759762 then originCaller
760763 else caller
761764 let pmt = value(payments[0])
762765 let pmtAssetId = value(pmt.assetId)
763766 let pmtAmt = pmt.amount
764767 let currentDLp = calcCurrentDLp(big0, big0, big0)
765768 if ((currentDLp == currentDLp))
766769 then {
767770 let txId58 = toBase58String(transactionId)
768771 if ((lpId != toBase58String(pmtAssetId)))
769772 then throw("Wrong LP")
770773 else {
771774 let amBalance = getAccBalance(amId)
772775 let prBalance = getAccBalance(prId)
773- let $t03102631137 = {
776+ let $t03111731228 = {
774777 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
775778 if ($isInstanceOf(@, "(Int, Int)"))
776779 then @
777780 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
778781 }
779- if (($t03102631137 == $t03102631137))
782+ if (($t03111731228 == $t03111731228))
780783 then {
781- let feeAmount = $t03102631137._2
782- let totalGet = $t03102631137._1
784+ let feeAmount = $t03111731228._2
785+ let totalGet = $t03111731228._1
783786 let totalAmount = if (if ((minOutAmount > 0))
784787 then (minOutAmount > totalGet)
785788 else false)
786789 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
787790 else totalGet
788- let $t03132731634 = if ((outAssetId == amId))
791+ let $t03141831725 = if ((outAssetId == amId))
789792 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
790793 else if ((outAssetId == prId))
791794 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
792795 else throw("invalid out asset id")
793- let outAm = $t03132731634._1
794- let outPr = $t03132731634._2
795- let amBalanceNew = $t03132731634._3
796- let prBalanceNew = $t03132731634._4
796+ let outAm = $t03141831725._1
797+ let outPr = $t03141831725._2
798+ let amBalanceNew = $t03141831725._3
799+ let prBalanceNew = $t03141831725._4
797800 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
798801 let curPr = f1(curPrX18, scale8)
799802 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
800803 then unit
801804 else fromBase58String(outAssetId)
802805 let sendFeeToMatcher = if ((feeAmount > 0))
803806 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
804807 else nil
805808 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)
806809 if ((state == state))
807810 then {
808811 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
809812 if ((burn == burn))
810813 then {
811- let $t03241932769 = {
814+ let $t03251032860 = {
812815 let feeAmountForCalc = if ((this == feeCollectorAddress))
813816 then 0
814817 else feeAmount
815818 let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId))
816819 then true
817820 else false
818821 if (outInAmountAsset)
819822 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
820823 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
821824 }
822- let amountAssetBalanceDelta = $t03241932769._1
823- let priceAssetBalanceDelta = $t03241932769._2
824- let $t03277232880 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
825- let refreshDLpActions = $t03277232880._1
826- let updatedDLp = $t03277232880._2
825+ let amountAssetBalanceDelta = $t03251032860._1
826+ let priceAssetBalanceDelta = $t03251032860._2
827+ let $t03286332971 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
828+ let refreshDLpActions = $t03286332971._1
829+ let updatedDLp = $t03286332971._2
827830 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
828831 if ((isUpdatedDLpValid == isUpdatedDLpValid))
829832 then $Tuple2((state ++ refreshDLpActions), totalAmount)
830833 else throw("Strict value is not equal to itself.")
831834 }
832835 else throw("Strict value is not equal to itself.")
833836 }
834837 else throw("Strict value is not equal to itself.")
835838 }
836839 else throw("Strict value is not equal to itself.")
837840 }
838841 }
839842 else throw("Strict value is not equal to itself.")
840843 }
841844
842845
843846 func m () = match getString(mpk()) {
844847 case s: String =>
845848 fromBase58String(s)
846849 case _: Unit =>
847850 unit
848851 case _ =>
849852 throw("Match error")
850853 }
851854
852855
853856 func pm () = match getString(pmpk()) {
854857 case s: String =>
855858 fromBase58String(s)
856859 case _: Unit =>
857860 unit
858861 case _ =>
859862 throw("Match error")
860863 }
861864
862865
863866 let pd = throw("Permission denied")
864867
865868 func isManager (i) = match m() {
866869 case pk: ByteVector =>
867870 (i.callerPublicKey == pk)
868871 case _: Unit =>
869872 (i.caller == this)
870873 case _ =>
871874 throw("Match error")
872875 }
873876
874877
875878 func mm (i) = match m() {
876879 case pk: ByteVector =>
877880 if ((i.callerPublicKey == pk))
878881 then true
879882 else pd
880883 case _: Unit =>
881884 if ((i.caller == this))
882885 then true
883886 else pd
884887 case _ =>
885888 throw("Match error")
886889 }
887890
888891
889892 func getY (isReverse,D,poolAmountInBalance) = {
890893 let poolConfig = gpc()
891894 let amId = poolConfig[idxAmAsId]
892895 let prId = poolConfig[idxPrAsId]
893896 let n = big2
894897 let aPrecision = parseBigIntValue(Amult)
895898 let a = (parseBigIntValue(A) * aPrecision)
896899 let xp = if ((isReverse == false))
897900 then [(toBigInt(getAccBalance(amId)) + poolAmountInBalance), toBigInt(getAccBalance(prId))]
898901 else [(toBigInt(getAccBalance(prId)) + poolAmountInBalance), toBigInt(getAccBalance(amId))]
899902 let x = xp[0]
900903 let s = x
901904 let ann = (a * n)
902905 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
903906 let b = ((s + ((D * aPrecision) / ann)) - D)
904907 func calc (acc,cur) = {
905- let $t03432734347 = acc
906- let y = $t03432734347._1
907- let found = $t03432734347._2
908+ let $t03441834438 = acc
909+ let y = $t03441834438._1
910+ let found = $t03441834438._2
908911 if ((found != unit))
909912 then acc
910913 else {
911914 let yNext = (((y * y) + c) / ((big2 * y) + b))
912915 let yDiff = absBigInt((yNext - value(y)))
913916 if ((big1 >= yDiff))
914917 then $Tuple2(yNext, cur)
915918 else $Tuple2(yNext, unit)
916919 }
917920 }
918921
919922 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
920- let $t03467834725 = {
923+ let $t03476934816 = {
921924 let $l = arr
922925 let $s = size($l)
923926 let $acc0 = $Tuple2(D, unit)
924927 func $f0_1 ($a,$i) = if (($i >= $s))
925928 then $a
926929 else calc($a, $l[$i])
927930
928931 func $f0_2 ($a,$i) = if (($i >= $s))
929932 then $a
930933 else throw("List size exceeds 15")
931934
932935 $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)
933936 }
934- let y = $t03467834725._1
935- let found = $t03467834725._2
937+ let y = $t03476934816._1
938+ let found = $t03476934816._2
936939 if ((found != unit))
937940 then y
938941 else throw(("Y calculation error, Y = " + toString(y)))
939942 }
940943
941944
945+func skipOrderValidation () = valueOrElse(getBoolean(fca, keySkipOrderValidation(toString(this))), false)
946+
947+
942948 @Callable(i)
943949 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
944- let $t03496635390 = if ((isReverse == false))
950+ let $t03516835592 = if ((isReverse == false))
945951 then {
946952 let assetOut = strf(this, pa())
947953 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
948954 $Tuple2(assetOut, poolAmountInBalance)
949955 }
950956 else {
951957 let assetOut = strf(this, aa())
952958 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
953959 $Tuple2(assetOut, poolAmountInBalance)
954960 }
955- let assetOut = $t03496635390._1
956- let poolAmountInBalance = $t03496635390._2
961+ let assetOut = $t03516835592._1
962+ let poolAmountInBalance = $t03516835592._2
957963 let poolConfig = gpc()
958964 let amId = poolConfig[idxAmAsId]
959965 let prId = poolConfig[idxPrAsId]
960966 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
961967 let D = getD(xp)
962968 let y = getY(isReverse, D, toBigInt(cleanAmountIn))
963969 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
964970 let totalGetRaw = max([0, toInt(dy)])
965971 let newXp = if ((isReverse == false))
966972 then [((toBigInt(getAccBalance(amId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
967973 else [(toBigInt(getAccBalance(amId)) - dy), ((toBigInt(getAccBalance(prId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount))]
968974 let newD = getD(newXp)
969975 let checkD = if ((newD >= D))
970976 then true
971977 else throw(makeString(["new D is fewer error", toString(D), toString(newD)], "__"))
972978 if ((checkD == checkD))
973979 then $Tuple2(nil, totalGetRaw)
974980 else throw("Strict value is not equal to itself.")
975981 }
976982
977983
978984
979985 @Callable(i)
980986 func calculateAmountOutForSwapAndSendTokens (cleanAmountIn,isReverse,amountOutMin,addressTo,feePoolAmount) = {
981987 let swapContact = {
982988 let @ = invoke(fca, "getSwapContractREADONLY", nil, nil)
983989 if ($isInstanceOf(@, "String"))
984990 then @
985991 else throw(($getType(@) + " couldn't be cast to String"))
986992 }
987993 let checks = [if ((value(i.payments[0]).amount >= cleanAmountIn))
988994 then true
989995 else throwErr("Wrong amount"), if ((i.caller == addressFromStringValue(swapContact)))
990996 then true
991997 else throwErr("Permission denied")]
992998 if ((checks == checks))
993999 then {
9941000 let pmt = value(i.payments[0])
9951001 let assetIn = assetIdToString(pmt.assetId)
996- let $t03682637220 = if ((isReverse == false))
1002+ let $t03702837422 = if ((isReverse == false))
9971003 then {
9981004 let assetOut = strf(this, pa())
9991005 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10001006 $Tuple2(assetOut, poolAmountInBalance)
10011007 }
10021008 else {
10031009 let assetOut = strf(this, aa())
10041010 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10051011 $Tuple2(assetOut, poolAmountInBalance)
10061012 }
1007- let assetOut = $t03682637220._1
1008- let poolAmountInBalance = $t03682637220._2
1013+ let assetOut = $t03702837422._1
1014+ let poolAmountInBalance = $t03702837422._2
10091015 let poolConfig = gpc()
10101016 let amId = poolConfig[idxAmAsId]
10111017 let prId = poolConfig[idxPrAsId]
10121018 let xp = if ((isReverse == false))
10131019 then [(toBigInt(getAccBalance(amId)) - toBigInt(value(i.payments[0]).amount)), toBigInt(getAccBalance(prId))]
10141020 else [toBigInt(getAccBalance(amId)), (toBigInt(getAccBalance(prId)) - toBigInt(value(i.payments[0]).amount))]
10151021 let D = getD(xp)
10161022 let y = getY(isReverse, D, toBigInt(0))
10171023 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
10181024 let totalGetRaw = max([0, toInt(dy)])
10191025 let checkMin = if ((totalGetRaw >= amountOutMin))
10201026 then true
10211027 else throw("Exchange result is fewer coins than expected")
10221028 if ((checkMin == checkMin))
10231029 then {
10241030 let newXp = if ((isReverse == false))
10251031 then [(toBigInt(getAccBalance(amId)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
10261032 else [(toBigInt(getAccBalance(amId)) - dy), (toBigInt(getAccBalance(prId)) + toBigInt(feePoolAmount))]
10271033 let newD = getD(newXp)
10281034 let checkD = if ((newD >= D))
10291035 then true
10301036 else throw("new D is fewer error")
10311037 if ((checkD == checkD))
10321038 then $Tuple2([ScriptTransfer(addressFromStringValue(addressTo), totalGetRaw, parseAssetId(assetOut))], totalGetRaw)
10331039 else throw("Strict value is not equal to itself.")
10341040 }
10351041 else throw("Strict value is not equal to itself.")
10361042 }
10371043 else throw("Strict value is not equal to itself.")
10381044 }
10391045
10401046
10411047
10421048 @Callable(i)
10431049 func constructor (fc) = {
10441050 let c = mm(i)
10451051 if ((c == c))
10461052 then [StringEntry(fc(), fc)]
10471053 else throw("Strict value is not equal to itself.")
10481054 }
10491055
10501056
10511057
10521058 @Callable(i)
10531059 func setManager (pendingManagerPublicKey) = {
10541060 let c = mm(i)
10551061 if ((c == c))
10561062 then {
10571063 let cm = fromBase58String(pendingManagerPublicKey)
10581064 if ((cm == cm))
10591065 then [StringEntry(pmpk(), pendingManagerPublicKey)]
10601066 else throw("Strict value is not equal to itself.")
10611067 }
10621068 else throw("Strict value is not equal to itself.")
10631069 }
10641070
10651071
10661072
10671073 @Callable(i)
10681074 func confirmManager () = {
10691075 let p = pm()
10701076 let hpm = if (isDefined(p))
10711077 then true
10721078 else throw("No pending manager")
10731079 if ((hpm == hpm))
10741080 then {
10751081 let cpm = if ((i.callerPublicKey == value(p)))
10761082 then true
10771083 else throw("You are not pending manager")
10781084 if ((cpm == cpm))
10791085 then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())]
10801086 else throw("Strict value is not equal to itself.")
10811087 }
10821088 else throw("Strict value is not equal to itself.")
10831089 }
10841090
10851091
10861092
10871093 @Callable(i)
10881094 func put (slip,autoStake) = {
10891095 let factCfg = gfc()
10901096 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
10911097 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
10921098 if ((0 > slip))
10931099 then throw("Wrong slippage")
10941100 else if ((size(i.payments) != 2))
10951101 then throw("2 pmnts expd")
10961102 else {
10971103 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
10981104 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
10991105 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amAssetPmt)
11001106 if ((amountAssetBalance == amountAssetBalance))
11011107 then {
11021108 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - prAssetPmt)
11031109 if ((priceAssetBalance == priceAssetBalance))
11041110 then {
11051111 let lpAssetEmission = toBigInt(value(assetInfo(cfgLpAssetId)).quantity)
11061112 if ((lpAssetEmission == lpAssetEmission))
11071113 then {
11081114 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
11091115 if ((currentDLp == currentDLp))
11101116 then {
11111117 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, "")
11121118 let emitLpAmt = e._2
11131119 let lpAssetId = e._7
11141120 let state = e._9
11151121 let amDiff = e._10
11161122 let prDiff = e._11
11171123 let amId = e._12
11181124 let prId = e._13
11191125 let r = invoke(fca, "emit", [emitLpAmt], nil)
11201126 if ((r == r))
11211127 then {
11221128 let el = match r {
11231129 case legacy: Address =>
11241130 invoke(legacy, "emit", [emitLpAmt], nil)
11251131 case _ =>
11261132 unit
11271133 }
11281134 if ((el == el))
11291135 then {
11301136 let sa = if ((amDiff > 0))
11311137 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
11321138 else nil
11331139 if ((sa == sa))
11341140 then {
11351141 let sp = if ((prDiff > 0))
11361142 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
11371143 else nil
11381144 if ((sp == sp))
11391145 then {
11401146 let lpTrnsfr = if (autoStake)
11411147 then {
11421148 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
11431149 if ((ss == ss))
11441150 then nil
11451151 else throw("Strict value is not equal to itself.")
11461152 }
11471153 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1148- let $t04183941981 = refreshDLpInternal(0, 0, 0)
1149- let refreshDLpActions = $t04183941981._1
1150- let updatedDLp = $t04183941981._2
1154+ let $t04204142183 = refreshDLpInternal(0, 0, 0)
1155+ let refreshDLpActions = $t04204142183._1
1156+ let updatedDLp = $t04204142183._2
11511157 let check = if ((updatedDLp >= currentDLp))
11521158 then true
11531159 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
11541160 if ((check == check))
11551161 then {
11561162 let lpAssetEmissionAfter = value(assetInfo(cfgLpAssetId)).quantity
11571163 if ((lpAssetEmissionAfter == lpAssetEmissionAfter))
11581164 then ((state ++ lpTrnsfr) ++ refreshDLpActions)
11591165 else throw("Strict value is not equal to itself.")
11601166 }
11611167 else throw("Strict value is not equal to itself.")
11621168 }
11631169 else throw("Strict value is not equal to itself.")
11641170 }
11651171 else throw("Strict value is not equal to itself.")
11661172 }
11671173 else throw("Strict value is not equal to itself.")
11681174 }
11691175 else throw("Strict value is not equal to itself.")
11701176 }
11711177 else throw("Strict value is not equal to itself.")
11721178 }
11731179 else throw("Strict value is not equal to itself.")
11741180 }
11751181 else throw("Strict value is not equal to itself.")
11761182 }
11771183 else throw("Strict value is not equal to itself.")
11781184 }
11791185 }
11801186
11811187
11821188
11831189 @Callable(i)
11841190 func putOneTknV2 (minOutAmount,autoStake) = {
11851191 let isPoolOneTokenOperationsDisabled = {
11861192 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
11871193 if ($isInstanceOf(@, "Boolean"))
11881194 then @
11891195 else throw(($getType(@) + " couldn't be cast to Boolean"))
11901196 }
11911197 let isPutDisabled = if (if (if (igs())
11921198 then true
11931199 else (cfgPoolStatus == PoolPutDis))
11941200 then true
11951201 else (cfgPoolStatus == PoolShutdown))
11961202 then true
11971203 else isPoolOneTokenOperationsDisabled
11981204 let checks = [if (if (!(isPutDisabled))
11991205 then true
12001206 else isManager(i))
12011207 then true
12021208 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
12031209 then true
12041210 else throwErr("exactly 1 payment are expected")]
12051211 if ((checks == checks))
12061212 then {
12071213 let amId = toBase58String(value(cfgAmountAssetId))
12081214 let prId = toBase58String(value(cfgPriceAssetId))
12091215 let lpId = cfgLpAssetId
12101216 let amDecimals = cfgAmountAssetDecimals
12111217 let prDecimals = cfgPriceAssetDecimals
12121218 let userAddress = if ((i.caller == this))
12131219 then i.originCaller
12141220 else i.caller
12151221 let pmt = value(i.payments[0])
12161222 let pmtAssetId = toBase58String(value(pmt.assetId))
12171223 let pmtAmt = pmt.amount
12181224 let currentDLp = if ((pmt.assetId == cfgAmountAssetId))
12191225 then calcCurrentDLp(toBigInt(pmtAmt), toBigInt(0), toBigInt(0))
12201226 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12211227 if ((currentDLp == currentDLp))
12221228 then {
1223- let $t04362243780 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1224- if (($t04362243780 == $t04362243780))
1229+ let $t04382443982 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1230+ if (($t04382443982 == $t04382443982))
12251231 then {
1226- let feeAmount = $t04362243780._3
1227- let state = $t04362243780._2
1228- let estimLP = $t04362243780._1
1232+ let feeAmount = $t04382443982._3
1233+ let state = $t04382443982._2
1234+ let estimLP = $t04382443982._1
12291235 let emitLpAmt = if (if ((minOutAmount > 0))
12301236 then (minOutAmount > estimLP)
12311237 else false)
12321238 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
12331239 else estimLP
12341240 let e = invoke(fca, "emit", [emitLpAmt], nil)
12351241 if ((e == e))
12361242 then {
12371243 let el = match e {
12381244 case legacy: Address =>
12391245 invoke(legacy, "emit", [emitLpAmt], nil)
12401246 case _ =>
12411247 unit
12421248 }
12431249 if ((el == el))
12441250 then {
12451251 let lpTrnsfr = if (autoStake)
12461252 then {
1247- let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)])
1253+ let ss = invoke(stakingContract, "stakeFor", [toString(i.caller)], [AttachedPayment(lpId, emitLpAmt)])
12481254 if ((ss == ss))
12491255 then nil
12501256 else throw("Strict value is not equal to itself.")
12511257 }
12521258 else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
12531259 let sendFeeToMatcher = if ((feeAmount > 0))
12541260 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12551261 else nil
1256- let $t04459544944 = if ((this == feeCollectorAddress))
1262+ let $t04486745216 = if ((this == feeCollectorAddress))
12571263 then $Tuple2(0, 0)
12581264 else {
12591265 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12601266 then true
12611267 else false
12621268 if (paymentInAmountAsset)
12631269 then $Tuple2(-(feeAmount), 0)
12641270 else $Tuple2(0, -(feeAmount))
12651271 }
1266- let amountAssetBalanceDelta = $t04459544944._1
1267- let priceAssetBalanceDelta = $t04459544944._2
1268- let $t04494745055 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1269- let refreshDLpActions = $t04494745055._1
1270- let updatedDLp = $t04494745055._2
1272+ let amountAssetBalanceDelta = $t04486745216._1
1273+ let priceAssetBalanceDelta = $t04486745216._2
1274+ let $t04521945327 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1275+ let refreshDLpActions = $t04521945327._1
1276+ let updatedDLp = $t04521945327._2
12711277 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12721278 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12731279 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
12741280 else throw("Strict value is not equal to itself.")
12751281 }
12761282 else throw("Strict value is not equal to itself.")
12771283 }
12781284 else throw("Strict value is not equal to itself.")
12791285 }
12801286 else throw("Strict value is not equal to itself.")
12811287 }
12821288 else throw("Strict value is not equal to itself.")
12831289 }
12841290 else throw("Strict value is not equal to itself.")
12851291 }
12861292
12871293
12881294
12891295 @Callable(i)
12901296 func putForFree (maxSlpg) = if ((0 > maxSlpg))
12911297 then throw("Wrong slpg")
12921298 else if ((size(i.payments) != 2))
12931299 then throw("2 pmnts expd")
12941300 else {
12951301 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, "")
12961302 let state = estPut._9
12971303 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
12981304 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
12991305 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
13001306 if ((currentDLp == currentDLp))
13011307 then {
1302- let $t04608546150 = refreshDLpInternal(0, 0, 0)
1303- let refreshDLpActions = $t04608546150._1
1304- let updatedDLp = $t04608546150._2
1308+ let $t04635746422 = refreshDLpInternal(0, 0, 0)
1309+ let refreshDLpActions = $t04635746422._1
1310+ let updatedDLp = $t04635746422._2
13051311 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13061312 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13071313 then (state ++ refreshDLpActions)
13081314 else throw("Strict value is not equal to itself.")
13091315 }
13101316 else throw("Strict value is not equal to itself.")
13111317 }
13121318
13131319
13141320
13151321 @Callable(i)
13161322 func get () = {
13171323 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
13181324 if ((currentDLp == currentDLp))
13191325 then {
13201326 let r = cg(i)
13211327 let outAmtAmt = r._1
13221328 let outPrAmt = r._2
13231329 let pmtAmt = r._3
13241330 let pmtAssetId = r._4
13251331 let state = r._5
13261332 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13271333 if ((b == b))
13281334 then {
1329- let $t04732347405 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1330- let refreshDLpActions = $t04732347405._1
1331- let updatedDLp = $t04732347405._2
1335+ let $t04759547677 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1336+ let refreshDLpActions = $t04759547677._1
1337+ let updatedDLp = $t04759547677._2
13321338 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13331339 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13341340 then (state ++ refreshDLpActions)
13351341 else throw("Strict value is not equal to itself.")
13361342 }
13371343 else throw("Strict value is not equal to itself.")
13381344 }
13391345 else throw("Strict value is not equal to itself.")
13401346 }
13411347
13421348
13431349
13441350 @Callable(i)
13451351 func getOneTknV2 (outAssetId,minOutAmount) = {
13461352 let isPoolOneTokenOperationsDisabled = {
13471353 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
13481354 if ($isInstanceOf(@, "Boolean"))
13491355 then @
13501356 else throw(($getType(@) + " couldn't be cast to Boolean"))
13511357 }
13521358 let isGetDisabled = if (if (igs())
13531359 then true
13541360 else (cfgPoolStatus == PoolShutdown))
13551361 then true
13561362 else isPoolOneTokenOperationsDisabled
13571363 let checks = [if (if (!(isGetDisabled))
13581364 then true
13591365 else isManager(i))
13601366 then true
13611367 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
13621368 then true
13631369 else throwErr("exactly 1 payment are expected")]
13641370 if ((checks == checks))
13651371 then {
1366- let $t04802348178 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1367- let state = $t04802348178._1
1368- let totalAmount = $t04802348178._2
1372+ let $t04829548450 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1373+ let state = $t04829548450._1
1374+ let totalAmount = $t04829548450._2
13691375 $Tuple2(state, totalAmount)
13701376 }
13711377 else throw("Strict value is not equal to itself.")
13721378 }
13731379
13741380
13751381
13761382 @Callable(i)
13771383 func refreshDLp () = {
13781384 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyDLpRefreshedHeight), 0)
13791385 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= dLpRefreshDelay))
13801386 then unit
13811387 else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], ""))
13821388 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13831389 then {
13841390 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1385- let $t04870248766 = refreshDLpInternal(0, 0, 0)
1386- let dLpUpdateActions = $t04870248766._1
1387- let updatedDLp = $t04870248766._2
1391+ let $t04897449038 = refreshDLpInternal(0, 0, 0)
1392+ let dLpUpdateActions = $t04897449038._1
1393+ let updatedDLp = $t04897449038._2
13881394 let actions = if ((dLp != updatedDLp))
13891395 then dLpUpdateActions
13901396 else throwErr("nothing to refresh")
13911397 $Tuple2(actions, toString(updatedDLp))
13921398 }
13931399 else throw("Strict value is not equal to itself.")
13941400 }
13951401
13961402
13971403
13981404 @Callable(i)
13991405 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
14001406 let amId = toBase58String(value(cfgAmountAssetId))
14011407 let prId = toBase58String(value(cfgPriceAssetId))
14021408 let lpId = toBase58String(value(cfgLpAssetId))
14031409 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
14041410 let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
14051411 let D0 = getD(xp)
14061412 let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
14071413 let index = if ((outAssetId == amId))
14081414 then 0
14091415 else if ((outAssetId == prId))
14101416 then 1
14111417 else throw("invalid out asset id")
14121418 let newY = getYD(xp, index, D1)
14131419 let dy = (xp[index] - newY)
14141420 let totalGetRaw = max([0, toInt((dy - big1))])
1415- let $t04977649831 = takeFee(totalGetRaw, outFee)
1416- let totalGet = $t04977649831._1
1417- let feeAmount = $t04977649831._2
1421+ let $t05004850103 = takeFee(totalGetRaw, outFee)
1422+ let totalGet = $t05004850103._1
1423+ let feeAmount = $t05004850103._2
14181424 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14191425 }
14201426
14211427
14221428
14231429 @Callable(i)
14241430 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
14251431 let amId = toBase58String(value(cfgAmountAssetId))
14261432 let prId = toBase58String(value(cfgPriceAssetId))
14271433 let lpId = toBase58String(value(cfgLpAssetId))
14281434 let amBalance = getAccBalance(amId)
14291435 let prBalance = getAccBalance(prId)
1430- let $t05020650321 = {
1436+ let $t05047850593 = {
14311437 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14321438 if ($isInstanceOf(@, "(Int, Int)"))
14331439 then @
14341440 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14351441 }
1436- let totalGet = $t05020650321._1
1437- let feeAmount = $t05020650321._2
1442+ let totalGet = $t05047850593._1
1443+ let feeAmount = $t05047850593._2
14381444 let r = ego("", lpId, lpAssetAmount, this)
14391445 let outAmAmt = r._1
14401446 let outPrAmt = r._2
14411447 let sumOfGetAssets = (outAmAmt + outPrAmt)
14421448 let bonus = if ((sumOfGetAssets == 0))
14431449 then if ((totalGet == 0))
14441450 then 0
14451451 else throw("bonus calculation error")
14461452 else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
14471453 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
14481454 }
14491455
14501456
14511457
14521458 @Callable(i)
14531459 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
14541460 let r = cg(i)
14551461 let outAmAmt = r._1
14561462 let outPrAmt = r._2
14571463 let pmtAmt = r._3
14581464 let pmtAssetId = r._4
14591465 let state = r._5
14601466 if ((noLessThenAmtAsset > outAmAmt))
14611467 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
14621468 else if ((noLessThenPriceAsset > outPrAmt))
14631469 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
14641470 else {
14651471 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14661472 if ((currentDLp == currentDLp))
14671473 then {
14681474 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14691475 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14701476 then {
1471- let $t05148751568 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1472- let refreshDLpActions = $t05148751568._1
1473- let updatedDLp = $t05148751568._2
1477+ let $t05175951840 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1478+ let refreshDLpActions = $t05175951840._1
1479+ let updatedDLp = $t05175951840._2
14741480 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14751481 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14761482 then (state ++ refreshDLpActions)
14771483 else throw("Strict value is not equal to itself.")
14781484 }
14791485 else throw("Strict value is not equal to itself.")
14801486 }
14811487 else throw("Strict value is not equal to itself.")
14821488 }
14831489 }
14841490
14851491
14861492
14871493 @Callable(i)
14881494 func unstakeAndGet (amount) = {
14891495 let checkPayments = if ((size(i.payments) != 0))
14901496 then throw("No pmnts expd")
14911497 else true
14921498 if ((checkPayments == checkPayments))
14931499 then {
14941500 let factoryCfg = gfc()
14951501 let lpAssetId = cfgLpAssetId
14961502 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
14971503 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14981504 if ((currentDLp == currentDLp))
14991505 then {
15001506 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
15011507 if ((unstakeInv == unstakeInv))
15021508 then {
15031509 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
15041510 let outAmAmt = r._1
15051511 let outPrAmt = r._2
15061512 let sts = parseIntValue(r._9)
15071513 let state = r._10
15081514 let v = if (if (igs())
15091515 then true
15101516 else (sts == PoolShutdown))
15111517 then throw(("Blocked: " + toString(sts)))
15121518 else true
15131519 if ((v == v))
15141520 then {
15151521 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15161522 if ((burnA == burnA))
15171523 then {
1518- let $t05259552676 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1519- let refreshDLpActions = $t05259552676._1
1520- let updatedDLp = $t05259552676._2
1524+ let $t05286752948 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1525+ let refreshDLpActions = $t05286752948._1
1526+ let updatedDLp = $t05286752948._2
15211527 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15221528 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15231529 then (state ++ refreshDLpActions)
15241530 else throw("Strict value is not equal to itself.")
15251531 }
15261532 else throw("Strict value is not equal to itself.")
15271533 }
15281534 else throw("Strict value is not equal to itself.")
15291535 }
15301536 else throw("Strict value is not equal to itself.")
15311537 }
15321538 else throw("Strict value is not equal to itself.")
15331539 }
15341540 else throw("Strict value is not equal to itself.")
15351541 }
15361542
15371543
15381544
15391545 @Callable(i)
15401546 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
15411547 let isGetDisabled = if (igs())
15421548 then true
15431549 else (cfgPoolStatus == PoolShutdown)
15441550 let checks = [if (!(isGetDisabled))
15451551 then true
15461552 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
15471553 then true
15481554 else throw("no payments are expected")]
15491555 if ((checks == checks))
15501556 then {
15511557 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15521558 if ((currentDLp == currentDLp))
15531559 then {
15541560 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
15551561 if ((unstakeInv == unstakeInv))
15561562 then {
15571563 let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
15581564 let outAmAmt = res._1
15591565 let outPrAmt = res._2
15601566 let state = res._10
15611567 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
15621568 then true
15631569 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
15641570 then true
15651571 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
15661572 if ((checkAmounts == checkAmounts))
15671573 then {
15681574 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15691575 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15701576 then {
1571- let $t05392754008 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1572- let refreshDLpActions = $t05392754008._1
1573- let updatedDLp = $t05392754008._2
1577+ let $t05419954280 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1578+ let refreshDLpActions = $t05419954280._1
1579+ let updatedDLp = $t05419954280._2
15741580 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15751581 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15761582 then (state ++ refreshDLpActions)
15771583 else throw("Strict value is not equal to itself.")
15781584 }
15791585 else throw("Strict value is not equal to itself.")
15801586 }
15811587 else throw("Strict value is not equal to itself.")
15821588 }
15831589 else throw("Strict value is not equal to itself.")
15841590 }
15851591 else throw("Strict value is not equal to itself.")
15861592 }
15871593 else throw("Strict value is not equal to itself.")
15881594 }
15891595
15901596
15911597
15921598 @Callable(i)
15931599 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
15941600 let isPoolOneTokenOperationsDisabled = {
15951601 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
15961602 if ($isInstanceOf(@, "Boolean"))
15971603 then @
15981604 else throw(($getType(@) + " couldn't be cast to Boolean"))
15991605 }
16001606 let isGetDisabled = if (if (igs())
16011607 then true
16021608 else (cfgPoolStatus == PoolShutdown))
16031609 then true
16041610 else isPoolOneTokenOperationsDisabled
16051611 let checks = [if (if (!(isGetDisabled))
16061612 then true
16071613 else isManager(i))
16081614 then true
16091615 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
16101616 then true
16111617 else throwErr("no payments are expected")]
16121618 if ((checks == checks))
16131619 then {
16141620 let factoryCfg = gfc()
16151621 let lpAssetId = cfgLpAssetId
16161622 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
16171623 let userAddress = i.caller
16181624 let lpAssetRecipientAddress = this
16191625 let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
16201626 if ((unstakeInv == unstakeInv))
16211627 then {
1622- let $t05503055218 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1623- let state = $t05503055218._1
1624- let totalAmount = $t05503055218._2
1628+ let $t05530255490 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1629+ let state = $t05530255490._1
1630+ let totalAmount = $t05530255490._2
16251631 $Tuple2(state, totalAmount)
16261632 }
16271633 else throw("Strict value is not equal to itself.")
16281634 }
16291635 else throw("Strict value is not equal to itself.")
16301636 }
16311637
16321638
16331639
16341640 @Callable(i)
16351641 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1636- let $t05534655449 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1637- let lpAmount = $t05534655449._1
1638- let state = $t05534655449._2
1639- let feeAmount = $t05534655449._3
1640- let bonus = $t05534655449._4
1642+ let $t05561855721 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1643+ let lpAmount = $t05561855721._1
1644+ let state = $t05561855721._2
1645+ let feeAmount = $t05561855721._3
1646+ let bonus = $t05561855721._4
16411647 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16421648 }
16431649
16441650
16451651
16461652 @Callable(i)
16471653 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1648- let $t05559755701 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1649- let lpAmount = $t05559755701._1
1650- let state = $t05559755701._2
1651- let feeAmount = $t05559755701._3
1652- let bonus = $t05559755701._4
1654+ let $t05586955973 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1655+ let lpAmount = $t05586955973._1
1656+ let state = $t05586955973._2
1657+ let feeAmount = $t05586955973._3
1658+ let bonus = $t05586955973._4
16531659 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16541660 }
16551661
16561662
16571663
16581664 @Callable(i)
16591665 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
16601666 then throw("denied")
16611667 else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
16621668
16631669
16641670
16651671 @Callable(i)
16661672 func setS (k,v) = if ((toString(i.caller) != strf(this, ada())))
16671673 then pd
16681674 else [StringEntry(k, v)]
16691675
16701676
16711677
16721678 @Callable(i)
16731679 func setI (k,v) = if ((toString(i.caller) != strf(this, ada())))
16741680 then pd
16751681 else [IntegerEntry(k, v)]
16761682
16771683
16781684
16791685 @Callable(i)
16801686 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
16811687
16821688
16831689
16841690 @Callable(i)
16851691 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
16861692
16871693
16881694
16891695 @Callable(i)
16901696 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
16911697 let pr = calcPrices(amAmt, prAmt, lpAmt)
16921698 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
16931699 }
16941700
16951701
16961702
16971703 @Callable(i)
16981704 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
16991705
17001706
17011707
17021708 @Callable(i)
17031709 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
17041710
17051711
17061712
17071713 @Callable(i)
17081714 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
17091715
17101716
17111717
17121718 @Callable(i)
17131719 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, ""))
17141720
17151721
17161722
17171723 @Callable(i)
17181724 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
17191725 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
17201726 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
17211727 }
17221728
17231729
17241730 @Verifier(tx)
17251731 func verify () = {
17261732 let targetPublicKey = match m() {
17271733 case pk: ByteVector =>
17281734 pk
17291735 case _: Unit =>
17301736 tx.senderPublicKey
17311737 case _ =>
17321738 throw("Match error")
17331739 }
17341740 match tx {
17351741 case order: Order =>
17361742 let matcherPub = mp()
1737- let $t05849358562 = validateMatcherOrderAllowed(order)
1738- let orderValid = $t05849358562._1
1739- let orderValidInfo = $t05849358562._2
1743+ let $t05876558882 = if (skipOrderValidation())
1744+ then $Tuple2(true, "")
1745+ else validateMatcherOrderAllowed(order)
1746+ let orderValid = $t05876558882._1
1747+ let orderValidInfo = $t05876558882._2
17401748 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17411749 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17421750 if (if (if (orderValid)
17431751 then senderValid
17441752 else false)
17451753 then matcherValid
17461754 else false)
17471755 then true
17481756 else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
17491757 case s: SetScriptTransaction =>
17501758 if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
17511759 then true
17521760 else {
17531761 let newHash = blake2b256(value(s.script))
17541762 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
17551763 let currentHash = scriptHash(this)
17561764 if ((allowedHash == newHash))
17571765 then (currentHash != newHash)
17581766 else false
17591767 }
17601768 case _ =>
17611769 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
17621770 }
17631771 }
17641772

github/deemru/w8io/026f985 
262.31 ms