tx · CEfjh6jK6sJ5UT4v2FFrtmXHhYjjU3T8MW2UVMTmL7wG

3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT:  -0.03600000 Waves

2022.12.07 10:26 [2349628] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves

{ "type": 13, "id": "CEfjh6jK6sJ5UT4v2FFrtmXHhYjjU3T8MW2UVMTmL7wG", "fee": 3600000, "feeAssetId": null, "timestamp": 1670398021325, "version": 1, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "3Pi7F6y1GYirvyuTQYCnKsipinSi5Wqg9issAoe8Nacekp1WWrFLEwkJBoRM1bvrDez7eRSTXpjMHMK4T8nWAkJ3" ], "script": "base64:BgLNKAgCEgMKAQgSAwoBCBIAEgQKAgEEEgQKAgEEEgMKAQESABIECgIIARIAEgQKAggBEgQKAggBEgQKAgEBEgMKAQESBQoDAQEBEgUKAwEIARIECgIBCBIECgIBCBIECgIICBIECgIICBIECgIIARIAEgMKAQgSBQoDAQEBEgQKAggBEgQKAgEBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEIEgAiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgRiaWcwIgRiaWcxIgRiaWcyIgRiaWczIgRiaWc0IgpzbGlwcGFnZTREIgt3YXZlc1N0cmluZyIFQW11bHQiBURjb252IgNTRVAiBUVNUFRZIgpQb29sQWN0aXZlIgpQb29sUHV0RGlzIg5Qb29sTWF0Y2hlckRpcyIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyIJaWR4UG9vbFN0IglpZHhMUEFzSWQiCWlkeEFtQXNJZCIJaWR4UHJBc0lkIgtpZHhBbXRBc0RjbSINaWR4UHJpY2VBc0RjbSILaWR4SUFtdEFzSWQiDWlkeElQcmljZUFzSWQi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84, "height": 2349628, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5G9XsAa4Krrnpvq1Xpcg9j9MGxhucVdjDXPHbygZyPxC Next: 3fxAE1V8ZcKjxvj8KcJ98NozrcCVL72USbdwGzKNm1L2 Diff:
OldNewDifferences
772772 let pmt = value(payments[0])
773773 let pmtAssetId = value(pmt.assetId)
774774 let pmtAmt = pmt.amount
775- let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(pmtAmt))
776- let txId58 = toBase58String(transactionId)
777- if ((lpId != toBase58String(pmtAssetId)))
778- then throw("Wrong LP")
779- else {
780- let amBalance = getAccBalance(amId)
781- let prBalance = getAccBalance(prId)
782- let $t02999730108 = {
783- let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
784- if ($isInstanceOf(@, "(Int, Int)"))
785- then @
786- else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
787- }
788- if (($t02999730108 == $t02999730108))
789- then {
790- let feeAmount = $t02999730108._2
791- let totalGet = $t02999730108._1
792- let totalAmount = if (if ((minOutAmount > 0))
793- then (minOutAmount > totalGet)
794- else false)
795- then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
796- else totalGet
797- let $t03029830605 = if ((outAssetId == amId))
798- then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
799- else if ((outAssetId == prId))
800- then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
801- else throw("invalid out asset id")
802- let outAm = $t03029830605._1
803- let outPr = $t03029830605._2
804- let amBalanceNew = $t03029830605._3
805- let prBalanceNew = $t03029830605._4
806- let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
807- let curPr = f1(curPrX18, scale8)
808- let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
809- then unit
810- else fromBase58String(outAssetId)
811- let sendFeeToMatcher = if ((feeAmount > 0))
812- then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
813- else nil
814- let state = ([ScriptTransfer(userAddress, totalAmount, outAssetIdOrWaves), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAm, outPr, pmtAmt, curPr, height, lastBlock.timestamp)), IntegerEntry(pl(), curPr), IntegerEntry(ph(height, lastBlock.timestamp), curPr)] ++ sendFeeToMatcher)
815- if ((state == state))
775+ let currentDLp = calcCurrentDLp(big0, big0, big0)
776+ if ((currentDLp == currentDLp))
777+ then {
778+ let txId58 = toBase58String(transactionId)
779+ if ((lpId != toBase58String(pmtAssetId)))
780+ then throw("Wrong LP")
781+ else {
782+ let amBalance = getAccBalance(amId)
783+ let prBalance = getAccBalance(prId)
784+ let $t02997130082 = {
785+ let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
786+ if ($isInstanceOf(@, "(Int, Int)"))
787+ then @
788+ else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
789+ }
790+ if (($t02997130082 == $t02997130082))
816791 then {
817- let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
818- if ((burn == burn))
792+ let feeAmount = $t02997130082._2
793+ let totalGet = $t02997130082._1
794+ let totalAmount = if (if ((minOutAmount > 0))
795+ then (minOutAmount > totalGet)
796+ else false)
797+ then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
798+ else totalGet
799+ let $t03027230579 = if ((outAssetId == amId))
800+ then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
801+ else if ((outAssetId == prId))
802+ then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
803+ else throw("invalid out asset id")
804+ let outAm = $t03027230579._1
805+ let outPr = $t03027230579._2
806+ let amBalanceNew = $t03027230579._3
807+ let prBalanceNew = $t03027230579._4
808+ let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
809+ let curPr = f1(curPrX18, scale8)
810+ let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
811+ then unit
812+ else fromBase58String(outAssetId)
813+ let sendFeeToMatcher = if ((feeAmount > 0))
814+ then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
815+ else nil
816+ let state = ([ScriptTransfer(userAddress, totalAmount, outAssetIdOrWaves), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAm, outPr, pmtAmt, curPr, height, lastBlock.timestamp)), IntegerEntry(pl(), curPr), IntegerEntry(ph(height, lastBlock.timestamp), curPr)] ++ sendFeeToMatcher)
817+ if ((state == state))
819818 then {
820- let $t03139031740 = {
821- let feeAmountForCalc = if ((this == feeCollectorAddress))
822- then 0
823- else feeAmount
824- let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId))
825- then true
826- else false
827- if (outInAmountAsset)
828- then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
829- else $Tuple2(0, -((totalGet + feeAmountForCalc)))
830- }
831- let amountAssetBalanceDelta = $t03139031740._1
832- let priceAssetBalanceDelta = $t03139031740._2
833- let $t03174331851 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
834- let refreshDLpActions = $t03174331851._1
835- let updatedDLp = $t03174331851._2
836- let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
837- if ((isUpdatedDLpValid == isUpdatedDLpValid))
838- then $Tuple2((state ++ refreshDLpActions), totalAmount)
819+ let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
820+ if ((burn == burn))
821+ then {
822+ let $t03136431714 = {
823+ let feeAmountForCalc = if ((this == feeCollectorAddress))
824+ then 0
825+ else feeAmount
826+ let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId))
827+ then true
828+ else false
829+ if (outInAmountAsset)
830+ then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
831+ else $Tuple2(0, -((totalGet + feeAmountForCalc)))
832+ }
833+ let amountAssetBalanceDelta = $t03136431714._1
834+ let priceAssetBalanceDelta = $t03136431714._2
835+ let $t03171731825 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
836+ let refreshDLpActions = $t03171731825._1
837+ let updatedDLp = $t03171731825._2
838+ let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
839+ if ((isUpdatedDLpValid == isUpdatedDLpValid))
840+ then $Tuple2((state ++ refreshDLpActions), totalAmount)
841+ else throw("Strict value is not equal to itself.")
842+ }
839843 else throw("Strict value is not equal to itself.")
840844 }
841845 else throw("Strict value is not equal to itself.")
842846 }
843847 else throw("Strict value is not equal to itself.")
844848 }
845- else throw("Strict value is not equal to itself.")
846849 }
850+ else throw("Strict value is not equal to itself.")
847851 }
848852
849853
990994 else throw("Strict value is not equal to itself.")
991995 }
992996 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
993- let $t03570735772 = refreshDLpInternal(0, 0, 0)
994- let refreshDLpActions = $t03570735772._1
995- let updatedDLp = $t03570735772._2
997+ let $t03568135746 = refreshDLpInternal(0, 0, 0)
998+ let refreshDLpActions = $t03568135746._1
999+ let updatedDLp = $t03568135746._2
9961000 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
9971001 if ((isUpdatedDLpValid == isUpdatedDLpValid))
9981002 then ((state ++ lpTrnsfr) ++ refreshDLpActions)
10481052 let pmt = value(i.payments[0])
10491053 let pmtAssetId = toBase58String(value(pmt.assetId))
10501054 let pmtAmt = pmt.amount
1051- let $t03690937067 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1052- if (($t03690937067 == $t03690937067))
1055+ let $t03688337041 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1056+ if (($t03688337041 == $t03688337041))
10531057 then {
1054- let feeAmount = $t03690937067._3
1055- let state = $t03690937067._2
1056- let estimLP = $t03690937067._1
1058+ let feeAmount = $t03688337041._3
1059+ let state = $t03688337041._2
1060+ let estimLP = $t03688337041._1
10571061 let emitLpAmt = if (if ((minOutAmount > 0))
10581062 then (minOutAmount > estimLP)
10591063 else false)
10811085 let sendFeeToMatcher = if ((feeAmount > 0))
10821086 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
10831087 else nil
1084- let $t03788238231 = if ((this == feeCollectorAddress))
1088+ let $t03785638205 = if ((this == feeCollectorAddress))
10851089 then $Tuple2(0, 0)
10861090 else {
10871091 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
10911095 then $Tuple2(-(feeAmount), 0)
10921096 else $Tuple2(0, -(feeAmount))
10931097 }
1094- let amountAssetBalanceDelta = $t03788238231._1
1095- let priceAssetBalanceDelta = $t03788238231._2
1096- let $t03823438342 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1097- let refreshDLpActions = $t03823438342._1
1098- let updatedDLp = $t03823438342._2
1098+ let amountAssetBalanceDelta = $t03785638205._1
1099+ let priceAssetBalanceDelta = $t03785638205._2
1100+ let $t03820838316 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1101+ let refreshDLpActions = $t03820838316._1
1102+ let updatedDLp = $t03820838316._2
10991103 $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
11001104 }
11011105 else throw("Strict value is not equal to itself.")
11221126 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
11231127 if ((currentDLp == currentDLp))
11241128 then {
1125- let $t03930139366 = refreshDLpInternal(0, 0, 0)
1126- let refreshDLpActions = $t03930139366._1
1127- let updatedDLp = $t03930139366._2
1129+ let $t03927539340 = refreshDLpInternal(0, 0, 0)
1130+ let refreshDLpActions = $t03927539340._1
1131+ let updatedDLp = $t03927539340._2
11281132 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
11291133 if ((isUpdatedDLpValid == isUpdatedDLpValid))
11301134 then (state ++ refreshDLpActions)
11471151 if ((b == b))
11481152 then {
11491153 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(pmtAmt))
1150- let $t04015540237 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1151- let refreshDLpActions = $t04015540237._1
1152- let updatedDLp = $t04015540237._2
1154+ let $t04012940211 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1155+ let refreshDLpActions = $t04012940211._1
1156+ let updatedDLp = $t04012940211._2
11531157 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
11541158 if ((isUpdatedDLpValid == isUpdatedDLpValid))
11551159 then (state ++ refreshDLpActions)
11821186 else throwErr("exactly 1 payment are expected")]
11831187 if ((checks == checks))
11841188 then {
1185- let $t04085541010 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1186- let state = $t04085541010._1
1187- let totalAmount = $t04085541010._2
1189+ let $t04082940984 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1190+ let state = $t04082940984._1
1191+ let totalAmount = $t04082940984._2
11881192 $Tuple2(state, totalAmount)
11891193 }
11901194 else throw("Strict value is not equal to itself.")
12011205 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
12021206 then {
12031207 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1204- let $t04153441598 = refreshDLpInternal(0, 0, 0)
1205- let dLpUpdateActions = $t04153441598._1
1206- let updatedDLp = $t04153441598._2
1208+ let $t04150841572 = refreshDLpInternal(0, 0, 0)
1209+ let dLpUpdateActions = $t04150841572._1
1210+ let updatedDLp = $t04150841572._2
12071211 let actions = if ((dLp != updatedDLp))
12081212 then dLpUpdateActions
12091213 else throwErr("nothing to refresh")
12321236 let newY = getYD(xp, index, D1)
12331237 let dy = (xp[index] - newY)
12341238 let totalGetRaw = max([0, toInt((dy - big1))])
1235- let $t04249842547 = takeFee(totalGetRaw)
1236- let totalGet = $t04249842547._1
1237- let feeAmount = $t04249842547._2
1239+ let $t04247242521 = takeFee(totalGetRaw)
1240+ let totalGet = $t04247242521._1
1241+ let feeAmount = $t04247242521._2
12381242 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
12391243 }
12401244
12481252 let lpId = poolConfig[idxLPAsId]
12491253 let amBalance = getAccBalance(amId)
12501254 let prBalance = getAccBalance(prId)
1251- let $t04289243007 = {
1255+ let $t04286642981 = {
12521256 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
12531257 if ($isInstanceOf(@, "(Int, Int)"))
12541258 then @
12551259 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
12561260 }
1257- let totalGet = $t04289243007._1
1258- let feeAmount = $t04289243007._2
1261+ let totalGet = $t04286642981._1
1262+ let feeAmount = $t04286642981._2
12591263 let r = ego("", lpId, lpAssetAmount, this)
12601264 let outAmAmt = r._1
12611265 let outPrAmt = r._2
12871291 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
12881292 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
12891293 then {
1290- let $t04417544256 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1291- let refreshDLpActions = $t04417544256._1
1292- let updatedDLp = $t04417544256._2
1294+ let $t04414944230 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1295+ let refreshDLpActions = $t04414944230._1
1296+ let updatedDLp = $t04414944230._2
12931297 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12941298 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12951299 then (state ++ refreshDLpActions)
13311335 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
13321336 if ((burnA == burnA))
13331337 then {
1334- let $t04531945400 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1335- let refreshDLpActions = $t04531945400._1
1336- let updatedDLp = $t04531945400._2
1338+ let $t04529345374 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1339+ let refreshDLpActions = $t04529345374._1
1340+ let updatedDLp = $t04529345374._2
13371341 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13381342 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13391343 then (state ++ refreshDLpActions)
13801384 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
13811385 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
13821386 then {
1383- let $t04664846729 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1384- let refreshDLpActions = $t04664846729._1
1385- let updatedDLp = $t04664846729._2
1387+ let $t04662246703 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1388+ let refreshDLpActions = $t04662246703._1
1389+ let updatedDLp = $t04662246703._2
13861390 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13871391 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13881392 then (state ++ refreshDLpActions)
14281432 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), unstakeAmount], nil)
14291433 if ((unstakeInv == unstakeInv))
14301434 then {
1431- let $t04766347851 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1432- let state = $t04766347851._1
1433- let totalAmount = $t04766347851._2
1435+ let $t04763747825 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1436+ let state = $t04763747825._1
1437+ let totalAmount = $t04763747825._2
14341438 $Tuple2(state, totalAmount)
14351439 }
14361440 else throw("Strict value is not equal to itself.")
14461450 let amId = poolConfig[idxAmAsId]
14471451 let prId = poolConfig[idxPrAsId]
14481452 let lpId = poolConfig[idxLPAsId]
1449- let $t04811048213 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1450- let lpAmount = $t04811048213._1
1451- let state = $t04811048213._2
1452- let feeAmount = $t04811048213._3
1453- let bonus = $t04811048213._4
1453+ let $t04808448187 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1454+ let lpAmount = $t04808448187._1
1455+ let state = $t04808448187._2
1456+ let feeAmount = $t04808448187._3
1457+ let bonus = $t04808448187._4
14541458 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
14551459 }
14561460
14621466 let amId = poolConfig[idxAmAsId]
14631467 let prId = poolConfig[idxPrAsId]
14641468 let lpId = poolConfig[idxLPAsId]
1465- let $t04849248596 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1466- let lpAmount = $t04849248596._1
1467- let state = $t04849248596._2
1468- let feeAmount = $t04849248596._3
1469- let bonus = $t04849248596._4
1469+ let $t04846648570 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1470+ let lpAmount = $t04846648570._1
1471+ let state = $t04846648570._2
1472+ let feeAmount = $t04846648570._3
1473+ let bonus = $t04846648570._4
14701474 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
14711475 }
14721476
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let scale8 = 100000000
55
66 let scale8BigInt = toBigInt(100000000)
77
88 let scale18 = toBigInt(1000000000000000000)
99
1010 let zeroBigInt = toBigInt(0)
1111
1212 let big0 = toBigInt(0)
1313
1414 let big1 = toBigInt(1)
1515
1616 let big2 = toBigInt(2)
1717
1818 let big3 = toBigInt(3)
1919
2020 let big4 = toBigInt(4)
2121
2222 let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
2323
2424 let wavesString = "WAVES"
2525
2626 let Amult = "100"
2727
2828 let Dconv = "1"
2929
3030 let SEP = "__"
3131
3232 let EMPTY = ""
3333
3434 let PoolActive = 1
3535
3636 let PoolPutDis = 2
3737
3838 let PoolMatcherDis = 3
3939
4040 let PoolShutdown = 4
4141
4242 let idxPoolAddress = 1
4343
4444 let idxPoolSt = 2
4545
4646 let idxLPAsId = 3
4747
4848 let idxAmAsId = 4
4949
5050 let idxPrAsId = 5
5151
5252 let idxAmtAsDcm = 6
5353
5454 let idxPriceAsDcm = 7
5555
5656 let idxIAmtAsId = 8
5757
5858 let idxIPriceAsId = 9
5959
6060 let idxFactStakCntr = 1
6161
6262 let idxFactoryRestCntr = 6
6363
6464 let idxFactSlippCntr = 7
6565
6666 let idxFactGwxRewCntr = 10
6767
6868 let feeDefault = fraction(10, scale8, 10000)
6969
7070 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
7171
7272
7373 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
7474
7575
7676 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
7777
7878
7979 func abs (val) = if ((zeroBigInt > val))
8080 then -(val)
8181 else val
8282
8383
8484 func absBigInt (val) = if ((zeroBigInt > val))
8585 then -(val)
8686 else val
8787
8888
8989 func fc () = "%s__factoryContract"
9090
9191
9292 func mpk () = "%s__managerPublicKey"
9393
9494
9595 func pmpk () = "%s__pendingManagerPublicKey"
9696
9797
9898 func pl () = "%s%s__price__last"
9999
100100
101101 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
102102
103103
104104 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
105105
106106
107107 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
108108
109109
110110 func aa () = "%s__amountAsset"
111111
112112
113113 func pa () = "%s__priceAsset"
114114
115115
116116 func amp () = "%s__amp"
117117
118118
119119 func ada () = "%s__addonAddr"
120120
121121
122122 let keyFee = "%s__fee"
123123
124124 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
125125
126126 let keyDLp = makeString(["%s", "dLp"], SEP)
127127
128128 let keyDLpRefreshedHeight = makeString(["%s", "dLpRefreshedHeight"], SEP)
129129
130130 let keyDLpRefreshDelay = makeString(["%s", "refreshDLpDelay"], SEP)
131131
132132 let dLpRefreshDelayDefault = 1
133133
134134 let dLpRefreshDelay = valueOrElse(getInteger(this, keyDLpRefreshDelay), dLpRefreshDelayDefault)
135135
136136 func fcfg () = "%s__factoryConfig"
137137
138138
139139 func mtpk () = "%s%s__matcher__publicKey"
140140
141141
142142 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
143143
144144
145145 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
146146
147147
148148 func aps () = "%s__shutdown"
149149
150150
151151 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
152152
153153
154154 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
155155
156156
157157 func toe (orV,sendrV,matchV) = throw(((((("Failed: ordValid=" + toString(orV)) + " sndrValid=") + toString(sendrV)) + " mtchrValid=") + toString(matchV)))
158158
159159
160160 func str (val) = match val {
161161 case valStr: String =>
162162 valStr
163163 case _ =>
164164 throw("fail cast to String")
165165 }
166166
167167
168168 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
169169
170170
171171 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
172172
173173
174174 func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
175175
176176
177177 func fmtErr (msg) = makeString(["lp_stable.ride:", msg], " ")
178178
179179
180180 let fca = addressFromStringValue(strf(this, fc()))
181181
182182 let A = strf(this, amp())
183183
184184 func igs () = valueOrElse(getBoolean(fca, aps()), false)
185185
186186
187187 func mp () = fromBase58String(strf(fca, mtpk()))
188188
189189
190190 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
191191
192192 func gpc () = {
193193 let amtAs = strf(this, aa())
194194 let priceAs = strf(this, pa())
195195 let iPriceAs = intf(fca, mba(priceAs))
196196 let iAmtAs = intf(fca, mba(amtAs))
197197 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
198198 }
199199
200200
201201 func parseAssetId (input) = if ((input == wavesString))
202202 then unit
203203 else fromBase58String(input)
204204
205205
206206 func assetIdToString (input) = if ((input == unit))
207207 then wavesString
208208 else toBase58String(value(input))
209209
210210
211211 func parsePoolConfig (poolConfig) = $Tuple7(addressFromStringValue(poolConfig[idxPoolAddress]), parseIntValue(poolConfig[idxPoolSt]), fromBase58String(poolConfig[idxLPAsId]), parseAssetId(poolConfig[idxAmAsId]), parseAssetId(poolConfig[idxPrAsId]), parseIntValue(poolConfig[idxAmtAsDcm]), parseIntValue(poolConfig[idxPriceAsDcm]))
212212
213213
214214 let poolConfigParsed = parsePoolConfig(gpc())
215215
216216 let $t072557441 = poolConfigParsed
217217
218218 let cfgPoolAddress = $t072557441._1
219219
220220 let cfgPoolStatus = $t072557441._2
221221
222222 let cfgLpAssetId = $t072557441._3
223223
224224 let cfgAmountAssetId = $t072557441._4
225225
226226 let cfgPriceAssetId = $t072557441._5
227227
228228 let cfgAmountAssetDecimals = $t072557441._6
229229
230230 let cfgPriceAssetDecimals = $t072557441._7
231231
232232 func gfc () = split(strf(fca, fcfg()), SEP)
233233
234234
235235 let factoryConfig = gfc()
236236
237237 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
238238
239239 let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
240240
241241 let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
242242
243243 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
244244
245245 func dataPutActionInfo (inAmtAssetAmt,inPriceAssetAmt,outLpAmt,price,slipByUser,slippageReal,txHeight,txTimestamp,slipageAmAmt,slipagePrAmt) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(inAmtAssetAmt), toString(inPriceAssetAmt), toString(outLpAmt), toString(price), toString(slipByUser), toString(slippageReal), toString(txHeight), toString(txTimestamp), toString(slipageAmAmt), toString(slipagePrAmt)], SEP)
246246
247247
248248 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)
249249
250250
251251 func getAccBalance (assetId) = if ((assetId == "WAVES"))
252252 then wavesBalance(this).available
253253 else assetBalance(this, fromBase58String(assetId))
254254
255255
256256 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
257257
258258
259259 func vad (A1,A2,slippage) = {
260260 let diff = fraction((A1 - A2), scale8BigInt, A2)
261261 let pass = ((slippage - abs(diff)) > zeroBigInt)
262262 if (!(pass))
263263 then throw(("Big slpg: " + toString(diff)))
264264 else $Tuple2(pass, min([A1, A2]))
265265 }
266266
267267
268268 func vd (D1,D0,slpg) = {
269269 let diff = fraction(D0, scale8BigInt, D1)
270270 let fail = (slpg > diff)
271271 if (if (fail)
272272 then true
273273 else (D0 > D1))
274274 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
275275 else fail
276276 }
277277
278278
279279 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
280280 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
281281 let prAsAmtX18 = t1(prAmt, prAssetDcm)
282282 cpbi(prAsAmtX18, amtAsAmtX18)
283283 }
284284
285285
286286 func calcPrices (amAmt,prAmt,lpAmt) = {
287287 let cfg = gpc()
288288 let amtAsDcm = parseIntValue(cfg[idxAmtAsDcm])
289289 let prAsDcm = parseIntValue(cfg[idxPriceAsDcm])
290290 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
291291 let amAmtX18 = t1(amAmt, amtAsDcm)
292292 let prAmtX18 = t1(prAmt, prAsDcm)
293293 let lpAmtX18 = t1(lpAmt, scale8)
294294 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
295295 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
296296 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
297297 }
298298
299299
300300 func calculatePrices (amAmt,prAmt,lpAmt) = {
301301 let p = calcPrices(amAmt, prAmt, lpAmt)
302302 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
303303 }
304304
305305
306306 func takeFee (amount) = {
307307 let feeAmount = fraction(amount, fee, scale8)
308308 $Tuple2((amount - feeAmount), feeAmount)
309309 }
310310
311311
312312 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
313313 let cfg = gpc()
314314 let lpId = cfg[idxLPAsId]
315315 let amId = cfg[idxAmAsId]
316316 let prId = cfg[idxPrAsId]
317317 let amDcm = parseIntValue(cfg[idxAmtAsDcm])
318318 let prDcm = parseIntValue(cfg[idxPriceAsDcm])
319319 let sts = cfg[idxPoolSt]
320320 let lpEmiss = valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "Wrong LP id").quantity
321321 if ((lpId != pmtAssetId))
322322 then throw("Wrong pmt asset")
323323 else {
324324 let amBalance = getAccBalance(amId)
325325 let amBalanceX18 = t1(amBalance, amDcm)
326326 let prBalance = getAccBalance(prId)
327327 let prBalanceX18 = t1(prBalance, prDcm)
328328 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
329329 let curPrice = f1(curPriceX18, scale8)
330330 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
331331 let lpEmissX18 = t1(lpEmiss, scale8)
332332 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
333333 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
334334 let outAmAmt = f1(outAmAmtX18, amDcm)
335335 let outPrAmt = f1(outPrAmtX18, prDcm)
336336 let state = if ((txId58 == ""))
337337 then nil
338338 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
339339 then unit
340340 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
341341 then unit
342342 else fromBase58String(prId)), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAmAmt, outPrAmt, pmtLpAmt, curPrice, height, lastBlock.timestamp)), IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice)]
343343 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
344344 }
345345 }
346346
347347
348348 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
349349 let cfg = gpc()
350350 let lpId = fromBase58String(cfg[idxLPAsId])
351351 let amIdStr = cfg[idxAmAsId]
352352 let prIdStr = cfg[idxPrAsId]
353353 let inAmIdStr = cfg[idxIAmtAsId]
354354 let inPrIdStr = cfg[idxIPriceAsId]
355355 let amtDcm = parseIntValue(cfg[idxAmtAsDcm])
356356 let priceDcm = parseIntValue(cfg[idxPriceAsDcm])
357357 let sts = cfg[idxPoolSt]
358358 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
359359 let amBalance = if (isEval)
360360 then getAccBalance(amIdStr)
361361 else if (if (isOneAsset)
362362 then (pmtId == amIdStr)
363363 else false)
364364 then (getAccBalance(amIdStr) - pmtAmt)
365365 else if (isOneAsset)
366366 then getAccBalance(amIdStr)
367367 else (getAccBalance(amIdStr) - inAmAmt)
368368 let prBalance = if (isEval)
369369 then getAccBalance(prIdStr)
370370 else if (if (isOneAsset)
371371 then (pmtId == prIdStr)
372372 else false)
373373 then (getAccBalance(prIdStr) - pmtAmt)
374374 else if (isOneAsset)
375375 then getAccBalance(prIdStr)
376376 else (getAccBalance(prIdStr) - inPrAmt)
377377 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
378378 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
379379 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
380380 let amBalanceX18 = t1(amBalance, amtDcm)
381381 let prBalanceX18 = t1(prBalance, priceDcm)
382382 let r = if ((lpEm == 0))
383383 then {
384384 let curPriceX18 = zeroBigInt
385385 let slippageX18 = zeroBigInt
386386 let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN)
387387 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
388388 }
389389 else {
390390 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
391391 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
392392 let slippageX18 = t1(slippage, scale8)
393393 if (if (if (validateSlippage)
394394 then (curPriceX18 != zeroBigInt)
395395 else false)
396396 then (slippageRealX18 > slippageX18)
397397 else false)
398398 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
399399 else {
400400 let lpEmissionX18 = t1(lpEm, scale8)
401401 let prViaAmX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
402402 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
403403 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
404404 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
405405 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
406406 let expAmtAssetAmtX18 = expectedAmts._1
407407 let expPriceAssetAmtX18 = expectedAmts._2
408408 let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18)
409409 $Tuple5(f1(lpAmtX18, scale8), f1(expAmtAssetAmtX18, amtDcm), f1(expPriceAssetAmtX18, priceDcm), curPriceX18, slippageX18)
410410 }
411411 }
412412 let calcLpAmt = r._1
413413 let calcAmAssetPmt = r._2
414414 let calcPrAssetPmt = r._3
415415 let curPrice = f1(r._4, scale8)
416416 let slippageCalc = f1(r._5, scale8)
417417 if ((0 >= calcLpAmt))
418418 then throw("LP <= 0")
419419 else {
420420 let emitLpAmt = if (!(emitLp))
421421 then 0
422422 else calcLpAmt
423423 let amDiff = (inAmAmt - calcAmAssetPmt)
424424 let prDiff = (inPrAmt - calcPrAssetPmt)
425425 let $t01787218217 = if (if (isOneAsset)
426426 then (pmtId == amIdStr)
427427 else false)
428428 then $Tuple2(pmtAmt, 0)
429429 else if (if (isOneAsset)
430430 then (pmtId == prIdStr)
431431 else false)
432432 then $Tuple2(0, pmtAmt)
433433 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
434434 let writeAmAmt = $t01787218217._1
435435 let writePrAmt = $t01787218217._2
436436 let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId58), dataPutActionInfo(writeAmAmt, writePrAmt, emitLpAmt, curPrice, slippage, slippageCalc, height, lastBlock.timestamp, amDiff, prDiff))]
437437 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
438438 }
439439 }
440440
441441
442442 func getD (xp) = {
443443 let xp0 = xp[0]
444444 let xp1 = xp[1]
445445 let s = (xp0 + xp1)
446446 if ((s == big0))
447447 then big0
448448 else {
449449 let a = parseIntValue(A)
450450 let ann = (a * 2)
451451 let p = fraction(xp0, xp1, big1)
452452 let xp0_xp1_n_n = fraction(p, big4, big1)
453453 let ann_s = fraction(toBigInt(ann), s, big1)
454454 let ann_1 = toBigInt((ann - 1))
455455 func calcDNext (d) = {
456456 let dd = fraction(d, d, big1)
457457 let ddd = fraction(dd, d, big1)
458458 let dp = fraction(ddd, big1, xp0_xp1_n_n)
459459 fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)))
460460 }
461461
462462 func calc (acc,i) = if (acc._2)
463463 then acc
464464 else {
465465 let d = acc._1
466466 let dNext = calcDNext(d)
467467 let dDiffRaw = toInt((dNext - value(d)))
468468 let dDiff = if ((0 > dDiffRaw))
469469 then -(dDiffRaw)
470470 else dDiffRaw
471471 if ((1 >= dDiff))
472472 then $Tuple2(dNext, true)
473473 else $Tuple2(dNext, false)
474474 }
475475
476476 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
477477 let $t02012820176 = {
478478 let $l = arr
479479 let $s = size($l)
480480 let $acc0 = $Tuple2(s, false)
481481 func $f0_1 ($a,$i) = if (($i >= $s))
482482 then $a
483483 else calc($a, $l[$i])
484484
485485 func $f0_2 ($a,$i) = if (($i >= $s))
486486 then $a
487487 else throw("List size exceeds 15")
488488
489489 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
490490 }
491491 let d = $t02012820176._1
492492 let found = $t02012820176._2
493493 if (found)
494494 then d
495495 else throw(("D calculation error, D = " + toString(d)))
496496 }
497497 }
498498
499499
500500 func getDOld (xp) = {
501501 let n = big2
502502 let xp0 = xp[0]
503503 let xp1 = xp[1]
504504 let aPrecision = parseBigIntValue(Amult)
505505 let a = (parseBigIntValue(A) * aPrecision)
506506 let s = (xp0 + xp1)
507507 if ((s == big0))
508508 then big0
509509 else {
510510 let ann = (a * n)
511511 let xp0_xp1_n_n = (((xp0 * xp1) * n) * n)
512512 let ann_s_aPrecision = ((ann * s) / aPrecision)
513513 let ann_aPrecision = (ann - aPrecision)
514514 let n1 = (n + big1)
515515 func calc (acc,cur) = {
516516 let $t02080520825 = acc
517517 let d = $t02080520825._1
518518 let found = $t02080520825._2
519519 if ((found != unit))
520520 then acc
521521 else {
522522 let dp = (((d * d) * d) / xp0_xp1_n_n)
523523 let dNext = (((ann_s_aPrecision + (dp * n)) * d) / (((ann_aPrecision * d) / aPrecision) + (n1 * dp)))
524524 let dDiff = absBigInt((dNext - value(d)))
525525 if ((big1 >= dDiff))
526526 then $Tuple2(dNext, cur)
527527 else $Tuple2(dNext, unit)
528528 }
529529 }
530530
531531 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
532532 let $t02124621293 = {
533533 let $l = arr
534534 let $s = size($l)
535535 let $acc0 = $Tuple2(s, unit)
536536 func $f0_1 ($a,$i) = if (($i >= $s))
537537 then $a
538538 else calc($a, $l[$i])
539539
540540 func $f0_2 ($a,$i) = if (($i >= $s))
541541 then $a
542542 else throw("List size exceeds 15")
543543
544544 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
545545 }
546546 let d = $t02124621293._1
547547 let found = $t02124621293._2
548548 if ((found != unit))
549549 then d
550550 else throw(("D calculation error, D = " + toString(d)))
551551 }
552552 }
553553
554554
555555 func getYD (xp,i,D) = {
556556 let n = big2
557557 let x = xp[if ((i == 0))
558558 then 1
559559 else 0]
560560 let aPrecision = parseBigIntValue(Amult)
561561 let a = (parseBigIntValue(A) * aPrecision)
562562 let s = x
563563 let ann = (a * n)
564564 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
565565 let b = ((s + ((D * aPrecision) / ann)) - D)
566566 func calc (acc,cur) = {
567567 let $t02179321813 = acc
568568 let y = $t02179321813._1
569569 let found = $t02179321813._2
570570 if ((found != unit))
571571 then acc
572572 else {
573573 let yNext = (((y * y) + c) / ((big2 * y) + b))
574574 let yDiff = absBigInt((yNext - value(y)))
575575 if ((big1 >= yDiff))
576576 then $Tuple2(yNext, cur)
577577 else $Tuple2(yNext, unit)
578578 }
579579 }
580580
581581 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
582582 let $t02212022167 = {
583583 let $l = arr
584584 let $s = size($l)
585585 let $acc0 = $Tuple2(D, unit)
586586 func $f0_1 ($a,$i) = if (($i >= $s))
587587 then $a
588588 else calc($a, $l[$i])
589589
590590 func $f0_2 ($a,$i) = if (($i >= $s))
591591 then $a
592592 else throw("List size exceeds 15")
593593
594594 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
595595 }
596596 let y = $t02212022167._1
597597 let found = $t02212022167._2
598598 if ((found != unit))
599599 then y
600600 else throw(("Y calculation error, Y = " + toString(y)))
601601 }
602602
603603
604604 func calcDLp (amountBalance,priceBalance,lpEmission) = {
605605 let updatedDLp = fraction(getD([amountBalance, priceBalance]), scale18, lpEmission)
606606 updatedDLp
607607 }
608608
609609
610610 func calcCurrentDLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
611611 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
612612 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
613613 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
614614 let currentDLp = calcDLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
615615 currentDLp
616616 }
617617
618618
619619 func refreshDLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
620620 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
621621 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
622622 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
623623 let updatedDLp = calcDLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
624624 let actions = [IntegerEntry(keyDLpRefreshedHeight, height), StringEntry(keyDLp, toString(updatedDLp))]
625625 $Tuple2(actions, updatedDLp)
626626 }
627627
628628
629629 func validateUpdatedDLp (oldDLp,updatedDLp) = if ((updatedDLp >= oldDLp))
630630 then true
631631 else throwErr("updated DLp lower than current DLp")
632632
633633
634634 func validateMatcherOrderAllowed (order) = {
635635 let amountAssetAmount = order.amount
636636 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
637637 let $t02406724279 = if ((order.orderType == Buy))
638638 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
639639 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
640640 let amountAssetBalanceDelta = $t02406724279._1
641641 let priceAssetBalanceDelta = $t02406724279._2
642642 if (if (if (igs())
643643 then true
644644 else (cfgPoolStatus == PoolMatcherDis))
645645 then true
646646 else (cfgPoolStatus == PoolShutdown))
647647 then throw("Admin blocked")
648648 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
649649 then true
650650 else (order.assetPair.priceAsset != cfgPriceAssetId))
651651 then throw("Wr assets")
652652 else {
653653 let dLp = parseBigIntValue(getStringValue(this, keyDLp))
654654 let $t02460924709 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
655655 let unusedActions = $t02460924709._1
656656 let dLpNew = $t02460924709._2
657657 let isOrderValid = (dLpNew >= dLp)
658658 isOrderValid
659659 }
660660 }
661661
662662
663663 func cg (i) = if ((size(i.payments) != 1))
664664 then throw("1 pmnt exp")
665665 else {
666666 let pmt = value(i.payments[0])
667667 let pmtAssetId = value(pmt.assetId)
668668 let pmtAmt = pmt.amount
669669 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
670670 let outAmAmt = r._1
671671 let outPrAmt = r._2
672672 let sts = parseIntValue(r._9)
673673 let state = r._10
674674 if (if (igs())
675675 then true
676676 else (sts == PoolShutdown))
677677 then throw(("Admin blocked: " + toString(sts)))
678678 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
679679 }
680680
681681
682682 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
683683 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
684684 let sts = parseIntValue(r._8)
685685 if (if (if (igs())
686686 then true
687687 else (sts == PoolPutDis))
688688 then true
689689 else (sts == PoolShutdown))
690690 then throw(("Blocked:" + toString(sts)))
691691 else r
692692 }
693693
694694
695695 func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = {
696696 let poolConfig = gpc()
697697 let amId = poolConfig[idxAmAsId]
698698 let prId = poolConfig[idxPrAsId]
699699 let lpId = poolConfig[idxLPAsId]
700700 let amtDcm = parseIntValue(poolConfig[idxAmtAsDcm])
701701 let priceDcm = parseIntValue(poolConfig[idxPriceAsDcm])
702702 let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
703703 let chechEmission = if ((lpAssetEmission > big0))
704704 then true
705705 else throw("initial deposit requires all coins")
706706 if ((chechEmission == chechEmission))
707707 then {
708708 let amBalance = getAccBalance(amId)
709709 let prBalance = getAccBalance(prId)
710710 let $t02702627488 = if ((txId == ""))
711711 then $Tuple2(amBalance, prBalance)
712712 else if ((pmtAssetId == amId))
713713 then if ((pmtAmtRaw > amBalance))
714714 then throw("invalid payment amount")
715715 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
716716 else if ((pmtAssetId == prId))
717717 then if ((pmtAmtRaw > prBalance))
718718 then throw("invalid payment amount")
719719 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
720720 else throw("wrong pmtAssetId")
721721 let amBalanceOld = $t02702627488._1
722722 let prBalanceOld = $t02702627488._2
723723 let $t02749427670 = if ((pmtAssetId == amId))
724724 then $Tuple2(pmtAmtRaw, 0)
725725 else if ((pmtAssetId == prId))
726726 then $Tuple2(0, pmtAmtRaw)
727727 else throw("invalid payment")
728728 let amAmountRaw = $t02749427670._1
729729 let prAmountRaw = $t02749427670._2
730730 let $t02767427913 = if (withTakeFee)
731731 then $Tuple3(takeFee(amAmountRaw)._1, takeFee(prAmountRaw)._1, takeFee(pmtAmtRaw)._2)
732732 else $Tuple3(amAmountRaw, prAmountRaw, 0)
733733 let amAmount = $t02767427913._1
734734 let prAmount = $t02767427913._2
735735 let feeAmount = $t02767427913._3
736736 let amBalanceNew = (amBalanceOld + amAmount)
737737 let prBalanceNew = (prBalanceOld + prAmount)
738738 let D0 = getD([toBigInt(amBalanceOld), toBigInt(prBalanceOld)])
739739 let D1 = getD([toBigInt(amBalanceNew), toBigInt(prBalanceNew)])
740740 let checkD = if ((D1 > D0))
741741 then true
742742 else throw()
743743 if ((checkD == checkD))
744744 then {
745745 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0)
746746 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
747747 let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId), dataPutActionInfo(amAmountRaw, prAmountRaw, toInt(lpAmount), curPrice, 0, 0, height, lastBlock.timestamp, 0, 0))]
748748 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
749749 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
750750 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
751751 let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
752752 let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
753753 $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
754754 }
755755 else throw("Strict value is not equal to itself.")
756756 }
757757 else throw("Strict value is not equal to itself.")
758758 }
759759
760760
761761 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
762762 let poolConfig = gpc()
763763 let lpId = poolConfig[idxLPAsId]
764764 let amId = poolConfig[idxAmAsId]
765765 let prId = poolConfig[idxPrAsId]
766766 let amDecimals = parseIntValue(poolConfig[idxAmtAsDcm])
767767 let prDecimals = parseIntValue(poolConfig[idxPriceAsDcm])
768768 let poolStatus = poolConfig[idxPoolSt]
769769 let userAddress = if ((caller == restContract))
770770 then originCaller
771771 else caller
772772 let pmt = value(payments[0])
773773 let pmtAssetId = value(pmt.assetId)
774774 let pmtAmt = pmt.amount
775- let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(pmtAmt))
776- let txId58 = toBase58String(transactionId)
777- if ((lpId != toBase58String(pmtAssetId)))
778- then throw("Wrong LP")
779- else {
780- let amBalance = getAccBalance(amId)
781- let prBalance = getAccBalance(prId)
782- let $t02999730108 = {
783- let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
784- if ($isInstanceOf(@, "(Int, Int)"))
785- then @
786- else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
787- }
788- if (($t02999730108 == $t02999730108))
789- then {
790- let feeAmount = $t02999730108._2
791- let totalGet = $t02999730108._1
792- let totalAmount = if (if ((minOutAmount > 0))
793- then (minOutAmount > totalGet)
794- else false)
795- then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
796- else totalGet
797- let $t03029830605 = if ((outAssetId == amId))
798- then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
799- else if ((outAssetId == prId))
800- then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
801- else throw("invalid out asset id")
802- let outAm = $t03029830605._1
803- let outPr = $t03029830605._2
804- let amBalanceNew = $t03029830605._3
805- let prBalanceNew = $t03029830605._4
806- let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
807- let curPr = f1(curPrX18, scale8)
808- let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
809- then unit
810- else fromBase58String(outAssetId)
811- let sendFeeToMatcher = if ((feeAmount > 0))
812- then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
813- else nil
814- let state = ([ScriptTransfer(userAddress, totalAmount, outAssetIdOrWaves), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAm, outPr, pmtAmt, curPr, height, lastBlock.timestamp)), IntegerEntry(pl(), curPr), IntegerEntry(ph(height, lastBlock.timestamp), curPr)] ++ sendFeeToMatcher)
815- if ((state == state))
775+ let currentDLp = calcCurrentDLp(big0, big0, big0)
776+ if ((currentDLp == currentDLp))
777+ then {
778+ let txId58 = toBase58String(transactionId)
779+ if ((lpId != toBase58String(pmtAssetId)))
780+ then throw("Wrong LP")
781+ else {
782+ let amBalance = getAccBalance(amId)
783+ let prBalance = getAccBalance(prId)
784+ let $t02997130082 = {
785+ let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
786+ if ($isInstanceOf(@, "(Int, Int)"))
787+ then @
788+ else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
789+ }
790+ if (($t02997130082 == $t02997130082))
816791 then {
817- let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
818- if ((burn == burn))
792+ let feeAmount = $t02997130082._2
793+ let totalGet = $t02997130082._1
794+ let totalAmount = if (if ((minOutAmount > 0))
795+ then (minOutAmount > totalGet)
796+ else false)
797+ then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
798+ else totalGet
799+ let $t03027230579 = if ((outAssetId == amId))
800+ then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
801+ else if ((outAssetId == prId))
802+ then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
803+ else throw("invalid out asset id")
804+ let outAm = $t03027230579._1
805+ let outPr = $t03027230579._2
806+ let amBalanceNew = $t03027230579._3
807+ let prBalanceNew = $t03027230579._4
808+ let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
809+ let curPr = f1(curPrX18, scale8)
810+ let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
811+ then unit
812+ else fromBase58String(outAssetId)
813+ let sendFeeToMatcher = if ((feeAmount > 0))
814+ then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
815+ else nil
816+ let state = ([ScriptTransfer(userAddress, totalAmount, outAssetIdOrWaves), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAm, outPr, pmtAmt, curPr, height, lastBlock.timestamp)), IntegerEntry(pl(), curPr), IntegerEntry(ph(height, lastBlock.timestamp), curPr)] ++ sendFeeToMatcher)
817+ if ((state == state))
819818 then {
820- let $t03139031740 = {
821- let feeAmountForCalc = if ((this == feeCollectorAddress))
822- then 0
823- else feeAmount
824- let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId))
825- then true
826- else false
827- if (outInAmountAsset)
828- then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
829- else $Tuple2(0, -((totalGet + feeAmountForCalc)))
830- }
831- let amountAssetBalanceDelta = $t03139031740._1
832- let priceAssetBalanceDelta = $t03139031740._2
833- let $t03174331851 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
834- let refreshDLpActions = $t03174331851._1
835- let updatedDLp = $t03174331851._2
836- let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
837- if ((isUpdatedDLpValid == isUpdatedDLpValid))
838- then $Tuple2((state ++ refreshDLpActions), totalAmount)
819+ let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
820+ if ((burn == burn))
821+ then {
822+ let $t03136431714 = {
823+ let feeAmountForCalc = if ((this == feeCollectorAddress))
824+ then 0
825+ else feeAmount
826+ let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId))
827+ then true
828+ else false
829+ if (outInAmountAsset)
830+ then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
831+ else $Tuple2(0, -((totalGet + feeAmountForCalc)))
832+ }
833+ let amountAssetBalanceDelta = $t03136431714._1
834+ let priceAssetBalanceDelta = $t03136431714._2
835+ let $t03171731825 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
836+ let refreshDLpActions = $t03171731825._1
837+ let updatedDLp = $t03171731825._2
838+ let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
839+ if ((isUpdatedDLpValid == isUpdatedDLpValid))
840+ then $Tuple2((state ++ refreshDLpActions), totalAmount)
841+ else throw("Strict value is not equal to itself.")
842+ }
839843 else throw("Strict value is not equal to itself.")
840844 }
841845 else throw("Strict value is not equal to itself.")
842846 }
843847 else throw("Strict value is not equal to itself.")
844848 }
845- else throw("Strict value is not equal to itself.")
846849 }
850+ else throw("Strict value is not equal to itself.")
847851 }
848852
849853
850854 func m () = match getString(mpk()) {
851855 case s: String =>
852856 fromBase58String(s)
853857 case _: Unit =>
854858 unit
855859 case _ =>
856860 throw("Match error")
857861 }
858862
859863
860864 func pm () = match getString(pmpk()) {
861865 case s: String =>
862866 fromBase58String(s)
863867 case _: Unit =>
864868 unit
865869 case _ =>
866870 throw("Match error")
867871 }
868872
869873
870874 let pd = throw("Permission denied")
871875
872876 func isManager (i) = match m() {
873877 case pk: ByteVector =>
874878 (i.callerPublicKey == pk)
875879 case _: Unit =>
876880 (i.caller == this)
877881 case _ =>
878882 throw("Match error")
879883 }
880884
881885
882886 func mm (i) = match m() {
883887 case pk: ByteVector =>
884888 if ((i.callerPublicKey == pk))
885889 then true
886890 else pd
887891 case _: Unit =>
888892 if ((i.caller == this))
889893 then true
890894 else pd
891895 case _ =>
892896 throw("Match error")
893897 }
894898
895899
896900 @Callable(i)
897901 func constructor (fc) = {
898902 let c = mm(i)
899903 if ((c == c))
900904 then [StringEntry(fc(), fc)]
901905 else throw("Strict value is not equal to itself.")
902906 }
903907
904908
905909
906910 @Callable(i)
907911 func setManager (pendingManagerPublicKey) = {
908912 let c = mm(i)
909913 if ((c == c))
910914 then {
911915 let cm = fromBase58String(pendingManagerPublicKey)
912916 if ((cm == cm))
913917 then [StringEntry(pmpk(), pendingManagerPublicKey)]
914918 else throw("Strict value is not equal to itself.")
915919 }
916920 else throw("Strict value is not equal to itself.")
917921 }
918922
919923
920924
921925 @Callable(i)
922926 func confirmManager () = {
923927 let p = pm()
924928 let hpm = if (isDefined(p))
925929 then true
926930 else throw("No pending manager")
927931 if ((hpm == hpm))
928932 then {
929933 let cpm = if ((i.callerPublicKey == value(p)))
930934 then true
931935 else throw("You are not pending manager")
932936 if ((cpm == cpm))
933937 then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())]
934938 else throw("Strict value is not equal to itself.")
935939 }
936940 else throw("Strict value is not equal to itself.")
937941 }
938942
939943
940944
941945 @Callable(i)
942946 func put (slip,autoStake) = {
943947 let factCfg = gfc()
944948 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
945949 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
946950 if ((0 > slip))
947951 then throw("Wrong slippage")
948952 else if ((size(i.payments) != 2))
949953 then throw("2 pmnts expd")
950954 else {
951955 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
952956 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
953957 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
954958 if ((currentDLp == currentDLp))
955959 then {
956960 let e = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(value(i.payments[0]).assetId, value(i.payments[0]).amount), i.payments[1], slip, true, false, true, 0, "")
957961 let emitLpAmt = e._2
958962 let lpAssetId = e._7
959963 let state = e._9
960964 let amDiff = e._10
961965 let prDiff = e._11
962966 let amId = e._12
963967 let prId = e._13
964968 let r = invoke(fca, "emit", [emitLpAmt], nil)
965969 if ((r == r))
966970 then {
967971 let el = match r {
968972 case legacy: Address =>
969973 invoke(legacy, "emit", [emitLpAmt], nil)
970974 case _ =>
971975 unit
972976 }
973977 if ((el == el))
974978 then {
975979 let sa = if ((amDiff > 0))
976980 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
977981 else nil
978982 if ((sa == sa))
979983 then {
980984 let sp = if ((prDiff > 0))
981985 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
982986 else nil
983987 if ((sp == sp))
984988 then {
985989 let lpTrnsfr = if (autoStake)
986990 then {
987991 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
988992 if ((ss == ss))
989993 then nil
990994 else throw("Strict value is not equal to itself.")
991995 }
992996 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
993- let $t03570735772 = refreshDLpInternal(0, 0, 0)
994- let refreshDLpActions = $t03570735772._1
995- let updatedDLp = $t03570735772._2
997+ let $t03568135746 = refreshDLpInternal(0, 0, 0)
998+ let refreshDLpActions = $t03568135746._1
999+ let updatedDLp = $t03568135746._2
9961000 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
9971001 if ((isUpdatedDLpValid == isUpdatedDLpValid))
9981002 then ((state ++ lpTrnsfr) ++ refreshDLpActions)
9991003 else throw("Strict value is not equal to itself.")
10001004 }
10011005 else throw("Strict value is not equal to itself.")
10021006 }
10031007 else throw("Strict value is not equal to itself.")
10041008 }
10051009 else throw("Strict value is not equal to itself.")
10061010 }
10071011 else throw("Strict value is not equal to itself.")
10081012 }
10091013 else throw("Strict value is not equal to itself.")
10101014 }
10111015 }
10121016
10131017
10141018
10151019 @Callable(i)
10161020 func putOneTknV2 (minOutAmount,autoStake) = {
10171021 let isPoolOneTokenOperationsDisabled = {
10181022 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
10191023 if ($isInstanceOf(@, "Boolean"))
10201024 then @
10211025 else throw(($getType(@) + " couldn't be cast to Boolean"))
10221026 }
10231027 let isPutDisabled = if (if (if (igs())
10241028 then true
10251029 else (cfgPoolStatus == PoolPutDis))
10261030 then true
10271031 else (cfgPoolStatus == PoolShutdown))
10281032 then true
10291033 else isPoolOneTokenOperationsDisabled
10301034 let checks = [if (if (!(isPutDisabled))
10311035 then true
10321036 else isManager(i))
10331037 then true
10341038 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
10351039 then true
10361040 else throwErr("exactly 1 payment are expected")]
10371041 if ((checks == checks))
10381042 then {
10391043 let poolConfig = gpc()
10401044 let amId = poolConfig[idxAmAsId]
10411045 let prId = poolConfig[idxPrAsId]
10421046 let lpId = fromBase58String(poolConfig[idxLPAsId])
10431047 let amDecimals = parseIntValue(poolConfig[idxAmtAsDcm])
10441048 let prDecimals = parseIntValue(poolConfig[idxPriceAsDcm])
10451049 let userAddress = if ((i.caller == this))
10461050 then i.originCaller
10471051 else i.caller
10481052 let pmt = value(i.payments[0])
10491053 let pmtAssetId = toBase58String(value(pmt.assetId))
10501054 let pmtAmt = pmt.amount
1051- let $t03690937067 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1052- if (($t03690937067 == $t03690937067))
1055+ let $t03688337041 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1056+ if (($t03688337041 == $t03688337041))
10531057 then {
1054- let feeAmount = $t03690937067._3
1055- let state = $t03690937067._2
1056- let estimLP = $t03690937067._1
1058+ let feeAmount = $t03688337041._3
1059+ let state = $t03688337041._2
1060+ let estimLP = $t03688337041._1
10571061 let emitLpAmt = if (if ((minOutAmount > 0))
10581062 then (minOutAmount > estimLP)
10591063 else false)
10601064 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
10611065 else estimLP
10621066 let e = invoke(fca, "emit", [emitLpAmt], nil)
10631067 if ((e == e))
10641068 then {
10651069 let el = match e {
10661070 case legacy: Address =>
10671071 invoke(legacy, "emit", [emitLpAmt], nil)
10681072 case _ =>
10691073 unit
10701074 }
10711075 if ((el == el))
10721076 then {
10731077 let lpTrnsfr = if (autoStake)
10741078 then {
10751079 let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)])
10761080 if ((ss == ss))
10771081 then nil
10781082 else throw("Strict value is not equal to itself.")
10791083 }
10801084 else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
10811085 let sendFeeToMatcher = if ((feeAmount > 0))
10821086 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
10831087 else nil
1084- let $t03788238231 = if ((this == feeCollectorAddress))
1088+ let $t03785638205 = if ((this == feeCollectorAddress))
10851089 then $Tuple2(0, 0)
10861090 else {
10871091 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
10881092 then true
10891093 else false
10901094 if (paymentInAmountAsset)
10911095 then $Tuple2(-(feeAmount), 0)
10921096 else $Tuple2(0, -(feeAmount))
10931097 }
1094- let amountAssetBalanceDelta = $t03788238231._1
1095- let priceAssetBalanceDelta = $t03788238231._2
1096- let $t03823438342 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1097- let refreshDLpActions = $t03823438342._1
1098- let updatedDLp = $t03823438342._2
1098+ let amountAssetBalanceDelta = $t03785638205._1
1099+ let priceAssetBalanceDelta = $t03785638205._2
1100+ let $t03820838316 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1101+ let refreshDLpActions = $t03820838316._1
1102+ let updatedDLp = $t03820838316._2
10991103 $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
11001104 }
11011105 else throw("Strict value is not equal to itself.")
11021106 }
11031107 else throw("Strict value is not equal to itself.")
11041108 }
11051109 else throw("Strict value is not equal to itself.")
11061110 }
11071111 else throw("Strict value is not equal to itself.")
11081112 }
11091113
11101114
11111115
11121116 @Callable(i)
11131117 func putForFree (maxSlpg) = if ((0 > maxSlpg))
11141118 then throw("Wrong slpg")
11151119 else if ((size(i.payments) != 2))
11161120 then throw("2 pmnts expd")
11171121 else {
11181122 let estPut = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(value(i.payments[0]).assetId, value(i.payments[0]).amount), i.payments[1], maxSlpg, false, false, true, 0, "")
11191123 let state = estPut._9
11201124 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
11211125 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
11221126 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
11231127 if ((currentDLp == currentDLp))
11241128 then {
1125- let $t03930139366 = refreshDLpInternal(0, 0, 0)
1126- let refreshDLpActions = $t03930139366._1
1127- let updatedDLp = $t03930139366._2
1129+ let $t03927539340 = refreshDLpInternal(0, 0, 0)
1130+ let refreshDLpActions = $t03927539340._1
1131+ let updatedDLp = $t03927539340._2
11281132 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
11291133 if ((isUpdatedDLpValid == isUpdatedDLpValid))
11301134 then (state ++ refreshDLpActions)
11311135 else throw("Strict value is not equal to itself.")
11321136 }
11331137 else throw("Strict value is not equal to itself.")
11341138 }
11351139
11361140
11371141
11381142 @Callable(i)
11391143 func get () = {
11401144 let r = cg(i)
11411145 let outAmtAmt = r._1
11421146 let outPrAmt = r._2
11431147 let pmtAmt = r._3
11441148 let pmtAssetId = r._4
11451149 let state = r._5
11461150 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
11471151 if ((b == b))
11481152 then {
11491153 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(pmtAmt))
1150- let $t04015540237 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1151- let refreshDLpActions = $t04015540237._1
1152- let updatedDLp = $t04015540237._2
1154+ let $t04012940211 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1155+ let refreshDLpActions = $t04012940211._1
1156+ let updatedDLp = $t04012940211._2
11531157 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
11541158 if ((isUpdatedDLpValid == isUpdatedDLpValid))
11551159 then (state ++ refreshDLpActions)
11561160 else throw("Strict value is not equal to itself.")
11571161 }
11581162 else throw("Strict value is not equal to itself.")
11591163 }
11601164
11611165
11621166
11631167 @Callable(i)
11641168 func getOneTknV2 (outAssetId,minOutAmount) = {
11651169 let isPoolOneTokenOperationsDisabled = {
11661170 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
11671171 if ($isInstanceOf(@, "Boolean"))
11681172 then @
11691173 else throw(($getType(@) + " couldn't be cast to Boolean"))
11701174 }
11711175 let isGetDisabled = if (if (igs())
11721176 then true
11731177 else (cfgPoolStatus == PoolShutdown))
11741178 then true
11751179 else isPoolOneTokenOperationsDisabled
11761180 let checks = [if (if (!(isGetDisabled))
11771181 then true
11781182 else isManager(i))
11791183 then true
11801184 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
11811185 then true
11821186 else throwErr("exactly 1 payment are expected")]
11831187 if ((checks == checks))
11841188 then {
1185- let $t04085541010 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1186- let state = $t04085541010._1
1187- let totalAmount = $t04085541010._2
1189+ let $t04082940984 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1190+ let state = $t04082940984._1
1191+ let totalAmount = $t04082940984._2
11881192 $Tuple2(state, totalAmount)
11891193 }
11901194 else throw("Strict value is not equal to itself.")
11911195 }
11921196
11931197
11941198
11951199 @Callable(i)
11961200 func refreshDLp () = {
11971201 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyDLpRefreshedHeight), 0)
11981202 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= dLpRefreshDelay))
11991203 then unit
12001204 else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], ""))
12011205 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
12021206 then {
12031207 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1204- let $t04153441598 = refreshDLpInternal(0, 0, 0)
1205- let dLpUpdateActions = $t04153441598._1
1206- let updatedDLp = $t04153441598._2
1208+ let $t04150841572 = refreshDLpInternal(0, 0, 0)
1209+ let dLpUpdateActions = $t04150841572._1
1210+ let updatedDLp = $t04150841572._2
12071211 let actions = if ((dLp != updatedDLp))
12081212 then dLpUpdateActions
12091213 else throwErr("nothing to refresh")
12101214 $Tuple2(actions, toString(updatedDLp))
12111215 }
12121216 else throw("Strict value is not equal to itself.")
12131217 }
12141218
12151219
12161220
12171221 @Callable(i)
12181222 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
12191223 let poolConfig = gpc()
12201224 let amId = poolConfig[idxAmAsId]
12211225 let prId = poolConfig[idxPrAsId]
12221226 let lpId = poolConfig[idxLPAsId]
12231227 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
12241228 let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
12251229 let D0 = getD(xp)
12261230 let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
12271231 let index = if ((outAssetId == amId))
12281232 then 0
12291233 else if ((outAssetId == prId))
12301234 then 1
12311235 else throw("invalid out asset id")
12321236 let newY = getYD(xp, index, D1)
12331237 let dy = (xp[index] - newY)
12341238 let totalGetRaw = max([0, toInt((dy - big1))])
1235- let $t04249842547 = takeFee(totalGetRaw)
1236- let totalGet = $t04249842547._1
1237- let feeAmount = $t04249842547._2
1239+ let $t04247242521 = takeFee(totalGetRaw)
1240+ let totalGet = $t04247242521._1
1241+ let feeAmount = $t04247242521._2
12381242 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
12391243 }
12401244
12411245
12421246
12431247 @Callable(i)
12441248 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
12451249 let poolConfig = gpc()
12461250 let amId = poolConfig[idxAmAsId]
12471251 let prId = poolConfig[idxPrAsId]
12481252 let lpId = poolConfig[idxLPAsId]
12491253 let amBalance = getAccBalance(amId)
12501254 let prBalance = getAccBalance(prId)
1251- let $t04289243007 = {
1255+ let $t04286642981 = {
12521256 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
12531257 if ($isInstanceOf(@, "(Int, Int)"))
12541258 then @
12551259 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
12561260 }
1257- let totalGet = $t04289243007._1
1258- let feeAmount = $t04289243007._2
1261+ let totalGet = $t04286642981._1
1262+ let feeAmount = $t04286642981._2
12591263 let r = ego("", lpId, lpAssetAmount, this)
12601264 let outAmAmt = r._1
12611265 let outPrAmt = r._2
12621266 let sumOfGetAssets = (outAmAmt + outPrAmt)
12631267 let bonus = if ((sumOfGetAssets == 0))
12641268 then if ((totalGet == 0))
12651269 then 0
12661270 else throw("bonus calculation error")
12671271 else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
12681272 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
12691273 }
12701274
12711275
12721276
12731277 @Callable(i)
12741278 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
12751279 let r = cg(i)
12761280 let outAmAmt = r._1
12771281 let outPrAmt = r._2
12781282 let pmtAmt = r._3
12791283 let pmtAssetId = r._4
12801284 let state = r._5
12811285 if ((noLessThenAmtAsset > outAmAmt))
12821286 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
12831287 else if ((noLessThenPriceAsset > outPrAmt))
12841288 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
12851289 else {
12861290 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(pmtAmt))
12871291 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
12881292 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
12891293 then {
1290- let $t04417544256 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1291- let refreshDLpActions = $t04417544256._1
1292- let updatedDLp = $t04417544256._2
1294+ let $t04414944230 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1295+ let refreshDLpActions = $t04414944230._1
1296+ let updatedDLp = $t04414944230._2
12931297 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12941298 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12951299 then (state ++ refreshDLpActions)
12961300 else throw("Strict value is not equal to itself.")
12971301 }
12981302 else throw("Strict value is not equal to itself.")
12991303 }
13001304 }
13011305
13021306
13031307
13041308 @Callable(i)
13051309 func unstakeAndGet (amount) = {
13061310 let checkPayments = if ((size(i.payments) != 0))
13071311 then throw("No pmnts expd")
13081312 else true
13091313 if ((checkPayments == checkPayments))
13101314 then {
13111315 let cfg = gpc()
13121316 let factoryCfg = gfc()
13131317 let lpAssetId = fromBase58String(cfg[idxLPAsId])
13141318 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
13151319 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
13161320 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
13171321 if ((unstakeInv == unstakeInv))
13181322 then {
13191323 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
13201324 let outAmAmt = r._1
13211325 let outPrAmt = r._2
13221326 let sts = parseIntValue(r._9)
13231327 let state = r._10
13241328 let v = if (if (igs())
13251329 then true
13261330 else (sts == PoolShutdown))
13271331 then throw(("Blocked: " + toString(sts)))
13281332 else true
13291333 if ((v == v))
13301334 then {
13311335 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
13321336 if ((burnA == burnA))
13331337 then {
1334- let $t04531945400 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1335- let refreshDLpActions = $t04531945400._1
1336- let updatedDLp = $t04531945400._2
1338+ let $t04529345374 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1339+ let refreshDLpActions = $t04529345374._1
1340+ let updatedDLp = $t04529345374._2
13371341 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13381342 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13391343 then (state ++ refreshDLpActions)
13401344 else throw("Strict value is not equal to itself.")
13411345 }
13421346 else throw("Strict value is not equal to itself.")
13431347 }
13441348 else throw("Strict value is not equal to itself.")
13451349 }
13461350 else throw("Strict value is not equal to itself.")
13471351 }
13481352 else throw("Strict value is not equal to itself.")
13491353 }
13501354
13511355
13521356
13531357 @Callable(i)
13541358 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
13551359 let isGetDisabled = if (igs())
13561360 then true
13571361 else (cfgPoolStatus == PoolShutdown)
13581362 let checks = [if (!(isGetDisabled))
13591363 then true
13601364 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
13611365 then true
13621366 else throw("no payments are expected")]
13631367 if ((checks == checks))
13641368 then {
13651369 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
13661370 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
13671371 if ((unstakeInv == unstakeInv))
13681372 then {
13691373 let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
13701374 let outAmAmt = res._1
13711375 let outPrAmt = res._2
13721376 let state = res._10
13731377 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
13741378 then true
13751379 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
13761380 then true
13771381 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
13781382 if ((checkAmounts == checkAmounts))
13791383 then {
13801384 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
13811385 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
13821386 then {
1383- let $t04664846729 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1384- let refreshDLpActions = $t04664846729._1
1385- let updatedDLp = $t04664846729._2
1387+ let $t04662246703 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1388+ let refreshDLpActions = $t04662246703._1
1389+ let updatedDLp = $t04662246703._2
13861390 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13871391 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13881392 then (state ++ refreshDLpActions)
13891393 else throw("Strict value is not equal to itself.")
13901394 }
13911395 else throw("Strict value is not equal to itself.")
13921396 }
13931397 else throw("Strict value is not equal to itself.")
13941398 }
13951399 else throw("Strict value is not equal to itself.")
13961400 }
13971401 else throw("Strict value is not equal to itself.")
13981402 }
13991403
14001404
14011405
14021406 @Callable(i)
14031407 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
14041408 let isPoolOneTokenOperationsDisabled = {
14051409 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
14061410 if ($isInstanceOf(@, "Boolean"))
14071411 then @
14081412 else throw(($getType(@) + " couldn't be cast to Boolean"))
14091413 }
14101414 let isGetDisabled = if (if (igs())
14111415 then true
14121416 else (cfgPoolStatus == PoolShutdown))
14131417 then true
14141418 else isPoolOneTokenOperationsDisabled
14151419 let checks = [if (if (!(isGetDisabled))
14161420 then true
14171421 else isManager(i))
14181422 then true
14191423 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
14201424 then true
14211425 else throwErr("no payments are expected")]
14221426 if ((checks == checks))
14231427 then {
14241428 let cfg = gpc()
14251429 let factoryCfg = gfc()
14261430 let lpAssetId = fromBase58String(cfg[idxLPAsId])
14271431 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
14281432 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), unstakeAmount], nil)
14291433 if ((unstakeInv == unstakeInv))
14301434 then {
1431- let $t04766347851 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1432- let state = $t04766347851._1
1433- let totalAmount = $t04766347851._2
1435+ let $t04763747825 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1436+ let state = $t04763747825._1
1437+ let totalAmount = $t04763747825._2
14341438 $Tuple2(state, totalAmount)
14351439 }
14361440 else throw("Strict value is not equal to itself.")
14371441 }
14381442 else throw("Strict value is not equal to itself.")
14391443 }
14401444
14411445
14421446
14431447 @Callable(i)
14441448 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
14451449 let poolConfig = gpc()
14461450 let amId = poolConfig[idxAmAsId]
14471451 let prId = poolConfig[idxPrAsId]
14481452 let lpId = poolConfig[idxLPAsId]
1449- let $t04811048213 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1450- let lpAmount = $t04811048213._1
1451- let state = $t04811048213._2
1452- let feeAmount = $t04811048213._3
1453- let bonus = $t04811048213._4
1453+ let $t04808448187 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1454+ let lpAmount = $t04808448187._1
1455+ let state = $t04808448187._2
1456+ let feeAmount = $t04808448187._3
1457+ let bonus = $t04808448187._4
14541458 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
14551459 }
14561460
14571461
14581462
14591463 @Callable(i)
14601464 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
14611465 let poolConfig = gpc()
14621466 let amId = poolConfig[idxAmAsId]
14631467 let prId = poolConfig[idxPrAsId]
14641468 let lpId = poolConfig[idxLPAsId]
1465- let $t04849248596 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1466- let lpAmount = $t04849248596._1
1467- let state = $t04849248596._2
1468- let feeAmount = $t04849248596._3
1469- let bonus = $t04849248596._4
1469+ let $t04846648570 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1470+ let lpAmount = $t04846648570._1
1471+ let state = $t04846648570._2
1472+ let feeAmount = $t04846648570._3
1473+ let bonus = $t04846648570._4
14701474 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
14711475 }
14721476
14731477
14741478
14751479 @Callable(i)
14761480 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
14771481 then throw("denied")
14781482 else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
14791483
14801484
14811485
14821486 @Callable(i)
14831487 func setS (k,v) = if ((toString(i.caller) != strf(this, ada())))
14841488 then pd
14851489 else [StringEntry(k, v)]
14861490
14871491
14881492
14891493 @Callable(i)
14901494 func setI (k,v) = if ((toString(i.caller) != strf(this, ada())))
14911495 then pd
14921496 else [IntegerEntry(k, v)]
14931497
14941498
14951499
14961500 @Callable(i)
14971501 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
14981502
14991503
15001504
15011505 @Callable(i)
15021506 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
15031507
15041508
15051509
15061510 @Callable(i)
15071511 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
15081512 let pr = calcPrices(amAmt, prAmt, lpAmt)
15091513 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
15101514 }
15111515
15121516
15131517
15141518 @Callable(i)
15151519 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
15161520
15171521
15181522
15191523 @Callable(i)
15201524 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
15211525
15221526
15231527
15241528 @Callable(i)
15251529 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
15261530
15271531
15281532
15291533 @Callable(i)
15301534 func estimatePutOperationWrapperREADONLY (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,usrAddr,isEval,emitLp) = $Tuple2(nil, epo(txId58, slippage, inAmAmt, inAmId, inPrAmt, inPrId, usrAddr, isEval, emitLp, true, false, 0, ""))
15311535
15321536
15331537
15341538 @Callable(i)
15351539 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
15361540 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
15371541 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
15381542 }
15391543
15401544
15411545
15421546 @Callable(i)
15431547 func getFeeREADONLY () = $Tuple2(nil, fee)
15441548
15451549
15461550 @Verifier(tx)
15471551 func verify () = {
15481552 let targetPublicKey = match m() {
15491553 case pk: ByteVector =>
15501554 pk
15511555 case _: Unit =>
15521556 tx.senderPublicKey
15531557 case _ =>
15541558 throw("Match error")
15551559 }
15561560 match tx {
15571561 case order: Order =>
15581562 let matcherPub = mp()
15591563 let orderValid = validateMatcherOrderAllowed(order)
15601564 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
15611565 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
15621566 if (if (if (orderValid)
15631567 then senderValid
15641568 else false)
15651569 then matcherValid
15661570 else false)
15671571 then true
15681572 else toe(orderValid, senderValid, matcherValid)
15691573 case s: SetScriptTransaction =>
15701574 let newHash = blake2b256(value(s.script))
15711575 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
15721576 let currentHash = scriptHash(this)
15731577 if (if ((allowedHash == newHash))
15741578 then (currentHash != newHash)
15751579 else false)
15761580 then true
15771581 else sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
15781582 case _ =>
15791583 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
15801584 }
15811585 }
15821586

github/deemru/w8io/169f3d6 
387.83 ms