tx · 3HzS5zWaowaTuXXM1UgzeTbZ81r8E2LGQWsoqGBe6F7k

3N7b3kPunHUXhZp1vMG9NhPMARNEprCMWxT:  -0.03600000 Waves

2023.01.23 13:43 [2417485] smart account 3N7b3kPunHUXhZp1vMG9NhPMARNEprCMWxT > SELF 0.00000000 Waves

{ "type": 13, "id": "3HzS5zWaowaTuXXM1UgzeTbZ81r8E2LGQWsoqGBe6F7k", "fee": 3600000, "feeAssetId": null, "timestamp": 1674470654003, "version": 1, "sender": "3N7b3kPunHUXhZp1vMG9NhPMARNEprCMWxT", "senderPublicKey": "AYbpHveq7zviKTDV7SGTB1pZGFbkumgfq3jSwVv6BznT", "proofs": [ "ta77YHJPzWZP1QBy2SXGKnjM75XeJLfsdZfZEAxdDpokEuLiQ6rxZQsCEnKdicXpcdp22EAbUs8Ka8mBu8ov1Lx" ], "script": "base64:BgKBLggCEgMKAQgSABIECgIBBBIDCgEBEgQKAgEEEgQKAggBEgQKAggBEgQKAggBEgUKAwEIARIAEgQKAgEBEgMKAQESBQoDAQEBEgQKAggIEgASABIDCgEIEgUKAwEBARIECgIBARIECgIIARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAEgMKAQESAwoBARIECgIIASIKbFBkZWNpbWFscyIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiC3dhdmVzU3RyaW5nIgNTRVAiClBvb2xBY3RpdmUiD1Bvb2xQdXREaXNhYmxlZCITUG9vbE1hdGNoZXJEaXNhYmxlZCIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyINaWR4UG9vbFN0YXR1cyIQaWR4UG9vbExQQXNzZXRJZCINaWR4QW10QXNzZXRJZCIPaWR4UHJpY2VBc3NldElkIg5pZHhBbXRBc3NldERjbSIQaWR4UHJpY2VBc3NldERjbSIOaWR4SUFtdEFzc2V0SWQiEGlkeElQcmljZUFzc2V0SWQiDWlkeExQQXNz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9mHF7gVGG8uaTCAQa1ERj3jvRhoVbTPf7MiHuzH Next: C4YHY5zxGuCYdb5ojqVMw9yk96MTYym6HyytEv2oxAVw Diff:
OldNewDifferences
449449 else (order.assetPair.priceAsset != cfgPriceAssetId))
450450 then throw("Wrong order assets.")
451451 else {
452- let kLp = valueOrErrorMessage(parseBigInt(valueOrErrorMessage(getString(this, keyKLp), fmtErr("kLp is required"))), fmtErr("invalid kLp"))
453- let $t02200922109 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
454- let unusedActions = $t02200922109._1
455- let kLpNew = $t02200922109._2
452+ let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp"))
453+ let $t02197822078 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
454+ let unusedActions = $t02197822078._1
455+ let kLpNew = $t02197822078._2
456456 let isOrderValid = (kLpNew >= kLp)
457457 let info = makeString([toString(kLp), toString(kLpNew)], " ")
458458 $Tuple2(isOrderValid, info)
531531 else if ((paymentAssetId == cfgPriceAssetId))
532532 then false
533533 else throwErr("invalid asset")
534- let $t02491625209 = if (isEval)
534+ let $t02488525178 = if (isEval)
535535 then $Tuple2(amountBalanceRaw, priceBalanceRaw)
536536 else if (paymentInAmountAsset)
537537 then $Tuple2((amountBalanceRaw - paymentAmountRaw), priceBalanceRaw)
538538 else $Tuple2(amountBalanceRaw, (priceBalanceRaw - paymentAmountRaw))
539- let amountBalanceOld = $t02491625209._1
540- let priceBalanceOld = $t02491625209._2
541- let $t02521325362 = if (paymentInAmountAsset)
539+ let amountBalanceOld = $t02488525178._1
540+ let priceBalanceOld = $t02488525178._2
541+ let $t02518225331 = if (paymentInAmountAsset)
542542 then $Tuple2(paymentAmountRaw, 0)
543543 else $Tuple2(0, paymentAmountRaw)
544- let amountAssetAmountRaw = $t02521325362._1
545- let priceAssetAmountRaw = $t02521325362._2
544+ let amountAssetAmountRaw = $t02518225331._1
545+ let priceAssetAmountRaw = $t02518225331._2
546546 let amountAssetAmount = takeFee(amountAssetAmountRaw, inFee)._1
547547 let priceAssetAmount = takeFee(priceAssetAmountRaw, inFee)._1
548- let $t02549425558 = takeFee(paymentAmountRaw, inFee)
549- let paymentAmount = $t02549425558._1
550- let feeAmount = $t02549425558._2
548+ let $t02546325527 = takeFee(paymentAmountRaw, inFee)
549+ let paymentAmount = $t02546325527._1
550+ let feeAmount = $t02546325527._2
551551 let amountBalanceNew = (amountBalanceOld + amountAssetAmount)
552552 let priceBalanceNew = (priceBalanceOld + priceAssetAmount)
553553 let priceNewX18 = calcPriceBigInt(toX18(priceBalanceNew, cfgPriceAssetDecimals), toX18(amountBalanceNew, cfgAmountAssetDecimals))
570570 let priceOldX18 = calcPriceBigInt(toX18(priceBalanceOld, cfgPriceAssetDecimals), toX18(amountBalanceOld, cfgAmountAssetDecimals))
571571 let priceOld = fromX18(priceOldX18, scale8)
572572 let loss = {
573- let $t02723927406 = if (paymentInAmountAsset)
573+ let $t02720827375 = if (paymentInAmountAsset)
574574 then $Tuple2(amountAssetAmountRaw, amountBalanceOld)
575575 else $Tuple2(priceAssetAmountRaw, priceBalanceOld)
576- let amount = $t02723927406._1
577- let balance = $t02723927406._2
576+ let amount = $t02720827375._1
577+ let balance = $t02720827375._2
578578 let issueAmountBoth = toInt(fraction(supplyBigInt, toBigInt((amount / 2)), toBigInt(balance)))
579579 fraction((issueAmount - issueAmountBoth), scale8, issueAmountBoth)
580580 }
614614 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity)
615615 let redeemedBigInt = toBigInt(paymentAmount)
616616 let amountRaw = max([0, toInt(((balanceBigInt * (scale18 - pow((scale18 - ((redeemedBigInt * scale18) / supplyBigInt)), 18, big2, 0, 18, DOWN))) / scale18))])
617- let $t02948429540 = takeFee(amountRaw, outFee)
618- let totalAmount = $t02948429540._1
619- let feeAmount = $t02948429540._2
620- let $t02954429770 = if (outInAmountAsset)
617+ let $t02945329509 = takeFee(amountRaw, outFee)
618+ let totalAmount = $t02945329509._1
619+ let feeAmount = $t02945329509._2
620+ let $t02951329739 = if (outInAmountAsset)
621621 then $Tuple4(totalAmount, 0, (amBalanceOld - amountRaw), prBalanceOld)
622622 else $Tuple4(0, totalAmount, amBalanceOld, (prBalanceOld - amountRaw))
623- let outAmAmount = $t02954429770._1
624- let outPrAmount = $t02954429770._2
625- let amBalanceNew = $t02954429770._3
626- let prBalanceNew = $t02954429770._4
623+ let outAmAmount = $t02951329739._1
624+ let outPrAmount = $t02951329739._2
625+ let amBalanceNew = $t02951329739._3
626+ let prBalanceNew = $t02951329739._4
627627 let priceNewX18 = calcPriceBigInt(toX18(prBalanceNew, cfgPriceAssetDecimals), toX18(amBalanceNew, cfgAmountAssetDecimals))
628628 let priceNew = fromX18(priceNewX18, scale8)
629629 let commonState = if (isEval)
769769 else throw("Strict value is not equal to itself.")
770770 }
771771 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
772- let $t03429834760 = refreshKLpInternal(0, 0, 0)
773- if (($t03429834760 == $t03429834760))
772+ let $t03426734729 = refreshKLpInternal(0, 0, 0)
773+ if (($t03426734729 == $t03426734729))
774774 then {
775- let updatedKLp = $t03429834760._2
776- let refreshKLpActions = $t03429834760._1
775+ let updatedKLp = $t03426734729._2
776+ let refreshKLpActions = $t03426734729._1
777777 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
778778 if ((isUpdatedKLpValid == isUpdatedKLpValid))
779779 then ((state ++ lpTransfer) ++ refreshKLpActions)
805805 let currentKLp = calcCurrentKLp(amAssetPmt, prAssetPmt, toBigInt(0))
806806 if ((currentKLp == currentKLp))
807807 then {
808- let $t03532235387 = refreshKLpInternal(0, 0, 0)
809- let refreshKLpActions = $t03532235387._1
810- let updatedKLp = $t03532235387._2
808+ let $t03529135356 = refreshKLpInternal(0, 0, 0)
809+ let refreshKLpActions = $t03529135356._1
810+ let updatedKLp = $t03529135356._2
811811 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
812812 if ((isUpdatedKLpValid == isUpdatedKLpValid))
813813 then (state ++ refreshKLpActions)
854854 then {
855855 let userAddress = i.caller
856856 let txId = i.transactionId
857- let $t03657536727 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
858- if (($t03657536727 == $t03657536727))
857+ let $t03654436696 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
858+ if (($t03654436696 == $t03654436696))
859859 then {
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
860+ let paymentInAmountAsset = $t03654436696._5
861+ let bonus = $t03654436696._4
862+ let feeAmount = $t03654436696._3
863+ let commonState = $t03654436696._2
864+ let emitAmountEstimated = $t03654436696._1
865865 let emitAmount = if (if ((minOutAmount > 0))
866866 then (minOutAmount > emitAmountEstimated)
867867 else false)
881881 let sendFee = if ((feeAmount > 0))
882882 then [ScriptTransfer(feeCollectorAddress, feeAmount, paymentAssetId)]
883883 else nil
884- let $t03731337510 = if ((this == feeCollectorAddress))
884+ let $t03728237479 = if ((this == feeCollectorAddress))
885885 then $Tuple2(0, 0)
886886 else if (paymentInAmountAsset)
887887 then $Tuple2(-(feeAmount), 0)
888888 else $Tuple2(0, -(feeAmount))
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
889+ let amountAssetBalanceDelta = $t03728237479._1
890+ let priceAssetBalanceDelta = $t03728237479._2
891+ let $t03748237590 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
892+ let refreshKLpActions = $t03748237590._1
893+ let updatedKLp = $t03748237590._2
894894 let kLp = value(getString(keyKLp))
895895 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
896896 if ((isUpdatedKLpValid == isUpdatedKLpValid))
910910
911911 @Callable(i)
912912 func putOneTknREADONLY (paymentAssetId,paymentAmountRaw) = {
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
913+ let $t03789638053 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
914+ let emitAmountEstimated = $t03789638053._1
915+ let commonState = $t03789638053._2
916+ let feeAmount = $t03789638053._3
917+ let bonus = $t03789638053._4
918+ let paymentInAmountAsset = $t03789638053._5
919919 $Tuple2(nil, $Tuple3(emitAmountEstimated, feeAmount, bonus))
920920 }
921921
952952 then {
953953 let userAddress = i.caller
954954 let txId = i.transactionId
955- let $t03896939122 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
956- if (($t03896939122 == $t03896939122))
955+ let $t03893839091 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
956+ if (($t03893839091 == $t03893839091))
957957 then {
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
958+ let outInAmountAsset = $t03893839091._5
959+ let bonus = $t03893839091._4
960+ let feeAmount = $t03893839091._3
961+ let commonState = $t03893839091._2
962+ let amountEstimated = $t03893839091._1
963963 let amount = if (if ((minOutAmount > 0))
964964 then (minOutAmount > amountEstimated)
965965 else false)
972972 let sendFee = if ((feeAmount > 0))
973973 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
974974 else nil
975- let $t03962239869 = {
975+ let $t03959139838 = {
976976 let feeAmountForCalc = if ((this == feeCollectorAddress))
977977 then 0
978978 else feeAmount
980980 then $Tuple2(-((amount + feeAmountForCalc)), 0)
981981 else $Tuple2(0, -((amount + feeAmountForCalc)))
982982 }
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
983+ let amountAssetBalanceDelta = $t03959139838._1
984+ let priceAssetBalanceDelta = $t03959139838._2
985+ let $t03984139949 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
986+ let refreshKLpActions = $t03984139949._1
987+ let updatedKLp = $t03984139949._2
988988 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
989989 if ((isUpdatedKLpValid == isUpdatedKLpValid))
990990 then $Tuple2((((commonState ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
10031003
10041004 @Callable(i)
10051005 func getOneTknREADONLY (outAssetId,paymentAmount) = {
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
1006+ let $t04020640362 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
1007+ let amountEstimated = $t04020640362._1
1008+ let commonState = $t04020640362._2
1009+ let feeAmount = $t04020640362._3
1010+ let bonus = $t04020640362._4
1011+ let outInAmountAsset = $t04020640362._5
10121012 $Tuple2(nil, $Tuple3(amountEstimated, feeAmount, bonus))
10131013 }
10141014
10451045 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
10461046 if ((unstakeInv == unstakeInv))
10471047 then {
1048- let $t04129841449 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
1049- if (($t04129841449 == $t04129841449))
1048+ let $t04126741418 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
1049+ if (($t04126741418 == $t04126741418))
10501050 then {
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
1051+ let outInAmountAsset = $t04126741418._5
1052+ let bonus = $t04126741418._4
1053+ let feeAmount = $t04126741418._3
1054+ let commonState = $t04126741418._2
1055+ let amountEstimated = $t04126741418._1
10561056 let amount = if (if ((minOutAmount > 0))
10571057 then (minOutAmount > amountEstimated)
10581058 else false)
10651065 let sendFee = if ((feeAmount > 0))
10661066 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
10671067 else nil
1068- let $t04194442191 = {
1068+ let $t04191342160 = {
10691069 let feeAmountForCalc = if ((this == feeCollectorAddress))
10701070 then 0
10711071 else feeAmount
10731073 then $Tuple2(-((amount + feeAmountForCalc)), 0)
10741074 else $Tuple2(0, -((amount + feeAmountForCalc)))
10751075 }
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
1076+ let amountAssetBalanceDelta = $t04191342160._1
1077+ let priceAssetBalanceDelta = $t04191342160._2
1078+ let $t04216342271 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1079+ let refreshKLpActions = $t04216342271._1
1080+ let updatedKLp = $t04216342271._2
10811081 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
10821082 if ((isUpdatedKLpValid == isUpdatedKLpValid))
10831083 then $Tuple2((((commonState ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
11101110 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
11111111 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11121112 then {
1113- let $t04324843330 = refreshKLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1114- let refreshKLpActions = $t04324843330._1
1115- let updatedKLp = $t04324843330._2
1113+ let $t04321743299 = refreshKLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1114+ let refreshKLpActions = $t04321743299._1
1115+ let updatedKLp = $t04321743299._2
11161116 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11171117 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11181118 then (state ++ refreshKLpActions)
11441144 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
11451145 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11461146 then {
1147- let $t04427944360 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1148- let refreshKLpActions = $t04427944360._1
1149- let updatedKLp = $t04427944360._2
1147+ let $t04424844329 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1148+ let refreshKLpActions = $t04424844329._1
1149+ let updatedKLp = $t04424844329._2
11501150 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11511151 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11521152 then (state ++ refreshKLpActions)
11901190 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
11911191 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11921192 then {
1193- let $t04548645567 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1194- let refreshKLpActions = $t04548645567._1
1195- let updatedKLp = $t04548645567._2
1193+ let $t04545545536 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1194+ let refreshKLpActions = $t04545545536._1
1195+ let updatedKLp = $t04545545536._2
11961196 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11971197 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11981198 then (state ++ refreshKLpActions)
12431243 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
12441244 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
12451245 then {
1246- let $t04686246943 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1247- let refreshKLpActions = $t04686246943._1
1248- let updatedKLp = $t04686246943._2
1246+ let $t04683146912 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1247+ let refreshKLpActions = $t04683146912._1
1248+ let updatedKLp = $t04683146912._2
12491249 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
12501250 if ((isUpdatedKLpValid == isUpdatedKLpValid))
12511251 then (state ++ refreshKLpActions)
12801280 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
12811281 then {
12821282 let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp"))
1283- let $t04813048194 = refreshKLpInternal(0, 0, 0)
1284- let kLpUpdateActions = $t04813048194._1
1285- let updatedKLp = $t04813048194._2
1283+ let $t04809948163 = refreshKLpInternal(0, 0, 0)
1284+ let kLpUpdateActions = $t04809948163._1
1285+ let updatedKLp = $t04809948163._2
12861286 let actions = if ((kLp != updatedKLp))
12871287 then kLpUpdateActions
12881288 else throwErr("nothing to refresh")
14571457 match tx {
14581458 case order: Order =>
14591459 let matcherPub = getMatcherPubOrFail()
1460- let $t05685656925 = validateMatcherOrderAllowed(order)
1461- let orderValid = $t05685656925._1
1462- let orderValidInfo = $t05685656925._2
1460+ let $t05682556894 = validateMatcherOrderAllowed(order)
1461+ let orderValid = $t05682556894._1
1462+ let orderValidInfo = $t05682556894._2
14631463 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
14641464 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
14651465 if (if (if (orderValid)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let lPdecimals = 8
55
66 let scale8 = 100000000
77
88 let scale8BigInt = toBigInt(100000000)
99
1010 let scale18 = toBigInt(1000000000000000000)
1111
1212 let zeroBigInt = toBigInt(0)
1313
1414 let big0 = toBigInt(0)
1515
1616 let big1 = toBigInt(1)
1717
1818 let big2 = toBigInt(2)
1919
2020 let wavesString = "WAVES"
2121
2222 let SEP = "__"
2323
2424 let PoolActive = 1
2525
2626 let PoolPutDisabled = 2
2727
2828 let PoolMatcherDisabled = 3
2929
3030 let PoolShutdown = 4
3131
3232 let idxPoolAddress = 1
3333
3434 let idxPoolStatus = 2
3535
3636 let idxPoolLPAssetId = 3
3737
3838 let idxAmtAssetId = 4
3939
4040 let idxPriceAssetId = 5
4141
4242 let idxAmtAssetDcm = 6
4343
4444 let idxPriceAssetDcm = 7
4545
4646 let idxIAmtAssetId = 8
4747
4848 let idxIPriceAssetId = 9
4949
5050 let idxLPAssetDcm = 10
5151
5252 let idxPoolAmtAssetAmt = 1
5353
5454 let idxPoolPriceAssetAmt = 2
5555
5656 let idxPoolLPAssetAmt = 3
5757
5858 let idxFactoryStakingContract = 1
5959
6060 let idxFactorySlippageContract = 7
6161
6262 func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
6363
6464
6565 func toX18BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult)
6666
6767
6868 func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
6969
7070
7171 func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
7272
7373
7474 func toScale (amt,resScale,curScale) = fraction(amt, resScale, curScale)
7575
7676
7777 func abs (val) = if ((0 > val))
7878 then -(val)
7979 else val
8080
8181
8282 func absBigInt (val) = if ((zeroBigInt > val))
8383 then -(val)
8484 else val
8585
8686
8787 func fc () = "%s__factoryContract"
8888
8989
9090 func mpk () = "%s__managerPublicKey"
9191
9292
9393 func pmpk () = "%s__pendingManagerPublicKey"
9494
9595
9696 func pl () = "%s%s__price__last"
9797
9898
9999 func ph (h,timestamp) = makeString(["%s%s%d%d__price__history", toString(h), toString(timestamp)], SEP)
100100
101101
102102 func pau (userAddress,txId) = ((("%s%s%s__P__" + userAddress) + "__") + txId)
103103
104104
105105 func gau (userAddress,txId) = ((("%s%s%s__G__" + userAddress) + "__") + txId)
106106
107107
108108 func aa () = "%s__amountAsset"
109109
110110
111111 func pa () = "%s__priceAsset"
112112
113113
114114 let keyFee = "%s__fee"
115115
116116 let feeDefault = fraction(10, scale8, 10000)
117117
118118 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
119119
120120 let keyKLp = makeString(["%s", "kLp"], SEP)
121121
122122 let keyKLpRefreshedHeight = makeString(["%s", "kLpRefreshedHeight"], SEP)
123123
124124 let keyKLpRefreshDelay = makeString(["%s", "refreshKLpDelay"], SEP)
125125
126126 let kLpRefreshDelayDefault = 30
127127
128128 let kLpRefreshDelay = valueOrElse(getInteger(this, keyKLpRefreshDelay), kLpRefreshDelayDefault)
129129
130130 func keyFactoryConfig () = "%s__factoryConfig"
131131
132132
133133 func keyMatcherPub () = "%s%s__matcher__publicKey"
134134
135135
136136 func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
137137
138138
139139 func keyPoolConfig (iAmtAsset,iPriceAsset) = (((("%d%d%s__" + iAmtAsset) + "__") + iPriceAsset) + "__config")
140140
141141
142142 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
143143
144144
145145 func keyAllPoolsShutdown () = "%s__shutdown"
146146
147147
148148 func keyPoolWeight (contractAddress) = ("%s%s__poolWeight__" + contractAddress)
149149
150150
151151 func keyAllowedLpScriptHash () = "%s__allowedLpScriptHash"
152152
153153
154154 let keyFeeCollectorAddress = "%s__feeCollectorAddress"
155155
156156 func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
157157
158158
159159 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
160160
161161
162162 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
163163
164164
165165 func throwErr (msg) = throw(makeString(["lp.ride:", msg], " "))
166166
167167
168168 func fmtErr (msg) = makeString(["lp.ride:", msg], " ")
169169
170170
171171 let factoryContract = addressFromStringValue(getStringOrFail(this, fc()))
172172
173173 let feeCollectorAddress = addressFromStringValue(getStringOrFail(factoryContract, keyFeeCollectorAddress))
174174
175175 let inFee = {
176176 let @ = invoke(factoryContract, "getInFeeREADONLY", [toString(this)], nil)
177177 if ($isInstanceOf(@, "Int"))
178178 then @
179179 else throw(($getType(@) + " couldn't be cast to Int"))
180180 }
181181
182182 let outFee = {
183183 let @ = invoke(factoryContract, "getOutFeeREADONLY", [toString(this)], nil)
184184 if ($isInstanceOf(@, "Int"))
185185 then @
186186 else throw(($getType(@) + " couldn't be cast to Int"))
187187 }
188188
189189 func isGlobalShutdown () = valueOrElse(getBoolean(factoryContract, keyAllPoolsShutdown()), false)
190190
191191
192192 func getMatcherPubOrFail () = fromBase58String(getStringOrFail(factoryContract, keyMatcherPub()))
193193
194194
195195 func getPoolConfig () = {
196196 let amtAsset = getStringOrFail(this, aa())
197197 let priceAsset = getStringOrFail(this, pa())
198198 let iPriceAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAsset))
199199 let iAmtAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amtAsset))
200200 split(getStringOrFail(factoryContract, keyPoolConfig(toString(iAmtAsset), toString(iPriceAsset))), SEP)
201201 }
202202
203203
204204 func parseAssetId (input) = if ((input == wavesString))
205205 then unit
206206 else fromBase58String(input)
207207
208208
209209 func assetIdToString (input) = if ((input == unit))
210210 then wavesString
211211 else toBase58String(value(input))
212212
213213
214214 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]))
215215
216216
217217 let poolConfigParsed = parsePoolConfig(getPoolConfig())
218218
219219 let $t084088574 = poolConfigParsed
220220
221221 let cfgPoolAddress = $t084088574._1
222222
223223 let cfgPoolStatus = $t084088574._2
224224
225225 let cfgLpAssetId = $t084088574._3
226226
227227 let cfgAmountAssetId = $t084088574._4
228228
229229 let cfgPriceAssetId = $t084088574._5
230230
231231 let cfgAmountAssetDecimals = $t084088574._6
232232
233233 let cfgPriceAssetDecimals = $t084088574._7
234234
235235 func getFactoryConfig () = split(getStringOrFail(factoryContract, keyFactoryConfig()), SEP)
236236
237237
238238 let stakingContract = valueOrErrorMessage(addressFromString(getFactoryConfig()[idxFactoryStakingContract]), "incorrect staking address")
239239
240240 let slippageContract = valueOrErrorMessage(addressFromString(getFactoryConfig()[idxFactorySlippageContract]), "incorrect staking address")
241241
242242 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)
243243
244244
245245 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)
246246
247247
248248 func getAccBalance (assetId) = if ((assetId == "WAVES"))
249249 then wavesBalance(this).available
250250 else assetBalance(this, fromBase58String(assetId))
251251
252252
253253 func calcPriceBigInt (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
254254
255255
256256 func calcPriceBigIntRound (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
257257
258258
259259 func privateCalcPrice (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
260260 let amtAssetAmtX18 = toX18(amAmt, amAssetDcm)
261261 let priceAssetAmtX18 = toX18(prAmt, prAssetDcm)
262262 calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18)
263263 }
264264
265265
266266 func calcPrices (amAmt,prAmt,lpAmt) = {
267267 let cfg = getPoolConfig()
268268 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
269269 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
270270 let priceX18 = privateCalcPrice(amtAssetDcm, priceAssetDcm, amAmt, prAmt)
271271 let amAmtX18 = toX18(amAmt, amtAssetDcm)
272272 let prAmtX18 = toX18(prAmt, priceAssetDcm)
273273 let lpAmtX18 = toX18(lpAmt, scale8)
274274 let lpPriceInAmAssetX18 = calcPriceBigInt(amAmtX18, lpAmtX18)
275275 let lpPriceInPrAssetX18 = calcPriceBigInt(prAmtX18, lpAmtX18)
276276 [priceX18, lpPriceInAmAssetX18, lpPriceInPrAssetX18]
277277 }
278278
279279
280280 func calculatePrices (amAmt,prAmt,lpAmt) = {
281281 let prices = calcPrices(amAmt, prAmt, lpAmt)
282282 [fromX18(prices[0], scale8), fromX18(prices[1], scale8), fromX18(prices[2], scale8)]
283283 }
284284
285285
286286 func estimateGetOperation (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
287287 let cfg = getPoolConfig()
288288 let lpAssetId = cfg[idxPoolLPAssetId]
289289 let amAssetId = cfg[idxAmtAssetId]
290290 let prAssetId = cfg[idxPriceAssetId]
291291 let amAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
292292 let prAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
293293 let poolStatus = cfg[idxPoolStatus]
294294 let lpEmission = valueOrErrorMessage(assetInfo(fromBase58String(lpAssetId)), (("Asset " + lpAssetId) + " doesn't exist")).quantity
295295 if ((lpAssetId != pmtAssetId))
296296 then throw("Invalid asset passed.")
297297 else {
298298 let amBalance = getAccBalance(amAssetId)
299299 let amBalanceX18 = toX18(amBalance, amAssetDcm)
300300 let prBalance = getAccBalance(prAssetId)
301301 let prBalanceX18 = toX18(prBalance, prAssetDcm)
302302 let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18)
303303 let curPrice = fromX18(curPriceX18, scale8)
304304 let pmtLpAmtX18 = toX18(pmtLpAmt, scale8)
305305 let lpEmissionX18 = toX18(lpEmission, scale8)
306306 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissionX18)
307307 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissionX18)
308308 let outAmAmt = fromX18Round(outAmAmtX18, amAssetDcm, FLOOR)
309309 let outPrAmt = fromX18Round(outPrAmtX18, prAssetDcm, FLOOR)
310310 let state = if ((txId58 == ""))
311311 then nil
312312 else [ScriptTransfer(userAddress, outAmAmt, if ((amAssetId == "WAVES"))
313313 then unit
314314 else fromBase58String(amAssetId)), ScriptTransfer(userAddress, outPrAmt, if ((prAssetId == "WAVES"))
315315 then unit
316316 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)]
317317 $Tuple10(outAmAmt, outPrAmt, amAssetId, prAssetId, amBalance, prBalance, lpEmission, curPriceX18, poolStatus, state)
318318 }
319319 }
320320
321321
322322 func estimatePutOperation (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = {
323323 let cfg = getPoolConfig()
324324 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
325325 let amAssetIdStr = cfg[idxAmtAssetId]
326326 let prAssetIdStr = cfg[idxPriceAssetId]
327327 let iAmtAssetId = cfg[idxIAmtAssetId]
328328 let iPriceAssetId = cfg[idxIPriceAssetId]
329329 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
330330 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
331331 let poolStatus = cfg[idxPoolStatus]
332332 let lpEmission = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
333333 let inAmAssetIdStr = toBase58String(valueOrElse(inAmAssetId, fromBase58String("WAVES")))
334334 let inPrAssetIdStr = toBase58String(valueOrElse(inPrAssetId, fromBase58String("WAVES")))
335335 if (if ((amAssetIdStr != inAmAssetIdStr))
336336 then true
337337 else (prAssetIdStr != inPrAssetIdStr))
338338 then throw("Invalid amt or price asset passed.")
339339 else {
340340 let amBalance = if (isEvaluate)
341341 then getAccBalance(amAssetIdStr)
342342 else (getAccBalance(amAssetIdStr) - inAmAssetAmt)
343343 let prBalance = if (isEvaluate)
344344 then getAccBalance(prAssetIdStr)
345345 else (getAccBalance(prAssetIdStr) - inPrAssetAmt)
346346 let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm)
347347 let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm)
348348 let userPriceX18 = calcPriceBigInt(inPrAssetAmtX18, inAmAssetAmtX18)
349349 let amBalanceX18 = toX18(amBalance, amtAssetDcm)
350350 let prBalanceX18 = toX18(prBalance, priceAssetDcm)
351351 let res = if ((lpEmission == 0))
352352 then {
353353 let curPriceX18 = zeroBigInt
354354 let slippageX18 = zeroBigInt
355355 let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN)
356356 $Tuple5(fromX18(lpAmtX18, scale8), fromX18(inAmAssetAmtX18, amtAssetDcm), fromX18(inPrAssetAmtX18, priceAssetDcm), calcPriceBigInt((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
357357 }
358358 else {
359359 let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18)
360360 let slippageX18 = fraction(absBigInt((curPriceX18 - userPriceX18)), scale18, curPriceX18)
361361 let slippageToleranceX18 = toX18(slippageTolerance, scale8)
362362 if (if ((curPriceX18 != zeroBigInt))
363363 then (slippageX18 > slippageToleranceX18)
364364 else false)
365365 then throw(((("Price slippage " + toString(slippageX18)) + " exceeded the passed limit of ") + toString(slippageToleranceX18)))
366366 else {
367367 let lpEmissionX18 = toX18(lpEmission, scale8)
368368 let prViaAmX18 = fraction(inAmAssetAmtX18, calcPriceBigIntRound(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING)
369369 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, calcPriceBigIntRound(prBalanceX18, amBalanceX18, FLOOR), CEILING)
370370 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
371371 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
372372 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
373373 let expAmtAssetAmtX18 = expectedAmts._1
374374 let expPriceAssetAmtX18 = expectedAmts._2
375375 let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18, FLOOR)
376376 $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtAssetDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceAssetDcm, CEILING), curPriceX18, slippageX18)
377377 }
378378 }
379379 let calcLpAmt = res._1
380380 let calcAmAssetPmt = res._2
381381 let calcPrAssetPmt = res._3
382382 let curPrice = fromX18(res._4, scale8)
383383 let slippageCalc = fromX18(res._5, scale8)
384384 if ((0 >= calcLpAmt))
385385 then throw("Invalid calculations. LP calculated is less than zero.")
386386 else {
387387 let emitLpAmt = if (!(emitLp))
388388 then 0
389389 else calcLpAmt
390390 let amDiff = (inAmAssetAmt - calcAmAssetPmt)
391391 let prDiff = (inPrAssetAmt - calcPrAssetPmt)
392392 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))]
393393 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEmission, lpAssetId, poolStatus, commonState, amDiff, prDiff, inAmAssetId, inPrAssetId)
394394 }
395395 }
396396 }
397397
398398
399399 func calcKLp (amountBalance,priceBalance,lpEmission) = {
400400 let amountBalanceX18 = toX18BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals))
401401 let priceBalanceX18 = toX18BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))
402402 let updatedKLp = fraction(pow((amountBalanceX18 * priceBalanceX18), 0, toBigInt(5), 1, 18, DOWN), big1, lpEmission)
403403 if ((lpEmission == big0))
404404 then big0
405405 else updatedKLp
406406 }
407407
408408
409409 func calcCurrentKLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
410410 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
411411 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
412412 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
413413 let currentKLp = calcKLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
414414 currentKLp
415415 }
416416
417417
418418 func refreshKLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
419419 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
420420 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
421421 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
422422 let updatedKLp = calcKLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
423423 let actions = [IntegerEntry(keyKLpRefreshedHeight, height), StringEntry(keyKLp, toString(updatedKLp))]
424424 $Tuple2(actions, updatedKLp)
425425 }
426426
427427
428428 func validateUpdatedKLp (oldKLp,updatedKLp) = if ((updatedKLp >= oldKLp))
429429 then true
430430 else throwErr(makeString(["updated KLp lower than current KLp", toString(oldKLp), toString(updatedKLp)], " "))
431431
432432
433433 func validateMatcherOrderAllowed (order) = {
434434 let amountAssetAmount = order.amount
435435 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
436436 let $t02132621538 = if ((order.orderType == Buy))
437437 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
438438 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
439439 let amountAssetBalanceDelta = $t02132621538._1
440440 let priceAssetBalanceDelta = $t02132621538._2
441441 if (if (if (isGlobalShutdown())
442442 then true
443443 else (cfgPoolStatus == PoolMatcherDisabled))
444444 then true
445445 else (cfgPoolStatus == PoolShutdown))
446446 then throw("Exchange operations disabled")
447447 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
448448 then true
449449 else (order.assetPair.priceAsset != cfgPriceAssetId))
450450 then throw("Wrong order assets.")
451451 else {
452- let kLp = valueOrErrorMessage(parseBigInt(valueOrErrorMessage(getString(this, keyKLp), fmtErr("kLp is required"))), fmtErr("invalid kLp"))
453- let $t02200922109 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
454- let unusedActions = $t02200922109._1
455- let kLpNew = $t02200922109._2
452+ let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp"))
453+ let $t02197822078 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
454+ let unusedActions = $t02197822078._1
455+ let kLpNew = $t02197822078._2
456456 let isOrderValid = (kLpNew >= kLp)
457457 let info = makeString([toString(kLp), toString(kLpNew)], " ")
458458 $Tuple2(isOrderValid, info)
459459 }
460460 }
461461
462462
463463 func commonGet (i) = if ((size(i.payments) != 1))
464464 then throw("exactly 1 payment is expected")
465465 else {
466466 let pmt = value(i.payments[0])
467467 let pmtAssetId = value(pmt.assetId)
468468 let pmtAmt = pmt.amount
469469 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
470470 let outAmAmt = res._1
471471 let outPrAmt = res._2
472472 let poolStatus = parseIntValue(res._9)
473473 let state = res._10
474474 if (if (isGlobalShutdown())
475475 then true
476476 else (poolStatus == PoolShutdown))
477477 then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus)))
478478 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
479479 }
480480
481481
482482 func commonPut (i,slippageTolerance,emitLp) = if ((size(i.payments) != 2))
483483 then throw("exactly 2 payments are expected")
484484 else {
485485 let amAssetPmt = value(i.payments[0])
486486 let prAssetPmt = value(i.payments[1])
487487 let estPut = estimatePutOperation(toBase58String(i.transactionId), slippageTolerance, amAssetPmt.amount, amAssetPmt.assetId, prAssetPmt.amount, prAssetPmt.assetId, toString(i.caller), false, emitLp)
488488 let poolStatus = parseIntValue(estPut._8)
489489 if (if (if (isGlobalShutdown())
490490 then true
491491 else (poolStatus == PoolPutDisabled))
492492 then true
493493 else (poolStatus == PoolShutdown))
494494 then throw(("Put operation is blocked by admin. Status = " + toString(poolStatus)))
495495 else estPut
496496 }
497497
498498
499499 func emit (amount) = {
500500 let emitInv = invoke(factoryContract, "emit", [amount], nil)
501501 if ((emitInv == emitInv))
502502 then {
503503 let emitInvLegacy = match emitInv {
504504 case legacyFactoryContract: Address =>
505505 invoke(legacyFactoryContract, "emit", [amount], nil)
506506 case _ =>
507507 unit
508508 }
509509 if ((emitInvLegacy == emitInvLegacy))
510510 then amount
511511 else throw("Strict value is not equal to itself.")
512512 }
513513 else throw("Strict value is not equal to itself.")
514514 }
515515
516516
517517 func takeFee (amount,fee) = {
518518 let feeAmount = if ((fee == 0))
519519 then 0
520520 else fraction(amount, fee, scale8)
521521 $Tuple2((amount - feeAmount), feeAmount)
522522 }
523523
524524
525525 func calcPutOneToken (paymentAmountRaw,paymentAssetId,userAddress,txId) = {
526526 let isEval = (txId == unit)
527527 let amountBalanceRaw = getAccBalance(assetIdToString(cfgAmountAssetId))
528528 let priceBalanceRaw = getAccBalance(assetIdToString(cfgPriceAssetId))
529529 let paymentInAmountAsset = if ((paymentAssetId == cfgAmountAssetId))
530530 then true
531531 else if ((paymentAssetId == cfgPriceAssetId))
532532 then false
533533 else throwErr("invalid asset")
534- let $t02491625209 = if (isEval)
534+ let $t02488525178 = if (isEval)
535535 then $Tuple2(amountBalanceRaw, priceBalanceRaw)
536536 else if (paymentInAmountAsset)
537537 then $Tuple2((amountBalanceRaw - paymentAmountRaw), priceBalanceRaw)
538538 else $Tuple2(amountBalanceRaw, (priceBalanceRaw - paymentAmountRaw))
539- let amountBalanceOld = $t02491625209._1
540- let priceBalanceOld = $t02491625209._2
541- let $t02521325362 = if (paymentInAmountAsset)
539+ let amountBalanceOld = $t02488525178._1
540+ let priceBalanceOld = $t02488525178._2
541+ let $t02518225331 = if (paymentInAmountAsset)
542542 then $Tuple2(paymentAmountRaw, 0)
543543 else $Tuple2(0, paymentAmountRaw)
544- let amountAssetAmountRaw = $t02521325362._1
545- let priceAssetAmountRaw = $t02521325362._2
544+ let amountAssetAmountRaw = $t02518225331._1
545+ let priceAssetAmountRaw = $t02518225331._2
546546 let amountAssetAmount = takeFee(amountAssetAmountRaw, inFee)._1
547547 let priceAssetAmount = takeFee(priceAssetAmountRaw, inFee)._1
548- let $t02549425558 = takeFee(paymentAmountRaw, inFee)
549- let paymentAmount = $t02549425558._1
550- let feeAmount = $t02549425558._2
548+ let $t02546325527 = takeFee(paymentAmountRaw, inFee)
549+ let paymentAmount = $t02546325527._1
550+ let feeAmount = $t02546325527._2
551551 let amountBalanceNew = (amountBalanceOld + amountAssetAmount)
552552 let priceBalanceNew = (priceBalanceOld + priceAssetAmount)
553553 let priceNewX18 = calcPriceBigInt(toX18(priceBalanceNew, cfgPriceAssetDecimals), toX18(amountBalanceNew, cfgAmountAssetDecimals))
554554 let priceNew = fromX18(priceNewX18, scale8)
555555 let paymentBalance = if (paymentInAmountAsset)
556556 then amountBalanceOld
557557 else priceBalanceOld
558558 let paymentBalanceBigInt = toBigInt(paymentBalance)
559559 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity)
560560 let chechSupply = if ((supplyBigInt > big0))
561561 then true
562562 else throwErr("initial deposit requires all coins")
563563 if ((chechSupply == chechSupply))
564564 then {
565565 let depositBigInt = toBigInt(paymentAmount)
566566 let issueAmount = max([0, toInt(((supplyBigInt * (sqrtBigInt((scale18 + ((depositBigInt * scale18) / paymentBalanceBigInt)), 18, 18, DOWN) - scale18)) / scale18))])
567567 let commonState = if (isEval)
568568 then nil
569569 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))]
570570 let priceOldX18 = calcPriceBigInt(toX18(priceBalanceOld, cfgPriceAssetDecimals), toX18(amountBalanceOld, cfgAmountAssetDecimals))
571571 let priceOld = fromX18(priceOldX18, scale8)
572572 let loss = {
573- let $t02723927406 = if (paymentInAmountAsset)
573+ let $t02720827375 = if (paymentInAmountAsset)
574574 then $Tuple2(amountAssetAmountRaw, amountBalanceOld)
575575 else $Tuple2(priceAssetAmountRaw, priceBalanceOld)
576- let amount = $t02723927406._1
577- let balance = $t02723927406._2
576+ let amount = $t02720827375._1
577+ let balance = $t02720827375._2
578578 let issueAmountBoth = toInt(fraction(supplyBigInt, toBigInt((amount / 2)), toBigInt(balance)))
579579 fraction((issueAmount - issueAmountBoth), scale8, issueAmountBoth)
580580 }
581581 $Tuple5(issueAmount, commonState, feeAmount, loss, paymentInAmountAsset)
582582 }
583583 else throw("Strict value is not equal to itself.")
584584 }
585585
586586
587587 func calcGetOneToken (outAssetId,paymentAmount,paymentAssetId,userAddress,txId) = {
588588 let isEval = (txId == unit)
589589 let cfg = getPoolConfig()
590590 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
591591 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
592592 let checks = [if ((paymentAssetId == cfgLpAssetId))
593593 then true
594594 else throwErr("invalid lp asset")]
595595 if ((checks == checks))
596596 then {
597597 let outInAmountAsset = if ((outAssetId == cfgAmountAssetId))
598598 then true
599599 else if ((outAssetId == cfgPriceAssetId))
600600 then false
601601 else throwErr("invalid asset")
602602 let balanceBigInt = if (outInAmountAsset)
603603 then toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId)))
604604 else toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId)))
605605 let outInAmountAssetDecimals = if (outInAmountAsset)
606606 then amtAssetDcm
607607 else priceAssetDcm
608608 let amBalanceOld = getAccBalance(assetIdToString(cfgAmountAssetId))
609609 let prBalanceOld = getAccBalance(assetIdToString(cfgPriceAssetId))
610610 let outBalance = if (outInAmountAsset)
611611 then amBalanceOld
612612 else prBalanceOld
613613 let outBalanceBigInt = toBigInt(outBalance)
614614 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity)
615615 let redeemedBigInt = toBigInt(paymentAmount)
616616 let amountRaw = max([0, toInt(((balanceBigInt * (scale18 - pow((scale18 - ((redeemedBigInt * scale18) / supplyBigInt)), 18, big2, 0, 18, DOWN))) / scale18))])
617- let $t02948429540 = takeFee(amountRaw, outFee)
618- let totalAmount = $t02948429540._1
619- let feeAmount = $t02948429540._2
620- let $t02954429770 = if (outInAmountAsset)
617+ let $t02945329509 = takeFee(amountRaw, outFee)
618+ let totalAmount = $t02945329509._1
619+ let feeAmount = $t02945329509._2
620+ let $t02951329739 = if (outInAmountAsset)
621621 then $Tuple4(totalAmount, 0, (amBalanceOld - amountRaw), prBalanceOld)
622622 else $Tuple4(0, totalAmount, amBalanceOld, (prBalanceOld - amountRaw))
623- let outAmAmount = $t02954429770._1
624- let outPrAmount = $t02954429770._2
625- let amBalanceNew = $t02954429770._3
626- let prBalanceNew = $t02954429770._4
623+ let outAmAmount = $t02951329739._1
624+ let outPrAmount = $t02951329739._2
625+ let amBalanceNew = $t02951329739._3
626+ let prBalanceNew = $t02951329739._4
627627 let priceNewX18 = calcPriceBigInt(toX18(prBalanceNew, cfgPriceAssetDecimals), toX18(amBalanceNew, cfgAmountAssetDecimals))
628628 let priceNew = fromX18(priceNewX18, scale8)
629629 let commonState = if (isEval)
630630 then nil
631631 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)]
632632 let priceOldX18 = calcPriceBigInt(toX18(prBalanceOld, cfgPriceAssetDecimals), toX18(amBalanceOld, cfgAmountAssetDecimals))
633633 let priceOld = fromX18(priceOldX18, scale8)
634634 let loss = {
635635 let amountBothInPaymentAsset = (toInt(fraction(balanceBigInt, redeemedBigInt, supplyBigInt)) * 2)
636636 fraction((totalAmount - amountBothInPaymentAsset), scale8, amountBothInPaymentAsset)
637637 }
638638 $Tuple5(totalAmount, commonState, feeAmount, loss, outInAmountAsset)
639639 }
640640 else throw("Strict value is not equal to itself.")
641641 }
642642
643643
644644 func managerPublicKeyOrUnit () = match getString(mpk()) {
645645 case s: String =>
646646 fromBase58String(s)
647647 case _: Unit =>
648648 unit
649649 case _ =>
650650 throw("Match error")
651651 }
652652
653653
654654 func pendingManagerPublicKeyOrUnit () = match getString(pmpk()) {
655655 case s: String =>
656656 fromBase58String(s)
657657 case _: Unit =>
658658 unit
659659 case _ =>
660660 throw("Match error")
661661 }
662662
663663
664664 func isManager (i) = match managerPublicKeyOrUnit() {
665665 case pk: ByteVector =>
666666 (i.callerPublicKey == pk)
667667 case _: Unit =>
668668 (i.caller == this)
669669 case _ =>
670670 throw("Match error")
671671 }
672672
673673
674674 func mustManager (i) = {
675675 let pd = throw("Permission denied")
676676 match managerPublicKeyOrUnit() {
677677 case pk: ByteVector =>
678678 if ((i.callerPublicKey == pk))
679679 then true
680680 else pd
681681 case _: Unit =>
682682 if ((i.caller == this))
683683 then true
684684 else pd
685685 case _ =>
686686 throw("Match error")
687687 }
688688 }
689689
690690
691691 @Callable(i)
692692 func setManager (pendingManagerPublicKey) = {
693693 let checkCaller = mustManager(i)
694694 if ((checkCaller == checkCaller))
695695 then {
696696 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
697697 if ((checkManagerPublicKey == checkManagerPublicKey))
698698 then [StringEntry(pmpk(), pendingManagerPublicKey)]
699699 else throw("Strict value is not equal to itself.")
700700 }
701701 else throw("Strict value is not equal to itself.")
702702 }
703703
704704
705705
706706 @Callable(i)
707707 func confirmManager () = {
708708 let pm = pendingManagerPublicKeyOrUnit()
709709 let hasPM = if (isDefined(pm))
710710 then true
711711 else throw("No pending manager")
712712 if ((hasPM == hasPM))
713713 then {
714714 let checkPM = if ((i.callerPublicKey == value(pm)))
715715 then true
716716 else throw("You are not pending manager")
717717 if ((checkPM == checkPM))
718718 then [StringEntry(mpk(), toBase58String(value(pm))), DeleteEntry(pmpk())]
719719 else throw("Strict value is not equal to itself.")
720720 }
721721 else throw("Strict value is not equal to itself.")
722722 }
723723
724724
725725
726726 @Callable(i)
727727 func put (slippageTolerance,shouldAutoStake) = if ((0 > slippageTolerance))
728728 then throw("Invalid slippageTolerance passed")
729729 else {
730730 let estPut = commonPut(i, slippageTolerance, true)
731731 let emitLpAmt = estPut._2
732732 let lpAssetId = estPut._7
733733 let state = estPut._9
734734 let amDiff = estPut._10
735735 let prDiff = estPut._11
736736 let amId = estPut._12
737737 let prId = estPut._13
738738 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
739739 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
740740 let currentKLp = calcCurrentKLp(amAssetPmt, prAssetPmt, toBigInt(0))
741741 if ((currentKLp == currentKLp))
742742 then {
743743 let emitInv = invoke(factoryContract, "emit", [emitLpAmt], nil)
744744 if ((emitInv == emitInv))
745745 then {
746746 let emitInvLegacy = match emitInv {
747747 case legacyFactoryContract: Address =>
748748 invoke(legacyFactoryContract, "emit", [emitLpAmt], nil)
749749 case _ =>
750750 unit
751751 }
752752 if ((emitInvLegacy == emitInvLegacy))
753753 then {
754754 let slippageAInv = if ((amDiff > 0))
755755 then invoke(slippageContract, "put", nil, [AttachedPayment(amId, amDiff)])
756756 else nil
757757 if ((slippageAInv == slippageAInv))
758758 then {
759759 let slippagePInv = if ((prDiff > 0))
760760 then invoke(slippageContract, "put", nil, [AttachedPayment(prId, prDiff)])
761761 else nil
762762 if ((slippagePInv == slippagePInv))
763763 then {
764764 let lpTransfer = if (shouldAutoStake)
765765 then {
766766 let slpStakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
767767 if ((slpStakeInv == slpStakeInv))
768768 then nil
769769 else throw("Strict value is not equal to itself.")
770770 }
771771 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
772- let $t03429834760 = refreshKLpInternal(0, 0, 0)
773- if (($t03429834760 == $t03429834760))
772+ let $t03426734729 = refreshKLpInternal(0, 0, 0)
773+ if (($t03426734729 == $t03426734729))
774774 then {
775- let updatedKLp = $t03429834760._2
776- let refreshKLpActions = $t03429834760._1
775+ let updatedKLp = $t03426734729._2
776+ let refreshKLpActions = $t03426734729._1
777777 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
778778 if ((isUpdatedKLpValid == isUpdatedKLpValid))
779779 then ((state ++ lpTransfer) ++ refreshKLpActions)
780780 else throw("Strict value is not equal to itself.")
781781 }
782782 else throw("Strict value is not equal to itself.")
783783 }
784784 else throw("Strict value is not equal to itself.")
785785 }
786786 else throw("Strict value is not equal to itself.")
787787 }
788788 else throw("Strict value is not equal to itself.")
789789 }
790790 else throw("Strict value is not equal to itself.")
791791 }
792792 else throw("Strict value is not equal to itself.")
793793 }
794794
795795
796796
797797 @Callable(i)
798798 func putForFree (maxSlippage) = if ((0 > maxSlippage))
799799 then throw("Invalid value passed")
800800 else {
801801 let estPut = commonPut(i, maxSlippage, false)
802802 let state = estPut._9
803803 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
804804 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
805805 let currentKLp = calcCurrentKLp(amAssetPmt, prAssetPmt, toBigInt(0))
806806 if ((currentKLp == currentKLp))
807807 then {
808- let $t03532235387 = refreshKLpInternal(0, 0, 0)
809- let refreshKLpActions = $t03532235387._1
810- let updatedKLp = $t03532235387._2
808+ let $t03529135356 = refreshKLpInternal(0, 0, 0)
809+ let refreshKLpActions = $t03529135356._1
810+ let updatedKLp = $t03529135356._2
811811 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
812812 if ((isUpdatedKLpValid == isUpdatedKLpValid))
813813 then (state ++ refreshKLpActions)
814814 else throw("Strict value is not equal to itself.")
815815 }
816816 else throw("Strict value is not equal to itself.")
817817 }
818818
819819
820820
821821 @Callable(i)
822822 func putOneTkn (minOutAmount,autoStake) = {
823823 let isPoolOneTokenOperationsDisabled = {
824824 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
825825 if ($isInstanceOf(@, "Boolean"))
826826 then @
827827 else throw(($getType(@) + " couldn't be cast to Boolean"))
828828 }
829829 let isPutDisabled = if (if (if (isGlobalShutdown())
830830 then true
831831 else (cfgPoolStatus == PoolPutDisabled))
832832 then true
833833 else (cfgPoolStatus == PoolShutdown))
834834 then true
835835 else isPoolOneTokenOperationsDisabled
836836 let checks = [if (if (!(isPutDisabled))
837837 then true
838838 else isManager(i))
839839 then true
840840 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
841841 then true
842842 else throwErr("exactly 1 payment are expected")]
843843 if ((checks == checks))
844844 then {
845845 let payment = i.payments[0]
846846 let paymentAssetId = payment.assetId
847847 let paymentAmountRaw = payment.amount
848848 let currentKLp = if ((paymentAssetId == cfgAmountAssetId))
849849 then calcCurrentKLp(toBigInt(paymentAmountRaw), toBigInt(0), toBigInt(0))
850850 else if ((paymentAssetId == cfgPriceAssetId))
851851 then calcCurrentKLp(toBigInt(0), toBigInt(paymentAmountRaw), toBigInt(0))
852852 else throwErr("payment asset is not supported")
853853 if ((currentKLp == currentKLp))
854854 then {
855855 let userAddress = i.caller
856856 let txId = i.transactionId
857- let $t03657536727 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
858- if (($t03657536727 == $t03657536727))
857+ let $t03654436696 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
858+ if (($t03654436696 == $t03654436696))
859859 then {
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
860+ let paymentInAmountAsset = $t03654436696._5
861+ let bonus = $t03654436696._4
862+ let feeAmount = $t03654436696._3
863+ let commonState = $t03654436696._2
864+ let emitAmountEstimated = $t03654436696._1
865865 let emitAmount = if (if ((minOutAmount > 0))
866866 then (minOutAmount > emitAmountEstimated)
867867 else false)
868868 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
869869 else emitAmountEstimated
870870 let emitInv = emit(emitAmount)
871871 if ((emitInv == emitInv))
872872 then {
873873 let lpTransfer = if (autoStake)
874874 then {
875875 let stakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(cfgLpAssetId, emitAmount)])
876876 if ((stakeInv == stakeInv))
877877 then nil
878878 else throw("Strict value is not equal to itself.")
879879 }
880880 else [ScriptTransfer(i.caller, emitAmount, cfgLpAssetId)]
881881 let sendFee = if ((feeAmount > 0))
882882 then [ScriptTransfer(feeCollectorAddress, feeAmount, paymentAssetId)]
883883 else nil
884- let $t03731337510 = if ((this == feeCollectorAddress))
884+ let $t03728237479 = if ((this == feeCollectorAddress))
885885 then $Tuple2(0, 0)
886886 else if (paymentInAmountAsset)
887887 then $Tuple2(-(feeAmount), 0)
888888 else $Tuple2(0, -(feeAmount))
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
889+ let amountAssetBalanceDelta = $t03728237479._1
890+ let priceAssetBalanceDelta = $t03728237479._2
891+ let $t03748237590 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
892+ let refreshKLpActions = $t03748237590._1
893+ let updatedKLp = $t03748237590._2
894894 let kLp = value(getString(keyKLp))
895895 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
896896 if ((isUpdatedKLpValid == isUpdatedKLpValid))
897897 then $Tuple2((((commonState ++ lpTransfer) ++ sendFee) ++ refreshKLpActions), emitAmount)
898898 else throw("Strict value is not equal to itself.")
899899 }
900900 else throw("Strict value is not equal to itself.")
901901 }
902902 else throw("Strict value is not equal to itself.")
903903 }
904904 else throw("Strict value is not equal to itself.")
905905 }
906906 else throw("Strict value is not equal to itself.")
907907 }
908908
909909
910910
911911 @Callable(i)
912912 func putOneTknREADONLY (paymentAssetId,paymentAmountRaw) = {
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
913+ let $t03789638053 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
914+ let emitAmountEstimated = $t03789638053._1
915+ let commonState = $t03789638053._2
916+ let feeAmount = $t03789638053._3
917+ let bonus = $t03789638053._4
918+ let paymentInAmountAsset = $t03789638053._5
919919 $Tuple2(nil, $Tuple3(emitAmountEstimated, feeAmount, bonus))
920920 }
921921
922922
923923
924924 @Callable(i)
925925 func getOneTkn (outAssetIdStr,minOutAmount) = {
926926 let isPoolOneTokenOperationsDisabled = {
927927 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
928928 if ($isInstanceOf(@, "Boolean"))
929929 then @
930930 else throw(($getType(@) + " couldn't be cast to Boolean"))
931931 }
932932 let isGetDisabled = if (if (isGlobalShutdown())
933933 then true
934934 else (cfgPoolStatus == PoolShutdown))
935935 then true
936936 else isPoolOneTokenOperationsDisabled
937937 let checks = [if (if (!(isGetDisabled))
938938 then true
939939 else isManager(i))
940940 then true
941941 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
942942 then true
943943 else throwErr("exactly 1 payment are expected")]
944944 if ((checks == checks))
945945 then {
946946 let outAssetId = parseAssetId(outAssetIdStr)
947947 let payment = i.payments[0]
948948 let paymentAssetId = payment.assetId
949949 let paymentAmount = payment.amount
950950 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
951951 if ((currentKLp == currentKLp))
952952 then {
953953 let userAddress = i.caller
954954 let txId = i.transactionId
955- let $t03896939122 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
956- if (($t03896939122 == $t03896939122))
955+ let $t03893839091 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
956+ if (($t03893839091 == $t03893839091))
957957 then {
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
958+ let outInAmountAsset = $t03893839091._5
959+ let bonus = $t03893839091._4
960+ let feeAmount = $t03893839091._3
961+ let commonState = $t03893839091._2
962+ let amountEstimated = $t03893839091._1
963963 let amount = if (if ((minOutAmount > 0))
964964 then (minOutAmount > amountEstimated)
965965 else false)
966966 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
967967 else amountEstimated
968968 let burnInv = invoke(factoryContract, "burn", [paymentAmount], [AttachedPayment(paymentAssetId, paymentAmount)])
969969 if ((burnInv == burnInv))
970970 then {
971971 let assetTransfer = [ScriptTransfer(userAddress, amount, outAssetId)]
972972 let sendFee = if ((feeAmount > 0))
973973 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
974974 else nil
975- let $t03962239869 = {
975+ let $t03959139838 = {
976976 let feeAmountForCalc = if ((this == feeCollectorAddress))
977977 then 0
978978 else feeAmount
979979 if (outInAmountAsset)
980980 then $Tuple2(-((amount + feeAmountForCalc)), 0)
981981 else $Tuple2(0, -((amount + feeAmountForCalc)))
982982 }
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
983+ let amountAssetBalanceDelta = $t03959139838._1
984+ let priceAssetBalanceDelta = $t03959139838._2
985+ let $t03984139949 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
986+ let refreshKLpActions = $t03984139949._1
987+ let updatedKLp = $t03984139949._2
988988 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
989989 if ((isUpdatedKLpValid == isUpdatedKLpValid))
990990 then $Tuple2((((commonState ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
991991 else throw("Strict value is not equal to itself.")
992992 }
993993 else throw("Strict value is not equal to itself.")
994994 }
995995 else throw("Strict value is not equal to itself.")
996996 }
997997 else throw("Strict value is not equal to itself.")
998998 }
999999 else throw("Strict value is not equal to itself.")
10001000 }
10011001
10021002
10031003
10041004 @Callable(i)
10051005 func getOneTknREADONLY (outAssetId,paymentAmount) = {
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
1006+ let $t04020640362 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
1007+ let amountEstimated = $t04020640362._1
1008+ let commonState = $t04020640362._2
1009+ let feeAmount = $t04020640362._3
1010+ let bonus = $t04020640362._4
1011+ let outInAmountAsset = $t04020640362._5
10121012 $Tuple2(nil, $Tuple3(amountEstimated, feeAmount, bonus))
10131013 }
10141014
10151015
10161016
10171017 @Callable(i)
10181018 func unstakeAndGetOneTkn (unstakeAmount,outAssetIdStr,minOutAmount) = {
10191019 let isPoolOneTokenOperationsDisabled = {
10201020 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
10211021 if ($isInstanceOf(@, "Boolean"))
10221022 then @
10231023 else throw(($getType(@) + " couldn't be cast to Boolean"))
10241024 }
10251025 let isGetDisabled = if (if (isGlobalShutdown())
10261026 then true
10271027 else (cfgPoolStatus == PoolShutdown))
10281028 then true
10291029 else isPoolOneTokenOperationsDisabled
10301030 let checks = [if (if (!(isGetDisabled))
10311031 then true
10321032 else isManager(i))
10331033 then true
10341034 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
10351035 then true
10361036 else throwErr("no payments are expected")]
10371037 if ((checks == checks))
10381038 then {
10391039 let outAssetId = parseAssetId(outAssetIdStr)
10401040 let userAddress = i.caller
10411041 let txId = i.transactionId
10421042 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
10431043 if ((currentKLp == currentKLp))
10441044 then {
10451045 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
10461046 if ((unstakeInv == unstakeInv))
10471047 then {
1048- let $t04129841449 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
1049- if (($t04129841449 == $t04129841449))
1048+ let $t04126741418 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
1049+ if (($t04126741418 == $t04126741418))
10501050 then {
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
1051+ let outInAmountAsset = $t04126741418._5
1052+ let bonus = $t04126741418._4
1053+ let feeAmount = $t04126741418._3
1054+ let commonState = $t04126741418._2
1055+ let amountEstimated = $t04126741418._1
10561056 let amount = if (if ((minOutAmount > 0))
10571057 then (minOutAmount > amountEstimated)
10581058 else false)
10591059 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
10601060 else amountEstimated
10611061 let burnInv = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
10621062 if ((burnInv == burnInv))
10631063 then {
10641064 let assetTransfer = [ScriptTransfer(i.caller, amount, outAssetId)]
10651065 let sendFee = if ((feeAmount > 0))
10661066 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
10671067 else nil
1068- let $t04194442191 = {
1068+ let $t04191342160 = {
10691069 let feeAmountForCalc = if ((this == feeCollectorAddress))
10701070 then 0
10711071 else feeAmount
10721072 if (outInAmountAsset)
10731073 then $Tuple2(-((amount + feeAmountForCalc)), 0)
10741074 else $Tuple2(0, -((amount + feeAmountForCalc)))
10751075 }
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
1076+ let amountAssetBalanceDelta = $t04191342160._1
1077+ let priceAssetBalanceDelta = $t04191342160._2
1078+ let $t04216342271 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1079+ let refreshKLpActions = $t04216342271._1
1080+ let updatedKLp = $t04216342271._2
10811081 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
10821082 if ((isUpdatedKLpValid == isUpdatedKLpValid))
10831083 then $Tuple2((((commonState ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
10841084 else throw("Strict value is not equal to itself.")
10851085 }
10861086 else throw("Strict value is not equal to itself.")
10871087 }
10881088 else throw("Strict value is not equal to itself.")
10891089 }
10901090 else throw("Strict value is not equal to itself.")
10911091 }
10921092 else throw("Strict value is not equal to itself.")
10931093 }
10941094 else throw("Strict value is not equal to itself.")
10951095 }
10961096
10971097
10981098
10991099 @Callable(i)
11001100 func get () = {
11011101 let res = commonGet(i)
11021102 let outAmtAmt = res._1
11031103 let outPrAmt = res._2
11041104 let pmtAmt = res._3
11051105 let pmtAssetId = res._4
11061106 let state = res._5
11071107 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
11081108 if ((currentKLp == currentKLp))
11091109 then {
11101110 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
11111111 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11121112 then {
1113- let $t04324843330 = refreshKLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1114- let refreshKLpActions = $t04324843330._1
1115- let updatedKLp = $t04324843330._2
1113+ let $t04321743299 = refreshKLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1114+ let refreshKLpActions = $t04321743299._1
1115+ let updatedKLp = $t04321743299._2
11161116 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11171117 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11181118 then (state ++ refreshKLpActions)
11191119 else throw("Strict value is not equal to itself.")
11201120 }
11211121 else throw("Strict value is not equal to itself.")
11221122 }
11231123 else throw("Strict value is not equal to itself.")
11241124 }
11251125
11261126
11271127
11281128 @Callable(i)
11291129 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
11301130 let res = commonGet(i)
11311131 let outAmAmt = res._1
11321132 let outPrAmt = res._2
11331133 let pmtAmt = res._3
11341134 let pmtAssetId = res._4
11351135 let state = res._5
11361136 if ((noLessThenAmtAsset > outAmAmt))
11371137 then throw(((("noLessThenAmtAsset failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
11381138 else if ((noLessThenPriceAsset > outPrAmt))
11391139 then throw(((("noLessThenPriceAsset failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
11401140 else {
11411141 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
11421142 if ((currentKLp == currentKLp))
11431143 then {
11441144 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
11451145 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11461146 then {
1147- let $t04427944360 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1148- let refreshKLpActions = $t04427944360._1
1149- let updatedKLp = $t04427944360._2
1147+ let $t04424844329 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1148+ let refreshKLpActions = $t04424844329._1
1149+ let updatedKLp = $t04424844329._2
11501150 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11511151 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11521152 then (state ++ refreshKLpActions)
11531153 else throw("Strict value is not equal to itself.")
11541154 }
11551155 else throw("Strict value is not equal to itself.")
11561156 }
11571157 else throw("Strict value is not equal to itself.")
11581158 }
11591159 }
11601160
11611161
11621162
11631163 @Callable(i)
11641164 func unstakeAndGet (amount) = {
11651165 let checkPayments = if ((size(i.payments) != 0))
11661166 then throw("No payments are expected")
11671167 else true
11681168 if ((checkPayments == checkPayments))
11691169 then {
11701170 let cfg = getPoolConfig()
11711171 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
11721172 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
11731173 if ((currentKLp == currentKLp))
11741174 then {
11751175 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(lpAssetId), amount], nil)
11761176 if ((unstakeInv == unstakeInv))
11771177 then {
11781178 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
11791179 let outAmAmt = res._1
11801180 let outPrAmt = res._2
11811181 let poolStatus = parseIntValue(res._9)
11821182 let state = res._10
11831183 let checkPoolStatus = if (if (isGlobalShutdown())
11841184 then true
11851185 else (poolStatus == PoolShutdown))
11861186 then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus)))
11871187 else true
11881188 if ((checkPoolStatus == checkPoolStatus))
11891189 then {
11901190 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
11911191 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11921192 then {
1193- let $t04548645567 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1194- let refreshKLpActions = $t04548645567._1
1195- let updatedKLp = $t04548645567._2
1193+ let $t04545545536 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1194+ let refreshKLpActions = $t04545545536._1
1195+ let updatedKLp = $t04545545536._2
11961196 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11971197 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11981198 then (state ++ refreshKLpActions)
11991199 else throw("Strict value is not equal to itself.")
12001200 }
12011201 else throw("Strict value is not equal to itself.")
12021202 }
12031203 else throw("Strict value is not equal to itself.")
12041204 }
12051205 else throw("Strict value is not equal to itself.")
12061206 }
12071207 else throw("Strict value is not equal to itself.")
12081208 }
12091209 else throw("Strict value is not equal to itself.")
12101210 }
12111211
12121212
12131213
12141214 @Callable(i)
12151215 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
12161216 let isGetDisabled = if (isGlobalShutdown())
12171217 then true
12181218 else (cfgPoolStatus == PoolShutdown)
12191219 let checks = [if (!(isGetDisabled))
12201220 then true
12211221 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
12221222 then true
12231223 else throw("no payments are expected")]
12241224 if ((checks == checks))
12251225 then {
12261226 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
12271227 if ((currentKLp == currentKLp))
12281228 then {
12291229 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
12301230 if ((unstakeInv == unstakeInv))
12311231 then {
12321232 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
12331233 let outAmAmt = res._1
12341234 let outPrAmt = res._2
12351235 let state = res._10
12361236 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
12371237 then true
12381238 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
12391239 then true
12401240 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
12411241 if ((checkAmounts == checkAmounts))
12421242 then {
12431243 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
12441244 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
12451245 then {
1246- let $t04686246943 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1247- let refreshKLpActions = $t04686246943._1
1248- let updatedKLp = $t04686246943._2
1246+ let $t04683146912 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1247+ let refreshKLpActions = $t04683146912._1
1248+ let updatedKLp = $t04683146912._2
12491249 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
12501250 if ((isUpdatedKLpValid == isUpdatedKLpValid))
12511251 then (state ++ refreshKLpActions)
12521252 else throw("Strict value is not equal to itself.")
12531253 }
12541254 else throw("Strict value is not equal to itself.")
12551255 }
12561256 else throw("Strict value is not equal to itself.")
12571257 }
12581258 else throw("Strict value is not equal to itself.")
12591259 }
12601260 else throw("Strict value is not equal to itself.")
12611261 }
12621262 else throw("Strict value is not equal to itself.")
12631263 }
12641264
12651265
12661266
12671267 @Callable(i)
12681268 func activate (amtAssetStr,priceAssetStr) = if ((toString(i.caller) != toString(factoryContract)))
12691269 then throw("permissions denied")
12701270 else $Tuple2([StringEntry(aa(), amtAssetStr), StringEntry(pa(), priceAssetStr)], "success")
12711271
12721272
12731273
12741274 @Callable(i)
12751275 func refreshKLp () = {
12761276 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyKLpRefreshedHeight), 0)
12771277 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= kLpRefreshDelay))
12781278 then unit
12791279 else throwErr(makeString([toString(kLpRefreshDelay), " blocks have not passed since the previous call"], ""))
12801280 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
12811281 then {
12821282 let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp"))
1283- let $t04813048194 = refreshKLpInternal(0, 0, 0)
1284- let kLpUpdateActions = $t04813048194._1
1285- let updatedKLp = $t04813048194._2
1283+ let $t04809948163 = refreshKLpInternal(0, 0, 0)
1284+ let kLpUpdateActions = $t04809948163._1
1285+ let updatedKLp = $t04809948163._2
12861286 let actions = if ((kLp != updatedKLp))
12871287 then kLpUpdateActions
12881288 else throwErr("nothing to refresh")
12891289 $Tuple2(actions, toString(updatedKLp))
12901290 }
12911291 else throw("Strict value is not equal to itself.")
12921292 }
12931293
12941294
12951295
12961296 @Callable(i)
12971297 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, getPoolConfig())
12981298
12991299
13001300
13011301 @Callable(i)
13021302 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
13031303
13041304
13051305
13061306 @Callable(i)
13071307 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
13081308 let prices = calcPrices(amAmt, prAmt, lpAmt)
13091309 $Tuple2(nil, [toString(prices[0]), toString(prices[1]), toString(prices[2])])
13101310 }
13111311
13121312
13131313
13141314 @Callable(i)
13151315 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(toX18(origVal, origScaleMult)))
13161316
13171317
13181318
13191319 @Callable(i)
13201320 func fromX18WrapperREADONLY (val,resultScaleMult) = $Tuple2(nil, fromX18(parseBigIntValue(val), resultScaleMult))
13211321
13221322
13231323
13241324 @Callable(i)
13251325 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(calcPriceBigInt(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
13261326
13271327
13281328
13291329 @Callable(i)
13301330 func estimatePutOperationWrapperREADONLY (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = $Tuple2(nil, estimatePutOperation(txId58, slippageTolerance, inAmAssetAmt, inAmAssetId, inPrAssetAmt, inPrAssetId, userAddress, isEvaluate, emitLp))
13311331
13321332
13331333
13341334 @Callable(i)
13351335 func estimateGetOperationWrapperREADONLY (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
13361336 let res = estimateGetOperation(txId58, pmtAssetId, pmtLpAmt, addressFromStringValue(userAddress))
13371337 $Tuple2(nil, $Tuple10(res._1, res._2, res._3, res._4, res._5, res._6, res._7, toString(res._8), res._9, res._10))
13381338 }
13391339
13401340
13411341
13421342 @Callable(i)
13431343 func statsREADONLY () = {
13441344 let cfg = getPoolConfig()
13451345 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
13461346 let amtAssetId = cfg[idxAmtAssetId]
13471347 let priceAssetId = cfg[idxPriceAssetId]
13481348 let iAmtAssetId = cfg[idxIAmtAssetId]
13491349 let iPriceAssetId = cfg[idxIPriceAssetId]
13501350 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
13511351 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
13521352 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
13531353 let accAmtAssetBalance = getAccBalance(amtAssetId)
13541354 let accPriceAssetBalance = getAccBalance(priceAssetId)
13551355 let pricesList = if ((poolLPBalance == 0))
13561356 then [zeroBigInt, zeroBigInt, zeroBigInt]
13571357 else calcPrices(accAmtAssetBalance, accPriceAssetBalance, poolLPBalance)
13581358 let curPrice = 0
13591359 let lpAmtAssetShare = fromX18(pricesList[1], scale8)
13601360 let lpPriceAssetShare = fromX18(pricesList[2], scale8)
13611361 let poolWeight = value(getInteger(factoryContract, keyPoolWeight(toString(this))))
13621362 $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))
13631363 }
13641364
13651365
13661366
13671367 @Callable(i)
13681368 func evaluatePutByAmountAssetREADONLY (inAmAssetAmt) = {
13691369 let cfg = getPoolConfig()
13701370 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
13711371 let amAssetIdStr = cfg[idxAmtAssetId]
13721372 let amAssetId = fromBase58String(amAssetIdStr)
13731373 let prAssetIdStr = cfg[idxPriceAssetId]
13741374 let prAssetId = fromBase58String(prAssetIdStr)
13751375 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
13761376 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
13771377 let poolStatus = cfg[idxPoolStatus]
13781378 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
13791379 let accAmtAssetBalance = getAccBalance(amAssetIdStr)
13801380 let accPriceAssetBalance = getAccBalance(prAssetIdStr)
13811381 let amtAssetAmtX18 = toX18(accAmtAssetBalance, amtAssetDcm)
13821382 let priceAssetAmtX18 = toX18(accPriceAssetBalance, priceAssetDcm)
13831383 let curPriceX18 = if ((poolLPBalance == 0))
13841384 then zeroBigInt
13851385 else calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18)
13861386 let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm)
13871387 let inPrAssetAmtX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
13881388 let inPrAssetAmt = fromX18(inPrAssetAmtX18, priceAssetDcm)
13891389 let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false)
13901390 let calcLpAmt = estPut._1
13911391 let curPriceCalc = estPut._3
13921392 let amBalance = estPut._4
13931393 let prBalance = estPut._5
13941394 let lpEmission = estPut._6
13951395 $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))
13961396 }
13971397
13981398
13991399
14001400 @Callable(i)
14011401 func evaluatePutByPriceAssetREADONLY (inPrAssetAmt) = {
14021402 let cfg = getPoolConfig()
14031403 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
14041404 let amAssetIdStr = cfg[idxAmtAssetId]
14051405 let amAssetId = fromBase58String(amAssetIdStr)
14061406 let prAssetIdStr = cfg[idxPriceAssetId]
14071407 let prAssetId = fromBase58String(prAssetIdStr)
14081408 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
14091409 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
14101410 let poolStatus = cfg[idxPoolStatus]
14111411 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
14121412 let amBalanceRaw = getAccBalance(amAssetIdStr)
14131413 let prBalanceRaw = getAccBalance(prAssetIdStr)
14141414 let amBalanceRawX18 = toX18(amBalanceRaw, amtAssetDcm)
14151415 let prBalanceRawX18 = toX18(prBalanceRaw, priceAssetDcm)
14161416 let curPriceX18 = if ((poolLPBalance == 0))
14171417 then zeroBigInt
14181418 else calcPriceBigInt(prBalanceRawX18, amBalanceRawX18)
14191419 let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm)
14201420 let inAmAssetAmtX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
14211421 let inAmAssetAmt = fromX18(inAmAssetAmtX18, amtAssetDcm)
14221422 let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false)
14231423 let calcLpAmt = estPut._1
14241424 let curPriceCalc = estPut._3
14251425 let amBalance = estPut._4
14261426 let prBalance = estPut._5
14271427 let lpEmission = estPut._6
14281428 $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))
14291429 }
14301430
14311431
14321432
14331433 @Callable(i)
14341434 func evaluateGetREADONLY (paymentLpAssetId,paymentLpAmt) = {
14351435 let res = estimateGetOperation("", paymentLpAssetId, paymentLpAmt, this)
14361436 let outAmAmt = res._1
14371437 let outPrAmt = res._2
14381438 let amBalance = res._5
14391439 let prBalance = res._6
14401440 let lpEmission = res._7
14411441 let curPrice = res._8
14421442 let poolStatus = parseIntValue(res._9)
14431443 $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))
14441444 }
14451445
14461446
14471447 @Verifier(tx)
14481448 func verify () = {
14491449 let targetPublicKey = match managerPublicKeyOrUnit() {
14501450 case pk: ByteVector =>
14511451 pk
14521452 case _: Unit =>
14531453 tx.senderPublicKey
14541454 case _ =>
14551455 throw("Match error")
14561456 }
14571457 match tx {
14581458 case order: Order =>
14591459 let matcherPub = getMatcherPubOrFail()
1460- let $t05685656925 = validateMatcherOrderAllowed(order)
1461- let orderValid = $t05685656925._1
1462- let orderValidInfo = $t05685656925._2
1460+ let $t05682556894 = validateMatcherOrderAllowed(order)
1461+ let orderValid = $t05682556894._1
1462+ let orderValidInfo = $t05682556894._2
14631463 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
14641464 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
14651465 if (if (if (orderValid)
14661466 then senderValid
14671467 else false)
14681468 then matcherValid
14691469 else false)
14701470 then true
14711471 else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
14721472 case s: SetScriptTransaction =>
14731473 let newHash = blake2b256(value(s.script))
14741474 let allowedHash = fromBase64String(value(getString(factoryContract, keyAllowedLpScriptHash())))
14751475 let currentHash = scriptHash(this)
14761476 if (if ((allowedHash == newHash))
14771477 then (currentHash != newHash)
14781478 else false)
14791479 then true
14801480 else sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
14811481 case _ =>
14821482 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
14831483 }
14841484 }
14851485

github/deemru/w8io/026f985 
180.03 ms