tx · 7wXQx9mHF7gVGG8uaTCAQa1ERj3jvRhoVbTPf7MiHuzH

3N7b3kPunHUXhZp1vMG9NhPMARNEprCMWxT:  -0.03600000 Waves

2023.01.20 14:23 [2413225] smart account 3N7b3kPunHUXhZp1vMG9NhPMARNEprCMWxT > SELF 0.00000000 Waves

{ "type": 13, "id": "7wXQx9mHF7gVGG8uaTCAQa1ERj3jvRhoVbTPf7MiHuzH", "fee": 3600000, "feeAssetId": null, "timestamp": 1674213863084, "version": 1, "sender": "3N7b3kPunHUXhZp1vMG9NhPMARNEprCMWxT", "senderPublicKey": "AYbpHveq7zviKTDV7SGTB1pZGFbkumgfq3jSwVv6BznT", "proofs": [ "2JFj6zJy9abYJFjvDPZqhhHHHoLtZ1EzFeYJ1U84sg571jL5Agpq3expvD2RduuQCFs8j31yAhmQBEK9jApG2c2f" ], "script": "base64:BgKBLggCEgMKAQgSABIECgIBBBIDCgEBEgQKAgEEEgQKAggBEgQKAggBEgQKAggBEgUKAwEIARIAEgQKAgEBEgMKAQESBQoDAQEBEgQKAggIEgASABIDCgEIEgUKAwEBARIECgIBARIECgIIARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAEgMKAQESAwoBARIECgIIASIKbFBkZWNpbWFscyIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiC3dhdmVzU3RyaW5nIgNTRVAiClBvb2xBY3RpdmUiD1Bvb2xQdXREaXNhYmxlZCITUG9vbE1hdGNoZXJEaXNhYmxlZCIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyINaWR4UG9vbFN0YXR1cyIQaWR4UG9vbExQQXNzZXRJZCINaWR4QW10QXNzZXRJZCIPaWR4UHJpY2VBc3NldElkIg5pZHhBbXRBc3NldERjbSIQaWR4UHJpY2VBc3NldERjbSIOaWR4SUFtdEFzc2V0SWQiEGlkeElQcmljZUFzc2V0SWQiDWlkeExQQXNzZX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a5bicC63G Next: 3HzS5zWaowaTuXXM1UgzeTbZ81r8E2LGQWsoqGBe6F7k Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let lPdecimals = 8
5+
46 let scale8 = 100000000
7+
8+let scale8BigInt = toBigInt(100000000)
59
610 let scale18 = toBigInt(1000000000000000000)
711
1620 let wavesString = "WAVES"
1721
1822 let SEP = "__"
23+
24+let PoolActive = 1
1925
2026 let PoolPutDisabled = 2
2127
4147
4248 let idxIPriceAssetId = 9
4349
50+let idxLPAssetDcm = 10
51+
52+let idxPoolAmtAssetAmt = 1
53+
54+let idxPoolPriceAssetAmt = 2
55+
56+let idxPoolLPAssetAmt = 3
57+
4458 let idxFactoryStakingContract = 1
4559
4660 let idxFactorySlippageContract = 7
5569
5670
5771 func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
72+
73+
74+func toScale (amt,resScale,curScale) = fraction(amt, resScale, curScale)
75+
76+
77+func abs (val) = if ((0 > val))
78+ then -(val)
79+ else val
5880
5981
6082 func absBigInt (val) = if ((zeroBigInt > val))
109131
110132
111133 func keyMatcherPub () = "%s%s__matcher__publicKey"
134+
135+
136+func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
112137
113138
114139 func keyPoolConfig (iAmtAsset,iPriceAsset) = (((("%d%d%s__" + iAmtAsset) + "__") + iPriceAsset) + "__config")
193218
194219 let $t084088574 = poolConfigParsed
195220
221+let cfgPoolAddress = $t084088574._1
222+
196223 let cfgPoolStatus = $t084088574._2
197224
198225 let cfgLpAssetId = $t084088574._3
247274 let lpPriceInAmAssetX18 = calcPriceBigInt(amAmtX18, lpAmtX18)
248275 let lpPriceInPrAssetX18 = calcPriceBigInt(prAmtX18, lpAmtX18)
249276 [priceX18, lpPriceInAmAssetX18, lpPriceInPrAssetX18]
277+ }
278+
279+
280+func calculatePrices (amAmt,prAmt,lpAmt) = {
281+ let prices = calcPrices(amAmt, prAmt, lpAmt)
282+[fromX18(prices[0], scale8), fromX18(prices[1], scale8), fromX18(prices[2], scale8)]
250283 }
251284
252285
420453 let $t02200922109 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
421454 let unusedActions = $t02200922109._1
422455 let kLpNew = $t02200922109._2
423- let $t02211222174 = refreshKLpInternal(0, 0, 0)
424- let unusedActions0 = $t02211222174._1
425- let kLpCurrent = $t02211222174._2
426456 let isOrderValid = (kLpNew >= kLp)
427- let amountBalance = getAccBalance(assetIdToString(cfgAmountAssetId))
428- let priceBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
429- let amountBalanceX18 = toX18(amountBalance, cfgAmountAssetDecimals)
430- let amountBalanceX18New = (amountBalanceX18 + toX18(amountAssetBalanceDelta, cfgAmountAssetDecimals))
431- let priceBalanceX18 = toX18(priceBalance, cfgPriceAssetDecimals)
432- let priceBalanceX18New = (priceBalanceX18 + toX18(priceAssetBalanceDelta, cfgPriceAssetDecimals))
433- let k = pow((amountBalanceX18 * priceBalanceX18), 0, toBigInt(5), 1, 18, DOWN)
434- let kNew = pow((amountBalanceX18New * priceBalanceX18New), 0, toBigInt(5), 1, 18, DOWN)
435- let info = makeString([toString(kLp), toString(kLpNew), toString(k), toString(kNew)], " ")
457+ let info = makeString([toString(kLp), toString(kLpNew)], " ")
436458 $Tuple2(isOrderValid, info)
437459 }
438460 }
509531 else if ((paymentAssetId == cfgPriceAssetId))
510532 then false
511533 else throwErr("invalid asset")
512- let $t02569625989 = if (isEval)
534+ let $t02491625209 = if (isEval)
513535 then $Tuple2(amountBalanceRaw, priceBalanceRaw)
514536 else if (paymentInAmountAsset)
515537 then $Tuple2((amountBalanceRaw - paymentAmountRaw), priceBalanceRaw)
516538 else $Tuple2(amountBalanceRaw, (priceBalanceRaw - paymentAmountRaw))
517- let amountBalanceOld = $t02569625989._1
518- let priceBalanceOld = $t02569625989._2
519- let $t02599326142 = if (paymentInAmountAsset)
539+ let amountBalanceOld = $t02491625209._1
540+ let priceBalanceOld = $t02491625209._2
541+ let $t02521325362 = if (paymentInAmountAsset)
520542 then $Tuple2(paymentAmountRaw, 0)
521543 else $Tuple2(0, paymentAmountRaw)
522- let amountAssetAmountRaw = $t02599326142._1
523- let priceAssetAmountRaw = $t02599326142._2
544+ let amountAssetAmountRaw = $t02521325362._1
545+ let priceAssetAmountRaw = $t02521325362._2
524546 let amountAssetAmount = takeFee(amountAssetAmountRaw, inFee)._1
525547 let priceAssetAmount = takeFee(priceAssetAmountRaw, inFee)._1
526- let $t02627426338 = takeFee(paymentAmountRaw, inFee)
527- let paymentAmount = $t02627426338._1
528- let feeAmount = $t02627426338._2
548+ let $t02549425558 = takeFee(paymentAmountRaw, inFee)
549+ let paymentAmount = $t02549425558._1
550+ let feeAmount = $t02549425558._2
529551 let amountBalanceNew = (amountBalanceOld + amountAssetAmount)
530552 let priceBalanceNew = (priceBalanceOld + priceAssetAmount)
531553 let priceNewX18 = calcPriceBigInt(toX18(priceBalanceNew, cfgPriceAssetDecimals), toX18(amountBalanceNew, cfgAmountAssetDecimals))
548570 let priceOldX18 = calcPriceBigInt(toX18(priceBalanceOld, cfgPriceAssetDecimals), toX18(amountBalanceOld, cfgAmountAssetDecimals))
549571 let priceOld = fromX18(priceOldX18, scale8)
550572 let loss = {
551- let $t02801928186 = if (paymentInAmountAsset)
573+ let $t02723927406 = if (paymentInAmountAsset)
552574 then $Tuple2(amountAssetAmountRaw, amountBalanceOld)
553575 else $Tuple2(priceAssetAmountRaw, priceBalanceOld)
554- let amount = $t02801928186._1
555- let balance = $t02801928186._2
576+ let amount = $t02723927406._1
577+ let balance = $t02723927406._2
556578 let issueAmountBoth = toInt(fraction(supplyBigInt, toBigInt((amount / 2)), toBigInt(balance)))
557579 fraction((issueAmount - issueAmountBoth), scale8, issueAmountBoth)
558580 }
592614 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity)
593615 let redeemedBigInt = toBigInt(paymentAmount)
594616 let amountRaw = max([0, toInt(((balanceBigInt * (scale18 - pow((scale18 - ((redeemedBigInt * scale18) / supplyBigInt)), 18, big2, 0, 18, DOWN))) / scale18))])
595- let $t03026430320 = takeFee(amountRaw, outFee)
596- let totalAmount = $t03026430320._1
597- let feeAmount = $t03026430320._2
598- let $t03032430550 = if (outInAmountAsset)
617+ let $t02948429540 = takeFee(amountRaw, outFee)
618+ let totalAmount = $t02948429540._1
619+ let feeAmount = $t02948429540._2
620+ let $t02954429770 = if (outInAmountAsset)
599621 then $Tuple4(totalAmount, 0, (amBalanceOld - amountRaw), prBalanceOld)
600622 else $Tuple4(0, totalAmount, amBalanceOld, (prBalanceOld - amountRaw))
601- let outAmAmount = $t03032430550._1
602- let outPrAmount = $t03032430550._2
603- let amBalanceNew = $t03032430550._3
604- let prBalanceNew = $t03032430550._4
623+ let outAmAmount = $t02954429770._1
624+ let outPrAmount = $t02954429770._2
625+ let amBalanceNew = $t02954429770._3
626+ let prBalanceNew = $t02954429770._4
605627 let priceNewX18 = calcPriceBigInt(toX18(prBalanceNew, cfgPriceAssetDecimals), toX18(amBalanceNew, cfgAmountAssetDecimals))
606628 let priceNew = fromX18(priceNewX18, scale8)
607629 let commonState = if (isEval)
747769 else throw("Strict value is not equal to itself.")
748770 }
749771 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
750- let $t03507835540 = refreshKLpInternal(0, 0, 0)
751- if (($t03507835540 == $t03507835540))
772+ let $t03429834760 = refreshKLpInternal(0, 0, 0)
773+ if (($t03429834760 == $t03429834760))
752774 then {
753- let updatedKLp = $t03507835540._2
754- let refreshKLpActions = $t03507835540._1
775+ let updatedKLp = $t03429834760._2
776+ let refreshKLpActions = $t03429834760._1
755777 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
756778 if ((isUpdatedKLpValid == isUpdatedKLpValid))
757779 then ((state ++ lpTransfer) ++ refreshKLpActions)
783805 let currentKLp = calcCurrentKLp(amAssetPmt, prAssetPmt, toBigInt(0))
784806 if ((currentKLp == currentKLp))
785807 then {
786- let $t03610236167 = refreshKLpInternal(0, 0, 0)
787- let refreshKLpActions = $t03610236167._1
788- let updatedKLp = $t03610236167._2
808+ let $t03532235387 = refreshKLpInternal(0, 0, 0)
809+ let refreshKLpActions = $t03532235387._1
810+ let updatedKLp = $t03532235387._2
789811 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
790812 if ((isUpdatedKLpValid == isUpdatedKLpValid))
791813 then (state ++ refreshKLpActions)
832854 then {
833855 let userAddress = i.caller
834856 let txId = i.transactionId
835- let $t03735537507 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
836- if (($t03735537507 == $t03735537507))
857+ let $t03657536727 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
858+ if (($t03657536727 == $t03657536727))
837859 then {
838- let paymentInAmountAsset = $t03735537507._5
839- let bonus = $t03735537507._4
840- let feeAmount = $t03735537507._3
841- let commonState = $t03735537507._2
842- let emitAmountEstimated = $t03735537507._1
860+ let paymentInAmountAsset = $t03657536727._5
861+ let bonus = $t03657536727._4
862+ let feeAmount = $t03657536727._3
863+ let commonState = $t03657536727._2
864+ let emitAmountEstimated = $t03657536727._1
843865 let emitAmount = if (if ((minOutAmount > 0))
844866 then (minOutAmount > emitAmountEstimated)
845867 else false)
859881 let sendFee = if ((feeAmount > 0))
860882 then [ScriptTransfer(feeCollectorAddress, feeAmount, paymentAssetId)]
861883 else nil
862- let $t03809338290 = if ((this == feeCollectorAddress))
884+ let $t03731337510 = if ((this == feeCollectorAddress))
863885 then $Tuple2(0, 0)
864886 else if (paymentInAmountAsset)
865887 then $Tuple2(-(feeAmount), 0)
866888 else $Tuple2(0, -(feeAmount))
867- let amountAssetBalanceDelta = $t03809338290._1
868- let priceAssetBalanceDelta = $t03809338290._2
869- let $t03829338401 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
870- let refreshKLpActions = $t03829338401._1
871- let updatedKLp = $t03829338401._2
889+ let amountAssetBalanceDelta = $t03731337510._1
890+ let priceAssetBalanceDelta = $t03731337510._2
891+ let $t03751337621 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
892+ let refreshKLpActions = $t03751337621._1
893+ let updatedKLp = $t03751337621._2
872894 let kLp = value(getString(keyKLp))
873895 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
874896 if ((isUpdatedKLpValid == isUpdatedKLpValid))
888910
889911 @Callable(i)
890912 func putOneTknREADONLY (paymentAssetId,paymentAmountRaw) = {
891- let $t03870738864 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
892- let emitAmountEstimated = $t03870738864._1
893- let commonState = $t03870738864._2
894- let feeAmount = $t03870738864._3
895- let bonus = $t03870738864._4
896- let paymentInAmountAsset = $t03870738864._5
913+ let $t03792738084 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
914+ let emitAmountEstimated = $t03792738084._1
915+ let commonState = $t03792738084._2
916+ let feeAmount = $t03792738084._3
917+ let bonus = $t03792738084._4
918+ let paymentInAmountAsset = $t03792738084._5
897919 $Tuple2(nil, $Tuple3(emitAmountEstimated, feeAmount, bonus))
898920 }
899921
930952 then {
931953 let userAddress = i.caller
932954 let txId = i.transactionId
933- let $t03974939902 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
934- if (($t03974939902 == $t03974939902))
955+ let $t03896939122 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
956+ if (($t03896939122 == $t03896939122))
935957 then {
936- let outInAmountAsset = $t03974939902._5
937- let bonus = $t03974939902._4
938- let feeAmount = $t03974939902._3
939- let commonState = $t03974939902._2
940- let amountEstimated = $t03974939902._1
958+ let outInAmountAsset = $t03896939122._5
959+ let bonus = $t03896939122._4
960+ let feeAmount = $t03896939122._3
961+ let commonState = $t03896939122._2
962+ let amountEstimated = $t03896939122._1
941963 let amount = if (if ((minOutAmount > 0))
942964 then (minOutAmount > amountEstimated)
943965 else false)
950972 let sendFee = if ((feeAmount > 0))
951973 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
952974 else nil
953- let $t04040240649 = {
975+ let $t03962239869 = {
954976 let feeAmountForCalc = if ((this == feeCollectorAddress))
955977 then 0
956978 else feeAmount
958980 then $Tuple2(-((amount + feeAmountForCalc)), 0)
959981 else $Tuple2(0, -((amount + feeAmountForCalc)))
960982 }
961- let amountAssetBalanceDelta = $t04040240649._1
962- let priceAssetBalanceDelta = $t04040240649._2
963- let $t04065240760 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
964- let refreshKLpActions = $t04065240760._1
965- let updatedKLp = $t04065240760._2
983+ let amountAssetBalanceDelta = $t03962239869._1
984+ let priceAssetBalanceDelta = $t03962239869._2
985+ let $t03987239980 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
986+ let refreshKLpActions = $t03987239980._1
987+ let updatedKLp = $t03987239980._2
966988 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
967989 if ((isUpdatedKLpValid == isUpdatedKLpValid))
968990 then $Tuple2((((commonState ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
9811003
9821004 @Callable(i)
9831005 func getOneTknREADONLY (outAssetId,paymentAmount) = {
984- let $t04101741173 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
985- let amountEstimated = $t04101741173._1
986- let commonState = $t04101741173._2
987- let feeAmount = $t04101741173._3
988- let bonus = $t04101741173._4
989- let outInAmountAsset = $t04101741173._5
1006+ let $t04023740393 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
1007+ let amountEstimated = $t04023740393._1
1008+ let commonState = $t04023740393._2
1009+ let feeAmount = $t04023740393._3
1010+ let bonus = $t04023740393._4
1011+ let outInAmountAsset = $t04023740393._5
9901012 $Tuple2(nil, $Tuple3(amountEstimated, feeAmount, bonus))
9911013 }
9921014
10231045 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
10241046 if ((unstakeInv == unstakeInv))
10251047 then {
1026- let $t04207842229 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
1027- if (($t04207842229 == $t04207842229))
1048+ let $t04129841449 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
1049+ if (($t04129841449 == $t04129841449))
10281050 then {
1029- let outInAmountAsset = $t04207842229._5
1030- let bonus = $t04207842229._4
1031- let feeAmount = $t04207842229._3
1032- let commonState = $t04207842229._2
1033- let amountEstimated = $t04207842229._1
1051+ let outInAmountAsset = $t04129841449._5
1052+ let bonus = $t04129841449._4
1053+ let feeAmount = $t04129841449._3
1054+ let commonState = $t04129841449._2
1055+ let amountEstimated = $t04129841449._1
10341056 let amount = if (if ((minOutAmount > 0))
10351057 then (minOutAmount > amountEstimated)
10361058 else false)
10431065 let sendFee = if ((feeAmount > 0))
10441066 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
10451067 else nil
1046- let $t04272442971 = {
1068+ let $t04194442191 = {
10471069 let feeAmountForCalc = if ((this == feeCollectorAddress))
10481070 then 0
10491071 else feeAmount
10511073 then $Tuple2(-((amount + feeAmountForCalc)), 0)
10521074 else $Tuple2(0, -((amount + feeAmountForCalc)))
10531075 }
1054- let amountAssetBalanceDelta = $t04272442971._1
1055- let priceAssetBalanceDelta = $t04272442971._2
1056- let $t04297443082 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1057- let refreshKLpActions = $t04297443082._1
1058- let updatedKLp = $t04297443082._2
1076+ let amountAssetBalanceDelta = $t04194442191._1
1077+ let priceAssetBalanceDelta = $t04194442191._2
1078+ let $t04219442302 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1079+ let refreshKLpActions = $t04219442302._1
1080+ let updatedKLp = $t04219442302._2
10591081 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
10601082 if ((isUpdatedKLpValid == isUpdatedKLpValid))
10611083 then $Tuple2((((commonState ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
10881110 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
10891111 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
10901112 then {
1091- let $t04402844110 = refreshKLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1092- let refreshKLpActions = $t04402844110._1
1093- let updatedKLp = $t04402844110._2
1113+ let $t04324843330 = refreshKLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1114+ let refreshKLpActions = $t04324843330._1
1115+ let updatedKLp = $t04324843330._2
10941116 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
10951117 if ((isUpdatedKLpValid == isUpdatedKLpValid))
10961118 then (state ++ refreshKLpActions)
11221144 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
11231145 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11241146 then {
1125- let $t04505945140 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1126- let refreshKLpActions = $t04505945140._1
1127- let updatedKLp = $t04505945140._2
1147+ let $t04427944360 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1148+ let refreshKLpActions = $t04427944360._1
1149+ let updatedKLp = $t04427944360._2
11281150 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11291151 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11301152 then (state ++ refreshKLpActions)
11681190 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
11691191 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11701192 then {
1171- let $t04626646347 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1172- let refreshKLpActions = $t04626646347._1
1173- let updatedKLp = $t04626646347._2
1193+ let $t04548645567 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1194+ let refreshKLpActions = $t04548645567._1
1195+ let updatedKLp = $t04548645567._2
11741196 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11751197 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11761198 then (state ++ refreshKLpActions)
12211243 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
12221244 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
12231245 then {
1224- let $t04764247723 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1225- let refreshKLpActions = $t04764247723._1
1226- let updatedKLp = $t04764247723._2
1246+ let $t04686246943 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1247+ let refreshKLpActions = $t04686246943._1
1248+ let updatedKLp = $t04686246943._2
12271249 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
12281250 if ((isUpdatedKLpValid == isUpdatedKLpValid))
12291251 then (state ++ refreshKLpActions)
12581280 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
12591281 then {
12601282 let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp"))
1261- let $t04891048974 = refreshKLpInternal(0, 0, 0)
1262- let kLpUpdateActions = $t04891048974._1
1263- let updatedKLp = $t04891048974._2
1283+ let $t04813048194 = refreshKLpInternal(0, 0, 0)
1284+ let kLpUpdateActions = $t04813048194._1
1285+ let updatedKLp = $t04813048194._2
12641286 let actions = if ((kLp != updatedKLp))
12651287 then kLpUpdateActions
12661288 else throwErr("nothing to refresh")
14351457 match tx {
14361458 case order: Order =>
14371459 let matcherPub = getMatcherPubOrFail()
1438- let $t05763657705 = validateMatcherOrderAllowed(order)
1439- let orderValid = $t05763657705._1
1440- let orderValidInfo = $t05763657705._2
1460+ let $t05685656925 = validateMatcherOrderAllowed(order)
1461+ let orderValid = $t05685656925._1
1462+ let orderValidInfo = $t05685656925._2
14411463 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
14421464 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
14431465 if (if (if (orderValid)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let lPdecimals = 8
5+
46 let scale8 = 100000000
7+
8+let scale8BigInt = toBigInt(100000000)
59
610 let scale18 = toBigInt(1000000000000000000)
711
812 let zeroBigInt = toBigInt(0)
913
1014 let big0 = toBigInt(0)
1115
1216 let big1 = toBigInt(1)
1317
1418 let big2 = toBigInt(2)
1519
1620 let wavesString = "WAVES"
1721
1822 let SEP = "__"
23+
24+let PoolActive = 1
1925
2026 let PoolPutDisabled = 2
2127
2228 let PoolMatcherDisabled = 3
2329
2430 let PoolShutdown = 4
2531
2632 let idxPoolAddress = 1
2733
2834 let idxPoolStatus = 2
2935
3036 let idxPoolLPAssetId = 3
3137
3238 let idxAmtAssetId = 4
3339
3440 let idxPriceAssetId = 5
3541
3642 let idxAmtAssetDcm = 6
3743
3844 let idxPriceAssetDcm = 7
3945
4046 let idxIAmtAssetId = 8
4147
4248 let idxIPriceAssetId = 9
4349
50+let idxLPAssetDcm = 10
51+
52+let idxPoolAmtAssetAmt = 1
53+
54+let idxPoolPriceAssetAmt = 2
55+
56+let idxPoolLPAssetAmt = 3
57+
4458 let idxFactoryStakingContract = 1
4559
4660 let idxFactorySlippageContract = 7
4761
4862 func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
4963
5064
5165 func toX18BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult)
5266
5367
5468 func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
5569
5670
5771 func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
72+
73+
74+func toScale (amt,resScale,curScale) = fraction(amt, resScale, curScale)
75+
76+
77+func abs (val) = if ((0 > val))
78+ then -(val)
79+ else val
5880
5981
6082 func absBigInt (val) = if ((zeroBigInt > val))
6183 then -(val)
6284 else val
6385
6486
6587 func fc () = "%s__factoryContract"
6688
6789
6890 func mpk () = "%s__managerPublicKey"
6991
7092
7193 func pmpk () = "%s__pendingManagerPublicKey"
7294
7395
7496 func pl () = "%s%s__price__last"
7597
7698
7799 func ph (h,timestamp) = makeString(["%s%s%d%d__price__history", toString(h), toString(timestamp)], SEP)
78100
79101
80102 func pau (userAddress,txId) = ((("%s%s%s__P__" + userAddress) + "__") + txId)
81103
82104
83105 func gau (userAddress,txId) = ((("%s%s%s__G__" + userAddress) + "__") + txId)
84106
85107
86108 func aa () = "%s__amountAsset"
87109
88110
89111 func pa () = "%s__priceAsset"
90112
91113
92114 let keyFee = "%s__fee"
93115
94116 let feeDefault = fraction(10, scale8, 10000)
95117
96118 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
97119
98120 let keyKLp = makeString(["%s", "kLp"], SEP)
99121
100122 let keyKLpRefreshedHeight = makeString(["%s", "kLpRefreshedHeight"], SEP)
101123
102124 let keyKLpRefreshDelay = makeString(["%s", "refreshKLpDelay"], SEP)
103125
104126 let kLpRefreshDelayDefault = 30
105127
106128 let kLpRefreshDelay = valueOrElse(getInteger(this, keyKLpRefreshDelay), kLpRefreshDelayDefault)
107129
108130 func keyFactoryConfig () = "%s__factoryConfig"
109131
110132
111133 func keyMatcherPub () = "%s%s__matcher__publicKey"
134+
135+
136+func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
112137
113138
114139 func keyPoolConfig (iAmtAsset,iPriceAsset) = (((("%d%d%s__" + iAmtAsset) + "__") + iPriceAsset) + "__config")
115140
116141
117142 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
118143
119144
120145 func keyAllPoolsShutdown () = "%s__shutdown"
121146
122147
123148 func keyPoolWeight (contractAddress) = ("%s%s__poolWeight__" + contractAddress)
124149
125150
126151 func keyAllowedLpScriptHash () = "%s__allowedLpScriptHash"
127152
128153
129154 let keyFeeCollectorAddress = "%s__feeCollectorAddress"
130155
131156 func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
132157
133158
134159 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
135160
136161
137162 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
138163
139164
140165 func throwErr (msg) = throw(makeString(["lp.ride:", msg], " "))
141166
142167
143168 func fmtErr (msg) = makeString(["lp.ride:", msg], " ")
144169
145170
146171 let factoryContract = addressFromStringValue(getStringOrFail(this, fc()))
147172
148173 let feeCollectorAddress = addressFromStringValue(getStringOrFail(factoryContract, keyFeeCollectorAddress))
149174
150175 let inFee = {
151176 let @ = invoke(factoryContract, "getInFeeREADONLY", [toString(this)], nil)
152177 if ($isInstanceOf(@, "Int"))
153178 then @
154179 else throw(($getType(@) + " couldn't be cast to Int"))
155180 }
156181
157182 let outFee = {
158183 let @ = invoke(factoryContract, "getOutFeeREADONLY", [toString(this)], nil)
159184 if ($isInstanceOf(@, "Int"))
160185 then @
161186 else throw(($getType(@) + " couldn't be cast to Int"))
162187 }
163188
164189 func isGlobalShutdown () = valueOrElse(getBoolean(factoryContract, keyAllPoolsShutdown()), false)
165190
166191
167192 func getMatcherPubOrFail () = fromBase58String(getStringOrFail(factoryContract, keyMatcherPub()))
168193
169194
170195 func getPoolConfig () = {
171196 let amtAsset = getStringOrFail(this, aa())
172197 let priceAsset = getStringOrFail(this, pa())
173198 let iPriceAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAsset))
174199 let iAmtAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amtAsset))
175200 split(getStringOrFail(factoryContract, keyPoolConfig(toString(iAmtAsset), toString(iPriceAsset))), SEP)
176201 }
177202
178203
179204 func parseAssetId (input) = if ((input == wavesString))
180205 then unit
181206 else fromBase58String(input)
182207
183208
184209 func assetIdToString (input) = if ((input == unit))
185210 then wavesString
186211 else toBase58String(value(input))
187212
188213
189214 func parsePoolConfig (poolConfig) = $Tuple7(addressFromStringValue(poolConfig[idxPoolAddress]), parseIntValue(poolConfig[idxPoolStatus]), fromBase58String(poolConfig[idxPoolLPAssetId]), parseAssetId(poolConfig[idxAmtAssetId]), parseAssetId(poolConfig[idxPriceAssetId]), parseIntValue(poolConfig[idxAmtAssetDcm]), parseIntValue(poolConfig[idxPriceAssetDcm]))
190215
191216
192217 let poolConfigParsed = parsePoolConfig(getPoolConfig())
193218
194219 let $t084088574 = poolConfigParsed
195220
221+let cfgPoolAddress = $t084088574._1
222+
196223 let cfgPoolStatus = $t084088574._2
197224
198225 let cfgLpAssetId = $t084088574._3
199226
200227 let cfgAmountAssetId = $t084088574._4
201228
202229 let cfgPriceAssetId = $t084088574._5
203230
204231 let cfgAmountAssetDecimals = $t084088574._6
205232
206233 let cfgPriceAssetDecimals = $t084088574._7
207234
208235 func getFactoryConfig () = split(getStringOrFail(factoryContract, keyFactoryConfig()), SEP)
209236
210237
211238 let stakingContract = valueOrErrorMessage(addressFromString(getFactoryConfig()[idxFactoryStakingContract]), "incorrect staking address")
212239
213240 let slippageContract = valueOrErrorMessage(addressFromString(getFactoryConfig()[idxFactorySlippageContract]), "incorrect staking address")
214241
215242 func dataPutActionInfo (inAmtAssetAmt,inPriceAssetAmt,outLpAmt,price,slippageTolerancePassedByUser,slippageToleranceReal,txHeight,txTimestamp,slipageAmtAssetAmt,slipagePriceAssetAmt) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(inAmtAssetAmt), toString(inPriceAssetAmt), toString(outLpAmt), toString(price), toString(slippageTolerancePassedByUser), toString(slippageToleranceReal), toString(txHeight), toString(txTimestamp), toString(slipageAmtAssetAmt), toString(slipagePriceAssetAmt)], SEP)
216243
217244
218245 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)
219246
220247
221248 func getAccBalance (assetId) = if ((assetId == "WAVES"))
222249 then wavesBalance(this).available
223250 else assetBalance(this, fromBase58String(assetId))
224251
225252
226253 func calcPriceBigInt (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
227254
228255
229256 func calcPriceBigIntRound (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
230257
231258
232259 func privateCalcPrice (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
233260 let amtAssetAmtX18 = toX18(amAmt, amAssetDcm)
234261 let priceAssetAmtX18 = toX18(prAmt, prAssetDcm)
235262 calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18)
236263 }
237264
238265
239266 func calcPrices (amAmt,prAmt,lpAmt) = {
240267 let cfg = getPoolConfig()
241268 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
242269 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
243270 let priceX18 = privateCalcPrice(amtAssetDcm, priceAssetDcm, amAmt, prAmt)
244271 let amAmtX18 = toX18(amAmt, amtAssetDcm)
245272 let prAmtX18 = toX18(prAmt, priceAssetDcm)
246273 let lpAmtX18 = toX18(lpAmt, scale8)
247274 let lpPriceInAmAssetX18 = calcPriceBigInt(amAmtX18, lpAmtX18)
248275 let lpPriceInPrAssetX18 = calcPriceBigInt(prAmtX18, lpAmtX18)
249276 [priceX18, lpPriceInAmAssetX18, lpPriceInPrAssetX18]
277+ }
278+
279+
280+func calculatePrices (amAmt,prAmt,lpAmt) = {
281+ let prices = calcPrices(amAmt, prAmt, lpAmt)
282+[fromX18(prices[0], scale8), fromX18(prices[1], scale8), fromX18(prices[2], scale8)]
250283 }
251284
252285
253286 func estimateGetOperation (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
254287 let cfg = getPoolConfig()
255288 let lpAssetId = cfg[idxPoolLPAssetId]
256289 let amAssetId = cfg[idxAmtAssetId]
257290 let prAssetId = cfg[idxPriceAssetId]
258291 let amAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
259292 let prAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
260293 let poolStatus = cfg[idxPoolStatus]
261294 let lpEmission = valueOrErrorMessage(assetInfo(fromBase58String(lpAssetId)), (("Asset " + lpAssetId) + " doesn't exist")).quantity
262295 if ((lpAssetId != pmtAssetId))
263296 then throw("Invalid asset passed.")
264297 else {
265298 let amBalance = getAccBalance(amAssetId)
266299 let amBalanceX18 = toX18(amBalance, amAssetDcm)
267300 let prBalance = getAccBalance(prAssetId)
268301 let prBalanceX18 = toX18(prBalance, prAssetDcm)
269302 let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18)
270303 let curPrice = fromX18(curPriceX18, scale8)
271304 let pmtLpAmtX18 = toX18(pmtLpAmt, scale8)
272305 let lpEmissionX18 = toX18(lpEmission, scale8)
273306 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissionX18)
274307 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissionX18)
275308 let outAmAmt = fromX18Round(outAmAmtX18, amAssetDcm, FLOOR)
276309 let outPrAmt = fromX18Round(outPrAmtX18, prAssetDcm, FLOOR)
277310 let state = if ((txId58 == ""))
278311 then nil
279312 else [ScriptTransfer(userAddress, outAmAmt, if ((amAssetId == "WAVES"))
280313 then unit
281314 else fromBase58String(amAssetId)), ScriptTransfer(userAddress, outPrAmt, if ((prAssetId == "WAVES"))
282315 then unit
283316 else fromBase58String(prAssetId)), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAmAmt, outPrAmt, pmtLpAmt, curPrice, height, lastBlock.timestamp)), IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice)]
284317 $Tuple10(outAmAmt, outPrAmt, amAssetId, prAssetId, amBalance, prBalance, lpEmission, curPriceX18, poolStatus, state)
285318 }
286319 }
287320
288321
289322 func estimatePutOperation (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = {
290323 let cfg = getPoolConfig()
291324 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
292325 let amAssetIdStr = cfg[idxAmtAssetId]
293326 let prAssetIdStr = cfg[idxPriceAssetId]
294327 let iAmtAssetId = cfg[idxIAmtAssetId]
295328 let iPriceAssetId = cfg[idxIPriceAssetId]
296329 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
297330 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
298331 let poolStatus = cfg[idxPoolStatus]
299332 let lpEmission = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
300333 let inAmAssetIdStr = toBase58String(valueOrElse(inAmAssetId, fromBase58String("WAVES")))
301334 let inPrAssetIdStr = toBase58String(valueOrElse(inPrAssetId, fromBase58String("WAVES")))
302335 if (if ((amAssetIdStr != inAmAssetIdStr))
303336 then true
304337 else (prAssetIdStr != inPrAssetIdStr))
305338 then throw("Invalid amt or price asset passed.")
306339 else {
307340 let amBalance = if (isEvaluate)
308341 then getAccBalance(amAssetIdStr)
309342 else (getAccBalance(amAssetIdStr) - inAmAssetAmt)
310343 let prBalance = if (isEvaluate)
311344 then getAccBalance(prAssetIdStr)
312345 else (getAccBalance(prAssetIdStr) - inPrAssetAmt)
313346 let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm)
314347 let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm)
315348 let userPriceX18 = calcPriceBigInt(inPrAssetAmtX18, inAmAssetAmtX18)
316349 let amBalanceX18 = toX18(amBalance, amtAssetDcm)
317350 let prBalanceX18 = toX18(prBalance, priceAssetDcm)
318351 let res = if ((lpEmission == 0))
319352 then {
320353 let curPriceX18 = zeroBigInt
321354 let slippageX18 = zeroBigInt
322355 let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN)
323356 $Tuple5(fromX18(lpAmtX18, scale8), fromX18(inAmAssetAmtX18, amtAssetDcm), fromX18(inPrAssetAmtX18, priceAssetDcm), calcPriceBigInt((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
324357 }
325358 else {
326359 let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18)
327360 let slippageX18 = fraction(absBigInt((curPriceX18 - userPriceX18)), scale18, curPriceX18)
328361 let slippageToleranceX18 = toX18(slippageTolerance, scale8)
329362 if (if ((curPriceX18 != zeroBigInt))
330363 then (slippageX18 > slippageToleranceX18)
331364 else false)
332365 then throw(((("Price slippage " + toString(slippageX18)) + " exceeded the passed limit of ") + toString(slippageToleranceX18)))
333366 else {
334367 let lpEmissionX18 = toX18(lpEmission, scale8)
335368 let prViaAmX18 = fraction(inAmAssetAmtX18, calcPriceBigIntRound(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING)
336369 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, calcPriceBigIntRound(prBalanceX18, amBalanceX18, FLOOR), CEILING)
337370 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
338371 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
339372 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
340373 let expAmtAssetAmtX18 = expectedAmts._1
341374 let expPriceAssetAmtX18 = expectedAmts._2
342375 let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18, FLOOR)
343376 $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtAssetDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceAssetDcm, CEILING), curPriceX18, slippageX18)
344377 }
345378 }
346379 let calcLpAmt = res._1
347380 let calcAmAssetPmt = res._2
348381 let calcPrAssetPmt = res._3
349382 let curPrice = fromX18(res._4, scale8)
350383 let slippageCalc = fromX18(res._5, scale8)
351384 if ((0 >= calcLpAmt))
352385 then throw("Invalid calculations. LP calculated is less than zero.")
353386 else {
354387 let emitLpAmt = if (!(emitLp))
355388 then 0
356389 else calcLpAmt
357390 let amDiff = (inAmAssetAmt - calcAmAssetPmt)
358391 let prDiff = (inPrAssetAmt - calcPrAssetPmt)
359392 let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId58), dataPutActionInfo(calcAmAssetPmt, calcPrAssetPmt, emitLpAmt, curPrice, slippageTolerance, slippageCalc, height, lastBlock.timestamp, amDiff, prDiff))]
360393 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEmission, lpAssetId, poolStatus, commonState, amDiff, prDiff, inAmAssetId, inPrAssetId)
361394 }
362395 }
363396 }
364397
365398
366399 func calcKLp (amountBalance,priceBalance,lpEmission) = {
367400 let amountBalanceX18 = toX18BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals))
368401 let priceBalanceX18 = toX18BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))
369402 let updatedKLp = fraction(pow((amountBalanceX18 * priceBalanceX18), 0, toBigInt(5), 1, 18, DOWN), big1, lpEmission)
370403 if ((lpEmission == big0))
371404 then big0
372405 else updatedKLp
373406 }
374407
375408
376409 func calcCurrentKLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
377410 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
378411 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
379412 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
380413 let currentKLp = calcKLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
381414 currentKLp
382415 }
383416
384417
385418 func refreshKLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
386419 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
387420 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
388421 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
389422 let updatedKLp = calcKLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
390423 let actions = [IntegerEntry(keyKLpRefreshedHeight, height), StringEntry(keyKLp, toString(updatedKLp))]
391424 $Tuple2(actions, updatedKLp)
392425 }
393426
394427
395428 func validateUpdatedKLp (oldKLp,updatedKLp) = if ((updatedKLp >= oldKLp))
396429 then true
397430 else throwErr(makeString(["updated KLp lower than current KLp", toString(oldKLp), toString(updatedKLp)], " "))
398431
399432
400433 func validateMatcherOrderAllowed (order) = {
401434 let amountAssetAmount = order.amount
402435 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
403436 let $t02132621538 = if ((order.orderType == Buy))
404437 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
405438 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
406439 let amountAssetBalanceDelta = $t02132621538._1
407440 let priceAssetBalanceDelta = $t02132621538._2
408441 if (if (if (isGlobalShutdown())
409442 then true
410443 else (cfgPoolStatus == PoolMatcherDisabled))
411444 then true
412445 else (cfgPoolStatus == PoolShutdown))
413446 then throw("Exchange operations disabled")
414447 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
415448 then true
416449 else (order.assetPair.priceAsset != cfgPriceAssetId))
417450 then throw("Wrong order assets.")
418451 else {
419452 let kLp = valueOrErrorMessage(parseBigInt(valueOrErrorMessage(getString(this, keyKLp), fmtErr("kLp is required"))), fmtErr("invalid kLp"))
420453 let $t02200922109 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
421454 let unusedActions = $t02200922109._1
422455 let kLpNew = $t02200922109._2
423- let $t02211222174 = refreshKLpInternal(0, 0, 0)
424- let unusedActions0 = $t02211222174._1
425- let kLpCurrent = $t02211222174._2
426456 let isOrderValid = (kLpNew >= kLp)
427- let amountBalance = getAccBalance(assetIdToString(cfgAmountAssetId))
428- let priceBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
429- let amountBalanceX18 = toX18(amountBalance, cfgAmountAssetDecimals)
430- let amountBalanceX18New = (amountBalanceX18 + toX18(amountAssetBalanceDelta, cfgAmountAssetDecimals))
431- let priceBalanceX18 = toX18(priceBalance, cfgPriceAssetDecimals)
432- let priceBalanceX18New = (priceBalanceX18 + toX18(priceAssetBalanceDelta, cfgPriceAssetDecimals))
433- let k = pow((amountBalanceX18 * priceBalanceX18), 0, toBigInt(5), 1, 18, DOWN)
434- let kNew = pow((amountBalanceX18New * priceBalanceX18New), 0, toBigInt(5), 1, 18, DOWN)
435- let info = makeString([toString(kLp), toString(kLpNew), toString(k), toString(kNew)], " ")
457+ let info = makeString([toString(kLp), toString(kLpNew)], " ")
436458 $Tuple2(isOrderValid, info)
437459 }
438460 }
439461
440462
441463 func commonGet (i) = if ((size(i.payments) != 1))
442464 then throw("exactly 1 payment is expected")
443465 else {
444466 let pmt = value(i.payments[0])
445467 let pmtAssetId = value(pmt.assetId)
446468 let pmtAmt = pmt.amount
447469 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
448470 let outAmAmt = res._1
449471 let outPrAmt = res._2
450472 let poolStatus = parseIntValue(res._9)
451473 let state = res._10
452474 if (if (isGlobalShutdown())
453475 then true
454476 else (poolStatus == PoolShutdown))
455477 then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus)))
456478 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
457479 }
458480
459481
460482 func commonPut (i,slippageTolerance,emitLp) = if ((size(i.payments) != 2))
461483 then throw("exactly 2 payments are expected")
462484 else {
463485 let amAssetPmt = value(i.payments[0])
464486 let prAssetPmt = value(i.payments[1])
465487 let estPut = estimatePutOperation(toBase58String(i.transactionId), slippageTolerance, amAssetPmt.amount, amAssetPmt.assetId, prAssetPmt.amount, prAssetPmt.assetId, toString(i.caller), false, emitLp)
466488 let poolStatus = parseIntValue(estPut._8)
467489 if (if (if (isGlobalShutdown())
468490 then true
469491 else (poolStatus == PoolPutDisabled))
470492 then true
471493 else (poolStatus == PoolShutdown))
472494 then throw(("Put operation is blocked by admin. Status = " + toString(poolStatus)))
473495 else estPut
474496 }
475497
476498
477499 func emit (amount) = {
478500 let emitInv = invoke(factoryContract, "emit", [amount], nil)
479501 if ((emitInv == emitInv))
480502 then {
481503 let emitInvLegacy = match emitInv {
482504 case legacyFactoryContract: Address =>
483505 invoke(legacyFactoryContract, "emit", [amount], nil)
484506 case _ =>
485507 unit
486508 }
487509 if ((emitInvLegacy == emitInvLegacy))
488510 then amount
489511 else throw("Strict value is not equal to itself.")
490512 }
491513 else throw("Strict value is not equal to itself.")
492514 }
493515
494516
495517 func takeFee (amount,fee) = {
496518 let feeAmount = if ((fee == 0))
497519 then 0
498520 else fraction(amount, fee, scale8)
499521 $Tuple2((amount - feeAmount), feeAmount)
500522 }
501523
502524
503525 func calcPutOneToken (paymentAmountRaw,paymentAssetId,userAddress,txId) = {
504526 let isEval = (txId == unit)
505527 let amountBalanceRaw = getAccBalance(assetIdToString(cfgAmountAssetId))
506528 let priceBalanceRaw = getAccBalance(assetIdToString(cfgPriceAssetId))
507529 let paymentInAmountAsset = if ((paymentAssetId == cfgAmountAssetId))
508530 then true
509531 else if ((paymentAssetId == cfgPriceAssetId))
510532 then false
511533 else throwErr("invalid asset")
512- let $t02569625989 = if (isEval)
534+ let $t02491625209 = if (isEval)
513535 then $Tuple2(amountBalanceRaw, priceBalanceRaw)
514536 else if (paymentInAmountAsset)
515537 then $Tuple2((amountBalanceRaw - paymentAmountRaw), priceBalanceRaw)
516538 else $Tuple2(amountBalanceRaw, (priceBalanceRaw - paymentAmountRaw))
517- let amountBalanceOld = $t02569625989._1
518- let priceBalanceOld = $t02569625989._2
519- let $t02599326142 = if (paymentInAmountAsset)
539+ let amountBalanceOld = $t02491625209._1
540+ let priceBalanceOld = $t02491625209._2
541+ let $t02521325362 = if (paymentInAmountAsset)
520542 then $Tuple2(paymentAmountRaw, 0)
521543 else $Tuple2(0, paymentAmountRaw)
522- let amountAssetAmountRaw = $t02599326142._1
523- let priceAssetAmountRaw = $t02599326142._2
544+ let amountAssetAmountRaw = $t02521325362._1
545+ let priceAssetAmountRaw = $t02521325362._2
524546 let amountAssetAmount = takeFee(amountAssetAmountRaw, inFee)._1
525547 let priceAssetAmount = takeFee(priceAssetAmountRaw, inFee)._1
526- let $t02627426338 = takeFee(paymentAmountRaw, inFee)
527- let paymentAmount = $t02627426338._1
528- let feeAmount = $t02627426338._2
548+ let $t02549425558 = takeFee(paymentAmountRaw, inFee)
549+ let paymentAmount = $t02549425558._1
550+ let feeAmount = $t02549425558._2
529551 let amountBalanceNew = (amountBalanceOld + amountAssetAmount)
530552 let priceBalanceNew = (priceBalanceOld + priceAssetAmount)
531553 let priceNewX18 = calcPriceBigInt(toX18(priceBalanceNew, cfgPriceAssetDecimals), toX18(amountBalanceNew, cfgAmountAssetDecimals))
532554 let priceNew = fromX18(priceNewX18, scale8)
533555 let paymentBalance = if (paymentInAmountAsset)
534556 then amountBalanceOld
535557 else priceBalanceOld
536558 let paymentBalanceBigInt = toBigInt(paymentBalance)
537559 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity)
538560 let chechSupply = if ((supplyBigInt > big0))
539561 then true
540562 else throwErr("initial deposit requires all coins")
541563 if ((chechSupply == chechSupply))
542564 then {
543565 let depositBigInt = toBigInt(paymentAmount)
544566 let issueAmount = max([0, toInt(((supplyBigInt * (sqrtBigInt((scale18 + ((depositBigInt * scale18) / paymentBalanceBigInt)), 18, 18, DOWN) - scale18)) / scale18))])
545567 let commonState = if (isEval)
546568 then nil
547569 else [IntegerEntry(pl(), priceNew), IntegerEntry(ph(height, lastBlock.timestamp), priceNew), StringEntry(pau(toString(value(userAddress)), toBase58String(value(txId))), dataPutActionInfo(amountAssetAmountRaw, priceAssetAmountRaw, issueAmount, priceNew, 0, 0, height, lastBlock.timestamp, 0, 0))]
548570 let priceOldX18 = calcPriceBigInt(toX18(priceBalanceOld, cfgPriceAssetDecimals), toX18(amountBalanceOld, cfgAmountAssetDecimals))
549571 let priceOld = fromX18(priceOldX18, scale8)
550572 let loss = {
551- let $t02801928186 = if (paymentInAmountAsset)
573+ let $t02723927406 = if (paymentInAmountAsset)
552574 then $Tuple2(amountAssetAmountRaw, amountBalanceOld)
553575 else $Tuple2(priceAssetAmountRaw, priceBalanceOld)
554- let amount = $t02801928186._1
555- let balance = $t02801928186._2
576+ let amount = $t02723927406._1
577+ let balance = $t02723927406._2
556578 let issueAmountBoth = toInt(fraction(supplyBigInt, toBigInt((amount / 2)), toBigInt(balance)))
557579 fraction((issueAmount - issueAmountBoth), scale8, issueAmountBoth)
558580 }
559581 $Tuple5(issueAmount, commonState, feeAmount, loss, paymentInAmountAsset)
560582 }
561583 else throw("Strict value is not equal to itself.")
562584 }
563585
564586
565587 func calcGetOneToken (outAssetId,paymentAmount,paymentAssetId,userAddress,txId) = {
566588 let isEval = (txId == unit)
567589 let cfg = getPoolConfig()
568590 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
569591 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
570592 let checks = [if ((paymentAssetId == cfgLpAssetId))
571593 then true
572594 else throwErr("invalid lp asset")]
573595 if ((checks == checks))
574596 then {
575597 let outInAmountAsset = if ((outAssetId == cfgAmountAssetId))
576598 then true
577599 else if ((outAssetId == cfgPriceAssetId))
578600 then false
579601 else throwErr("invalid asset")
580602 let balanceBigInt = if (outInAmountAsset)
581603 then toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId)))
582604 else toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId)))
583605 let outInAmountAssetDecimals = if (outInAmountAsset)
584606 then amtAssetDcm
585607 else priceAssetDcm
586608 let amBalanceOld = getAccBalance(assetIdToString(cfgAmountAssetId))
587609 let prBalanceOld = getAccBalance(assetIdToString(cfgPriceAssetId))
588610 let outBalance = if (outInAmountAsset)
589611 then amBalanceOld
590612 else prBalanceOld
591613 let outBalanceBigInt = toBigInt(outBalance)
592614 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity)
593615 let redeemedBigInt = toBigInt(paymentAmount)
594616 let amountRaw = max([0, toInt(((balanceBigInt * (scale18 - pow((scale18 - ((redeemedBigInt * scale18) / supplyBigInt)), 18, big2, 0, 18, DOWN))) / scale18))])
595- let $t03026430320 = takeFee(amountRaw, outFee)
596- let totalAmount = $t03026430320._1
597- let feeAmount = $t03026430320._2
598- let $t03032430550 = if (outInAmountAsset)
617+ let $t02948429540 = takeFee(amountRaw, outFee)
618+ let totalAmount = $t02948429540._1
619+ let feeAmount = $t02948429540._2
620+ let $t02954429770 = if (outInAmountAsset)
599621 then $Tuple4(totalAmount, 0, (amBalanceOld - amountRaw), prBalanceOld)
600622 else $Tuple4(0, totalAmount, amBalanceOld, (prBalanceOld - amountRaw))
601- let outAmAmount = $t03032430550._1
602- let outPrAmount = $t03032430550._2
603- let amBalanceNew = $t03032430550._3
604- let prBalanceNew = $t03032430550._4
623+ let outAmAmount = $t02954429770._1
624+ let outPrAmount = $t02954429770._2
625+ let amBalanceNew = $t02954429770._3
626+ let prBalanceNew = $t02954429770._4
605627 let priceNewX18 = calcPriceBigInt(toX18(prBalanceNew, cfgPriceAssetDecimals), toX18(amBalanceNew, cfgAmountAssetDecimals))
606628 let priceNew = fromX18(priceNewX18, scale8)
607629 let commonState = if (isEval)
608630 then nil
609631 else [StringEntry(gau(toString(value(userAddress)), toBase58String(value(txId))), dataGetActionInfo(outAmAmount, outPrAmount, paymentAmount, priceNew, height, lastBlock.timestamp)), IntegerEntry(pl(), priceNew), IntegerEntry(ph(height, lastBlock.timestamp), priceNew)]
610632 let priceOldX18 = calcPriceBigInt(toX18(prBalanceOld, cfgPriceAssetDecimals), toX18(amBalanceOld, cfgAmountAssetDecimals))
611633 let priceOld = fromX18(priceOldX18, scale8)
612634 let loss = {
613635 let amountBothInPaymentAsset = (toInt(fraction(balanceBigInt, redeemedBigInt, supplyBigInt)) * 2)
614636 fraction((totalAmount - amountBothInPaymentAsset), scale8, amountBothInPaymentAsset)
615637 }
616638 $Tuple5(totalAmount, commonState, feeAmount, loss, outInAmountAsset)
617639 }
618640 else throw("Strict value is not equal to itself.")
619641 }
620642
621643
622644 func managerPublicKeyOrUnit () = match getString(mpk()) {
623645 case s: String =>
624646 fromBase58String(s)
625647 case _: Unit =>
626648 unit
627649 case _ =>
628650 throw("Match error")
629651 }
630652
631653
632654 func pendingManagerPublicKeyOrUnit () = match getString(pmpk()) {
633655 case s: String =>
634656 fromBase58String(s)
635657 case _: Unit =>
636658 unit
637659 case _ =>
638660 throw("Match error")
639661 }
640662
641663
642664 func isManager (i) = match managerPublicKeyOrUnit() {
643665 case pk: ByteVector =>
644666 (i.callerPublicKey == pk)
645667 case _: Unit =>
646668 (i.caller == this)
647669 case _ =>
648670 throw("Match error")
649671 }
650672
651673
652674 func mustManager (i) = {
653675 let pd = throw("Permission denied")
654676 match managerPublicKeyOrUnit() {
655677 case pk: ByteVector =>
656678 if ((i.callerPublicKey == pk))
657679 then true
658680 else pd
659681 case _: Unit =>
660682 if ((i.caller == this))
661683 then true
662684 else pd
663685 case _ =>
664686 throw("Match error")
665687 }
666688 }
667689
668690
669691 @Callable(i)
670692 func setManager (pendingManagerPublicKey) = {
671693 let checkCaller = mustManager(i)
672694 if ((checkCaller == checkCaller))
673695 then {
674696 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
675697 if ((checkManagerPublicKey == checkManagerPublicKey))
676698 then [StringEntry(pmpk(), pendingManagerPublicKey)]
677699 else throw("Strict value is not equal to itself.")
678700 }
679701 else throw("Strict value is not equal to itself.")
680702 }
681703
682704
683705
684706 @Callable(i)
685707 func confirmManager () = {
686708 let pm = pendingManagerPublicKeyOrUnit()
687709 let hasPM = if (isDefined(pm))
688710 then true
689711 else throw("No pending manager")
690712 if ((hasPM == hasPM))
691713 then {
692714 let checkPM = if ((i.callerPublicKey == value(pm)))
693715 then true
694716 else throw("You are not pending manager")
695717 if ((checkPM == checkPM))
696718 then [StringEntry(mpk(), toBase58String(value(pm))), DeleteEntry(pmpk())]
697719 else throw("Strict value is not equal to itself.")
698720 }
699721 else throw("Strict value is not equal to itself.")
700722 }
701723
702724
703725
704726 @Callable(i)
705727 func put (slippageTolerance,shouldAutoStake) = if ((0 > slippageTolerance))
706728 then throw("Invalid slippageTolerance passed")
707729 else {
708730 let estPut = commonPut(i, slippageTolerance, true)
709731 let emitLpAmt = estPut._2
710732 let lpAssetId = estPut._7
711733 let state = estPut._9
712734 let amDiff = estPut._10
713735 let prDiff = estPut._11
714736 let amId = estPut._12
715737 let prId = estPut._13
716738 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
717739 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
718740 let currentKLp = calcCurrentKLp(amAssetPmt, prAssetPmt, toBigInt(0))
719741 if ((currentKLp == currentKLp))
720742 then {
721743 let emitInv = invoke(factoryContract, "emit", [emitLpAmt], nil)
722744 if ((emitInv == emitInv))
723745 then {
724746 let emitInvLegacy = match emitInv {
725747 case legacyFactoryContract: Address =>
726748 invoke(legacyFactoryContract, "emit", [emitLpAmt], nil)
727749 case _ =>
728750 unit
729751 }
730752 if ((emitInvLegacy == emitInvLegacy))
731753 then {
732754 let slippageAInv = if ((amDiff > 0))
733755 then invoke(slippageContract, "put", nil, [AttachedPayment(amId, amDiff)])
734756 else nil
735757 if ((slippageAInv == slippageAInv))
736758 then {
737759 let slippagePInv = if ((prDiff > 0))
738760 then invoke(slippageContract, "put", nil, [AttachedPayment(prId, prDiff)])
739761 else nil
740762 if ((slippagePInv == slippagePInv))
741763 then {
742764 let lpTransfer = if (shouldAutoStake)
743765 then {
744766 let slpStakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
745767 if ((slpStakeInv == slpStakeInv))
746768 then nil
747769 else throw("Strict value is not equal to itself.")
748770 }
749771 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
750- let $t03507835540 = refreshKLpInternal(0, 0, 0)
751- if (($t03507835540 == $t03507835540))
772+ let $t03429834760 = refreshKLpInternal(0, 0, 0)
773+ if (($t03429834760 == $t03429834760))
752774 then {
753- let updatedKLp = $t03507835540._2
754- let refreshKLpActions = $t03507835540._1
775+ let updatedKLp = $t03429834760._2
776+ let refreshKLpActions = $t03429834760._1
755777 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
756778 if ((isUpdatedKLpValid == isUpdatedKLpValid))
757779 then ((state ++ lpTransfer) ++ refreshKLpActions)
758780 else throw("Strict value is not equal to itself.")
759781 }
760782 else throw("Strict value is not equal to itself.")
761783 }
762784 else throw("Strict value is not equal to itself.")
763785 }
764786 else throw("Strict value is not equal to itself.")
765787 }
766788 else throw("Strict value is not equal to itself.")
767789 }
768790 else throw("Strict value is not equal to itself.")
769791 }
770792 else throw("Strict value is not equal to itself.")
771793 }
772794
773795
774796
775797 @Callable(i)
776798 func putForFree (maxSlippage) = if ((0 > maxSlippage))
777799 then throw("Invalid value passed")
778800 else {
779801 let estPut = commonPut(i, maxSlippage, false)
780802 let state = estPut._9
781803 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
782804 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
783805 let currentKLp = calcCurrentKLp(amAssetPmt, prAssetPmt, toBigInt(0))
784806 if ((currentKLp == currentKLp))
785807 then {
786- let $t03610236167 = refreshKLpInternal(0, 0, 0)
787- let refreshKLpActions = $t03610236167._1
788- let updatedKLp = $t03610236167._2
808+ let $t03532235387 = refreshKLpInternal(0, 0, 0)
809+ let refreshKLpActions = $t03532235387._1
810+ let updatedKLp = $t03532235387._2
789811 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
790812 if ((isUpdatedKLpValid == isUpdatedKLpValid))
791813 then (state ++ refreshKLpActions)
792814 else throw("Strict value is not equal to itself.")
793815 }
794816 else throw("Strict value is not equal to itself.")
795817 }
796818
797819
798820
799821 @Callable(i)
800822 func putOneTkn (minOutAmount,autoStake) = {
801823 let isPoolOneTokenOperationsDisabled = {
802824 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
803825 if ($isInstanceOf(@, "Boolean"))
804826 then @
805827 else throw(($getType(@) + " couldn't be cast to Boolean"))
806828 }
807829 let isPutDisabled = if (if (if (isGlobalShutdown())
808830 then true
809831 else (cfgPoolStatus == PoolPutDisabled))
810832 then true
811833 else (cfgPoolStatus == PoolShutdown))
812834 then true
813835 else isPoolOneTokenOperationsDisabled
814836 let checks = [if (if (!(isPutDisabled))
815837 then true
816838 else isManager(i))
817839 then true
818840 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
819841 then true
820842 else throwErr("exactly 1 payment are expected")]
821843 if ((checks == checks))
822844 then {
823845 let payment = i.payments[0]
824846 let paymentAssetId = payment.assetId
825847 let paymentAmountRaw = payment.amount
826848 let currentKLp = if ((paymentAssetId == cfgAmountAssetId))
827849 then calcCurrentKLp(toBigInt(paymentAmountRaw), toBigInt(0), toBigInt(0))
828850 else if ((paymentAssetId == cfgPriceAssetId))
829851 then calcCurrentKLp(toBigInt(0), toBigInt(paymentAmountRaw), toBigInt(0))
830852 else throwErr("payment asset is not supported")
831853 if ((currentKLp == currentKLp))
832854 then {
833855 let userAddress = i.caller
834856 let txId = i.transactionId
835- let $t03735537507 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
836- if (($t03735537507 == $t03735537507))
857+ let $t03657536727 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
858+ if (($t03657536727 == $t03657536727))
837859 then {
838- let paymentInAmountAsset = $t03735537507._5
839- let bonus = $t03735537507._4
840- let feeAmount = $t03735537507._3
841- let commonState = $t03735537507._2
842- let emitAmountEstimated = $t03735537507._1
860+ let paymentInAmountAsset = $t03657536727._5
861+ let bonus = $t03657536727._4
862+ let feeAmount = $t03657536727._3
863+ let commonState = $t03657536727._2
864+ let emitAmountEstimated = $t03657536727._1
843865 let emitAmount = if (if ((minOutAmount > 0))
844866 then (minOutAmount > emitAmountEstimated)
845867 else false)
846868 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
847869 else emitAmountEstimated
848870 let emitInv = emit(emitAmount)
849871 if ((emitInv == emitInv))
850872 then {
851873 let lpTransfer = if (autoStake)
852874 then {
853875 let stakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(cfgLpAssetId, emitAmount)])
854876 if ((stakeInv == stakeInv))
855877 then nil
856878 else throw("Strict value is not equal to itself.")
857879 }
858880 else [ScriptTransfer(i.caller, emitAmount, cfgLpAssetId)]
859881 let sendFee = if ((feeAmount > 0))
860882 then [ScriptTransfer(feeCollectorAddress, feeAmount, paymentAssetId)]
861883 else nil
862- let $t03809338290 = if ((this == feeCollectorAddress))
884+ let $t03731337510 = if ((this == feeCollectorAddress))
863885 then $Tuple2(0, 0)
864886 else if (paymentInAmountAsset)
865887 then $Tuple2(-(feeAmount), 0)
866888 else $Tuple2(0, -(feeAmount))
867- let amountAssetBalanceDelta = $t03809338290._1
868- let priceAssetBalanceDelta = $t03809338290._2
869- let $t03829338401 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
870- let refreshKLpActions = $t03829338401._1
871- let updatedKLp = $t03829338401._2
889+ let amountAssetBalanceDelta = $t03731337510._1
890+ let priceAssetBalanceDelta = $t03731337510._2
891+ let $t03751337621 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
892+ let refreshKLpActions = $t03751337621._1
893+ let updatedKLp = $t03751337621._2
872894 let kLp = value(getString(keyKLp))
873895 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
874896 if ((isUpdatedKLpValid == isUpdatedKLpValid))
875897 then $Tuple2((((commonState ++ lpTransfer) ++ sendFee) ++ refreshKLpActions), emitAmount)
876898 else throw("Strict value is not equal to itself.")
877899 }
878900 else throw("Strict value is not equal to itself.")
879901 }
880902 else throw("Strict value is not equal to itself.")
881903 }
882904 else throw("Strict value is not equal to itself.")
883905 }
884906 else throw("Strict value is not equal to itself.")
885907 }
886908
887909
888910
889911 @Callable(i)
890912 func putOneTknREADONLY (paymentAssetId,paymentAmountRaw) = {
891- let $t03870738864 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
892- let emitAmountEstimated = $t03870738864._1
893- let commonState = $t03870738864._2
894- let feeAmount = $t03870738864._3
895- let bonus = $t03870738864._4
896- let paymentInAmountAsset = $t03870738864._5
913+ let $t03792738084 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
914+ let emitAmountEstimated = $t03792738084._1
915+ let commonState = $t03792738084._2
916+ let feeAmount = $t03792738084._3
917+ let bonus = $t03792738084._4
918+ let paymentInAmountAsset = $t03792738084._5
897919 $Tuple2(nil, $Tuple3(emitAmountEstimated, feeAmount, bonus))
898920 }
899921
900922
901923
902924 @Callable(i)
903925 func getOneTkn (outAssetIdStr,minOutAmount) = {
904926 let isPoolOneTokenOperationsDisabled = {
905927 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
906928 if ($isInstanceOf(@, "Boolean"))
907929 then @
908930 else throw(($getType(@) + " couldn't be cast to Boolean"))
909931 }
910932 let isGetDisabled = if (if (isGlobalShutdown())
911933 then true
912934 else (cfgPoolStatus == PoolShutdown))
913935 then true
914936 else isPoolOneTokenOperationsDisabled
915937 let checks = [if (if (!(isGetDisabled))
916938 then true
917939 else isManager(i))
918940 then true
919941 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
920942 then true
921943 else throwErr("exactly 1 payment are expected")]
922944 if ((checks == checks))
923945 then {
924946 let outAssetId = parseAssetId(outAssetIdStr)
925947 let payment = i.payments[0]
926948 let paymentAssetId = payment.assetId
927949 let paymentAmount = payment.amount
928950 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
929951 if ((currentKLp == currentKLp))
930952 then {
931953 let userAddress = i.caller
932954 let txId = i.transactionId
933- let $t03974939902 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
934- if (($t03974939902 == $t03974939902))
955+ let $t03896939122 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
956+ if (($t03896939122 == $t03896939122))
935957 then {
936- let outInAmountAsset = $t03974939902._5
937- let bonus = $t03974939902._4
938- let feeAmount = $t03974939902._3
939- let commonState = $t03974939902._2
940- let amountEstimated = $t03974939902._1
958+ let outInAmountAsset = $t03896939122._5
959+ let bonus = $t03896939122._4
960+ let feeAmount = $t03896939122._3
961+ let commonState = $t03896939122._2
962+ let amountEstimated = $t03896939122._1
941963 let amount = if (if ((minOutAmount > 0))
942964 then (minOutAmount > amountEstimated)
943965 else false)
944966 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
945967 else amountEstimated
946968 let burnInv = invoke(factoryContract, "burn", [paymentAmount], [AttachedPayment(paymentAssetId, paymentAmount)])
947969 if ((burnInv == burnInv))
948970 then {
949971 let assetTransfer = [ScriptTransfer(userAddress, amount, outAssetId)]
950972 let sendFee = if ((feeAmount > 0))
951973 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
952974 else nil
953- let $t04040240649 = {
975+ let $t03962239869 = {
954976 let feeAmountForCalc = if ((this == feeCollectorAddress))
955977 then 0
956978 else feeAmount
957979 if (outInAmountAsset)
958980 then $Tuple2(-((amount + feeAmountForCalc)), 0)
959981 else $Tuple2(0, -((amount + feeAmountForCalc)))
960982 }
961- let amountAssetBalanceDelta = $t04040240649._1
962- let priceAssetBalanceDelta = $t04040240649._2
963- let $t04065240760 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
964- let refreshKLpActions = $t04065240760._1
965- let updatedKLp = $t04065240760._2
983+ let amountAssetBalanceDelta = $t03962239869._1
984+ let priceAssetBalanceDelta = $t03962239869._2
985+ let $t03987239980 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
986+ let refreshKLpActions = $t03987239980._1
987+ let updatedKLp = $t03987239980._2
966988 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
967989 if ((isUpdatedKLpValid == isUpdatedKLpValid))
968990 then $Tuple2((((commonState ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
969991 else throw("Strict value is not equal to itself.")
970992 }
971993 else throw("Strict value is not equal to itself.")
972994 }
973995 else throw("Strict value is not equal to itself.")
974996 }
975997 else throw("Strict value is not equal to itself.")
976998 }
977999 else throw("Strict value is not equal to itself.")
9781000 }
9791001
9801002
9811003
9821004 @Callable(i)
9831005 func getOneTknREADONLY (outAssetId,paymentAmount) = {
984- let $t04101741173 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
985- let amountEstimated = $t04101741173._1
986- let commonState = $t04101741173._2
987- let feeAmount = $t04101741173._3
988- let bonus = $t04101741173._4
989- let outInAmountAsset = $t04101741173._5
1006+ let $t04023740393 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
1007+ let amountEstimated = $t04023740393._1
1008+ let commonState = $t04023740393._2
1009+ let feeAmount = $t04023740393._3
1010+ let bonus = $t04023740393._4
1011+ let outInAmountAsset = $t04023740393._5
9901012 $Tuple2(nil, $Tuple3(amountEstimated, feeAmount, bonus))
9911013 }
9921014
9931015
9941016
9951017 @Callable(i)
9961018 func unstakeAndGetOneTkn (unstakeAmount,outAssetIdStr,minOutAmount) = {
9971019 let isPoolOneTokenOperationsDisabled = {
9981020 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
9991021 if ($isInstanceOf(@, "Boolean"))
10001022 then @
10011023 else throw(($getType(@) + " couldn't be cast to Boolean"))
10021024 }
10031025 let isGetDisabled = if (if (isGlobalShutdown())
10041026 then true
10051027 else (cfgPoolStatus == PoolShutdown))
10061028 then true
10071029 else isPoolOneTokenOperationsDisabled
10081030 let checks = [if (if (!(isGetDisabled))
10091031 then true
10101032 else isManager(i))
10111033 then true
10121034 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
10131035 then true
10141036 else throwErr("no payments are expected")]
10151037 if ((checks == checks))
10161038 then {
10171039 let outAssetId = parseAssetId(outAssetIdStr)
10181040 let userAddress = i.caller
10191041 let txId = i.transactionId
10201042 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
10211043 if ((currentKLp == currentKLp))
10221044 then {
10231045 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
10241046 if ((unstakeInv == unstakeInv))
10251047 then {
1026- let $t04207842229 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
1027- if (($t04207842229 == $t04207842229))
1048+ let $t04129841449 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
1049+ if (($t04129841449 == $t04129841449))
10281050 then {
1029- let outInAmountAsset = $t04207842229._5
1030- let bonus = $t04207842229._4
1031- let feeAmount = $t04207842229._3
1032- let commonState = $t04207842229._2
1033- let amountEstimated = $t04207842229._1
1051+ let outInAmountAsset = $t04129841449._5
1052+ let bonus = $t04129841449._4
1053+ let feeAmount = $t04129841449._3
1054+ let commonState = $t04129841449._2
1055+ let amountEstimated = $t04129841449._1
10341056 let amount = if (if ((minOutAmount > 0))
10351057 then (minOutAmount > amountEstimated)
10361058 else false)
10371059 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
10381060 else amountEstimated
10391061 let burnInv = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
10401062 if ((burnInv == burnInv))
10411063 then {
10421064 let assetTransfer = [ScriptTransfer(i.caller, amount, outAssetId)]
10431065 let sendFee = if ((feeAmount > 0))
10441066 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
10451067 else nil
1046- let $t04272442971 = {
1068+ let $t04194442191 = {
10471069 let feeAmountForCalc = if ((this == feeCollectorAddress))
10481070 then 0
10491071 else feeAmount
10501072 if (outInAmountAsset)
10511073 then $Tuple2(-((amount + feeAmountForCalc)), 0)
10521074 else $Tuple2(0, -((amount + feeAmountForCalc)))
10531075 }
1054- let amountAssetBalanceDelta = $t04272442971._1
1055- let priceAssetBalanceDelta = $t04272442971._2
1056- let $t04297443082 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1057- let refreshKLpActions = $t04297443082._1
1058- let updatedKLp = $t04297443082._2
1076+ let amountAssetBalanceDelta = $t04194442191._1
1077+ let priceAssetBalanceDelta = $t04194442191._2
1078+ let $t04219442302 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1079+ let refreshKLpActions = $t04219442302._1
1080+ let updatedKLp = $t04219442302._2
10591081 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
10601082 if ((isUpdatedKLpValid == isUpdatedKLpValid))
10611083 then $Tuple2((((commonState ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
10621084 else throw("Strict value is not equal to itself.")
10631085 }
10641086 else throw("Strict value is not equal to itself.")
10651087 }
10661088 else throw("Strict value is not equal to itself.")
10671089 }
10681090 else throw("Strict value is not equal to itself.")
10691091 }
10701092 else throw("Strict value is not equal to itself.")
10711093 }
10721094 else throw("Strict value is not equal to itself.")
10731095 }
10741096
10751097
10761098
10771099 @Callable(i)
10781100 func get () = {
10791101 let res = commonGet(i)
10801102 let outAmtAmt = res._1
10811103 let outPrAmt = res._2
10821104 let pmtAmt = res._3
10831105 let pmtAssetId = res._4
10841106 let state = res._5
10851107 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
10861108 if ((currentKLp == currentKLp))
10871109 then {
10881110 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
10891111 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
10901112 then {
1091- let $t04402844110 = refreshKLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1092- let refreshKLpActions = $t04402844110._1
1093- let updatedKLp = $t04402844110._2
1113+ let $t04324843330 = refreshKLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1114+ let refreshKLpActions = $t04324843330._1
1115+ let updatedKLp = $t04324843330._2
10941116 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
10951117 if ((isUpdatedKLpValid == isUpdatedKLpValid))
10961118 then (state ++ refreshKLpActions)
10971119 else throw("Strict value is not equal to itself.")
10981120 }
10991121 else throw("Strict value is not equal to itself.")
11001122 }
11011123 else throw("Strict value is not equal to itself.")
11021124 }
11031125
11041126
11051127
11061128 @Callable(i)
11071129 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
11081130 let res = commonGet(i)
11091131 let outAmAmt = res._1
11101132 let outPrAmt = res._2
11111133 let pmtAmt = res._3
11121134 let pmtAssetId = res._4
11131135 let state = res._5
11141136 if ((noLessThenAmtAsset > outAmAmt))
11151137 then throw(((("noLessThenAmtAsset failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
11161138 else if ((noLessThenPriceAsset > outPrAmt))
11171139 then throw(((("noLessThenPriceAsset failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
11181140 else {
11191141 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
11201142 if ((currentKLp == currentKLp))
11211143 then {
11221144 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
11231145 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11241146 then {
1125- let $t04505945140 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1126- let refreshKLpActions = $t04505945140._1
1127- let updatedKLp = $t04505945140._2
1147+ let $t04427944360 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1148+ let refreshKLpActions = $t04427944360._1
1149+ let updatedKLp = $t04427944360._2
11281150 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11291151 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11301152 then (state ++ refreshKLpActions)
11311153 else throw("Strict value is not equal to itself.")
11321154 }
11331155 else throw("Strict value is not equal to itself.")
11341156 }
11351157 else throw("Strict value is not equal to itself.")
11361158 }
11371159 }
11381160
11391161
11401162
11411163 @Callable(i)
11421164 func unstakeAndGet (amount) = {
11431165 let checkPayments = if ((size(i.payments) != 0))
11441166 then throw("No payments are expected")
11451167 else true
11461168 if ((checkPayments == checkPayments))
11471169 then {
11481170 let cfg = getPoolConfig()
11491171 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
11501172 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
11511173 if ((currentKLp == currentKLp))
11521174 then {
11531175 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(lpAssetId), amount], nil)
11541176 if ((unstakeInv == unstakeInv))
11551177 then {
11561178 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
11571179 let outAmAmt = res._1
11581180 let outPrAmt = res._2
11591181 let poolStatus = parseIntValue(res._9)
11601182 let state = res._10
11611183 let checkPoolStatus = if (if (isGlobalShutdown())
11621184 then true
11631185 else (poolStatus == PoolShutdown))
11641186 then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus)))
11651187 else true
11661188 if ((checkPoolStatus == checkPoolStatus))
11671189 then {
11681190 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
11691191 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11701192 then {
1171- let $t04626646347 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1172- let refreshKLpActions = $t04626646347._1
1173- let updatedKLp = $t04626646347._2
1193+ let $t04548645567 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1194+ let refreshKLpActions = $t04548645567._1
1195+ let updatedKLp = $t04548645567._2
11741196 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11751197 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11761198 then (state ++ refreshKLpActions)
11771199 else throw("Strict value is not equal to itself.")
11781200 }
11791201 else throw("Strict value is not equal to itself.")
11801202 }
11811203 else throw("Strict value is not equal to itself.")
11821204 }
11831205 else throw("Strict value is not equal to itself.")
11841206 }
11851207 else throw("Strict value is not equal to itself.")
11861208 }
11871209 else throw("Strict value is not equal to itself.")
11881210 }
11891211
11901212
11911213
11921214 @Callable(i)
11931215 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
11941216 let isGetDisabled = if (isGlobalShutdown())
11951217 then true
11961218 else (cfgPoolStatus == PoolShutdown)
11971219 let checks = [if (!(isGetDisabled))
11981220 then true
11991221 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
12001222 then true
12011223 else throw("no payments are expected")]
12021224 if ((checks == checks))
12031225 then {
12041226 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
12051227 if ((currentKLp == currentKLp))
12061228 then {
12071229 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
12081230 if ((unstakeInv == unstakeInv))
12091231 then {
12101232 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
12111233 let outAmAmt = res._1
12121234 let outPrAmt = res._2
12131235 let state = res._10
12141236 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
12151237 then true
12161238 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
12171239 then true
12181240 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
12191241 if ((checkAmounts == checkAmounts))
12201242 then {
12211243 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
12221244 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
12231245 then {
1224- let $t04764247723 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1225- let refreshKLpActions = $t04764247723._1
1226- let updatedKLp = $t04764247723._2
1246+ let $t04686246943 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1247+ let refreshKLpActions = $t04686246943._1
1248+ let updatedKLp = $t04686246943._2
12271249 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
12281250 if ((isUpdatedKLpValid == isUpdatedKLpValid))
12291251 then (state ++ refreshKLpActions)
12301252 else throw("Strict value is not equal to itself.")
12311253 }
12321254 else throw("Strict value is not equal to itself.")
12331255 }
12341256 else throw("Strict value is not equal to itself.")
12351257 }
12361258 else throw("Strict value is not equal to itself.")
12371259 }
12381260 else throw("Strict value is not equal to itself.")
12391261 }
12401262 else throw("Strict value is not equal to itself.")
12411263 }
12421264
12431265
12441266
12451267 @Callable(i)
12461268 func activate (amtAssetStr,priceAssetStr) = if ((toString(i.caller) != toString(factoryContract)))
12471269 then throw("permissions denied")
12481270 else $Tuple2([StringEntry(aa(), amtAssetStr), StringEntry(pa(), priceAssetStr)], "success")
12491271
12501272
12511273
12521274 @Callable(i)
12531275 func refreshKLp () = {
12541276 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyKLpRefreshedHeight), 0)
12551277 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= kLpRefreshDelay))
12561278 then unit
12571279 else throwErr(makeString([toString(kLpRefreshDelay), " blocks have not passed since the previous call"], ""))
12581280 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
12591281 then {
12601282 let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp"))
1261- let $t04891048974 = refreshKLpInternal(0, 0, 0)
1262- let kLpUpdateActions = $t04891048974._1
1263- let updatedKLp = $t04891048974._2
1283+ let $t04813048194 = refreshKLpInternal(0, 0, 0)
1284+ let kLpUpdateActions = $t04813048194._1
1285+ let updatedKLp = $t04813048194._2
12641286 let actions = if ((kLp != updatedKLp))
12651287 then kLpUpdateActions
12661288 else throwErr("nothing to refresh")
12671289 $Tuple2(actions, toString(updatedKLp))
12681290 }
12691291 else throw("Strict value is not equal to itself.")
12701292 }
12711293
12721294
12731295
12741296 @Callable(i)
12751297 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, getPoolConfig())
12761298
12771299
12781300
12791301 @Callable(i)
12801302 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
12811303
12821304
12831305
12841306 @Callable(i)
12851307 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
12861308 let prices = calcPrices(amAmt, prAmt, lpAmt)
12871309 $Tuple2(nil, [toString(prices[0]), toString(prices[1]), toString(prices[2])])
12881310 }
12891311
12901312
12911313
12921314 @Callable(i)
12931315 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(toX18(origVal, origScaleMult)))
12941316
12951317
12961318
12971319 @Callable(i)
12981320 func fromX18WrapperREADONLY (val,resultScaleMult) = $Tuple2(nil, fromX18(parseBigIntValue(val), resultScaleMult))
12991321
13001322
13011323
13021324 @Callable(i)
13031325 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(calcPriceBigInt(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
13041326
13051327
13061328
13071329 @Callable(i)
13081330 func estimatePutOperationWrapperREADONLY (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = $Tuple2(nil, estimatePutOperation(txId58, slippageTolerance, inAmAssetAmt, inAmAssetId, inPrAssetAmt, inPrAssetId, userAddress, isEvaluate, emitLp))
13091331
13101332
13111333
13121334 @Callable(i)
13131335 func estimateGetOperationWrapperREADONLY (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
13141336 let res = estimateGetOperation(txId58, pmtAssetId, pmtLpAmt, addressFromStringValue(userAddress))
13151337 $Tuple2(nil, $Tuple10(res._1, res._2, res._3, res._4, res._5, res._6, res._7, toString(res._8), res._9, res._10))
13161338 }
13171339
13181340
13191341
13201342 @Callable(i)
13211343 func statsREADONLY () = {
13221344 let cfg = getPoolConfig()
13231345 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
13241346 let amtAssetId = cfg[idxAmtAssetId]
13251347 let priceAssetId = cfg[idxPriceAssetId]
13261348 let iAmtAssetId = cfg[idxIAmtAssetId]
13271349 let iPriceAssetId = cfg[idxIPriceAssetId]
13281350 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
13291351 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
13301352 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
13311353 let accAmtAssetBalance = getAccBalance(amtAssetId)
13321354 let accPriceAssetBalance = getAccBalance(priceAssetId)
13331355 let pricesList = if ((poolLPBalance == 0))
13341356 then [zeroBigInt, zeroBigInt, zeroBigInt]
13351357 else calcPrices(accAmtAssetBalance, accPriceAssetBalance, poolLPBalance)
13361358 let curPrice = 0
13371359 let lpAmtAssetShare = fromX18(pricesList[1], scale8)
13381360 let lpPriceAssetShare = fromX18(pricesList[2], scale8)
13391361 let poolWeight = value(getInteger(factoryContract, keyPoolWeight(toString(this))))
13401362 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(accAmtAssetBalance), toString(accPriceAssetBalance), toString(poolLPBalance), toString(curPrice), toString(lpAmtAssetShare), toString(lpPriceAssetShare), toString(poolWeight)], SEP))
13411363 }
13421364
13431365
13441366
13451367 @Callable(i)
13461368 func evaluatePutByAmountAssetREADONLY (inAmAssetAmt) = {
13471369 let cfg = getPoolConfig()
13481370 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
13491371 let amAssetIdStr = cfg[idxAmtAssetId]
13501372 let amAssetId = fromBase58String(amAssetIdStr)
13511373 let prAssetIdStr = cfg[idxPriceAssetId]
13521374 let prAssetId = fromBase58String(prAssetIdStr)
13531375 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
13541376 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
13551377 let poolStatus = cfg[idxPoolStatus]
13561378 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
13571379 let accAmtAssetBalance = getAccBalance(amAssetIdStr)
13581380 let accPriceAssetBalance = getAccBalance(prAssetIdStr)
13591381 let amtAssetAmtX18 = toX18(accAmtAssetBalance, amtAssetDcm)
13601382 let priceAssetAmtX18 = toX18(accPriceAssetBalance, priceAssetDcm)
13611383 let curPriceX18 = if ((poolLPBalance == 0))
13621384 then zeroBigInt
13631385 else calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18)
13641386 let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm)
13651387 let inPrAssetAmtX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
13661388 let inPrAssetAmt = fromX18(inPrAssetAmtX18, priceAssetDcm)
13671389 let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false)
13681390 let calcLpAmt = estPut._1
13691391 let curPriceCalc = estPut._3
13701392 let amBalance = estPut._4
13711393 let prBalance = estPut._5
13721394 let lpEmission = estPut._6
13731395 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(calcLpAmt), toString(fromX18(curPriceX18, scale8)), toString(amBalance), toString(prBalance), toString(lpEmission), poolStatus, toString(inAmAssetAmt), toString(inPrAssetAmt)], SEP))
13741396 }
13751397
13761398
13771399
13781400 @Callable(i)
13791401 func evaluatePutByPriceAssetREADONLY (inPrAssetAmt) = {
13801402 let cfg = getPoolConfig()
13811403 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
13821404 let amAssetIdStr = cfg[idxAmtAssetId]
13831405 let amAssetId = fromBase58String(amAssetIdStr)
13841406 let prAssetIdStr = cfg[idxPriceAssetId]
13851407 let prAssetId = fromBase58String(prAssetIdStr)
13861408 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
13871409 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
13881410 let poolStatus = cfg[idxPoolStatus]
13891411 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
13901412 let amBalanceRaw = getAccBalance(amAssetIdStr)
13911413 let prBalanceRaw = getAccBalance(prAssetIdStr)
13921414 let amBalanceRawX18 = toX18(amBalanceRaw, amtAssetDcm)
13931415 let prBalanceRawX18 = toX18(prBalanceRaw, priceAssetDcm)
13941416 let curPriceX18 = if ((poolLPBalance == 0))
13951417 then zeroBigInt
13961418 else calcPriceBigInt(prBalanceRawX18, amBalanceRawX18)
13971419 let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm)
13981420 let inAmAssetAmtX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
13991421 let inAmAssetAmt = fromX18(inAmAssetAmtX18, amtAssetDcm)
14001422 let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false)
14011423 let calcLpAmt = estPut._1
14021424 let curPriceCalc = estPut._3
14031425 let amBalance = estPut._4
14041426 let prBalance = estPut._5
14051427 let lpEmission = estPut._6
14061428 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(calcLpAmt), toString(fromX18(curPriceX18, scale8)), toString(amBalance), toString(prBalance), toString(lpEmission), poolStatus, toString(inAmAssetAmt), toString(inPrAssetAmt)], SEP))
14071429 }
14081430
14091431
14101432
14111433 @Callable(i)
14121434 func evaluateGetREADONLY (paymentLpAssetId,paymentLpAmt) = {
14131435 let res = estimateGetOperation("", paymentLpAssetId, paymentLpAmt, this)
14141436 let outAmAmt = res._1
14151437 let outPrAmt = res._2
14161438 let amBalance = res._5
14171439 let prBalance = res._6
14181440 let lpEmission = res._7
14191441 let curPrice = res._8
14201442 let poolStatus = parseIntValue(res._9)
14211443 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(outAmAmt), toString(outPrAmt), toString(amBalance), toString(prBalance), toString(lpEmission), toString(curPrice), toString(poolStatus)], SEP))
14221444 }
14231445
14241446
14251447 @Verifier(tx)
14261448 func verify () = {
14271449 let targetPublicKey = match managerPublicKeyOrUnit() {
14281450 case pk: ByteVector =>
14291451 pk
14301452 case _: Unit =>
14311453 tx.senderPublicKey
14321454 case _ =>
14331455 throw("Match error")
14341456 }
14351457 match tx {
14361458 case order: Order =>
14371459 let matcherPub = getMatcherPubOrFail()
1438- let $t05763657705 = validateMatcherOrderAllowed(order)
1439- let orderValid = $t05763657705._1
1440- let orderValidInfo = $t05763657705._2
1460+ let $t05685656925 = validateMatcherOrderAllowed(order)
1461+ let orderValid = $t05685656925._1
1462+ let orderValidInfo = $t05685656925._2
14411463 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
14421464 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
14431465 if (if (if (orderValid)
14441466 then senderValid
14451467 else false)
14461468 then matcherValid
14471469 else false)
14481470 then true
14491471 else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
14501472 case s: SetScriptTransaction =>
14511473 let newHash = blake2b256(value(s.script))
14521474 let allowedHash = fromBase64String(value(getString(factoryContract, keyAllowedLpScriptHash())))
14531475 let currentHash = scriptHash(this)
14541476 if (if ((allowedHash == newHash))
14551477 then (currentHash != newHash)
14561478 else false)
14571479 then true
14581480 else sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
14591481 case _ =>
14601482 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
14611483 }
14621484 }
14631485

github/deemru/w8io/169f3d6 
323.87 ms