tx · A6UJFBpY6Lodznq2mj7QY8EUWq1JpXE7xtEGfqFQkwZD

3N3LtGiBDqDjfHpd7WnTCTKXB3gPWqUrDLL:  -0.03600000 Waves

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

{ "type": 13, "id": "A6UJFBpY6Lodznq2mj7QY8EUWq1JpXE7xtEGfqFQkwZD", "fee": 3600000, "feeAssetId": null, "timestamp": 1674213841066, "version": 1, "sender": "3N3LtGiBDqDjfHpd7WnTCTKXB3gPWqUrDLL", "senderPublicKey": "3wnnbmrpP3X4LxULFVHTeu7zNZBzFV7NSxRokwryVFaJ", "proofs": [ "2bKuKUehKhNuRXU1xZmbU72Sc5Kh5FZTwAtzbin2E4GkKfZotZMo4epyxNSs4jbqfrugrLW96HFPU7LwKfgFT7Qc" ], "script": "base64:BgKBLggCEgMKAQgSABIECgIBBBIDCgEBEgQKAgEEEgQKAggBEgQKAggBEgQKAggBEgUKAwEIARIAEgQKAgEBEgMKAQESBQoDAQEBEgQKAggIEgASABIDCgEIEgUKAwEBARIECgIBARIECgIIARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAEgMKAQESAwoBARIECgIIASIKbFBkZWNpbWFscyIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiC3dhdmVzU3RyaW5nIgNTRVAiClBvb2xBY3RpdmUiD1Bvb2xQdXREaXNhYmxlZCITUG9vbE1hdGNoZXJEaXNhYmxlZCIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyINaWR4UG9vbFN0YXR1cyIQaWR4UG9vbExQQXNzZXRJZCINaWR4QW10QXNzZXRJZCIPaWR4UHJpY2VBc3NldElkIg5pZHhBbXRBc3NldERjbSIQaWR4UHJpY2VBc3NldERjbSIOaWR4SUFtdEFzc2V0SWQiEGlkeElQcmljZUFzc2V0SWQiDW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Vg59foNuC3FzBPmvxaSNh Next: 4LmGL8XeivAfxHcrxvxZAkYDDcQc8ccVp6fghHojSxYz Diff:
OldNewDifferences
153153
154154 let keyFeeCollectorAddress = "%s__feeCollectorAddress"
155155
156-func throwOrderError (orderValid,senderValid,matcherValid) = throw(((((("order validation failed: orderValid=" + toString(orderValid)) + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
156+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"], ""))
216216
217217 let poolConfigParsed = parsePoolConfig(getPoolConfig())
218218
219-let $t083448510 = poolConfigParsed
219+let $t084088574 = poolConfigParsed
220220
221-let cfgPoolAddress = $t083448510._1
221+let cfgPoolAddress = $t084088574._1
222222
223-let cfgPoolStatus = $t083448510._2
223+let cfgPoolStatus = $t084088574._2
224224
225-let cfgLpAssetId = $t083448510._3
225+let cfgLpAssetId = $t084088574._3
226226
227-let cfgAmountAssetId = $t083448510._4
227+let cfgAmountAssetId = $t084088574._4
228228
229-let cfgPriceAssetId = $t083448510._5
229+let cfgPriceAssetId = $t084088574._5
230230
231-let cfgAmountAssetDecimals = $t083448510._6
231+let cfgAmountAssetDecimals = $t084088574._6
232232
233-let cfgPriceAssetDecimals = $t083448510._7
233+let cfgPriceAssetDecimals = $t084088574._7
234234
235235 func getFactoryConfig () = split(getStringOrFail(factoryContract, keyFactoryConfig()), SEP)
236236
433433 func validateMatcherOrderAllowed (order) = {
434434 let amountAssetAmount = order.amount
435435 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
436- let $t02126221474 = if ((order.orderType == Buy))
436+ let $t02132621538 = if ((order.orderType == Buy))
437437 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
438438 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
439- let amountAssetBalanceDelta = $t02126221474._1
440- let priceAssetBalanceDelta = $t02126221474._2
439+ let amountAssetBalanceDelta = $t02132621538._1
440+ let priceAssetBalanceDelta = $t02132621538._2
441441 if (if (if (isGlobalShutdown())
442442 then true
443443 else (cfgPoolStatus == PoolMatcherDisabled))
450450 then throw("Wrong order assets.")
451451 else {
452452 let kLp = valueOrErrorMessage(parseBigInt(valueOrErrorMessage(getString(this, keyKLp), fmtErr("kLp is required"))), fmtErr("invalid kLp"))
453- let $t02194522045 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
454- let unusedActions = $t02194522045._1
455- let kLpNew = $t02194522045._2
453+ let $t02200922109 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
454+ let unusedActions = $t02200922109._1
455+ let kLpNew = $t02200922109._2
456456 let isOrderValid = (kLpNew >= kLp)
457- isOrderValid
457+ let info = makeString([toString(kLp), toString(kLpNew)], " ")
458+ $Tuple2(isOrderValid, info)
458459 }
459460 }
460461
530531 else if ((paymentAssetId == cfgPriceAssetId))
531532 then false
532533 else throwErr("invalid asset")
533- let $t02476625059 = if (isEval)
534+ let $t02491625209 = if (isEval)
534535 then $Tuple2(amountBalanceRaw, priceBalanceRaw)
535536 else if (paymentInAmountAsset)
536537 then $Tuple2((amountBalanceRaw - paymentAmountRaw), priceBalanceRaw)
537538 else $Tuple2(amountBalanceRaw, (priceBalanceRaw - paymentAmountRaw))
538- let amountBalanceOld = $t02476625059._1
539- let priceBalanceOld = $t02476625059._2
540- let $t02506325212 = if (paymentInAmountAsset)
539+ let amountBalanceOld = $t02491625209._1
540+ let priceBalanceOld = $t02491625209._2
541+ let $t02521325362 = if (paymentInAmountAsset)
541542 then $Tuple2(paymentAmountRaw, 0)
542543 else $Tuple2(0, paymentAmountRaw)
543- let amountAssetAmountRaw = $t02506325212._1
544- let priceAssetAmountRaw = $t02506325212._2
544+ let amountAssetAmountRaw = $t02521325362._1
545+ let priceAssetAmountRaw = $t02521325362._2
545546 let amountAssetAmount = takeFee(amountAssetAmountRaw, inFee)._1
546547 let priceAssetAmount = takeFee(priceAssetAmountRaw, inFee)._1
547- let $t02534425408 = takeFee(paymentAmountRaw, inFee)
548- let paymentAmount = $t02534425408._1
549- let feeAmount = $t02534425408._2
548+ let $t02549425558 = takeFee(paymentAmountRaw, inFee)
549+ let paymentAmount = $t02549425558._1
550+ let feeAmount = $t02549425558._2
550551 let amountBalanceNew = (amountBalanceOld + amountAssetAmount)
551552 let priceBalanceNew = (priceBalanceOld + priceAssetAmount)
552553 let priceNewX18 = calcPriceBigInt(toX18(priceBalanceNew, cfgPriceAssetDecimals), toX18(amountBalanceNew, cfgAmountAssetDecimals))
569570 let priceOldX18 = calcPriceBigInt(toX18(priceBalanceOld, cfgPriceAssetDecimals), toX18(amountBalanceOld, cfgAmountAssetDecimals))
570571 let priceOld = fromX18(priceOldX18, scale8)
571572 let loss = {
572- let $t02708927256 = if (paymentInAmountAsset)
573+ let $t02723927406 = if (paymentInAmountAsset)
573574 then $Tuple2(amountAssetAmountRaw, amountBalanceOld)
574575 else $Tuple2(priceAssetAmountRaw, priceBalanceOld)
575- let amount = $t02708927256._1
576- let balance = $t02708927256._2
576+ let amount = $t02723927406._1
577+ let balance = $t02723927406._2
577578 let issueAmountBoth = toInt(fraction(supplyBigInt, toBigInt((amount / 2)), toBigInt(balance)))
578579 fraction((issueAmount - issueAmountBoth), scale8, issueAmountBoth)
579580 }
613614 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity)
614615 let redeemedBigInt = toBigInt(paymentAmount)
615616 let amountRaw = max([0, toInt(((balanceBigInt * (scale18 - pow((scale18 - ((redeemedBigInt * scale18) / supplyBigInt)), 18, big2, 0, 18, DOWN))) / scale18))])
616- let $t02933429390 = takeFee(amountRaw, outFee)
617- let totalAmount = $t02933429390._1
618- let feeAmount = $t02933429390._2
619- let $t02939429620 = if (outInAmountAsset)
617+ let $t02948429540 = takeFee(amountRaw, outFee)
618+ let totalAmount = $t02948429540._1
619+ let feeAmount = $t02948429540._2
620+ let $t02954429770 = if (outInAmountAsset)
620621 then $Tuple4(totalAmount, 0, (amBalanceOld - amountRaw), prBalanceOld)
621622 else $Tuple4(0, totalAmount, amBalanceOld, (prBalanceOld - amountRaw))
622- let outAmAmount = $t02939429620._1
623- let outPrAmount = $t02939429620._2
624- let amBalanceNew = $t02939429620._3
625- let prBalanceNew = $t02939429620._4
623+ let outAmAmount = $t02954429770._1
624+ let outPrAmount = $t02954429770._2
625+ let amBalanceNew = $t02954429770._3
626+ let prBalanceNew = $t02954429770._4
626627 let priceNewX18 = calcPriceBigInt(toX18(prBalanceNew, cfgPriceAssetDecimals), toX18(amBalanceNew, cfgAmountAssetDecimals))
627628 let priceNew = fromX18(priceNewX18, scale8)
628629 let commonState = if (isEval)
768769 else throw("Strict value is not equal to itself.")
769770 }
770771 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
771- let $t03414834610 = refreshKLpInternal(0, 0, 0)
772- if (($t03414834610 == $t03414834610))
772+ let $t03429834760 = refreshKLpInternal(0, 0, 0)
773+ if (($t03429834760 == $t03429834760))
773774 then {
774- let updatedKLp = $t03414834610._2
775- let refreshKLpActions = $t03414834610._1
775+ let updatedKLp = $t03429834760._2
776+ let refreshKLpActions = $t03429834760._1
776777 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
777778 if ((isUpdatedKLpValid == isUpdatedKLpValid))
778779 then ((state ++ lpTransfer) ++ refreshKLpActions)
804805 let currentKLp = calcCurrentKLp(amAssetPmt, prAssetPmt, toBigInt(0))
805806 if ((currentKLp == currentKLp))
806807 then {
807- let $t03517235237 = refreshKLpInternal(0, 0, 0)
808- let refreshKLpActions = $t03517235237._1
809- let updatedKLp = $t03517235237._2
808+ let $t03532235387 = refreshKLpInternal(0, 0, 0)
809+ let refreshKLpActions = $t03532235387._1
810+ let updatedKLp = $t03532235387._2
810811 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
811812 if ((isUpdatedKLpValid == isUpdatedKLpValid))
812813 then (state ++ refreshKLpActions)
853854 then {
854855 let userAddress = i.caller
855856 let txId = i.transactionId
856- let $t03642536577 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
857- if (($t03642536577 == $t03642536577))
857+ let $t03657536727 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
858+ if (($t03657536727 == $t03657536727))
858859 then {
859- let paymentInAmountAsset = $t03642536577._5
860- let bonus = $t03642536577._4
861- let feeAmount = $t03642536577._3
862- let commonState = $t03642536577._2
863- let emitAmountEstimated = $t03642536577._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
864865 let emitAmount = if (if ((minOutAmount > 0))
865866 then (minOutAmount > emitAmountEstimated)
866867 else false)
880881 let sendFee = if ((feeAmount > 0))
881882 then [ScriptTransfer(feeCollectorAddress, feeAmount, paymentAssetId)]
882883 else nil
883- let $t03716337360 = if ((this == feeCollectorAddress))
884+ let $t03731337510 = if ((this == feeCollectorAddress))
884885 then $Tuple2(0, 0)
885886 else if (paymentInAmountAsset)
886887 then $Tuple2(-(feeAmount), 0)
887888 else $Tuple2(0, -(feeAmount))
888- let amountAssetBalanceDelta = $t03716337360._1
889- let priceAssetBalanceDelta = $t03716337360._2
890- let $t03736337471 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
891- let refreshKLpActions = $t03736337471._1
892- let updatedKLp = $t03736337471._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
893894 let kLp = value(getString(keyKLp))
894895 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
895896 if ((isUpdatedKLpValid == isUpdatedKLpValid))
909910
910911 @Callable(i)
911912 func putOneTknREADONLY (paymentAssetId,paymentAmountRaw) = {
912- let $t03777737934 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
913- let emitAmountEstimated = $t03777737934._1
914- let commonState = $t03777737934._2
915- let feeAmount = $t03777737934._3
916- let bonus = $t03777737934._4
917- let paymentInAmountAsset = $t03777737934._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
918919 $Tuple2(nil, $Tuple3(emitAmountEstimated, feeAmount, bonus))
919920 }
920921
951952 then {
952953 let userAddress = i.caller
953954 let txId = i.transactionId
954- let $t03881938972 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
955- if (($t03881938972 == $t03881938972))
955+ let $t03896939122 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
956+ if (($t03896939122 == $t03896939122))
956957 then {
957- let outInAmountAsset = $t03881938972._5
958- let bonus = $t03881938972._4
959- let feeAmount = $t03881938972._3
960- let commonState = $t03881938972._2
961- let amountEstimated = $t03881938972._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
962963 let amount = if (if ((minOutAmount > 0))
963964 then (minOutAmount > amountEstimated)
964965 else false)
971972 let sendFee = if ((feeAmount > 0))
972973 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
973974 else nil
974- let $t03947239719 = {
975+ let $t03962239869 = {
975976 let feeAmountForCalc = if ((this == feeCollectorAddress))
976977 then 0
977978 else feeAmount
979980 then $Tuple2(-((amount + feeAmountForCalc)), 0)
980981 else $Tuple2(0, -((amount + feeAmountForCalc)))
981982 }
982- let amountAssetBalanceDelta = $t03947239719._1
983- let priceAssetBalanceDelta = $t03947239719._2
984- let $t03972239830 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
985- let refreshKLpActions = $t03972239830._1
986- let updatedKLp = $t03972239830._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
987988 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
988989 if ((isUpdatedKLpValid == isUpdatedKLpValid))
989990 then $Tuple2((((commonState ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
10021003
10031004 @Callable(i)
10041005 func getOneTknREADONLY (outAssetId,paymentAmount) = {
1005- let $t04008740243 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
1006- let amountEstimated = $t04008740243._1
1007- let commonState = $t04008740243._2
1008- let feeAmount = $t04008740243._3
1009- let bonus = $t04008740243._4
1010- let outInAmountAsset = $t04008740243._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
10111012 $Tuple2(nil, $Tuple3(amountEstimated, feeAmount, bonus))
10121013 }
10131014
10441045 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
10451046 if ((unstakeInv == unstakeInv))
10461047 then {
1047- let $t04114841299 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
1048- if (($t04114841299 == $t04114841299))
1048+ let $t04129841449 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
1049+ if (($t04129841449 == $t04129841449))
10491050 then {
1050- let outInAmountAsset = $t04114841299._5
1051- let bonus = $t04114841299._4
1052- let feeAmount = $t04114841299._3
1053- let commonState = $t04114841299._2
1054- let amountEstimated = $t04114841299._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
10551056 let amount = if (if ((minOutAmount > 0))
10561057 then (minOutAmount > amountEstimated)
10571058 else false)
10641065 let sendFee = if ((feeAmount > 0))
10651066 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
10661067 else nil
1067- let $t04179442041 = {
1068+ let $t04194442191 = {
10681069 let feeAmountForCalc = if ((this == feeCollectorAddress))
10691070 then 0
10701071 else feeAmount
10721073 then $Tuple2(-((amount + feeAmountForCalc)), 0)
10731074 else $Tuple2(0, -((amount + feeAmountForCalc)))
10741075 }
1075- let amountAssetBalanceDelta = $t04179442041._1
1076- let priceAssetBalanceDelta = $t04179442041._2
1077- let $t04204442152 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1078- let refreshKLpActions = $t04204442152._1
1079- let updatedKLp = $t04204442152._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
10801081 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
10811082 if ((isUpdatedKLpValid == isUpdatedKLpValid))
10821083 then $Tuple2((((commonState ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
11091110 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
11101111 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11111112 then {
1112- let $t04309843180 = refreshKLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1113- let refreshKLpActions = $t04309843180._1
1114- let updatedKLp = $t04309843180._2
1113+ let $t04324843330 = refreshKLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1114+ let refreshKLpActions = $t04324843330._1
1115+ let updatedKLp = $t04324843330._2
11151116 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11161117 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11171118 then (state ++ refreshKLpActions)
11431144 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
11441145 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11451146 then {
1146- let $t04412944210 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1147- let refreshKLpActions = $t04412944210._1
1148- let updatedKLp = $t04412944210._2
1147+ let $t04427944360 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1148+ let refreshKLpActions = $t04427944360._1
1149+ let updatedKLp = $t04427944360._2
11491150 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11501151 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11511152 then (state ++ refreshKLpActions)
11891190 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
11901191 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11911192 then {
1192- let $t04533645417 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1193- let refreshKLpActions = $t04533645417._1
1194- let updatedKLp = $t04533645417._2
1193+ let $t04548645567 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1194+ let refreshKLpActions = $t04548645567._1
1195+ let updatedKLp = $t04548645567._2
11951196 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11961197 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11971198 then (state ++ refreshKLpActions)
12421243 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
12431244 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
12441245 then {
1245- let $t04671246793 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1246- let refreshKLpActions = $t04671246793._1
1247- let updatedKLp = $t04671246793._2
1246+ let $t04686246943 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1247+ let refreshKLpActions = $t04686246943._1
1248+ let updatedKLp = $t04686246943._2
12481249 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
12491250 if ((isUpdatedKLpValid == isUpdatedKLpValid))
12501251 then (state ++ refreshKLpActions)
12791280 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
12801281 then {
12811282 let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp"))
1282- let $t04798048044 = refreshKLpInternal(0, 0, 0)
1283- let kLpUpdateActions = $t04798048044._1
1284- let updatedKLp = $t04798048044._2
1283+ let $t04813048194 = refreshKLpInternal(0, 0, 0)
1284+ let kLpUpdateActions = $t04813048194._1
1285+ let updatedKLp = $t04813048194._2
12851286 let actions = if ((kLp != updatedKLp))
12861287 then kLpUpdateActions
12871288 else throwErr("nothing to refresh")
14561457 match tx {
14571458 case order: Order =>
14581459 let matcherPub = getMatcherPubOrFail()
1459- let orderValid = validateMatcherOrderAllowed(order)
1460+ let $t05685656925 = validateMatcherOrderAllowed(order)
1461+ let orderValid = $t05685656925._1
1462+ let orderValidInfo = $t05685656925._2
14601463 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
14611464 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
14621465 if (if (if (orderValid)
14651468 then matcherValid
14661469 else false)
14671470 then true
1468- else throwOrderError(orderValid, senderValid, matcherValid)
1471+ else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
14691472 case s: SetScriptTransaction =>
14701473 let newHash = blake2b256(value(s.script))
14711474 let allowedHash = fromBase64String(value(getString(factoryContract, keyAllowedLpScriptHash())))
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
156-func throwOrderError (orderValid,senderValid,matcherValid) = throw(((((("order validation failed: orderValid=" + toString(orderValid)) + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
156+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
219-let $t083448510 = poolConfigParsed
219+let $t084088574 = poolConfigParsed
220220
221-let cfgPoolAddress = $t083448510._1
221+let cfgPoolAddress = $t084088574._1
222222
223-let cfgPoolStatus = $t083448510._2
223+let cfgPoolStatus = $t084088574._2
224224
225-let cfgLpAssetId = $t083448510._3
225+let cfgLpAssetId = $t084088574._3
226226
227-let cfgAmountAssetId = $t083448510._4
227+let cfgAmountAssetId = $t084088574._4
228228
229-let cfgPriceAssetId = $t083448510._5
229+let cfgPriceAssetId = $t084088574._5
230230
231-let cfgAmountAssetDecimals = $t083448510._6
231+let cfgAmountAssetDecimals = $t084088574._6
232232
233-let cfgPriceAssetDecimals = $t083448510._7
233+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)
436- let $t02126221474 = if ((order.orderType == Buy))
436+ let $t02132621538 = if ((order.orderType == Buy))
437437 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
438438 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
439- let amountAssetBalanceDelta = $t02126221474._1
440- let priceAssetBalanceDelta = $t02126221474._2
439+ let amountAssetBalanceDelta = $t02132621538._1
440+ 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 {
452452 let kLp = valueOrErrorMessage(parseBigInt(valueOrErrorMessage(getString(this, keyKLp), fmtErr("kLp is required"))), fmtErr("invalid kLp"))
453- let $t02194522045 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
454- let unusedActions = $t02194522045._1
455- let kLpNew = $t02194522045._2
453+ let $t02200922109 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
454+ let unusedActions = $t02200922109._1
455+ let kLpNew = $t02200922109._2
456456 let isOrderValid = (kLpNew >= kLp)
457- isOrderValid
457+ let info = makeString([toString(kLp), toString(kLpNew)], " ")
458+ $Tuple2(isOrderValid, info)
458459 }
459460 }
460461
461462
462463 func commonGet (i) = if ((size(i.payments) != 1))
463464 then throw("exactly 1 payment is expected")
464465 else {
465466 let pmt = value(i.payments[0])
466467 let pmtAssetId = value(pmt.assetId)
467468 let pmtAmt = pmt.amount
468469 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
469470 let outAmAmt = res._1
470471 let outPrAmt = res._2
471472 let poolStatus = parseIntValue(res._9)
472473 let state = res._10
473474 if (if (isGlobalShutdown())
474475 then true
475476 else (poolStatus == PoolShutdown))
476477 then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus)))
477478 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
478479 }
479480
480481
481482 func commonPut (i,slippageTolerance,emitLp) = if ((size(i.payments) != 2))
482483 then throw("exactly 2 payments are expected")
483484 else {
484485 let amAssetPmt = value(i.payments[0])
485486 let prAssetPmt = value(i.payments[1])
486487 let estPut = estimatePutOperation(toBase58String(i.transactionId), slippageTolerance, amAssetPmt.amount, amAssetPmt.assetId, prAssetPmt.amount, prAssetPmt.assetId, toString(i.caller), false, emitLp)
487488 let poolStatus = parseIntValue(estPut._8)
488489 if (if (if (isGlobalShutdown())
489490 then true
490491 else (poolStatus == PoolPutDisabled))
491492 then true
492493 else (poolStatus == PoolShutdown))
493494 then throw(("Put operation is blocked by admin. Status = " + toString(poolStatus)))
494495 else estPut
495496 }
496497
497498
498499 func emit (amount) = {
499500 let emitInv = invoke(factoryContract, "emit", [amount], nil)
500501 if ((emitInv == emitInv))
501502 then {
502503 let emitInvLegacy = match emitInv {
503504 case legacyFactoryContract: Address =>
504505 invoke(legacyFactoryContract, "emit", [amount], nil)
505506 case _ =>
506507 unit
507508 }
508509 if ((emitInvLegacy == emitInvLegacy))
509510 then amount
510511 else throw("Strict value is not equal to itself.")
511512 }
512513 else throw("Strict value is not equal to itself.")
513514 }
514515
515516
516517 func takeFee (amount,fee) = {
517518 let feeAmount = if ((fee == 0))
518519 then 0
519520 else fraction(amount, fee, scale8)
520521 $Tuple2((amount - feeAmount), feeAmount)
521522 }
522523
523524
524525 func calcPutOneToken (paymentAmountRaw,paymentAssetId,userAddress,txId) = {
525526 let isEval = (txId == unit)
526527 let amountBalanceRaw = getAccBalance(assetIdToString(cfgAmountAssetId))
527528 let priceBalanceRaw = getAccBalance(assetIdToString(cfgPriceAssetId))
528529 let paymentInAmountAsset = if ((paymentAssetId == cfgAmountAssetId))
529530 then true
530531 else if ((paymentAssetId == cfgPriceAssetId))
531532 then false
532533 else throwErr("invalid asset")
533- let $t02476625059 = if (isEval)
534+ let $t02491625209 = if (isEval)
534535 then $Tuple2(amountBalanceRaw, priceBalanceRaw)
535536 else if (paymentInAmountAsset)
536537 then $Tuple2((amountBalanceRaw - paymentAmountRaw), priceBalanceRaw)
537538 else $Tuple2(amountBalanceRaw, (priceBalanceRaw - paymentAmountRaw))
538- let amountBalanceOld = $t02476625059._1
539- let priceBalanceOld = $t02476625059._2
540- let $t02506325212 = if (paymentInAmountAsset)
539+ let amountBalanceOld = $t02491625209._1
540+ let priceBalanceOld = $t02491625209._2
541+ let $t02521325362 = if (paymentInAmountAsset)
541542 then $Tuple2(paymentAmountRaw, 0)
542543 else $Tuple2(0, paymentAmountRaw)
543- let amountAssetAmountRaw = $t02506325212._1
544- let priceAssetAmountRaw = $t02506325212._2
544+ let amountAssetAmountRaw = $t02521325362._1
545+ let priceAssetAmountRaw = $t02521325362._2
545546 let amountAssetAmount = takeFee(amountAssetAmountRaw, inFee)._1
546547 let priceAssetAmount = takeFee(priceAssetAmountRaw, inFee)._1
547- let $t02534425408 = takeFee(paymentAmountRaw, inFee)
548- let paymentAmount = $t02534425408._1
549- let feeAmount = $t02534425408._2
548+ let $t02549425558 = takeFee(paymentAmountRaw, inFee)
549+ let paymentAmount = $t02549425558._1
550+ let feeAmount = $t02549425558._2
550551 let amountBalanceNew = (amountBalanceOld + amountAssetAmount)
551552 let priceBalanceNew = (priceBalanceOld + priceAssetAmount)
552553 let priceNewX18 = calcPriceBigInt(toX18(priceBalanceNew, cfgPriceAssetDecimals), toX18(amountBalanceNew, cfgAmountAssetDecimals))
553554 let priceNew = fromX18(priceNewX18, scale8)
554555 let paymentBalance = if (paymentInAmountAsset)
555556 then amountBalanceOld
556557 else priceBalanceOld
557558 let paymentBalanceBigInt = toBigInt(paymentBalance)
558559 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity)
559560 let chechSupply = if ((supplyBigInt > big0))
560561 then true
561562 else throwErr("initial deposit requires all coins")
562563 if ((chechSupply == chechSupply))
563564 then {
564565 let depositBigInt = toBigInt(paymentAmount)
565566 let issueAmount = max([0, toInt(((supplyBigInt * (sqrtBigInt((scale18 + ((depositBigInt * scale18) / paymentBalanceBigInt)), 18, 18, DOWN) - scale18)) / scale18))])
566567 let commonState = if (isEval)
567568 then nil
568569 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))]
569570 let priceOldX18 = calcPriceBigInt(toX18(priceBalanceOld, cfgPriceAssetDecimals), toX18(amountBalanceOld, cfgAmountAssetDecimals))
570571 let priceOld = fromX18(priceOldX18, scale8)
571572 let loss = {
572- let $t02708927256 = if (paymentInAmountAsset)
573+ let $t02723927406 = if (paymentInAmountAsset)
573574 then $Tuple2(amountAssetAmountRaw, amountBalanceOld)
574575 else $Tuple2(priceAssetAmountRaw, priceBalanceOld)
575- let amount = $t02708927256._1
576- let balance = $t02708927256._2
576+ let amount = $t02723927406._1
577+ let balance = $t02723927406._2
577578 let issueAmountBoth = toInt(fraction(supplyBigInt, toBigInt((amount / 2)), toBigInt(balance)))
578579 fraction((issueAmount - issueAmountBoth), scale8, issueAmountBoth)
579580 }
580581 $Tuple5(issueAmount, commonState, feeAmount, loss, paymentInAmountAsset)
581582 }
582583 else throw("Strict value is not equal to itself.")
583584 }
584585
585586
586587 func calcGetOneToken (outAssetId,paymentAmount,paymentAssetId,userAddress,txId) = {
587588 let isEval = (txId == unit)
588589 let cfg = getPoolConfig()
589590 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
590591 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
591592 let checks = [if ((paymentAssetId == cfgLpAssetId))
592593 then true
593594 else throwErr("invalid lp asset")]
594595 if ((checks == checks))
595596 then {
596597 let outInAmountAsset = if ((outAssetId == cfgAmountAssetId))
597598 then true
598599 else if ((outAssetId == cfgPriceAssetId))
599600 then false
600601 else throwErr("invalid asset")
601602 let balanceBigInt = if (outInAmountAsset)
602603 then toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId)))
603604 else toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId)))
604605 let outInAmountAssetDecimals = if (outInAmountAsset)
605606 then amtAssetDcm
606607 else priceAssetDcm
607608 let amBalanceOld = getAccBalance(assetIdToString(cfgAmountAssetId))
608609 let prBalanceOld = getAccBalance(assetIdToString(cfgPriceAssetId))
609610 let outBalance = if (outInAmountAsset)
610611 then amBalanceOld
611612 else prBalanceOld
612613 let outBalanceBigInt = toBigInt(outBalance)
613614 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity)
614615 let redeemedBigInt = toBigInt(paymentAmount)
615616 let amountRaw = max([0, toInt(((balanceBigInt * (scale18 - pow((scale18 - ((redeemedBigInt * scale18) / supplyBigInt)), 18, big2, 0, 18, DOWN))) / scale18))])
616- let $t02933429390 = takeFee(amountRaw, outFee)
617- let totalAmount = $t02933429390._1
618- let feeAmount = $t02933429390._2
619- let $t02939429620 = if (outInAmountAsset)
617+ let $t02948429540 = takeFee(amountRaw, outFee)
618+ let totalAmount = $t02948429540._1
619+ let feeAmount = $t02948429540._2
620+ let $t02954429770 = if (outInAmountAsset)
620621 then $Tuple4(totalAmount, 0, (amBalanceOld - amountRaw), prBalanceOld)
621622 else $Tuple4(0, totalAmount, amBalanceOld, (prBalanceOld - amountRaw))
622- let outAmAmount = $t02939429620._1
623- let outPrAmount = $t02939429620._2
624- let amBalanceNew = $t02939429620._3
625- let prBalanceNew = $t02939429620._4
623+ let outAmAmount = $t02954429770._1
624+ let outPrAmount = $t02954429770._2
625+ let amBalanceNew = $t02954429770._3
626+ let prBalanceNew = $t02954429770._4
626627 let priceNewX18 = calcPriceBigInt(toX18(prBalanceNew, cfgPriceAssetDecimals), toX18(amBalanceNew, cfgAmountAssetDecimals))
627628 let priceNew = fromX18(priceNewX18, scale8)
628629 let commonState = if (isEval)
629630 then nil
630631 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)]
631632 let priceOldX18 = calcPriceBigInt(toX18(prBalanceOld, cfgPriceAssetDecimals), toX18(amBalanceOld, cfgAmountAssetDecimals))
632633 let priceOld = fromX18(priceOldX18, scale8)
633634 let loss = {
634635 let amountBothInPaymentAsset = (toInt(fraction(balanceBigInt, redeemedBigInt, supplyBigInt)) * 2)
635636 fraction((totalAmount - amountBothInPaymentAsset), scale8, amountBothInPaymentAsset)
636637 }
637638 $Tuple5(totalAmount, commonState, feeAmount, loss, outInAmountAsset)
638639 }
639640 else throw("Strict value is not equal to itself.")
640641 }
641642
642643
643644 func managerPublicKeyOrUnit () = match getString(mpk()) {
644645 case s: String =>
645646 fromBase58String(s)
646647 case _: Unit =>
647648 unit
648649 case _ =>
649650 throw("Match error")
650651 }
651652
652653
653654 func pendingManagerPublicKeyOrUnit () = match getString(pmpk()) {
654655 case s: String =>
655656 fromBase58String(s)
656657 case _: Unit =>
657658 unit
658659 case _ =>
659660 throw("Match error")
660661 }
661662
662663
663664 func isManager (i) = match managerPublicKeyOrUnit() {
664665 case pk: ByteVector =>
665666 (i.callerPublicKey == pk)
666667 case _: Unit =>
667668 (i.caller == this)
668669 case _ =>
669670 throw("Match error")
670671 }
671672
672673
673674 func mustManager (i) = {
674675 let pd = throw("Permission denied")
675676 match managerPublicKeyOrUnit() {
676677 case pk: ByteVector =>
677678 if ((i.callerPublicKey == pk))
678679 then true
679680 else pd
680681 case _: Unit =>
681682 if ((i.caller == this))
682683 then true
683684 else pd
684685 case _ =>
685686 throw("Match error")
686687 }
687688 }
688689
689690
690691 @Callable(i)
691692 func setManager (pendingManagerPublicKey) = {
692693 let checkCaller = mustManager(i)
693694 if ((checkCaller == checkCaller))
694695 then {
695696 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
696697 if ((checkManagerPublicKey == checkManagerPublicKey))
697698 then [StringEntry(pmpk(), pendingManagerPublicKey)]
698699 else throw("Strict value is not equal to itself.")
699700 }
700701 else throw("Strict value is not equal to itself.")
701702 }
702703
703704
704705
705706 @Callable(i)
706707 func confirmManager () = {
707708 let pm = pendingManagerPublicKeyOrUnit()
708709 let hasPM = if (isDefined(pm))
709710 then true
710711 else throw("No pending manager")
711712 if ((hasPM == hasPM))
712713 then {
713714 let checkPM = if ((i.callerPublicKey == value(pm)))
714715 then true
715716 else throw("You are not pending manager")
716717 if ((checkPM == checkPM))
717718 then [StringEntry(mpk(), toBase58String(value(pm))), DeleteEntry(pmpk())]
718719 else throw("Strict value is not equal to itself.")
719720 }
720721 else throw("Strict value is not equal to itself.")
721722 }
722723
723724
724725
725726 @Callable(i)
726727 func put (slippageTolerance,shouldAutoStake) = if ((0 > slippageTolerance))
727728 then throw("Invalid slippageTolerance passed")
728729 else {
729730 let estPut = commonPut(i, slippageTolerance, true)
730731 let emitLpAmt = estPut._2
731732 let lpAssetId = estPut._7
732733 let state = estPut._9
733734 let amDiff = estPut._10
734735 let prDiff = estPut._11
735736 let amId = estPut._12
736737 let prId = estPut._13
737738 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
738739 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
739740 let currentKLp = calcCurrentKLp(amAssetPmt, prAssetPmt, toBigInt(0))
740741 if ((currentKLp == currentKLp))
741742 then {
742743 let emitInv = invoke(factoryContract, "emit", [emitLpAmt], nil)
743744 if ((emitInv == emitInv))
744745 then {
745746 let emitInvLegacy = match emitInv {
746747 case legacyFactoryContract: Address =>
747748 invoke(legacyFactoryContract, "emit", [emitLpAmt], nil)
748749 case _ =>
749750 unit
750751 }
751752 if ((emitInvLegacy == emitInvLegacy))
752753 then {
753754 let slippageAInv = if ((amDiff > 0))
754755 then invoke(slippageContract, "put", nil, [AttachedPayment(amId, amDiff)])
755756 else nil
756757 if ((slippageAInv == slippageAInv))
757758 then {
758759 let slippagePInv = if ((prDiff > 0))
759760 then invoke(slippageContract, "put", nil, [AttachedPayment(prId, prDiff)])
760761 else nil
761762 if ((slippagePInv == slippagePInv))
762763 then {
763764 let lpTransfer = if (shouldAutoStake)
764765 then {
765766 let slpStakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
766767 if ((slpStakeInv == slpStakeInv))
767768 then nil
768769 else throw("Strict value is not equal to itself.")
769770 }
770771 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
771- let $t03414834610 = refreshKLpInternal(0, 0, 0)
772- if (($t03414834610 == $t03414834610))
772+ let $t03429834760 = refreshKLpInternal(0, 0, 0)
773+ if (($t03429834760 == $t03429834760))
773774 then {
774- let updatedKLp = $t03414834610._2
775- let refreshKLpActions = $t03414834610._1
775+ let updatedKLp = $t03429834760._2
776+ let refreshKLpActions = $t03429834760._1
776777 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
777778 if ((isUpdatedKLpValid == isUpdatedKLpValid))
778779 then ((state ++ lpTransfer) ++ refreshKLpActions)
779780 else throw("Strict value is not equal to itself.")
780781 }
781782 else throw("Strict value is not equal to itself.")
782783 }
783784 else throw("Strict value is not equal to itself.")
784785 }
785786 else throw("Strict value is not equal to itself.")
786787 }
787788 else throw("Strict value is not equal to itself.")
788789 }
789790 else throw("Strict value is not equal to itself.")
790791 }
791792 else throw("Strict value is not equal to itself.")
792793 }
793794
794795
795796
796797 @Callable(i)
797798 func putForFree (maxSlippage) = if ((0 > maxSlippage))
798799 then throw("Invalid value passed")
799800 else {
800801 let estPut = commonPut(i, maxSlippage, false)
801802 let state = estPut._9
802803 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
803804 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
804805 let currentKLp = calcCurrentKLp(amAssetPmt, prAssetPmt, toBigInt(0))
805806 if ((currentKLp == currentKLp))
806807 then {
807- let $t03517235237 = refreshKLpInternal(0, 0, 0)
808- let refreshKLpActions = $t03517235237._1
809- let updatedKLp = $t03517235237._2
808+ let $t03532235387 = refreshKLpInternal(0, 0, 0)
809+ let refreshKLpActions = $t03532235387._1
810+ let updatedKLp = $t03532235387._2
810811 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
811812 if ((isUpdatedKLpValid == isUpdatedKLpValid))
812813 then (state ++ refreshKLpActions)
813814 else throw("Strict value is not equal to itself.")
814815 }
815816 else throw("Strict value is not equal to itself.")
816817 }
817818
818819
819820
820821 @Callable(i)
821822 func putOneTkn (minOutAmount,autoStake) = {
822823 let isPoolOneTokenOperationsDisabled = {
823824 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
824825 if ($isInstanceOf(@, "Boolean"))
825826 then @
826827 else throw(($getType(@) + " couldn't be cast to Boolean"))
827828 }
828829 let isPutDisabled = if (if (if (isGlobalShutdown())
829830 then true
830831 else (cfgPoolStatus == PoolPutDisabled))
831832 then true
832833 else (cfgPoolStatus == PoolShutdown))
833834 then true
834835 else isPoolOneTokenOperationsDisabled
835836 let checks = [if (if (!(isPutDisabled))
836837 then true
837838 else isManager(i))
838839 then true
839840 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
840841 then true
841842 else throwErr("exactly 1 payment are expected")]
842843 if ((checks == checks))
843844 then {
844845 let payment = i.payments[0]
845846 let paymentAssetId = payment.assetId
846847 let paymentAmountRaw = payment.amount
847848 let currentKLp = if ((paymentAssetId == cfgAmountAssetId))
848849 then calcCurrentKLp(toBigInt(paymentAmountRaw), toBigInt(0), toBigInt(0))
849850 else if ((paymentAssetId == cfgPriceAssetId))
850851 then calcCurrentKLp(toBigInt(0), toBigInt(paymentAmountRaw), toBigInt(0))
851852 else throwErr("payment asset is not supported")
852853 if ((currentKLp == currentKLp))
853854 then {
854855 let userAddress = i.caller
855856 let txId = i.transactionId
856- let $t03642536577 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
857- if (($t03642536577 == $t03642536577))
857+ let $t03657536727 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
858+ if (($t03657536727 == $t03657536727))
858859 then {
859- let paymentInAmountAsset = $t03642536577._5
860- let bonus = $t03642536577._4
861- let feeAmount = $t03642536577._3
862- let commonState = $t03642536577._2
863- let emitAmountEstimated = $t03642536577._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
864865 let emitAmount = if (if ((minOutAmount > 0))
865866 then (minOutAmount > emitAmountEstimated)
866867 else false)
867868 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
868869 else emitAmountEstimated
869870 let emitInv = emit(emitAmount)
870871 if ((emitInv == emitInv))
871872 then {
872873 let lpTransfer = if (autoStake)
873874 then {
874875 let stakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(cfgLpAssetId, emitAmount)])
875876 if ((stakeInv == stakeInv))
876877 then nil
877878 else throw("Strict value is not equal to itself.")
878879 }
879880 else [ScriptTransfer(i.caller, emitAmount, cfgLpAssetId)]
880881 let sendFee = if ((feeAmount > 0))
881882 then [ScriptTransfer(feeCollectorAddress, feeAmount, paymentAssetId)]
882883 else nil
883- let $t03716337360 = if ((this == feeCollectorAddress))
884+ let $t03731337510 = if ((this == feeCollectorAddress))
884885 then $Tuple2(0, 0)
885886 else if (paymentInAmountAsset)
886887 then $Tuple2(-(feeAmount), 0)
887888 else $Tuple2(0, -(feeAmount))
888- let amountAssetBalanceDelta = $t03716337360._1
889- let priceAssetBalanceDelta = $t03716337360._2
890- let $t03736337471 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
891- let refreshKLpActions = $t03736337471._1
892- let updatedKLp = $t03736337471._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
893894 let kLp = value(getString(keyKLp))
894895 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
895896 if ((isUpdatedKLpValid == isUpdatedKLpValid))
896897 then $Tuple2((((commonState ++ lpTransfer) ++ sendFee) ++ refreshKLpActions), emitAmount)
897898 else throw("Strict value is not equal to itself.")
898899 }
899900 else throw("Strict value is not equal to itself.")
900901 }
901902 else throw("Strict value is not equal to itself.")
902903 }
903904 else throw("Strict value is not equal to itself.")
904905 }
905906 else throw("Strict value is not equal to itself.")
906907 }
907908
908909
909910
910911 @Callable(i)
911912 func putOneTknREADONLY (paymentAssetId,paymentAmountRaw) = {
912- let $t03777737934 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
913- let emitAmountEstimated = $t03777737934._1
914- let commonState = $t03777737934._2
915- let feeAmount = $t03777737934._3
916- let bonus = $t03777737934._4
917- let paymentInAmountAsset = $t03777737934._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
918919 $Tuple2(nil, $Tuple3(emitAmountEstimated, feeAmount, bonus))
919920 }
920921
921922
922923
923924 @Callable(i)
924925 func getOneTkn (outAssetIdStr,minOutAmount) = {
925926 let isPoolOneTokenOperationsDisabled = {
926927 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
927928 if ($isInstanceOf(@, "Boolean"))
928929 then @
929930 else throw(($getType(@) + " couldn't be cast to Boolean"))
930931 }
931932 let isGetDisabled = if (if (isGlobalShutdown())
932933 then true
933934 else (cfgPoolStatus == PoolShutdown))
934935 then true
935936 else isPoolOneTokenOperationsDisabled
936937 let checks = [if (if (!(isGetDisabled))
937938 then true
938939 else isManager(i))
939940 then true
940941 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
941942 then true
942943 else throwErr("exactly 1 payment are expected")]
943944 if ((checks == checks))
944945 then {
945946 let outAssetId = parseAssetId(outAssetIdStr)
946947 let payment = i.payments[0]
947948 let paymentAssetId = payment.assetId
948949 let paymentAmount = payment.amount
949950 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
950951 if ((currentKLp == currentKLp))
951952 then {
952953 let userAddress = i.caller
953954 let txId = i.transactionId
954- let $t03881938972 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
955- if (($t03881938972 == $t03881938972))
955+ let $t03896939122 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
956+ if (($t03896939122 == $t03896939122))
956957 then {
957- let outInAmountAsset = $t03881938972._5
958- let bonus = $t03881938972._4
959- let feeAmount = $t03881938972._3
960- let commonState = $t03881938972._2
961- let amountEstimated = $t03881938972._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
962963 let amount = if (if ((minOutAmount > 0))
963964 then (minOutAmount > amountEstimated)
964965 else false)
965966 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
966967 else amountEstimated
967968 let burnInv = invoke(factoryContract, "burn", [paymentAmount], [AttachedPayment(paymentAssetId, paymentAmount)])
968969 if ((burnInv == burnInv))
969970 then {
970971 let assetTransfer = [ScriptTransfer(userAddress, amount, outAssetId)]
971972 let sendFee = if ((feeAmount > 0))
972973 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
973974 else nil
974- let $t03947239719 = {
975+ let $t03962239869 = {
975976 let feeAmountForCalc = if ((this == feeCollectorAddress))
976977 then 0
977978 else feeAmount
978979 if (outInAmountAsset)
979980 then $Tuple2(-((amount + feeAmountForCalc)), 0)
980981 else $Tuple2(0, -((amount + feeAmountForCalc)))
981982 }
982- let amountAssetBalanceDelta = $t03947239719._1
983- let priceAssetBalanceDelta = $t03947239719._2
984- let $t03972239830 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
985- let refreshKLpActions = $t03972239830._1
986- let updatedKLp = $t03972239830._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
987988 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
988989 if ((isUpdatedKLpValid == isUpdatedKLpValid))
989990 then $Tuple2((((commonState ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
990991 else throw("Strict value is not equal to itself.")
991992 }
992993 else throw("Strict value is not equal to itself.")
993994 }
994995 else throw("Strict value is not equal to itself.")
995996 }
996997 else throw("Strict value is not equal to itself.")
997998 }
998999 else throw("Strict value is not equal to itself.")
9991000 }
10001001
10011002
10021003
10031004 @Callable(i)
10041005 func getOneTknREADONLY (outAssetId,paymentAmount) = {
1005- let $t04008740243 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
1006- let amountEstimated = $t04008740243._1
1007- let commonState = $t04008740243._2
1008- let feeAmount = $t04008740243._3
1009- let bonus = $t04008740243._4
1010- let outInAmountAsset = $t04008740243._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
10111012 $Tuple2(nil, $Tuple3(amountEstimated, feeAmount, bonus))
10121013 }
10131014
10141015
10151016
10161017 @Callable(i)
10171018 func unstakeAndGetOneTkn (unstakeAmount,outAssetIdStr,minOutAmount) = {
10181019 let isPoolOneTokenOperationsDisabled = {
10191020 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
10201021 if ($isInstanceOf(@, "Boolean"))
10211022 then @
10221023 else throw(($getType(@) + " couldn't be cast to Boolean"))
10231024 }
10241025 let isGetDisabled = if (if (isGlobalShutdown())
10251026 then true
10261027 else (cfgPoolStatus == PoolShutdown))
10271028 then true
10281029 else isPoolOneTokenOperationsDisabled
10291030 let checks = [if (if (!(isGetDisabled))
10301031 then true
10311032 else isManager(i))
10321033 then true
10331034 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
10341035 then true
10351036 else throwErr("no payments are expected")]
10361037 if ((checks == checks))
10371038 then {
10381039 let outAssetId = parseAssetId(outAssetIdStr)
10391040 let userAddress = i.caller
10401041 let txId = i.transactionId
10411042 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
10421043 if ((currentKLp == currentKLp))
10431044 then {
10441045 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
10451046 if ((unstakeInv == unstakeInv))
10461047 then {
1047- let $t04114841299 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
1048- if (($t04114841299 == $t04114841299))
1048+ let $t04129841449 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
1049+ if (($t04129841449 == $t04129841449))
10491050 then {
1050- let outInAmountAsset = $t04114841299._5
1051- let bonus = $t04114841299._4
1052- let feeAmount = $t04114841299._3
1053- let commonState = $t04114841299._2
1054- let amountEstimated = $t04114841299._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
10551056 let amount = if (if ((minOutAmount > 0))
10561057 then (minOutAmount > amountEstimated)
10571058 else false)
10581059 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
10591060 else amountEstimated
10601061 let burnInv = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
10611062 if ((burnInv == burnInv))
10621063 then {
10631064 let assetTransfer = [ScriptTransfer(i.caller, amount, outAssetId)]
10641065 let sendFee = if ((feeAmount > 0))
10651066 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
10661067 else nil
1067- let $t04179442041 = {
1068+ let $t04194442191 = {
10681069 let feeAmountForCalc = if ((this == feeCollectorAddress))
10691070 then 0
10701071 else feeAmount
10711072 if (outInAmountAsset)
10721073 then $Tuple2(-((amount + feeAmountForCalc)), 0)
10731074 else $Tuple2(0, -((amount + feeAmountForCalc)))
10741075 }
1075- let amountAssetBalanceDelta = $t04179442041._1
1076- let priceAssetBalanceDelta = $t04179442041._2
1077- let $t04204442152 = refreshKLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1078- let refreshKLpActions = $t04204442152._1
1079- let updatedKLp = $t04204442152._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
10801081 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
10811082 if ((isUpdatedKLpValid == isUpdatedKLpValid))
10821083 then $Tuple2((((commonState ++ assetTransfer) ++ sendFee) ++ refreshKLpActions), amount)
10831084 else throw("Strict value is not equal to itself.")
10841085 }
10851086 else throw("Strict value is not equal to itself.")
10861087 }
10871088 else throw("Strict value is not equal to itself.")
10881089 }
10891090 else throw("Strict value is not equal to itself.")
10901091 }
10911092 else throw("Strict value is not equal to itself.")
10921093 }
10931094 else throw("Strict value is not equal to itself.")
10941095 }
10951096
10961097
10971098
10981099 @Callable(i)
10991100 func get () = {
11001101 let res = commonGet(i)
11011102 let outAmtAmt = res._1
11021103 let outPrAmt = res._2
11031104 let pmtAmt = res._3
11041105 let pmtAssetId = res._4
11051106 let state = res._5
11061107 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
11071108 if ((currentKLp == currentKLp))
11081109 then {
11091110 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
11101111 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11111112 then {
1112- let $t04309843180 = refreshKLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1113- let refreshKLpActions = $t04309843180._1
1114- let updatedKLp = $t04309843180._2
1113+ let $t04324843330 = refreshKLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1114+ let refreshKLpActions = $t04324843330._1
1115+ let updatedKLp = $t04324843330._2
11151116 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11161117 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11171118 then (state ++ refreshKLpActions)
11181119 else throw("Strict value is not equal to itself.")
11191120 }
11201121 else throw("Strict value is not equal to itself.")
11211122 }
11221123 else throw("Strict value is not equal to itself.")
11231124 }
11241125
11251126
11261127
11271128 @Callable(i)
11281129 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
11291130 let res = commonGet(i)
11301131 let outAmAmt = res._1
11311132 let outPrAmt = res._2
11321133 let pmtAmt = res._3
11331134 let pmtAssetId = res._4
11341135 let state = res._5
11351136 if ((noLessThenAmtAsset > outAmAmt))
11361137 then throw(((("noLessThenAmtAsset failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
11371138 else if ((noLessThenPriceAsset > outPrAmt))
11381139 then throw(((("noLessThenPriceAsset failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
11391140 else {
11401141 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
11411142 if ((currentKLp == currentKLp))
11421143 then {
11431144 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
11441145 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11451146 then {
1146- let $t04412944210 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1147- let refreshKLpActions = $t04412944210._1
1148- let updatedKLp = $t04412944210._2
1147+ let $t04427944360 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1148+ let refreshKLpActions = $t04427944360._1
1149+ let updatedKLp = $t04427944360._2
11491150 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11501151 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11511152 then (state ++ refreshKLpActions)
11521153 else throw("Strict value is not equal to itself.")
11531154 }
11541155 else throw("Strict value is not equal to itself.")
11551156 }
11561157 else throw("Strict value is not equal to itself.")
11571158 }
11581159 }
11591160
11601161
11611162
11621163 @Callable(i)
11631164 func unstakeAndGet (amount) = {
11641165 let checkPayments = if ((size(i.payments) != 0))
11651166 then throw("No payments are expected")
11661167 else true
11671168 if ((checkPayments == checkPayments))
11681169 then {
11691170 let cfg = getPoolConfig()
11701171 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
11711172 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
11721173 if ((currentKLp == currentKLp))
11731174 then {
11741175 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(lpAssetId), amount], nil)
11751176 if ((unstakeInv == unstakeInv))
11761177 then {
11771178 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
11781179 let outAmAmt = res._1
11791180 let outPrAmt = res._2
11801181 let poolStatus = parseIntValue(res._9)
11811182 let state = res._10
11821183 let checkPoolStatus = if (if (isGlobalShutdown())
11831184 then true
11841185 else (poolStatus == PoolShutdown))
11851186 then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus)))
11861187 else true
11871188 if ((checkPoolStatus == checkPoolStatus))
11881189 then {
11891190 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
11901191 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11911192 then {
1192- let $t04533645417 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1193- let refreshKLpActions = $t04533645417._1
1194- let updatedKLp = $t04533645417._2
1193+ let $t04548645567 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1194+ let refreshKLpActions = $t04548645567._1
1195+ let updatedKLp = $t04548645567._2
11951196 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
11961197 if ((isUpdatedKLpValid == isUpdatedKLpValid))
11971198 then (state ++ refreshKLpActions)
11981199 else throw("Strict value is not equal to itself.")
11991200 }
12001201 else throw("Strict value is not equal to itself.")
12011202 }
12021203 else throw("Strict value is not equal to itself.")
12031204 }
12041205 else throw("Strict value is not equal to itself.")
12051206 }
12061207 else throw("Strict value is not equal to itself.")
12071208 }
12081209 else throw("Strict value is not equal to itself.")
12091210 }
12101211
12111212
12121213
12131214 @Callable(i)
12141215 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
12151216 let isGetDisabled = if (isGlobalShutdown())
12161217 then true
12171218 else (cfgPoolStatus == PoolShutdown)
12181219 let checks = [if (!(isGetDisabled))
12191220 then true
12201221 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
12211222 then true
12221223 else throw("no payments are expected")]
12231224 if ((checks == checks))
12241225 then {
12251226 let currentKLp = calcCurrentKLp(toBigInt(0), toBigInt(0), toBigInt(0))
12261227 if ((currentKLp == currentKLp))
12271228 then {
12281229 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
12291230 if ((unstakeInv == unstakeInv))
12301231 then {
12311232 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
12321233 let outAmAmt = res._1
12331234 let outPrAmt = res._2
12341235 let state = res._10
12351236 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
12361237 then true
12371238 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
12381239 then true
12391240 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
12401241 if ((checkAmounts == checkAmounts))
12411242 then {
12421243 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
12431244 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
12441245 then {
1245- let $t04671246793 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1246- let refreshKLpActions = $t04671246793._1
1247- let updatedKLp = $t04671246793._2
1246+ let $t04686246943 = refreshKLpInternal(-(outAmAmt), -(outPrAmt), 0)
1247+ let refreshKLpActions = $t04686246943._1
1248+ let updatedKLp = $t04686246943._2
12481249 let isUpdatedKLpValid = validateUpdatedKLp(currentKLp, updatedKLp)
12491250 if ((isUpdatedKLpValid == isUpdatedKLpValid))
12501251 then (state ++ refreshKLpActions)
12511252 else throw("Strict value is not equal to itself.")
12521253 }
12531254 else throw("Strict value is not equal to itself.")
12541255 }
12551256 else throw("Strict value is not equal to itself.")
12561257 }
12571258 else throw("Strict value is not equal to itself.")
12581259 }
12591260 else throw("Strict value is not equal to itself.")
12601261 }
12611262 else throw("Strict value is not equal to itself.")
12621263 }
12631264
12641265
12651266
12661267 @Callable(i)
12671268 func activate (amtAssetStr,priceAssetStr) = if ((toString(i.caller) != toString(factoryContract)))
12681269 then throw("permissions denied")
12691270 else $Tuple2([StringEntry(aa(), amtAssetStr), StringEntry(pa(), priceAssetStr)], "success")
12701271
12711272
12721273
12731274 @Callable(i)
12741275 func refreshKLp () = {
12751276 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyKLpRefreshedHeight), 0)
12761277 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= kLpRefreshDelay))
12771278 then unit
12781279 else throwErr(makeString([toString(kLpRefreshDelay), " blocks have not passed since the previous call"], ""))
12791280 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
12801281 then {
12811282 let kLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyKLp), "0")), fmtErr("invalid kLp"))
1282- let $t04798048044 = refreshKLpInternal(0, 0, 0)
1283- let kLpUpdateActions = $t04798048044._1
1284- let updatedKLp = $t04798048044._2
1283+ let $t04813048194 = refreshKLpInternal(0, 0, 0)
1284+ let kLpUpdateActions = $t04813048194._1
1285+ let updatedKLp = $t04813048194._2
12851286 let actions = if ((kLp != updatedKLp))
12861287 then kLpUpdateActions
12871288 else throwErr("nothing to refresh")
12881289 $Tuple2(actions, toString(updatedKLp))
12891290 }
12901291 else throw("Strict value is not equal to itself.")
12911292 }
12921293
12931294
12941295
12951296 @Callable(i)
12961297 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, getPoolConfig())
12971298
12981299
12991300
13001301 @Callable(i)
13011302 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
13021303
13031304
13041305
13051306 @Callable(i)
13061307 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
13071308 let prices = calcPrices(amAmt, prAmt, lpAmt)
13081309 $Tuple2(nil, [toString(prices[0]), toString(prices[1]), toString(prices[2])])
13091310 }
13101311
13111312
13121313
13131314 @Callable(i)
13141315 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(toX18(origVal, origScaleMult)))
13151316
13161317
13171318
13181319 @Callable(i)
13191320 func fromX18WrapperREADONLY (val,resultScaleMult) = $Tuple2(nil, fromX18(parseBigIntValue(val), resultScaleMult))
13201321
13211322
13221323
13231324 @Callable(i)
13241325 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(calcPriceBigInt(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
13251326
13261327
13271328
13281329 @Callable(i)
13291330 func estimatePutOperationWrapperREADONLY (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = $Tuple2(nil, estimatePutOperation(txId58, slippageTolerance, inAmAssetAmt, inAmAssetId, inPrAssetAmt, inPrAssetId, userAddress, isEvaluate, emitLp))
13301331
13311332
13321333
13331334 @Callable(i)
13341335 func estimateGetOperationWrapperREADONLY (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
13351336 let res = estimateGetOperation(txId58, pmtAssetId, pmtLpAmt, addressFromStringValue(userAddress))
13361337 $Tuple2(nil, $Tuple10(res._1, res._2, res._3, res._4, res._5, res._6, res._7, toString(res._8), res._9, res._10))
13371338 }
13381339
13391340
13401341
13411342 @Callable(i)
13421343 func statsREADONLY () = {
13431344 let cfg = getPoolConfig()
13441345 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
13451346 let amtAssetId = cfg[idxAmtAssetId]
13461347 let priceAssetId = cfg[idxPriceAssetId]
13471348 let iAmtAssetId = cfg[idxIAmtAssetId]
13481349 let iPriceAssetId = cfg[idxIPriceAssetId]
13491350 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
13501351 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
13511352 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
13521353 let accAmtAssetBalance = getAccBalance(amtAssetId)
13531354 let accPriceAssetBalance = getAccBalance(priceAssetId)
13541355 let pricesList = if ((poolLPBalance == 0))
13551356 then [zeroBigInt, zeroBigInt, zeroBigInt]
13561357 else calcPrices(accAmtAssetBalance, accPriceAssetBalance, poolLPBalance)
13571358 let curPrice = 0
13581359 let lpAmtAssetShare = fromX18(pricesList[1], scale8)
13591360 let lpPriceAssetShare = fromX18(pricesList[2], scale8)
13601361 let poolWeight = value(getInteger(factoryContract, keyPoolWeight(toString(this))))
13611362 $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))
13621363 }
13631364
13641365
13651366
13661367 @Callable(i)
13671368 func evaluatePutByAmountAssetREADONLY (inAmAssetAmt) = {
13681369 let cfg = getPoolConfig()
13691370 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
13701371 let amAssetIdStr = cfg[idxAmtAssetId]
13711372 let amAssetId = fromBase58String(amAssetIdStr)
13721373 let prAssetIdStr = cfg[idxPriceAssetId]
13731374 let prAssetId = fromBase58String(prAssetIdStr)
13741375 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
13751376 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
13761377 let poolStatus = cfg[idxPoolStatus]
13771378 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
13781379 let accAmtAssetBalance = getAccBalance(amAssetIdStr)
13791380 let accPriceAssetBalance = getAccBalance(prAssetIdStr)
13801381 let amtAssetAmtX18 = toX18(accAmtAssetBalance, amtAssetDcm)
13811382 let priceAssetAmtX18 = toX18(accPriceAssetBalance, priceAssetDcm)
13821383 let curPriceX18 = if ((poolLPBalance == 0))
13831384 then zeroBigInt
13841385 else calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18)
13851386 let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm)
13861387 let inPrAssetAmtX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
13871388 let inPrAssetAmt = fromX18(inPrAssetAmtX18, priceAssetDcm)
13881389 let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false)
13891390 let calcLpAmt = estPut._1
13901391 let curPriceCalc = estPut._3
13911392 let amBalance = estPut._4
13921393 let prBalance = estPut._5
13931394 let lpEmission = estPut._6
13941395 $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))
13951396 }
13961397
13971398
13981399
13991400 @Callable(i)
14001401 func evaluatePutByPriceAssetREADONLY (inPrAssetAmt) = {
14011402 let cfg = getPoolConfig()
14021403 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
14031404 let amAssetIdStr = cfg[idxAmtAssetId]
14041405 let amAssetId = fromBase58String(amAssetIdStr)
14051406 let prAssetIdStr = cfg[idxPriceAssetId]
14061407 let prAssetId = fromBase58String(prAssetIdStr)
14071408 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
14081409 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
14091410 let poolStatus = cfg[idxPoolStatus]
14101411 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
14111412 let amBalanceRaw = getAccBalance(amAssetIdStr)
14121413 let prBalanceRaw = getAccBalance(prAssetIdStr)
14131414 let amBalanceRawX18 = toX18(amBalanceRaw, amtAssetDcm)
14141415 let prBalanceRawX18 = toX18(prBalanceRaw, priceAssetDcm)
14151416 let curPriceX18 = if ((poolLPBalance == 0))
14161417 then zeroBigInt
14171418 else calcPriceBigInt(prBalanceRawX18, amBalanceRawX18)
14181419 let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm)
14191420 let inAmAssetAmtX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
14201421 let inAmAssetAmt = fromX18(inAmAssetAmtX18, amtAssetDcm)
14211422 let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false)
14221423 let calcLpAmt = estPut._1
14231424 let curPriceCalc = estPut._3
14241425 let amBalance = estPut._4
14251426 let prBalance = estPut._5
14261427 let lpEmission = estPut._6
14271428 $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))
14281429 }
14291430
14301431
14311432
14321433 @Callable(i)
14331434 func evaluateGetREADONLY (paymentLpAssetId,paymentLpAmt) = {
14341435 let res = estimateGetOperation("", paymentLpAssetId, paymentLpAmt, this)
14351436 let outAmAmt = res._1
14361437 let outPrAmt = res._2
14371438 let amBalance = res._5
14381439 let prBalance = res._6
14391440 let lpEmission = res._7
14401441 let curPrice = res._8
14411442 let poolStatus = parseIntValue(res._9)
14421443 $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))
14431444 }
14441445
14451446
14461447 @Verifier(tx)
14471448 func verify () = {
14481449 let targetPublicKey = match managerPublicKeyOrUnit() {
14491450 case pk: ByteVector =>
14501451 pk
14511452 case _: Unit =>
14521453 tx.senderPublicKey
14531454 case _ =>
14541455 throw("Match error")
14551456 }
14561457 match tx {
14571458 case order: Order =>
14581459 let matcherPub = getMatcherPubOrFail()
1459- let orderValid = validateMatcherOrderAllowed(order)
1460+ let $t05685656925 = validateMatcherOrderAllowed(order)
1461+ let orderValid = $t05685656925._1
1462+ let orderValidInfo = $t05685656925._2
14601463 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
14611464 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
14621465 if (if (if (orderValid)
14631466 then senderValid
14641467 else false)
14651468 then matcherValid
14661469 else false)
14671470 then true
1468- else throwOrderError(orderValid, senderValid, matcherValid)
1471+ else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
14691472 case s: SetScriptTransaction =>
14701473 let newHash = blake2b256(value(s.script))
14711474 let allowedHash = fromBase64String(value(getString(factoryContract, keyAllowedLpScriptHash())))
14721475 let currentHash = scriptHash(this)
14731476 if (if ((allowedHash == newHash))
14741477 then (currentHash != newHash)
14751478 else false)
14761479 then true
14771480 else sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
14781481 case _ =>
14791482 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
14801483 }
14811484 }
14821485

github/deemru/w8io/026f985 
194.34 ms