tx · D8zVNcaXHi7CqYXtEuABKDjwTfzrd6hiw1AgZF3QWArD

3N7b3kPunHUXhZp1vMG9NhPMARNEprCMWxT:  -0.03200000 Waves

2023.02.08 11:04 [2440377] smart account 3N7b3kPunHUXhZp1vMG9NhPMARNEprCMWxT > SELF 0.00000000 Waves

{ "type": 13, "id": "D8zVNcaXHi7CqYXtEuABKDjwTfzrd6hiw1AgZF3QWArD", "fee": 3200000, "feeAssetId": null, "timestamp": 1675843429683, "version": 1, "sender": "3N7b3kPunHUXhZp1vMG9NhPMARNEprCMWxT", "senderPublicKey": "AYbpHveq7zviKTDV7SGTB1pZGFbkumgfq3jSwVv6BznT", "proofs": [ "55d871a9eheZSSEztSwMpdu9gumdrhBMYCnrFKCjx8HNTpA13535kJSzfSYzL8zoik84kWbY5QC4hAPorv5LRnCE" ], "script": "base64:BgKcKQgCEgQKAgEEEgYKBAEEAQgSAwoBCBIAEgQKAgEEEgMKAQESBAoCAQQSBAoCCAESBAoCCAESBAoCCAESBQoDAQgBEgASBAoCAQESAwoBARIFCgMBAQESBAoCCAgSABIDCgEIEgUKAwEBARIECgIBARIECgIIARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAEgMKAQESAwoBARIECgIIASIKbFBkZWNpbWFscyIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiC3dhdmVzU3RyaW5nIgNTRVAiClBvb2xBY3RpdmUiD1Bvb2xQdXREaXNhYmxlZCITUG9vbE1hdGNoZXJEaXNhYmxlZCIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyINaWR4UG9vbFN0YXR1cyIQaWR4UG9vbExQQXNzZXRJZCINaWR4QW10QXNzZXRJZCIPaWR4UHJpY2VBc3NldElkIg5pZHhBbXRBc3NldERjbSIQaWR4UHJpY2VBc3NldERjbSIOaWR4SUFtdEFzc2V0SWQiEGlkeElQcmljZUFzc2V0SWQiDWlke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cmRlcgQCY1YFAmR1BAJnZAkBAmFLAAQCYXYJAQJjVQEFAmNWBAJhdwkA9AMDCAUCY1YJYm9keUJ5dGVzCQCRAwIIBQJjVgZwcm9vZnMAAAgFAmNWD3NlbmRlclB1YmxpY0tleQQCYXgJAPQDAwgFAmNWCWJvZHlCeXRlcwkAkQMCCAUCY1YGcHJvb2ZzAAEFAmdkAwMDBQJhdgUCYXcHBQJheAcGCQECYXUDBQJhdgUCYXcFAmF4AwkAAQIFAmR1AhRTZXRTY3JpcHRUcmFuc2FjdGlvbgQCZUEFAmR1BAJnZQkA9gMBCQEFdmFsdWUBCAUCZUEGc2NyaXB0BAJnZgkA2wQBCQEFdmFsdWUBCQCdCAIFAmFFCQECYXMABAJnZwkA8QcBBQR0aGlzAwMJAAACBQJnZgUCZ2UJAQIhPQIFAmdnBQJnZQcGCQD0AwMIBQJnYQlib2R5Qnl0ZXMJAJEDAggFAmdhBnByb29mcwAABQJnYwkA9AMDCAUCZ2EJYm9keUJ5dGVzCQCRAwIIBQJnYQZwcm9vZnMAAAUCZ2MflOEF", "chainId": 84, "height": 2440377, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CdiJjaSo3tL1qnKrWiYdYFmsR2ys81KvgXGfRZ6nrA2U Next: 3DV35dEdDZQMZDEN21KYbcNDn2gBqTiKwjZbQ2zPr6CA Diff:
OldNewDifferences
6262 func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
6363
6464
65+func toX18BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult)
66+
67+
6568 func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
69+
70+
71+func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
6672
6773
6874 func toScale (amt,resScale,curScale) = fraction(amt, resScale, curScale)
194200
195201 let poolConfigParsed = parsePoolConfig(getPoolConfig())
196202
197-let $t076627828 = poolConfigParsed
203+let $t079068072 = poolConfigParsed
198204
199-let cfgPoolAddress = $t076627828._1
205+let cfgPoolAddress = $t079068072._1
200206
201-let cfgPoolStatus = $t076627828._2
207+let cfgPoolStatus = $t079068072._2
202208
203-let cfgLpAssetId = $t076627828._3
209+let cfgLpAssetId = $t079068072._3
204210
205-let cfgAmountAssetId = $t076627828._4
211+let cfgAmountAssetId = $t079068072._4
206212
207-let cfgPriceAssetId = $t076627828._5
213+let cfgPriceAssetId = $t079068072._5
208214
209-let cfgAmountAssetDecimals = $t076627828._6
215+let cfgAmountAssetDecimals = $t079068072._6
210216
211-let cfgPriceAssetDecimals = $t076627828._7
217+let cfgPriceAssetDecimals = $t079068072._7
212218
213219 func getFactoryConfig () = split(getStringOrFail(factoryContract, keyFactoryConfig()), SEP)
214220
487493 else if ((paymentAssetId == cfgPriceAssetId))
488494 then false
489495 else throwErr("invalid asset")
490- let $t02272523018 = if (isEval)
496+ let $t02296923262 = if (isEval)
491497 then $Tuple2(amountBalanceRaw, priceBalanceRaw)
492498 else if (paymentInAmountAsset)
493499 then $Tuple2((amountBalanceRaw - paymentAmountRaw), priceBalanceRaw)
494500 else $Tuple2(amountBalanceRaw, (priceBalanceRaw - paymentAmountRaw))
495- let amountBalanceOld = $t02272523018._1
496- let priceBalanceOld = $t02272523018._2
497- let $t02302223171 = if (paymentInAmountAsset)
501+ let amountBalanceOld = $t02296923262._1
502+ let priceBalanceOld = $t02296923262._2
503+ let $t02326623415 = if (paymentInAmountAsset)
498504 then $Tuple2(paymentAmountRaw, 0)
499505 else $Tuple2(0, paymentAmountRaw)
500- let amountAssetAmountRaw = $t02302223171._1
501- let priceAssetAmountRaw = $t02302223171._2
506+ let amountAssetAmountRaw = $t02326623415._1
507+ let priceAssetAmountRaw = $t02326623415._2
502508 let amountAssetAmount = takeFee(amountAssetAmountRaw, inFee)._1
503509 let priceAssetAmount = takeFee(priceAssetAmountRaw, inFee)._1
504- let $t02330323367 = takeFee(paymentAmountRaw, inFee)
505- let paymentAmount = $t02330323367._1
506- let feeAmount = $t02330323367._2
510+ let $t02354723611 = takeFee(paymentAmountRaw, inFee)
511+ let paymentAmount = $t02354723611._1
512+ let feeAmount = $t02354723611._2
507513 let amountBalanceNew = (amountBalanceOld + amountAssetAmount)
508514 let priceBalanceNew = (priceBalanceOld + priceAssetAmount)
509515 let priceNewX18 = calcPriceBigInt(toX18(priceBalanceNew, cfgPriceAssetDecimals), toX18(amountBalanceNew, cfgAmountAssetDecimals))
526532 let priceOldX18 = calcPriceBigInt(toX18(priceBalanceOld, cfgPriceAssetDecimals), toX18(amountBalanceOld, cfgAmountAssetDecimals))
527533 let priceOld = fromX18(priceOldX18, scale8)
528534 let loss = {
529- let $t02484425011 = if (paymentInAmountAsset)
535+ let $t02508825255 = if (paymentInAmountAsset)
530536 then $Tuple2(amountAssetAmountRaw, amountBalanceOld)
531537 else $Tuple2(priceAssetAmountRaw, priceBalanceOld)
532- let amount = $t02484425011._1
533- let balance = $t02484425011._2
538+ let amount = $t02508825255._1
539+ let balance = $t02508825255._2
534540 let issueAmountBoth = toInt(fraction(supplyBigInt, toBigInt((amount / 2)), toBigInt(balance)))
535541 fraction((issueAmount - issueAmountBoth), scale8, issueAmountBoth)
536542 }
564570 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity)
565571 let redeemedBigInt = toBigInt(paymentAmount)
566572 let amountRaw = max([0, toInt(((balanceBigInt * (scale18 - pow((scale18 - ((redeemedBigInt * scale18) / supplyBigInt)), 18, big2, 0, 18, DOWN))) / scale18))])
567- let $t02659126647 = takeFee(amountRaw, outFee)
568- let totalAmount = $t02659126647._1
569- let feeAmount = $t02659126647._2
570- let $t02665126877 = if (outInAmountAsset)
573+ let $t02683526891 = takeFee(amountRaw, outFee)
574+ let totalAmount = $t02683526891._1
575+ let feeAmount = $t02683526891._2
576+ let $t02689527121 = if (outInAmountAsset)
571577 then $Tuple4(totalAmount, 0, (amBalanceOld - amountRaw), prBalanceOld)
572578 else $Tuple4(0, totalAmount, amBalanceOld, (prBalanceOld - amountRaw))
573- let outAmAmount = $t02665126877._1
574- let outPrAmount = $t02665126877._2
575- let amBalanceNew = $t02665126877._3
576- let prBalanceNew = $t02665126877._4
579+ let outAmAmount = $t02689527121._1
580+ let outPrAmount = $t02689527121._2
581+ let amBalanceNew = $t02689527121._3
582+ let prBalanceNew = $t02689527121._4
577583 let priceNewX18 = calcPriceBigInt(toX18(prBalanceNew, cfgPriceAssetDecimals), toX18(amBalanceNew, cfgAmountAssetDecimals))
578584 let priceNew = fromX18(priceNewX18, scale8)
579585 let commonState = if (isEval)
640646
641647 @Callable(i)
642648 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse) = {
643- let $t02855428859 = if ((isReverse == false))
649+ let $t02879829103 = if ((isReverse == false))
644650 then {
645651 let assetOut = getStringOrFail(this, pa())
646652 let assetIn = getStringOrFail(this, aa())
651657 let assetIn = getStringOrFail(this, pa())
652658 $Tuple2(assetOut, assetIn)
653659 }
654- let assetOut = $t02855428859._1
655- let assetIn = $t02855428859._2
660+ let assetOut = $t02879829103._1
661+ let assetIn = $t02879829103._2
656662 let poolAssetInBalance = getAccBalance(assetIn)
657663 let poolAssetOutBalance = getAccBalance(assetOut)
658664 let amountOut = ((poolAssetOutBalance * cleanAmountIn) / (poolAssetInBalance + cleanAmountIn))
659- $Tuple2(nil, amountOut)
665+ let oldK = (poolAssetInBalance * poolAssetOutBalance)
666+ let newK = ((getAccBalance(assetIn) + cleanAmountIn) * (getAccBalance(assetOut) - amountOut))
667+ let checkK = if ((newK >= oldK))
668+ then true
669+ else throw("new K is fewer error")
670+ if ((checkK == checkK))
671+ then $Tuple2(nil, amountOut)
672+ else throw("Strict value is not equal to itself.")
660673 }
661674
662675
680693 let poolAssetInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
681694 let poolAssetOutBalance = getAccBalance(assetOut)
682695 let amountOut = ((poolAssetOutBalance * cleanAmountIn) / (poolAssetInBalance + cleanAmountIn))
683- let checkMin = if ((amountOut >= amountOutMin))
696+ let oldK = (poolAssetInBalance * poolAssetOutBalance)
697+ let newK = (getAccBalance(assetIn) * (getAccBalance(assetOut) - amountOut))
698+ let checkK = if ((newK >= oldK))
684699 then true
685- else throw("Exchange result is fewer coins than expected")
686- if ((checkMin == checkMin))
687- then [ScriptTransfer(addressFromStringValue(addressTo), amountOut, if ((assetIn == "WAVES"))
688- then unit
689- else fromBase58String(assetOut))]
700+ else throw("new K is fewer error")
701+ if ((checkK == checkK))
702+ then {
703+ let checkMin = if ((amountOut >= amountOutMin))
704+ then true
705+ else throw("Exchange result is fewer coins than expected")
706+ if ((checkMin == checkMin))
707+ then [ScriptTransfer(addressFromStringValue(addressTo), amountOut, if ((assetIn == "WAVES"))
708+ then unit
709+ else fromBase58String(assetOut))]
710+ else throw("Strict value is not equal to itself.")
711+ }
690712 else throw("Strict value is not equal to itself.")
691713 }
692714 else throw("Strict value is not equal to itself.")
822844 let paymentAmountRaw = payment.amount
823845 let userAddress = i.caller
824846 let txId = i.transactionId
825- let $t03366433794 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
826- if (($t03366433794 == $t03366433794))
847+ let $t03422234352 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
848+ if (($t03422234352 == $t03422234352))
827849 then {
828- let bonus = $t03366433794._4
829- let feeAmount = $t03366433794._3
830- let commonState = $t03366433794._2
831- let emitAmountEstimated = $t03366433794._1
850+ let bonus = $t03422234352._4
851+ let feeAmount = $t03422234352._3
852+ let commonState = $t03422234352._2
853+ let emitAmountEstimated = $t03422234352._1
832854 let emitAmount = if (if ((minOutAmount > 0))
833855 then (minOutAmount > emitAmountEstimated)
834856 else false)
861883
862884 @Callable(i)
863885 func putOneTknREADONLY (paymentAssetId,paymentAmountRaw) = {
864- let $t03452334658 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
865- let emitAmountEstimated = $t03452334658._1
866- let commonState = $t03452334658._2
867- let feeAmount = $t03452334658._3
868- let bonus = $t03452334658._4
886+ let $t03508135216 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
887+ let emitAmountEstimated = $t03508135216._1
888+ let commonState = $t03508135216._2
889+ let feeAmount = $t03508135216._3
890+ let bonus = $t03508135216._4
869891 $Tuple2(nil, $Tuple3(emitAmountEstimated, feeAmount, bonus))
870892 }
871893
899921 let paymentAmount = payment.amount
900922 let userAddress = i.caller
901923 let txId = i.transactionId
902- let $t03546335598 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
903- if (($t03546335598 == $t03546335598))
924+ let $t03602136156 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
925+ if (($t03602136156 == $t03602136156))
904926 then {
905- let bonus = $t03546335598._4
906- let feeAmount = $t03546335598._3
907- let commonState = $t03546335598._2
908- let amountEstimated = $t03546335598._1
927+ let bonus = $t03602136156._4
928+ let feeAmount = $t03602136156._3
929+ let commonState = $t03602136156._2
930+ let amountEstimated = $t03602136156._1
909931 let amount = if (if ((minOutAmount > 0))
910932 then (minOutAmount > amountEstimated)
911933 else false)
931953
932954 @Callable(i)
933955 func getOneTknREADONLY (outAssetId,paymentAmount) = {
934- let $t03623336371 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
935- let amountEstimated = $t03623336371._1
936- let commonState = $t03623336371._2
937- let feeAmount = $t03623336371._3
938- let bonus = $t03623336371._4
956+ let $t03679136929 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
957+ let amountEstimated = $t03679136929._1
958+ let commonState = $t03679136929._2
959+ let feeAmount = $t03679136929._3
960+ let bonus = $t03679136929._4
939961 $Tuple2(nil, $Tuple3(amountEstimated, feeAmount, bonus))
940962 }
941963
969991 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
970992 if ((unstakeInv == unstakeInv))
971993 then {
972- let $t03719637329 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
973- if (($t03719637329 == $t03719637329))
994+ let $t03775437887 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
995+ if (($t03775437887 == $t03775437887))
974996 then {
975- let bonus = $t03719637329._4
976- let feeAmount = $t03719637329._3
977- let commonState = $t03719637329._2
978- let amountEstimated = $t03719637329._1
997+ let bonus = $t03775437887._4
998+ let feeAmount = $t03775437887._3
999+ let commonState = $t03775437887._2
1000+ let amountEstimated = $t03775437887._1
9791001 let amount = if (if ((minOutAmount > 0))
9801002 then (minOutAmount > amountEstimated)
9811003 else false)
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
65+func toX18BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult)
66+
67+
6568 func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
69+
70+
71+func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
6672
6773
6874 func toScale (amt,resScale,curScale) = fraction(amt, resScale, curScale)
6975
7076
7177 func abs (val) = if ((0 > val))
7278 then -(val)
7379 else val
7480
7581
7682 func absBigInt (val) = if ((zeroBigInt > val))
7783 then -(val)
7884 else val
7985
8086
8187 func swapContract () = "%s__swapContract"
8288
8389
8490 func fc () = "%s__factoryContract"
8591
8692
8793 func mpk () = "%s__managerPublicKey"
8894
8995
9096 func pmpk () = "%s__pendingManagerPublicKey"
9197
9298
9399 func pl () = "%s%s__price__last"
94100
95101
96102 func ph (h,timestamp) = makeString(["%s%s%d%d__price__history", toString(h), toString(timestamp)], SEP)
97103
98104
99105 func pau (userAddress,txId) = ((("%s%s%s__P__" + userAddress) + "__") + txId)
100106
101107
102108 func gau (userAddress,txId) = ((("%s%s%s__G__" + userAddress) + "__") + txId)
103109
104110
105111 func aa () = "%s__amountAsset"
106112
107113
108114 func pa () = "%s__priceAsset"
109115
110116
111117 func keyFactoryConfig () = "%s__factoryConfig"
112118
113119
114120 func keyMatcherPub () = "%s%s__matcher__publicKey"
115121
116122
117123 func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
118124
119125
120126 func keyPoolConfig (iAmtAsset,iPriceAsset) = (((("%d%d%s__" + iAmtAsset) + "__") + iPriceAsset) + "__config")
121127
122128
123129 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
124130
125131
126132 func keyAllPoolsShutdown () = "%s__shutdown"
127133
128134
129135 func keyPoolWeight (contractAddress) = ("%s%s__poolWeight__" + contractAddress)
130136
131137
132138 func keyAllowedLpScriptHash () = "%s__allowedLpScriptHash"
133139
134140
135141 let keyFeeCollectorAddress = "%s__feeCollectorAddress"
136142
137143 func throwOrderError (orderValid,senderValid,matcherValid) = throw(((((("order validation failed: orderValid=" + toString(orderValid)) + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
138144
139145
140146 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
141147
142148
143149 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
144150
145151
146152 func throwErr (msg) = throw(makeString(["lp.ride:", msg], " "))
147153
148154
149155 let factoryContract = addressFromStringValue(getStringOrFail(this, fc()))
150156
151157 let feeCollectorAddress = addressFromStringValue(getStringOrFail(factoryContract, keyFeeCollectorAddress))
152158
153159 let inFee = {
154160 let @ = invoke(factoryContract, "getInFeeREADONLY", [toString(this)], nil)
155161 if ($isInstanceOf(@, "Int"))
156162 then @
157163 else throw(($getType(@) + " couldn't be cast to Int"))
158164 }
159165
160166 let outFee = {
161167 let @ = invoke(factoryContract, "getOutFeeREADONLY", [toString(this)], nil)
162168 if ($isInstanceOf(@, "Int"))
163169 then @
164170 else throw(($getType(@) + " couldn't be cast to Int"))
165171 }
166172
167173 func isGlobalShutdown () = valueOrElse(getBoolean(factoryContract, keyAllPoolsShutdown()), false)
168174
169175
170176 func getMatcherPubOrFail () = fromBase58String(getStringOrFail(factoryContract, keyMatcherPub()))
171177
172178
173179 func getPoolConfig () = {
174180 let amtAsset = getStringOrFail(this, aa())
175181 let priceAsset = getStringOrFail(this, pa())
176182 let iPriceAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAsset))
177183 let iAmtAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amtAsset))
178184 split(getStringOrFail(factoryContract, keyPoolConfig(toString(iAmtAsset), toString(iPriceAsset))), SEP)
179185 }
180186
181187
182188 func parseAssetId (input) = if ((input == wavesString))
183189 then unit
184190 else fromBase58String(input)
185191
186192
187193 func assetIdToString (input) = if ((input == unit))
188194 then wavesString
189195 else toBase58String(value(input))
190196
191197
192198 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]))
193199
194200
195201 let poolConfigParsed = parsePoolConfig(getPoolConfig())
196202
197-let $t076627828 = poolConfigParsed
203+let $t079068072 = poolConfigParsed
198204
199-let cfgPoolAddress = $t076627828._1
205+let cfgPoolAddress = $t079068072._1
200206
201-let cfgPoolStatus = $t076627828._2
207+let cfgPoolStatus = $t079068072._2
202208
203-let cfgLpAssetId = $t076627828._3
209+let cfgLpAssetId = $t079068072._3
204210
205-let cfgAmountAssetId = $t076627828._4
211+let cfgAmountAssetId = $t079068072._4
206212
207-let cfgPriceAssetId = $t076627828._5
213+let cfgPriceAssetId = $t079068072._5
208214
209-let cfgAmountAssetDecimals = $t076627828._6
215+let cfgAmountAssetDecimals = $t079068072._6
210216
211-let cfgPriceAssetDecimals = $t076627828._7
217+let cfgPriceAssetDecimals = $t079068072._7
212218
213219 func getFactoryConfig () = split(getStringOrFail(factoryContract, keyFactoryConfig()), SEP)
214220
215221
216222 let stakingContract = valueOrErrorMessage(addressFromString(getFactoryConfig()[idxFactoryStakingContract]), "incorrect staking address")
217223
218224 let slippageContract = valueOrErrorMessage(addressFromString(getFactoryConfig()[idxFactorySlippageContract]), "incorrect staking address")
219225
220226 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)
221227
222228
223229 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)
224230
225231
226232 func getAccBalance (assetId) = if ((assetId == "WAVES"))
227233 then wavesBalance(this).available
228234 else assetBalance(this, fromBase58String(assetId))
229235
230236
231237 func calcPriceBigInt (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
232238
233239
234240 func privateCalcPrice (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
235241 let amtAssetAmtX18 = toX18(amAmt, amAssetDcm)
236242 let priceAssetAmtX18 = toX18(prAmt, prAssetDcm)
237243 calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18)
238244 }
239245
240246
241247 func calcPrices (amAmt,prAmt,lpAmt) = {
242248 let cfg = getPoolConfig()
243249 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
244250 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
245251 let priceX18 = privateCalcPrice(amtAssetDcm, priceAssetDcm, amAmt, prAmt)
246252 let amAmtX18 = toX18(amAmt, amtAssetDcm)
247253 let prAmtX18 = toX18(prAmt, priceAssetDcm)
248254 let lpAmtX18 = toX18(lpAmt, scale8)
249255 let lpPriceInAmAssetX18 = calcPriceBigInt(amAmtX18, lpAmtX18)
250256 let lpPriceInPrAssetX18 = calcPriceBigInt(prAmtX18, lpAmtX18)
251257 [priceX18, lpPriceInAmAssetX18, lpPriceInPrAssetX18]
252258 }
253259
254260
255261 func calculatePrices (amAmt,prAmt,lpAmt) = {
256262 let prices = calcPrices(amAmt, prAmt, lpAmt)
257263 [fromX18(prices[0], scale8), fromX18(prices[1], scale8), fromX18(prices[2], scale8)]
258264 }
259265
260266
261267 func estimateGetOperation (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
262268 let cfg = getPoolConfig()
263269 let lpAssetId = cfg[idxPoolLPAssetId]
264270 let amAssetId = cfg[idxAmtAssetId]
265271 let prAssetId = cfg[idxPriceAssetId]
266272 let amAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
267273 let prAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
268274 let poolStatus = cfg[idxPoolStatus]
269275 let lpEmission = valueOrErrorMessage(assetInfo(fromBase58String(lpAssetId)), (("Asset " + lpAssetId) + " doesn't exist")).quantity
270276 if ((lpAssetId != pmtAssetId))
271277 then throw("Invalid asset passed.")
272278 else {
273279 let amBalance = getAccBalance(amAssetId)
274280 let amBalanceX18 = toX18(amBalance, amAssetDcm)
275281 let prBalance = getAccBalance(prAssetId)
276282 let prBalanceX18 = toX18(prBalance, prAssetDcm)
277283 let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18)
278284 let curPrice = fromX18(curPriceX18, scale8)
279285 let pmtLpAmtX18 = toX18(pmtLpAmt, scale8)
280286 let lpEmissionX18 = toX18(lpEmission, scale8)
281287 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissionX18)
282288 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissionX18)
283289 let outAmAmt = fromX18(outAmAmtX18, amAssetDcm)
284290 let outPrAmt = fromX18(outPrAmtX18, prAssetDcm)
285291 let state = if ((txId58 == ""))
286292 then nil
287293 else [ScriptTransfer(userAddress, outAmAmt, if ((amAssetId == "WAVES"))
288294 then unit
289295 else fromBase58String(amAssetId)), ScriptTransfer(userAddress, outPrAmt, if ((prAssetId == "WAVES"))
290296 then unit
291297 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)]
292298 $Tuple10(outAmAmt, outPrAmt, amAssetId, prAssetId, amBalance, prBalance, lpEmission, curPriceX18, poolStatus, state)
293299 }
294300 }
295301
296302
297303 func estimatePutOperation (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = {
298304 let cfg = getPoolConfig()
299305 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
300306 let amAssetIdStr = cfg[idxAmtAssetId]
301307 let prAssetIdStr = cfg[idxPriceAssetId]
302308 let iAmtAssetId = cfg[idxIAmtAssetId]
303309 let iPriceAssetId = cfg[idxIPriceAssetId]
304310 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
305311 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
306312 let poolStatus = cfg[idxPoolStatus]
307313 let lpEmission = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
308314 let inAmAssetIdStr = toBase58String(valueOrElse(inAmAssetId, fromBase58String("WAVES")))
309315 let inPrAssetIdStr = toBase58String(valueOrElse(inPrAssetId, fromBase58String("WAVES")))
310316 if (if ((amAssetIdStr != inAmAssetIdStr))
311317 then true
312318 else (prAssetIdStr != inPrAssetIdStr))
313319 then throw("Invalid amt or price asset passed.")
314320 else {
315321 let amBalance = if (isEvaluate)
316322 then getAccBalance(amAssetIdStr)
317323 else (getAccBalance(amAssetIdStr) - inAmAssetAmt)
318324 let prBalance = if (isEvaluate)
319325 then getAccBalance(prAssetIdStr)
320326 else (getAccBalance(prAssetIdStr) - inPrAssetAmt)
321327 let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm)
322328 let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm)
323329 let userPriceX18 = calcPriceBigInt(inPrAssetAmtX18, inAmAssetAmtX18)
324330 let amBalanceX18 = toX18(amBalance, amtAssetDcm)
325331 let prBalanceX18 = toX18(prBalance, priceAssetDcm)
326332 let res = if ((lpEmission == 0))
327333 then {
328334 let curPriceX18 = zeroBigInt
329335 let slippageX18 = zeroBigInt
330336 let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN)
331337 $Tuple5(fromX18(lpAmtX18, scale8), fromX18(inAmAssetAmtX18, amtAssetDcm), fromX18(inPrAssetAmtX18, priceAssetDcm), calcPriceBigInt((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
332338 }
333339 else {
334340 let curPriceX18 = calcPriceBigInt(prBalanceX18, amBalanceX18)
335341 let slippageX18 = fraction(absBigInt((curPriceX18 - userPriceX18)), scale18, curPriceX18)
336342 let slippageToleranceX18 = toX18(slippageTolerance, scale8)
337343 if (if ((curPriceX18 != zeroBigInt))
338344 then (slippageX18 > slippageToleranceX18)
339345 else false)
340346 then throw(((("Price slippage " + toString(slippageX18)) + " exceeded the passed limit of ") + toString(slippageToleranceX18)))
341347 else {
342348 let lpEmissionX18 = toX18(lpEmission, scale8)
343349 let prViaAmX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
344350 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
345351 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
346352 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
347353 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
348354 let expAmtAssetAmtX18 = expectedAmts._1
349355 let expPriceAssetAmtX18 = expectedAmts._2
350356 let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18)
351357 $Tuple5(fromX18(lpAmtX18, scale8), fromX18(expAmtAssetAmtX18, amtAssetDcm), fromX18(expPriceAssetAmtX18, priceAssetDcm), curPriceX18, slippageX18)
352358 }
353359 }
354360 let calcLpAmt = res._1
355361 let calcAmAssetPmt = res._2
356362 let calcPrAssetPmt = res._3
357363 let curPrice = fromX18(res._4, scale8)
358364 let slippageCalc = fromX18(res._5, scale8)
359365 if ((0 >= calcLpAmt))
360366 then throw("Invalid calculations. LP calculated is less than zero.")
361367 else {
362368 let emitLpAmt = if (!(emitLp))
363369 then 0
364370 else calcLpAmt
365371 let amDiff = (inAmAssetAmt - calcAmAssetPmt)
366372 let prDiff = (inPrAssetAmt - calcPrAssetPmt)
367373 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))]
368374 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEmission, lpAssetId, poolStatus, commonState, amDiff, prDiff, inAmAssetId, inPrAssetId)
369375 }
370376 }
371377 }
372378
373379
374380 func validateMatcherOrderAllowed (order) = {
375381 let cfg = getPoolConfig()
376382 let amtAssetId = cfg[idxAmtAssetId]
377383 let priceAssetId = cfg[idxPriceAssetId]
378384 let poolStatus = parseIntValue(cfg[idxPoolStatus])
379385 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
380386 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
381387 let accAmtAssetBalance = getAccBalance(amtAssetId)
382388 let accPriceAssetBalance = getAccBalance(priceAssetId)
383389 let curPriceX18 = if ((order.orderType == Buy))
384390 then privateCalcPrice(amtAssetDcm, priceAssetDcm, (accAmtAssetBalance + order.amount), accPriceAssetBalance)
385391 else privateCalcPrice(amtAssetDcm, priceAssetDcm, (accAmtAssetBalance - order.amount), accPriceAssetBalance)
386392 let curPrice = fromX18(curPriceX18, scale8)
387393 if (if (if (isGlobalShutdown())
388394 then true
389395 else (poolStatus == PoolMatcherDisabled))
390396 then true
391397 else (poolStatus == PoolShutdown))
392398 then throw("Exchange operations disabled")
393399 else {
394400 let orderAmtAsset = order.assetPair.amountAsset
395401 let orderAmtAssetStr = if ((orderAmtAsset == unit))
396402 then "WAVES"
397403 else toBase58String(value(orderAmtAsset))
398404 let orderPriceAsset = order.assetPair.priceAsset
399405 let orderPriceAssetStr = if ((orderPriceAsset == unit))
400406 then "WAVES"
401407 else toBase58String(value(orderPriceAsset))
402408 if (if ((orderAmtAssetStr != amtAssetId))
403409 then true
404410 else (orderPriceAssetStr != priceAssetId))
405411 then throw("Wrong order assets.")
406412 else {
407413 let orderPrice = order.price
408414 let priceDcm = fraction(scale8, priceAssetDcm, amtAssetDcm)
409415 let castedOrderPrice = toScale(orderPrice, scale8, priceDcm)
410416 let isOrderPriceValid = if ((order.orderType == Buy))
411417 then (curPrice >= castedOrderPrice)
412418 else (castedOrderPrice >= curPrice)
413419 true
414420 }
415421 }
416422 }
417423
418424
419425 func commonGet (i) = if ((size(i.payments) != 1))
420426 then throw("exactly 1 payment is expected")
421427 else {
422428 let pmt = value(i.payments[0])
423429 let pmtAssetId = value(pmt.assetId)
424430 let pmtAmt = pmt.amount
425431 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
426432 let outAmAmt = res._1
427433 let outPrAmt = res._2
428434 let poolStatus = parseIntValue(res._9)
429435 let state = res._10
430436 if (if (isGlobalShutdown())
431437 then true
432438 else (poolStatus == PoolShutdown))
433439 then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus)))
434440 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
435441 }
436442
437443
438444 func commonPut (i,slippageTolerance,emitLp) = if ((size(i.payments) != 2))
439445 then throw("exactly 2 payments are expected")
440446 else {
441447 let amAssetPmt = value(i.payments[0])
442448 let prAssetPmt = value(i.payments[1])
443449 let estPut = estimatePutOperation(toBase58String(i.transactionId), slippageTolerance, amAssetPmt.amount, amAssetPmt.assetId, prAssetPmt.amount, prAssetPmt.assetId, toString(i.caller), false, emitLp)
444450 let poolStatus = parseIntValue(estPut._8)
445451 if (if (if (isGlobalShutdown())
446452 then true
447453 else (poolStatus == PoolPutDisabled))
448454 then true
449455 else (poolStatus == PoolShutdown))
450456 then throw(("Put operation is blocked by admin. Status = " + toString(poolStatus)))
451457 else estPut
452458 }
453459
454460
455461 func emit (amount) = {
456462 let emitInv = invoke(factoryContract, "emit", [amount], nil)
457463 if ((emitInv == emitInv))
458464 then {
459465 let emitInvLegacy = match emitInv {
460466 case legacyFactoryContract: Address =>
461467 invoke(legacyFactoryContract, "emit", [amount], nil)
462468 case _ =>
463469 unit
464470 }
465471 if ((emitInvLegacy == emitInvLegacy))
466472 then amount
467473 else throw("Strict value is not equal to itself.")
468474 }
469475 else throw("Strict value is not equal to itself.")
470476 }
471477
472478
473479 func takeFee (amount,fee) = {
474480 let feeAmount = if ((fee == 0))
475481 then 0
476482 else fraction(amount, fee, scale8)
477483 $Tuple2((amount - feeAmount), feeAmount)
478484 }
479485
480486
481487 func calcPutOneToken (paymentAmountRaw,paymentAssetId,userAddress,txId) = {
482488 let isEval = (txId == unit)
483489 let amountBalanceRaw = getAccBalance(assetIdToString(cfgAmountAssetId))
484490 let priceBalanceRaw = getAccBalance(assetIdToString(cfgPriceAssetId))
485491 let paymentInAmountAsset = if ((paymentAssetId == cfgAmountAssetId))
486492 then true
487493 else if ((paymentAssetId == cfgPriceAssetId))
488494 then false
489495 else throwErr("invalid asset")
490- let $t02272523018 = if (isEval)
496+ let $t02296923262 = if (isEval)
491497 then $Tuple2(amountBalanceRaw, priceBalanceRaw)
492498 else if (paymentInAmountAsset)
493499 then $Tuple2((amountBalanceRaw - paymentAmountRaw), priceBalanceRaw)
494500 else $Tuple2(amountBalanceRaw, (priceBalanceRaw - paymentAmountRaw))
495- let amountBalanceOld = $t02272523018._1
496- let priceBalanceOld = $t02272523018._2
497- let $t02302223171 = if (paymentInAmountAsset)
501+ let amountBalanceOld = $t02296923262._1
502+ let priceBalanceOld = $t02296923262._2
503+ let $t02326623415 = if (paymentInAmountAsset)
498504 then $Tuple2(paymentAmountRaw, 0)
499505 else $Tuple2(0, paymentAmountRaw)
500- let amountAssetAmountRaw = $t02302223171._1
501- let priceAssetAmountRaw = $t02302223171._2
506+ let amountAssetAmountRaw = $t02326623415._1
507+ let priceAssetAmountRaw = $t02326623415._2
502508 let amountAssetAmount = takeFee(amountAssetAmountRaw, inFee)._1
503509 let priceAssetAmount = takeFee(priceAssetAmountRaw, inFee)._1
504- let $t02330323367 = takeFee(paymentAmountRaw, inFee)
505- let paymentAmount = $t02330323367._1
506- let feeAmount = $t02330323367._2
510+ let $t02354723611 = takeFee(paymentAmountRaw, inFee)
511+ let paymentAmount = $t02354723611._1
512+ let feeAmount = $t02354723611._2
507513 let amountBalanceNew = (amountBalanceOld + amountAssetAmount)
508514 let priceBalanceNew = (priceBalanceOld + priceAssetAmount)
509515 let priceNewX18 = calcPriceBigInt(toX18(priceBalanceNew, cfgPriceAssetDecimals), toX18(amountBalanceNew, cfgAmountAssetDecimals))
510516 let priceNew = fromX18(priceNewX18, scale8)
511517 let paymentBalance = if (paymentInAmountAsset)
512518 then amountBalanceOld
513519 else priceBalanceOld
514520 let paymentBalanceBigInt = toBigInt(paymentBalance)
515521 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity)
516522 let chechSupply = if ((supplyBigInt > big0))
517523 then true
518524 else throwErr("initial deposit requires all coins")
519525 if ((chechSupply == chechSupply))
520526 then {
521527 let depositBigInt = toBigInt(paymentAmount)
522528 let issueAmount = max([0, toInt(((supplyBigInt * (sqrtBigInt((scale18 + ((depositBigInt * scale18) / paymentBalanceBigInt)), 18, 18, DOWN) - scale18)) / scale18))])
523529 let commonState = if (isEval)
524530 then nil
525531 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))]
526532 let priceOldX18 = calcPriceBigInt(toX18(priceBalanceOld, cfgPriceAssetDecimals), toX18(amountBalanceOld, cfgAmountAssetDecimals))
527533 let priceOld = fromX18(priceOldX18, scale8)
528534 let loss = {
529- let $t02484425011 = if (paymentInAmountAsset)
535+ let $t02508825255 = if (paymentInAmountAsset)
530536 then $Tuple2(amountAssetAmountRaw, amountBalanceOld)
531537 else $Tuple2(priceAssetAmountRaw, priceBalanceOld)
532- let amount = $t02484425011._1
533- let balance = $t02484425011._2
538+ let amount = $t02508825255._1
539+ let balance = $t02508825255._2
534540 let issueAmountBoth = toInt(fraction(supplyBigInt, toBigInt((amount / 2)), toBigInt(balance)))
535541 fraction((issueAmount - issueAmountBoth), scale8, issueAmountBoth)
536542 }
537543 $Tuple4(issueAmount, commonState, feeAmount, loss)
538544 }
539545 else throw("Strict value is not equal to itself.")
540546 }
541547
542548
543549 func calcGetOneToken (outAssetId,paymentAmount,paymentAssetId,userAddress,txId) = {
544550 let isEval = (txId == unit)
545551 let checks = [if ((paymentAssetId == cfgLpAssetId))
546552 then true
547553 else throwErr("invalid lp asset")]
548554 if ((checks == checks))
549555 then {
550556 let outInAmountAsset = if ((outAssetId == cfgAmountAssetId))
551557 then true
552558 else if ((outAssetId == cfgPriceAssetId))
553559 then false
554560 else throwErr("invalid asset")
555561 let balanceBigInt = if (outInAmountAsset)
556562 then toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId)))
557563 else toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId)))
558564 let amBalanceOld = getAccBalance(assetIdToString(cfgAmountAssetId))
559565 let prBalanceOld = getAccBalance(assetIdToString(cfgPriceAssetId))
560566 let outBalance = if (outInAmountAsset)
561567 then amBalanceOld
562568 else prBalanceOld
563569 let outBalanceBigInt = toBigInt(outBalance)
564570 let supplyBigInt = toBigInt(valueOrErrorMessage(assetInfo(cfgLpAssetId), (("asset " + toBase58String(cfgLpAssetId)) + " doesn't exist")).quantity)
565571 let redeemedBigInt = toBigInt(paymentAmount)
566572 let amountRaw = max([0, toInt(((balanceBigInt * (scale18 - pow((scale18 - ((redeemedBigInt * scale18) / supplyBigInt)), 18, big2, 0, 18, DOWN))) / scale18))])
567- let $t02659126647 = takeFee(amountRaw, outFee)
568- let totalAmount = $t02659126647._1
569- let feeAmount = $t02659126647._2
570- let $t02665126877 = if (outInAmountAsset)
573+ let $t02683526891 = takeFee(amountRaw, outFee)
574+ let totalAmount = $t02683526891._1
575+ let feeAmount = $t02683526891._2
576+ let $t02689527121 = if (outInAmountAsset)
571577 then $Tuple4(totalAmount, 0, (amBalanceOld - amountRaw), prBalanceOld)
572578 else $Tuple4(0, totalAmount, amBalanceOld, (prBalanceOld - amountRaw))
573- let outAmAmount = $t02665126877._1
574- let outPrAmount = $t02665126877._2
575- let amBalanceNew = $t02665126877._3
576- let prBalanceNew = $t02665126877._4
579+ let outAmAmount = $t02689527121._1
580+ let outPrAmount = $t02689527121._2
581+ let amBalanceNew = $t02689527121._3
582+ let prBalanceNew = $t02689527121._4
577583 let priceNewX18 = calcPriceBigInt(toX18(prBalanceNew, cfgPriceAssetDecimals), toX18(amBalanceNew, cfgAmountAssetDecimals))
578584 let priceNew = fromX18(priceNewX18, scale8)
579585 let commonState = if (isEval)
580586 then nil
581587 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)]
582588 let priceOldX18 = calcPriceBigInt(toX18(prBalanceOld, cfgPriceAssetDecimals), toX18(amBalanceOld, cfgAmountAssetDecimals))
583589 let priceOld = fromX18(priceOldX18, scale8)
584590 let loss = {
585591 let amountBothInPaymentAsset = (toInt(fraction(balanceBigInt, redeemedBigInt, supplyBigInt)) * 2)
586592 fraction((totalAmount - amountBothInPaymentAsset), scale8, amountBothInPaymentAsset)
587593 }
588594 $Tuple4(totalAmount, commonState, feeAmount, loss)
589595 }
590596 else throw("Strict value is not equal to itself.")
591597 }
592598
593599
594600 func managerPublicKeyOrUnit () = match getString(mpk()) {
595601 case s: String =>
596602 fromBase58String(s)
597603 case _: Unit =>
598604 unit
599605 case _ =>
600606 throw("Match error")
601607 }
602608
603609
604610 func pendingManagerPublicKeyOrUnit () = match getString(pmpk()) {
605611 case s: String =>
606612 fromBase58String(s)
607613 case _: Unit =>
608614 unit
609615 case _ =>
610616 throw("Match error")
611617 }
612618
613619
614620 func isManager (i) = match managerPublicKeyOrUnit() {
615621 case pk: ByteVector =>
616622 (i.callerPublicKey == pk)
617623 case _: Unit =>
618624 (i.caller == this)
619625 case _ =>
620626 throw("Match error")
621627 }
622628
623629
624630 func mustManager (i) = {
625631 let pd = throw("Permission denied")
626632 match managerPublicKeyOrUnit() {
627633 case pk: ByteVector =>
628634 if ((i.callerPublicKey == pk))
629635 then true
630636 else pd
631637 case _: Unit =>
632638 if ((i.caller == this))
633639 then true
634640 else pd
635641 case _ =>
636642 throw("Match error")
637643 }
638644 }
639645
640646
641647 @Callable(i)
642648 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse) = {
643- let $t02855428859 = if ((isReverse == false))
649+ let $t02879829103 = if ((isReverse == false))
644650 then {
645651 let assetOut = getStringOrFail(this, pa())
646652 let assetIn = getStringOrFail(this, aa())
647653 $Tuple2(assetOut, assetIn)
648654 }
649655 else {
650656 let assetOut = getStringOrFail(this, aa())
651657 let assetIn = getStringOrFail(this, pa())
652658 $Tuple2(assetOut, assetIn)
653659 }
654- let assetOut = $t02855428859._1
655- let assetIn = $t02855428859._2
660+ let assetOut = $t02879829103._1
661+ let assetIn = $t02879829103._2
656662 let poolAssetInBalance = getAccBalance(assetIn)
657663 let poolAssetOutBalance = getAccBalance(assetOut)
658664 let amountOut = ((poolAssetOutBalance * cleanAmountIn) / (poolAssetInBalance + cleanAmountIn))
659- $Tuple2(nil, amountOut)
665+ let oldK = (poolAssetInBalance * poolAssetOutBalance)
666+ let newK = ((getAccBalance(assetIn) + cleanAmountIn) * (getAccBalance(assetOut) - amountOut))
667+ let checkK = if ((newK >= oldK))
668+ then true
669+ else throw("new K is fewer error")
670+ if ((checkK == checkK))
671+ then $Tuple2(nil, amountOut)
672+ else throw("Strict value is not equal to itself.")
660673 }
661674
662675
663676
664677 @Callable(i)
665678 func calculateAmountOutForSwapAndSendTokens (cleanAmountIn,isReverse,amountOutMin,addressTo) = {
666679 let checks = [if ((value(i.payments[0]).amount >= cleanAmountIn))
667680 then true
668681 else throwErr("Wrong amount"), if ((i.caller == addressFromStringValue(getStringOrFail(this, swapContract()))))
669682 then true
670683 else throwErr("Permission denied")]
671684 if ((checks == checks))
672685 then {
673686 let pmt = value(i.payments[0])
674687 let assetIn = if ((pmt.assetId == unit))
675688 then toBase58String(toBytes("WAVES"))
676689 else toBase58String(value(pmt.assetId))
677690 let assetOut = if ((isReverse == false))
678691 then getStringOrFail(this, pa())
679692 else getStringOrFail(this, aa())
680693 let poolAssetInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
681694 let poolAssetOutBalance = getAccBalance(assetOut)
682695 let amountOut = ((poolAssetOutBalance * cleanAmountIn) / (poolAssetInBalance + cleanAmountIn))
683- let checkMin = if ((amountOut >= amountOutMin))
696+ let oldK = (poolAssetInBalance * poolAssetOutBalance)
697+ let newK = (getAccBalance(assetIn) * (getAccBalance(assetOut) - amountOut))
698+ let checkK = if ((newK >= oldK))
684699 then true
685- else throw("Exchange result is fewer coins than expected")
686- if ((checkMin == checkMin))
687- then [ScriptTransfer(addressFromStringValue(addressTo), amountOut, if ((assetIn == "WAVES"))
688- then unit
689- else fromBase58String(assetOut))]
700+ else throw("new K is fewer error")
701+ if ((checkK == checkK))
702+ then {
703+ let checkMin = if ((amountOut >= amountOutMin))
704+ then true
705+ else throw("Exchange result is fewer coins than expected")
706+ if ((checkMin == checkMin))
707+ then [ScriptTransfer(addressFromStringValue(addressTo), amountOut, if ((assetIn == "WAVES"))
708+ then unit
709+ else fromBase58String(assetOut))]
710+ else throw("Strict value is not equal to itself.")
711+ }
690712 else throw("Strict value is not equal to itself.")
691713 }
692714 else throw("Strict value is not equal to itself.")
693715 }
694716
695717
696718
697719 @Callable(i)
698720 func setManager (pendingManagerPublicKey) = {
699721 let checkCaller = mustManager(i)
700722 if ((checkCaller == checkCaller))
701723 then {
702724 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
703725 if ((checkManagerPublicKey == checkManagerPublicKey))
704726 then [StringEntry(pmpk(), pendingManagerPublicKey)]
705727 else throw("Strict value is not equal to itself.")
706728 }
707729 else throw("Strict value is not equal to itself.")
708730 }
709731
710732
711733
712734 @Callable(i)
713735 func confirmManager () = {
714736 let pm = pendingManagerPublicKeyOrUnit()
715737 let hasPM = if (isDefined(pm))
716738 then true
717739 else throw("No pending manager")
718740 if ((hasPM == hasPM))
719741 then {
720742 let checkPM = if ((i.callerPublicKey == value(pm)))
721743 then true
722744 else throw("You are not pending manager")
723745 if ((checkPM == checkPM))
724746 then [StringEntry(mpk(), toBase58String(value(pm))), DeleteEntry(pmpk())]
725747 else throw("Strict value is not equal to itself.")
726748 }
727749 else throw("Strict value is not equal to itself.")
728750 }
729751
730752
731753
732754 @Callable(i)
733755 func put (slippageTolerance,shouldAutoStake) = if ((0 > slippageTolerance))
734756 then throw("Invalid slippageTolerance passed")
735757 else {
736758 let estPut = commonPut(i, slippageTolerance, true)
737759 let emitLpAmt = estPut._2
738760 let lpAssetId = estPut._7
739761 let state = estPut._9
740762 let amDiff = estPut._10
741763 let prDiff = estPut._11
742764 let amId = estPut._12
743765 let prId = estPut._13
744766 let emitInv = invoke(factoryContract, "emit", [emitLpAmt], nil)
745767 if ((emitInv == emitInv))
746768 then {
747769 let emitInvLegacy = match emitInv {
748770 case legacyFactoryContract: Address =>
749771 invoke(legacyFactoryContract, "emit", [emitLpAmt], nil)
750772 case _ =>
751773 unit
752774 }
753775 if ((emitInvLegacy == emitInvLegacy))
754776 then {
755777 let slippageAInv = if ((amDiff > 0))
756778 then invoke(slippageContract, "put", nil, [AttachedPayment(amId, amDiff)])
757779 else nil
758780 if ((slippageAInv == slippageAInv))
759781 then {
760782 let slippagePInv = if ((prDiff > 0))
761783 then invoke(slippageContract, "put", nil, [AttachedPayment(prId, prDiff)])
762784 else nil
763785 if ((slippagePInv == slippagePInv))
764786 then {
765787 let lpTransfer = if (shouldAutoStake)
766788 then {
767789 let slpStakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
768790 if ((slpStakeInv == slpStakeInv))
769791 then nil
770792 else throw("Strict value is not equal to itself.")
771793 }
772794 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
773795 (state ++ lpTransfer)
774796 }
775797 else throw("Strict value is not equal to itself.")
776798 }
777799 else throw("Strict value is not equal to itself.")
778800 }
779801 else throw("Strict value is not equal to itself.")
780802 }
781803 else throw("Strict value is not equal to itself.")
782804 }
783805
784806
785807
786808 @Callable(i)
787809 func putForFree (maxSlippage) = if ((0 > maxSlippage))
788810 then throw("Invalid value passed")
789811 else {
790812 let estPut = commonPut(i, maxSlippage, false)
791813 estPut._9
792814 }
793815
794816
795817
796818 @Callable(i)
797819 func putOneTkn (minOutAmount,autoStake) = {
798820 let isPoolOneTokenOperationsDisabled = {
799821 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
800822 if ($isInstanceOf(@, "Boolean"))
801823 then @
802824 else throw(($getType(@) + " couldn't be cast to Boolean"))
803825 }
804826 let isPutDisabled = if (if (if (isGlobalShutdown())
805827 then true
806828 else (cfgPoolStatus == PoolPutDisabled))
807829 then true
808830 else (cfgPoolStatus == PoolShutdown))
809831 then true
810832 else isPoolOneTokenOperationsDisabled
811833 let checks = [if (if (!(isPutDisabled))
812834 then true
813835 else isManager(i))
814836 then true
815837 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
816838 then true
817839 else throwErr("exactly 1 payment are expected")]
818840 if ((checks == checks))
819841 then {
820842 let payment = i.payments[0]
821843 let paymentAssetId = payment.assetId
822844 let paymentAmountRaw = payment.amount
823845 let userAddress = i.caller
824846 let txId = i.transactionId
825- let $t03366433794 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
826- if (($t03366433794 == $t03366433794))
847+ let $t03422234352 = calcPutOneToken(paymentAmountRaw, paymentAssetId, userAddress, txId)
848+ if (($t03422234352 == $t03422234352))
827849 then {
828- let bonus = $t03366433794._4
829- let feeAmount = $t03366433794._3
830- let commonState = $t03366433794._2
831- let emitAmountEstimated = $t03366433794._1
850+ let bonus = $t03422234352._4
851+ let feeAmount = $t03422234352._3
852+ let commonState = $t03422234352._2
853+ let emitAmountEstimated = $t03422234352._1
832854 let emitAmount = if (if ((minOutAmount > 0))
833855 then (minOutAmount > emitAmountEstimated)
834856 else false)
835857 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
836858 else emitAmountEstimated
837859 let emitInv = emit(emitAmount)
838860 if ((emitInv == emitInv))
839861 then {
840862 let lpTransfer = if (autoStake)
841863 then {
842864 let stakeInv = invoke(stakingContract, "stake", nil, [AttachedPayment(cfgLpAssetId, emitAmount)])
843865 if ((stakeInv == stakeInv))
844866 then nil
845867 else throw("Strict value is not equal to itself.")
846868 }
847869 else [ScriptTransfer(i.caller, emitAmount, cfgLpAssetId)]
848870 let sendFee = if ((feeAmount > 0))
849871 then [ScriptTransfer(feeCollectorAddress, feeAmount, paymentAssetId)]
850872 else nil
851873 $Tuple2(((commonState ++ lpTransfer) ++ sendFee), emitAmount)
852874 }
853875 else throw("Strict value is not equal to itself.")
854876 }
855877 else throw("Strict value is not equal to itself.")
856878 }
857879 else throw("Strict value is not equal to itself.")
858880 }
859881
860882
861883
862884 @Callable(i)
863885 func putOneTknREADONLY (paymentAssetId,paymentAmountRaw) = {
864- let $t03452334658 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
865- let emitAmountEstimated = $t03452334658._1
866- let commonState = $t03452334658._2
867- let feeAmount = $t03452334658._3
868- let bonus = $t03452334658._4
886+ let $t03508135216 = calcPutOneToken(paymentAmountRaw, parseAssetId(paymentAssetId), unit, unit)
887+ let emitAmountEstimated = $t03508135216._1
888+ let commonState = $t03508135216._2
889+ let feeAmount = $t03508135216._3
890+ let bonus = $t03508135216._4
869891 $Tuple2(nil, $Tuple3(emitAmountEstimated, feeAmount, bonus))
870892 }
871893
872894
873895
874896 @Callable(i)
875897 func getOneTkn (outAssetIdStr,minOutAmount) = {
876898 let isPoolOneTokenOperationsDisabled = {
877899 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
878900 if ($isInstanceOf(@, "Boolean"))
879901 then @
880902 else throw(($getType(@) + " couldn't be cast to Boolean"))
881903 }
882904 let isGetDisabled = if (if (isGlobalShutdown())
883905 then true
884906 else (cfgPoolStatus == PoolShutdown))
885907 then true
886908 else isPoolOneTokenOperationsDisabled
887909 let checks = [if (if (!(isGetDisabled))
888910 then true
889911 else isManager(i))
890912 then true
891913 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
892914 then true
893915 else throwErr("exactly 1 payment are expected")]
894916 if ((checks == checks))
895917 then {
896918 let outAssetId = parseAssetId(outAssetIdStr)
897919 let payment = i.payments[0]
898920 let paymentAssetId = payment.assetId
899921 let paymentAmount = payment.amount
900922 let userAddress = i.caller
901923 let txId = i.transactionId
902- let $t03546335598 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
903- if (($t03546335598 == $t03546335598))
924+ let $t03602136156 = calcGetOneToken(outAssetId, paymentAmount, paymentAssetId, userAddress, txId)
925+ if (($t03602136156 == $t03602136156))
904926 then {
905- let bonus = $t03546335598._4
906- let feeAmount = $t03546335598._3
907- let commonState = $t03546335598._2
908- let amountEstimated = $t03546335598._1
927+ let bonus = $t03602136156._4
928+ let feeAmount = $t03602136156._3
929+ let commonState = $t03602136156._2
930+ let amountEstimated = $t03602136156._1
909931 let amount = if (if ((minOutAmount > 0))
910932 then (minOutAmount > amountEstimated)
911933 else false)
912934 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
913935 else amountEstimated
914936 let burnInv = invoke(factoryContract, "burn", [paymentAmount], [AttachedPayment(paymentAssetId, paymentAmount)])
915937 if ((burnInv == burnInv))
916938 then {
917939 let assetTransfer = [ScriptTransfer(userAddress, amount, outAssetId)]
918940 let sendFee = if ((feeAmount > 0))
919941 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
920942 else nil
921943 $Tuple2(((commonState ++ assetTransfer) ++ sendFee), amount)
922944 }
923945 else throw("Strict value is not equal to itself.")
924946 }
925947 else throw("Strict value is not equal to itself.")
926948 }
927949 else throw("Strict value is not equal to itself.")
928950 }
929951
930952
931953
932954 @Callable(i)
933955 func getOneTknREADONLY (outAssetId,paymentAmount) = {
934- let $t03623336371 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
935- let amountEstimated = $t03623336371._1
936- let commonState = $t03623336371._2
937- let feeAmount = $t03623336371._3
938- let bonus = $t03623336371._4
956+ let $t03679136929 = calcGetOneToken(parseAssetId(outAssetId), paymentAmount, cfgLpAssetId, unit, unit)
957+ let amountEstimated = $t03679136929._1
958+ let commonState = $t03679136929._2
959+ let feeAmount = $t03679136929._3
960+ let bonus = $t03679136929._4
939961 $Tuple2(nil, $Tuple3(amountEstimated, feeAmount, bonus))
940962 }
941963
942964
943965
944966 @Callable(i)
945967 func unstakeAndGetOneTkn (unstakeAmount,outAssetIdStr,minOutAmount) = {
946968 let isPoolOneTokenOperationsDisabled = {
947969 let @ = invoke(factoryContract, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
948970 if ($isInstanceOf(@, "Boolean"))
949971 then @
950972 else throw(($getType(@) + " couldn't be cast to Boolean"))
951973 }
952974 let isGetDisabled = if (if (isGlobalShutdown())
953975 then true
954976 else (cfgPoolStatus == PoolShutdown))
955977 then true
956978 else isPoolOneTokenOperationsDisabled
957979 let checks = [if (if (!(isGetDisabled))
958980 then true
959981 else isManager(i))
960982 then true
961983 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
962984 then true
963985 else throwErr("no payments are expected")]
964986 if ((checks == checks))
965987 then {
966988 let outAssetId = parseAssetId(outAssetIdStr)
967989 let userAddress = i.caller
968990 let txId = i.transactionId
969991 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
970992 if ((unstakeInv == unstakeInv))
971993 then {
972- let $t03719637329 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
973- if (($t03719637329 == $t03719637329))
994+ let $t03775437887 = calcGetOneToken(outAssetId, unstakeAmount, cfgLpAssetId, userAddress, txId)
995+ if (($t03775437887 == $t03775437887))
974996 then {
975- let bonus = $t03719637329._4
976- let feeAmount = $t03719637329._3
977- let commonState = $t03719637329._2
978- let amountEstimated = $t03719637329._1
997+ let bonus = $t03775437887._4
998+ let feeAmount = $t03775437887._3
999+ let commonState = $t03775437887._2
1000+ let amountEstimated = $t03775437887._1
9791001 let amount = if (if ((minOutAmount > 0))
9801002 then (minOutAmount > amountEstimated)
9811003 else false)
9821004 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
9831005 else amountEstimated
9841006 let burnInv = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
9851007 if ((burnInv == burnInv))
9861008 then {
9871009 let assetTransfer = [ScriptTransfer(i.caller, amount, outAssetId)]
9881010 let sendFee = if ((feeAmount > 0))
9891011 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetId)]
9901012 else nil
9911013 $Tuple2(((commonState ++ assetTransfer) ++ sendFee), amount)
9921014 }
9931015 else throw("Strict value is not equal to itself.")
9941016 }
9951017 else throw("Strict value is not equal to itself.")
9961018 }
9971019 else throw("Strict value is not equal to itself.")
9981020 }
9991021 else throw("Strict value is not equal to itself.")
10001022 }
10011023
10021024
10031025
10041026 @Callable(i)
10051027 func get () = {
10061028 let res = commonGet(i)
10071029 let outAmtAmt = res._1
10081030 let outPrAmt = res._2
10091031 let pmtAmt = res._3
10101032 let pmtAssetId = res._4
10111033 let state = res._5
10121034 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
10131035 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
10141036 then state
10151037 else throw("Strict value is not equal to itself.")
10161038 }
10171039
10181040
10191041
10201042 @Callable(i)
10211043 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
10221044 let res = commonGet(i)
10231045 let outAmAmt = res._1
10241046 let outPrAmt = res._2
10251047 let pmtAmt = res._3
10261048 let pmtAssetId = res._4
10271049 let state = res._5
10281050 if ((noLessThenAmtAsset > outAmAmt))
10291051 then throw(((("noLessThenAmtAsset failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
10301052 else if ((noLessThenPriceAsset > outPrAmt))
10311053 then throw(((("noLessThenPriceAsset failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
10321054 else {
10331055 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
10341056 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
10351057 then state
10361058 else throw("Strict value is not equal to itself.")
10371059 }
10381060 }
10391061
10401062
10411063
10421064 @Callable(i)
10431065 func unstakeAndGet (amount) = {
10441066 let checkPayments = if ((size(i.payments) != 0))
10451067 then throw("No payments are expected")
10461068 else true
10471069 if ((checkPayments == checkPayments))
10481070 then {
10491071 let cfg = getPoolConfig()
10501072 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
10511073 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(lpAssetId), amount], nil)
10521074 if ((unstakeInv == unstakeInv))
10531075 then {
10541076 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
10551077 let poolStatus = parseIntValue(res._9)
10561078 let state = res._10
10571079 let checkPoolStatus = if (if (isGlobalShutdown())
10581080 then true
10591081 else (poolStatus == PoolShutdown))
10601082 then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus)))
10611083 else true
10621084 if ((checkPoolStatus == checkPoolStatus))
10631085 then {
10641086 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
10651087 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
10661088 then state
10671089 else throw("Strict value is not equal to itself.")
10681090 }
10691091 else throw("Strict value is not equal to itself.")
10701092 }
10711093 else throw("Strict value is not equal to itself.")
10721094 }
10731095 else throw("Strict value is not equal to itself.")
10741096 }
10751097
10761098
10771099
10781100 @Callable(i)
10791101 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
10801102 let isGetDisabled = if (isGlobalShutdown())
10811103 then true
10821104 else (cfgPoolStatus == PoolShutdown)
10831105 let checks = [if (!(isGetDisabled))
10841106 then true
10851107 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
10861108 then true
10871109 else throw("no payments are expected")]
10881110 if ((checks == checks))
10891111 then {
10901112 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
10911113 if ((unstakeInv == unstakeInv))
10921114 then {
10931115 let res = estimateGetOperation(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
10941116 let outAmAmt = res._1
10951117 let outPrAmt = res._2
10961118 let state = res._10
10971119 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
10981120 then true
10991121 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
11001122 then true
11011123 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
11021124 if ((checkAmounts == checkAmounts))
11031125 then {
11041126 let burnLPAssetOnFactory = invoke(factoryContract, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
11051127 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11061128 then state
11071129 else throw("Strict value is not equal to itself.")
11081130 }
11091131 else throw("Strict value is not equal to itself.")
11101132 }
11111133 else throw("Strict value is not equal to itself.")
11121134 }
11131135 else throw("Strict value is not equal to itself.")
11141136 }
11151137
11161138
11171139
11181140 @Callable(i)
11191141 func activate (amtAssetStr,priceAssetStr) = if ((toString(i.caller) != toString(factoryContract)))
11201142 then throw("permissions denied")
11211143 else $Tuple2([StringEntry(aa(), amtAssetStr), StringEntry(pa(), priceAssetStr)], "success")
11221144
11231145
11241146
11251147 @Callable(i)
11261148 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, getPoolConfig())
11271149
11281150
11291151
11301152 @Callable(i)
11311153 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
11321154
11331155
11341156
11351157 @Callable(i)
11361158 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
11371159 let prices = calcPrices(amAmt, prAmt, lpAmt)
11381160 $Tuple2(nil, [toString(prices[0]), toString(prices[1]), toString(prices[2])])
11391161 }
11401162
11411163
11421164
11431165 @Callable(i)
11441166 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(toX18(origVal, origScaleMult)))
11451167
11461168
11471169
11481170 @Callable(i)
11491171 func fromX18WrapperREADONLY (val,resultScaleMult) = $Tuple2(nil, fromX18(parseBigIntValue(val), resultScaleMult))
11501172
11511173
11521174
11531175 @Callable(i)
11541176 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(calcPriceBigInt(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
11551177
11561178
11571179
11581180 @Callable(i)
11591181 func estimatePutOperationWrapperREADONLY (txId58,slippageTolerance,inAmAssetAmt,inAmAssetId,inPrAssetAmt,inPrAssetId,userAddress,isEvaluate,emitLp) = $Tuple2(nil, estimatePutOperation(txId58, slippageTolerance, inAmAssetAmt, inAmAssetId, inPrAssetAmt, inPrAssetId, userAddress, isEvaluate, emitLp))
11601182
11611183
11621184
11631185 @Callable(i)
11641186 func estimateGetOperationWrapperREADONLY (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
11651187 let res = estimateGetOperation(txId58, pmtAssetId, pmtLpAmt, addressFromStringValue(userAddress))
11661188 $Tuple2(nil, $Tuple10(res._1, res._2, res._3, res._4, res._5, res._6, res._7, toString(res._8), res._9, res._10))
11671189 }
11681190
11691191
11701192
11711193 @Callable(i)
11721194 func statsREADONLY () = {
11731195 let cfg = getPoolConfig()
11741196 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
11751197 let amtAssetId = cfg[idxAmtAssetId]
11761198 let priceAssetId = cfg[idxPriceAssetId]
11771199 let iAmtAssetId = cfg[idxIAmtAssetId]
11781200 let iPriceAssetId = cfg[idxIPriceAssetId]
11791201 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
11801202 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
11811203 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
11821204 let accAmtAssetBalance = getAccBalance(amtAssetId)
11831205 let accPriceAssetBalance = getAccBalance(priceAssetId)
11841206 let pricesList = if ((poolLPBalance == 0))
11851207 then [zeroBigInt, zeroBigInt, zeroBigInt]
11861208 else calcPrices(accAmtAssetBalance, accPriceAssetBalance, poolLPBalance)
11871209 let curPrice = 0
11881210 let lpAmtAssetShare = fromX18(pricesList[1], scale8)
11891211 let lpPriceAssetShare = fromX18(pricesList[2], scale8)
11901212 let poolWeight = value(getInteger(factoryContract, keyPoolWeight(toString(this))))
11911213 $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))
11921214 }
11931215
11941216
11951217
11961218 @Callable(i)
11971219 func evaluatePutByAmountAssetREADONLY (inAmAssetAmt) = {
11981220 let cfg = getPoolConfig()
11991221 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
12001222 let amAssetIdStr = cfg[idxAmtAssetId]
12011223 let amAssetId = fromBase58String(amAssetIdStr)
12021224 let prAssetIdStr = cfg[idxPriceAssetId]
12031225 let prAssetId = fromBase58String(prAssetIdStr)
12041226 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
12051227 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
12061228 let poolStatus = cfg[idxPoolStatus]
12071229 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
12081230 let accAmtAssetBalance = getAccBalance(amAssetIdStr)
12091231 let accPriceAssetBalance = getAccBalance(prAssetIdStr)
12101232 let amtAssetAmtX18 = toX18(accAmtAssetBalance, amtAssetDcm)
12111233 let priceAssetAmtX18 = toX18(accPriceAssetBalance, priceAssetDcm)
12121234 let curPriceX18 = if ((poolLPBalance == 0))
12131235 then zeroBigInt
12141236 else calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18)
12151237 let inAmAssetAmtX18 = toX18(inAmAssetAmt, amtAssetDcm)
12161238 let inPrAssetAmtX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
12171239 let inPrAssetAmt = fromX18(inPrAssetAmtX18, priceAssetDcm)
12181240 let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false)
12191241 let calcLpAmt = estPut._1
12201242 let curPriceCalc = estPut._3
12211243 let amBalance = estPut._4
12221244 let prBalance = estPut._5
12231245 let lpEmission = estPut._6
12241246 $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))
12251247 }
12261248
12271249
12281250
12291251 @Callable(i)
12301252 func evaluatePutByPriceAssetREADONLY (inPrAssetAmt) = {
12311253 let cfg = getPoolConfig()
12321254 let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId])
12331255 let amAssetIdStr = cfg[idxAmtAssetId]
12341256 let amAssetId = fromBase58String(amAssetIdStr)
12351257 let prAssetIdStr = cfg[idxPriceAssetId]
12361258 let prAssetId = fromBase58String(prAssetIdStr)
12371259 let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm])
12381260 let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm])
12391261 let poolStatus = cfg[idxPoolStatus]
12401262 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
12411263 let amBalanceRaw = getAccBalance(amAssetIdStr)
12421264 let prBalanceRaw = getAccBalance(prAssetIdStr)
12431265 let amBalanceRawX18 = toX18(amBalanceRaw, amtAssetDcm)
12441266 let prBalanceRawX18 = toX18(prBalanceRaw, priceAssetDcm)
12451267 let curPriceX18 = if ((poolLPBalance == 0))
12461268 then zeroBigInt
12471269 else calcPriceBigInt(prBalanceRawX18, amBalanceRawX18)
12481270 let inPrAssetAmtX18 = toX18(inPrAssetAmt, priceAssetDcm)
12491271 let inAmAssetAmtX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
12501272 let inAmAssetAmt = fromX18(inAmAssetAmtX18, amtAssetDcm)
12511273 let estPut = estimatePutOperation("", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false)
12521274 let calcLpAmt = estPut._1
12531275 let curPriceCalc = estPut._3
12541276 let amBalance = estPut._4
12551277 let prBalance = estPut._5
12561278 let lpEmission = estPut._6
12571279 $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))
12581280 }
12591281
12601282
12611283
12621284 @Callable(i)
12631285 func evaluateGetREADONLY (paymentLpAssetId,paymentLpAmt) = {
12641286 let res = estimateGetOperation("", paymentLpAssetId, paymentLpAmt, this)
12651287 let outAmAmt = res._1
12661288 let outPrAmt = res._2
12671289 let amBalance = res._5
12681290 let prBalance = res._6
12691291 let lpEmission = res._7
12701292 let curPrice = res._8
12711293 let poolStatus = parseIntValue(res._9)
12721294 $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))
12731295 }
12741296
12751297
12761298 @Verifier(tx)
12771299 func verify () = {
12781300 let targetPublicKey = match managerPublicKeyOrUnit() {
12791301 case pk: ByteVector =>
12801302 pk
12811303 case _: Unit =>
12821304 tx.senderPublicKey
12831305 case _ =>
12841306 throw("Match error")
12851307 }
12861308 match tx {
12871309 case order: Order =>
12881310 let matcherPub = getMatcherPubOrFail()
12891311 let orderValid = validateMatcherOrderAllowed(order)
12901312 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
12911313 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
12921314 if (if (if (orderValid)
12931315 then senderValid
12941316 else false)
12951317 then matcherValid
12961318 else false)
12971319 then true
12981320 else throwOrderError(orderValid, senderValid, matcherValid)
12991321 case s: SetScriptTransaction =>
13001322 let newHash = blake2b256(value(s.script))
13011323 let allowedHash = fromBase64String(value(getString(factoryContract, keyAllowedLpScriptHash())))
13021324 let currentHash = scriptHash(this)
13031325 if (if ((allowedHash == newHash))
13041326 then (currentHash != newHash)
13051327 else false)
13061328 then true
13071329 else sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
13081330 case _ =>
13091331 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
13101332 }
13111333 }
13121334

github/deemru/w8io/026f985 
228.37 ms