tx · H2TWnCioPkGbiEH5A5CRkDs42iPCS86sw4T96ZdbY3Kr

3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT:  -0.03600000 Waves

2022.12.16 11:22 [2362610] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves

{ "type": 13, "id": "H2TWnCioPkGbiEH5A5CRkDs42iPCS86sw4T96ZdbY3Kr", "fee": 3600000, "feeAssetId": null, "timestamp": 1671178975803, "version": 1, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "61MkgLVP4CbRbciSWaetgVDpnzxAFrQuefeF2Vn72tZfLmmCmAuCRdjD3QN4aTyhw82R8ChHDpXm6gTcy6oyNaRi" ], "script": "base64:BgLiKAgCEgMKAQgSAwoBCBIAEgQKAgEEEgQKAgEEEgMKAQESABIECgIIARIAEgQKAggBEgQKAggBEgQKAgEBEgMKAQESBQoDAQEBEgUKAwEIARIECgIBCBIECgIBCBIECgIICBIECgIICBIECgIIARIAEgMKAQgSBQoDAQEBEgQKAggBEgQKAgEBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEIEgAiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgRiaWcwIgRiaWcxIgRiaWcyIgRiaWczIgRiaWc0IgpzbGlwcGFnZTREIgt3YXZlc1N0cmluZyIFQW11bHQiBURjb252IgNTRVAiBUVNUFRZIgpQb29sQWN0aXZlIgpQb29sUHV0RGlzIg5Qb29sTWF0Y2hlckRpcyIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyIJaWR4UG9vbFN0IglpZHhMUEFzSWQiCWlkeEFtQXNJZCIJaWR4UHJBc0lkIgtpZHhBbXRBc0RjbSINaWR4UHJpY2VBc0RjbSILaWR4SUFtdEFzSWQiDWlkeElQcmljZUFzSWQiD2lkeEZ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AQUCZVkEAmhTCQD0AwMIBQJlWQlib2R5Qnl0ZXMJAJEDAggFAmVZBnByb29mcwAACAUCZVkPc2VuZGVyUHVibGljS2V5BAJoVAkA9AMDCAUCZVkJYm9keUJ5dGVzCQCRAwIIBQJlWQZwcm9vZnMAAQUCaFEDAwMFAmhSBQJoUwcFAmhUBwYJAQJhQgMFAmhSBQJoUwUCaFQDCQABAgUCYUcCFFNldFNjcmlwdFRyYW5zYWN0aW9uBAJkSwUCYUcEAmhVCQD2AwEJAQV2YWx1ZQEIBQJkSwZzY3JpcHQEAmhWCQDbBAEJAQV2YWx1ZQEJAJ0IAgUCYVAJAQJhegAEAmhXCQDxBwEFBHRoaXMDAwkAAAIFAmhWBQJoVQkBAiE9AgUCaFcFAmhVBwYJAPQDAwgFAmhOCWJvZHlCeXRlcwkAkQMCCAUCaE4GcHJvb2ZzAAAFAmhQCQD0AwMIBQJoTglib2R5Qnl0ZXMJAJEDAggFAmhOBnByb29mcwAABQJoUI2uYPs=", "chainId": 84, "height": 2362610, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AxhLbJVF9wXAf3YhwXkgmcJTdGfrfxmisJpW5QrkVxMu Next: JD8Uf5NgCtxf4VwW7HqZGBFxVrm1Jhc4j3M2P6Zcibht Diff:
OldNewDifferences
777777 let pmt = value(payments[0])
778778 let pmtAssetId = value(pmt.assetId)
779779 let pmtAmt = pmt.amount
780- let currentDLp = calcCurrentDLp(big0, big0, big0)
780+ let currentDLp = calcCurrentDLp(big0, big0, toBigInt(pmtAmt))
781781 if ((currentDLp == currentDLp))
782782 then {
783783 let txId58 = toBase58String(transactionId)
786786 else {
787787 let amBalance = getAccBalance(amId)
788788 let prBalance = getAccBalance(prId)
789- let $t03027430385 = {
789+ let $t03028730398 = {
790790 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
791791 if ($isInstanceOf(@, "(Int, Int)"))
792792 then @
793793 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
794794 }
795- if (($t03027430385 == $t03027430385))
795+ if (($t03028730398 == $t03028730398))
796796 then {
797- let feeAmount = $t03027430385._2
798- let totalGet = $t03027430385._1
797+ let feeAmount = $t03028730398._2
798+ let totalGet = $t03028730398._1
799799 let totalAmount = if (if ((minOutAmount > 0))
800800 then (minOutAmount > totalGet)
801801 else false)
802802 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
803803 else totalGet
804- let $t03057530882 = if ((outAssetId == amId))
804+ let $t03058830895 = if ((outAssetId == amId))
805805 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
806806 else if ((outAssetId == prId))
807807 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
808808 else throw("invalid out asset id")
809- let outAm = $t03057530882._1
810- let outPr = $t03057530882._2
811- let amBalanceNew = $t03057530882._3
812- let prBalanceNew = $t03057530882._4
809+ let outAm = $t03058830895._1
810+ let outPr = $t03058830895._2
811+ let amBalanceNew = $t03058830895._3
812+ let prBalanceNew = $t03058830895._4
813813 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
814814 let curPr = f1(curPrX18, scale8)
815815 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
824824 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
825825 if ((burn == burn))
826826 then {
827- let $t03166732017 = {
827+ let $t03168032030 = {
828828 let feeAmountForCalc = if ((this == feeCollectorAddress))
829829 then 0
830830 else feeAmount
835835 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
836836 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
837837 }
838- let amountAssetBalanceDelta = $t03166732017._1
839- let priceAssetBalanceDelta = $t03166732017._2
840- let $t03202032128 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
841- let refreshDLpActions = $t03202032128._1
842- let updatedDLp = $t03202032128._2
838+ let amountAssetBalanceDelta = $t03168032030._1
839+ let priceAssetBalanceDelta = $t03168032030._2
840+ let $t03203332141 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
841+ let refreshDLpActions = $t03203332141._1
842+ let updatedDLp = $t03203332141._2
843843 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
844844 if ((isUpdatedDLpValid == isUpdatedDLpValid))
845845 then $Tuple2((state ++ refreshDLpActions), totalAmount)
999999 else throw("Strict value is not equal to itself.")
10001000 }
10011001 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1002- let $t03598436049 = refreshDLpInternal(0, 0, 0)
1003- let refreshDLpActions = $t03598436049._1
1004- let updatedDLp = $t03598436049._2
1002+ let $t03599736062 = refreshDLpInternal(0, 0, 0)
1003+ let refreshDLpActions = $t03599736062._1
1004+ let updatedDLp = $t03599736062._2
10051005 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
10061006 if ((isUpdatedDLpValid == isUpdatedDLpValid))
10071007 then ((state ++ lpTrnsfr) ++ refreshDLpActions)
10571057 let pmt = value(i.payments[0])
10581058 let pmtAssetId = toBase58String(value(pmt.assetId))
10591059 let pmtAmt = pmt.amount
1060- let $t03718637344 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1061- if (($t03718637344 == $t03718637344))
1060+ let currentDLp = if ((pmt.assetId == cfgAmountAssetId))
1061+ then calcCurrentDLp(toBigInt(pmtAmt), toBigInt(0), toBigInt(0))
1062+ else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
1063+ if ((currentDLp == currentDLp))
10621064 then {
1063- let feeAmount = $t03718637344._3
1064- let state = $t03718637344._2
1065- let estimLP = $t03718637344._1
1066- let emitLpAmt = if (if ((minOutAmount > 0))
1067- then (minOutAmount > estimLP)
1068- else false)
1069- then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
1070- else estimLP
1071- let e = invoke(fca, "emit", [emitLpAmt], nil)
1072- if ((e == e))
1065+ let $t03741337571 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1066+ if (($t03741337571 == $t03741337571))
10731067 then {
1074- let el = match e {
1075- case legacy: Address =>
1076- invoke(legacy, "emit", [emitLpAmt], nil)
1077- case _ =>
1078- unit
1079- }
1080- if ((el == el))
1068+ let feeAmount = $t03741337571._3
1069+ let state = $t03741337571._2
1070+ let estimLP = $t03741337571._1
1071+ let emitLpAmt = if (if ((minOutAmount > 0))
1072+ then (minOutAmount > estimLP)
1073+ else false)
1074+ then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
1075+ else estimLP
1076+ let e = invoke(fca, "emit", [emitLpAmt], nil)
1077+ if ((e == e))
10811078 then {
1082- let lpTrnsfr = if (autoStake)
1079+ let el = match e {
1080+ case legacy: Address =>
1081+ invoke(legacy, "emit", [emitLpAmt], nil)
1082+ case _ =>
1083+ unit
1084+ }
1085+ if ((el == el))
10831086 then {
1084- let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)])
1085- if ((ss == ss))
1086- then nil
1087+ let lpTrnsfr = if (autoStake)
1088+ then {
1089+ let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)])
1090+ if ((ss == ss))
1091+ then nil
1092+ else throw("Strict value is not equal to itself.")
1093+ }
1094+ else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
1095+ let sendFeeToMatcher = if ((feeAmount > 0))
1096+ then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
1097+ else nil
1098+ let $t03838638735 = if ((this == feeCollectorAddress))
1099+ then $Tuple2(0, 0)
1100+ else {
1101+ let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
1102+ then true
1103+ else false
1104+ if (paymentInAmountAsset)
1105+ then $Tuple2(-(feeAmount), 0)
1106+ else $Tuple2(0, -(feeAmount))
1107+ }
1108+ let amountAssetBalanceDelta = $t03838638735._1
1109+ let priceAssetBalanceDelta = $t03838638735._2
1110+ let $t03873838846 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1111+ let refreshDLpActions = $t03873838846._1
1112+ let updatedDLp = $t03873838846._2
1113+ let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
1114+ if ((isUpdatedDLpValid == isUpdatedDLpValid))
1115+ then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
10871116 else throw("Strict value is not equal to itself.")
10881117 }
1089- else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
1090- let sendFeeToMatcher = if ((feeAmount > 0))
1091- then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
1092- else nil
1093- let $t03815938508 = if ((this == feeCollectorAddress))
1094- then $Tuple2(0, 0)
1095- else {
1096- let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
1097- then true
1098- else false
1099- if (paymentInAmountAsset)
1100- then $Tuple2(-(feeAmount), 0)
1101- else $Tuple2(0, -(feeAmount))
1102- }
1103- let amountAssetBalanceDelta = $t03815938508._1
1104- let priceAssetBalanceDelta = $t03815938508._2
1105- let $t03851138619 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1106- let refreshDLpActions = $t03851138619._1
1107- let updatedDLp = $t03851138619._2
1108- $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
1118+ else throw("Strict value is not equal to itself.")
11091119 }
11101120 else throw("Strict value is not equal to itself.")
11111121 }
11311141 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
11321142 if ((currentDLp == currentDLp))
11331143 then {
1134- let $t03957839643 = refreshDLpInternal(0, 0, 0)
1135- let refreshDLpActions = $t03957839643._1
1136- let updatedDLp = $t03957839643._2
1144+ let $t03987639941 = refreshDLpInternal(0, 0, 0)
1145+ let refreshDLpActions = $t03987639941._1
1146+ let updatedDLp = $t03987639941._2
11371147 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
11381148 if ((isUpdatedDLpValid == isUpdatedDLpValid))
11391149 then (state ++ refreshDLpActions)
11461156
11471157 @Callable(i)
11481158 func get () = {
1149- let r = cg(i)
1150- let outAmtAmt = r._1
1151- let outPrAmt = r._2
1152- let pmtAmt = r._3
1153- let pmtAssetId = r._4
1154- let state = r._5
1155- let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
1156- if ((b == b))
1159+ let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(value(i.payments[0]).amount))
1160+ if ((currentDLp == currentDLp))
11571161 then {
1158- let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(pmtAmt))
1159- let $t04043240514 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1160- let refreshDLpActions = $t04043240514._1
1161- let updatedDLp = $t04043240514._2
1162- let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
1163- if ((isUpdatedDLpValid == isUpdatedDLpValid))
1164- then (state ++ refreshDLpActions)
1162+ let r = cg(i)
1163+ let outAmtAmt = r._1
1164+ let outPrAmt = r._2
1165+ let pmtAmt = r._3
1166+ let pmtAssetId = r._4
1167+ let state = r._5
1168+ let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
1169+ if ((b == b))
1170+ then {
1171+ let $t04075540837 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1172+ let refreshDLpActions = $t04075540837._1
1173+ let updatedDLp = $t04075540837._2
1174+ let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
1175+ if ((isUpdatedDLpValid == isUpdatedDLpValid))
1176+ then (state ++ refreshDLpActions)
1177+ else throw("Strict value is not equal to itself.")
1178+ }
11651179 else throw("Strict value is not equal to itself.")
11661180 }
11671181 else throw("Strict value is not equal to itself.")
11911205 else throwErr("exactly 1 payment are expected")]
11921206 if ((checks == checks))
11931207 then {
1194- let $t04113241287 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1195- let state = $t04113241287._1
1196- let totalAmount = $t04113241287._2
1208+ let $t04145541610 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1209+ let state = $t04145541610._1
1210+ let totalAmount = $t04145541610._2
11971211 $Tuple2(state, totalAmount)
11981212 }
11991213 else throw("Strict value is not equal to itself.")
12101224 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
12111225 then {
12121226 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1213- let $t04181141875 = refreshDLpInternal(0, 0, 0)
1214- let dLpUpdateActions = $t04181141875._1
1215- let updatedDLp = $t04181141875._2
1227+ let $t04213442198 = refreshDLpInternal(0, 0, 0)
1228+ let dLpUpdateActions = $t04213442198._1
1229+ let updatedDLp = $t04213442198._2
12161230 let actions = if ((dLp != updatedDLp))
12171231 then dLpUpdateActions
12181232 else throwErr("nothing to refresh")
12411255 let newY = getYD(xp, index, D1)
12421256 let dy = (xp[index] - newY)
12431257 let totalGetRaw = max([0, toInt((dy - big1))])
1244- let $t04277542824 = takeFee(totalGetRaw)
1245- let totalGet = $t04277542824._1
1246- let feeAmount = $t04277542824._2
1258+ let $t04309843147 = takeFee(totalGetRaw)
1259+ let totalGet = $t04309843147._1
1260+ let feeAmount = $t04309843147._2
12471261 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
12481262 }
12491263
12571271 let lpId = poolConfig[idxLPAsId]
12581272 let amBalance = getAccBalance(amId)
12591273 let prBalance = getAccBalance(prId)
1260- let $t04316943284 = {
1274+ let $t04349243607 = {
12611275 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
12621276 if ($isInstanceOf(@, "(Int, Int)"))
12631277 then @
12641278 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
12651279 }
1266- let totalGet = $t04316943284._1
1267- let feeAmount = $t04316943284._2
1280+ let totalGet = $t04349243607._1
1281+ let feeAmount = $t04349243607._2
12681282 let r = ego("", lpId, lpAssetAmount, this)
12691283 let outAmAmt = r._1
12701284 let outPrAmt = r._2
12961310 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
12971311 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
12981312 then {
1299- let $t04445244533 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1300- let refreshDLpActions = $t04445244533._1
1301- let updatedDLp = $t04445244533._2
1313+ let $t04477544856 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1314+ let refreshDLpActions = $t04477544856._1
1315+ let updatedDLp = $t04477544856._2
13021316 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13031317 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13041318 then (state ++ refreshDLpActions)
13401354 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
13411355 if ((burnA == burnA))
13421356 then {
1343- let $t04559645677 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1344- let refreshDLpActions = $t04559645677._1
1345- let updatedDLp = $t04559645677._2
1357+ let $t04591946000 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1358+ let refreshDLpActions = $t04591946000._1
1359+ let updatedDLp = $t04591946000._2
13461360 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13471361 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13481362 then (state ++ refreshDLpActions)
13891403 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
13901404 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
13911405 then {
1392- let $t04692547006 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1393- let refreshDLpActions = $t04692547006._1
1394- let updatedDLp = $t04692547006._2
1406+ let $t04724847329 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1407+ let refreshDLpActions = $t04724847329._1
1408+ let updatedDLp = $t04724847329._2
13951409 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13961410 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13971411 then (state ++ refreshDLpActions)
14371451 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), unstakeAmount], nil)
14381452 if ((unstakeInv == unstakeInv))
14391453 then {
1440- let $t04794048128 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1441- let state = $t04794048128._1
1442- let totalAmount = $t04794048128._2
1454+ let $t04826348451 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1455+ let state = $t04826348451._1
1456+ let totalAmount = $t04826348451._2
14431457 $Tuple2(state, totalAmount)
14441458 }
14451459 else throw("Strict value is not equal to itself.")
14551469 let amId = poolConfig[idxAmAsId]
14561470 let prId = poolConfig[idxPrAsId]
14571471 let lpId = poolConfig[idxLPAsId]
1458- let $t04838748490 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1459- let lpAmount = $t04838748490._1
1460- let state = $t04838748490._2
1461- let feeAmount = $t04838748490._3
1462- let bonus = $t04838748490._4
1472+ let $t04871048813 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1473+ let lpAmount = $t04871048813._1
1474+ let state = $t04871048813._2
1475+ let feeAmount = $t04871048813._3
1476+ let bonus = $t04871048813._4
14631477 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
14641478 }
14651479
14711485 let amId = poolConfig[idxAmAsId]
14721486 let prId = poolConfig[idxPrAsId]
14731487 let lpId = poolConfig[idxLPAsId]
1474- let $t04876948873 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1475- let lpAmount = $t04876948873._1
1476- let state = $t04876948873._2
1477- let feeAmount = $t04876948873._3
1478- let bonus = $t04876948873._4
1488+ let $t04909249196 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1489+ let lpAmount = $t04909249196._1
1490+ let state = $t04909249196._2
1491+ let feeAmount = $t04909249196._3
1492+ let bonus = $t04909249196._4
14791493 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
14801494 }
14811495
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 fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
7777
7878
7979 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
8080
8181
8282 func abs (val) = if ((zeroBigInt > val))
8383 then -(val)
8484 else val
8585
8686
8787 func absBigInt (val) = if ((zeroBigInt > val))
8888 then -(val)
8989 else val
9090
9191
9292 func fc () = "%s__factoryContract"
9393
9494
9595 func mpk () = "%s__managerPublicKey"
9696
9797
9898 func pmpk () = "%s__pendingManagerPublicKey"
9999
100100
101101 func pl () = "%s%s__price__last"
102102
103103
104104 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
105105
106106
107107 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
108108
109109
110110 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
111111
112112
113113 func aa () = "%s__amountAsset"
114114
115115
116116 func pa () = "%s__priceAsset"
117117
118118
119119 func amp () = "%s__amp"
120120
121121
122122 func ada () = "%s__addonAddr"
123123
124124
125125 let keyFee = "%s__fee"
126126
127127 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
128128
129129 let keyDLp = makeString(["%s", "dLp"], SEP)
130130
131131 let keyDLpRefreshedHeight = makeString(["%s", "dLpRefreshedHeight"], SEP)
132132
133133 let keyDLpRefreshDelay = makeString(["%s", "refreshDLpDelay"], SEP)
134134
135135 let dLpRefreshDelayDefault = 1
136136
137137 let dLpRefreshDelay = valueOrElse(getInteger(this, keyDLpRefreshDelay), dLpRefreshDelayDefault)
138138
139139 func fcfg () = "%s__factoryConfig"
140140
141141
142142 func mtpk () = "%s%s__matcher__publicKey"
143143
144144
145145 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
146146
147147
148148 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
149149
150150
151151 func aps () = "%s__shutdown"
152152
153153
154154 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
155155
156156
157157 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
158158
159159
160160 func toe (orV,sendrV,matchV) = throw(((((("Failed: ordValid=" + toString(orV)) + " sndrValid=") + toString(sendrV)) + " mtchrValid=") + toString(matchV)))
161161
162162
163163 func str (val) = match val {
164164 case valStr: String =>
165165 valStr
166166 case _ =>
167167 throw("fail cast to String")
168168 }
169169
170170
171171 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
172172
173173
174174 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
175175
176176
177177 func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
178178
179179
180180 func fmtErr (msg) = makeString(["lp_stable.ride:", msg], " ")
181181
182182
183183 let fca = addressFromStringValue(strf(this, fc()))
184184
185185 let A = strf(this, amp())
186186
187187 func igs () = valueOrElse(getBoolean(fca, aps()), false)
188188
189189
190190 func mp () = fromBase58String(strf(fca, mtpk()))
191191
192192
193193 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
194194
195195 func gpc () = {
196196 let amtAs = strf(this, aa())
197197 let priceAs = strf(this, pa())
198198 let iPriceAs = intf(fca, mba(priceAs))
199199 let iAmtAs = intf(fca, mba(amtAs))
200200 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
201201 }
202202
203203
204204 func parseAssetId (input) = if ((input == wavesString))
205205 then unit
206206 else fromBase58String(input)
207207
208208
209209 func assetIdToString (input) = if ((input == unit))
210210 then wavesString
211211 else toBase58String(value(input))
212212
213213
214214 func parsePoolConfig (poolConfig) = $Tuple7(addressFromStringValue(poolConfig[idxPoolAddress]), parseIntValue(poolConfig[idxPoolSt]), fromBase58String(poolConfig[idxLPAsId]), parseAssetId(poolConfig[idxAmAsId]), parseAssetId(poolConfig[idxPrAsId]), parseIntValue(poolConfig[idxAmtAsDcm]), parseIntValue(poolConfig[idxPriceAsDcm]))
215215
216216
217217 let poolConfigParsed = parsePoolConfig(gpc())
218218
219219 let $t074067592 = poolConfigParsed
220220
221221 let cfgPoolAddress = $t074067592._1
222222
223223 let cfgPoolStatus = $t074067592._2
224224
225225 let cfgLpAssetId = $t074067592._3
226226
227227 let cfgAmountAssetId = $t074067592._4
228228
229229 let cfgPriceAssetId = $t074067592._5
230230
231231 let cfgAmountAssetDecimals = $t074067592._6
232232
233233 let cfgPriceAssetDecimals = $t074067592._7
234234
235235 func gfc () = split(strf(fca, fcfg()), SEP)
236236
237237
238238 let factoryConfig = gfc()
239239
240240 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
241241
242242 let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
243243
244244 let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
245245
246246 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
247247
248248 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)
249249
250250
251251 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)
252252
253253
254254 func getAccBalance (assetId) = if ((assetId == "WAVES"))
255255 then wavesBalance(this).available
256256 else assetBalance(this, fromBase58String(assetId))
257257
258258
259259 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
260260
261261
262262 func vad (A1,A2,slippage) = {
263263 let diff = fraction((A1 - A2), scale8BigInt, A2)
264264 let pass = ((slippage - abs(diff)) > zeroBigInt)
265265 if (!(pass))
266266 then throw(("Big slpg: " + toString(diff)))
267267 else $Tuple2(pass, min([A1, A2]))
268268 }
269269
270270
271271 func vd (D1,D0,slpg) = {
272272 let diff = fraction(D0, scale8BigInt, D1)
273273 let fail = (slpg > diff)
274274 if (if (fail)
275275 then true
276276 else (D0 > D1))
277277 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
278278 else fail
279279 }
280280
281281
282282 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
283283 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
284284 let prAsAmtX18 = t1(prAmt, prAssetDcm)
285285 cpbi(prAsAmtX18, amtAsAmtX18)
286286 }
287287
288288
289289 func calcPrices (amAmt,prAmt,lpAmt) = {
290290 let cfg = gpc()
291291 let amtAsDcm = parseIntValue(cfg[idxAmtAsDcm])
292292 let prAsDcm = parseIntValue(cfg[idxPriceAsDcm])
293293 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
294294 let amAmtX18 = t1(amAmt, amtAsDcm)
295295 let prAmtX18 = t1(prAmt, prAsDcm)
296296 let lpAmtX18 = t1(lpAmt, scale8)
297297 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
298298 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
299299 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
300300 }
301301
302302
303303 func calculatePrices (amAmt,prAmt,lpAmt) = {
304304 let p = calcPrices(amAmt, prAmt, lpAmt)
305305 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
306306 }
307307
308308
309309 func takeFee (amount) = {
310310 let feeAmount = fraction(amount, fee, scale8)
311311 $Tuple2((amount - feeAmount), feeAmount)
312312 }
313313
314314
315315 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
316316 let cfg = gpc()
317317 let lpId = cfg[idxLPAsId]
318318 let amId = cfg[idxAmAsId]
319319 let prId = cfg[idxPrAsId]
320320 let amDcm = parseIntValue(cfg[idxAmtAsDcm])
321321 let prDcm = parseIntValue(cfg[idxPriceAsDcm])
322322 let sts = cfg[idxPoolSt]
323323 let lpEmiss = valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "Wrong LP id").quantity
324324 if ((lpId != pmtAssetId))
325325 then throw("Wrong pmt asset")
326326 else {
327327 let amBalance = getAccBalance(amId)
328328 let amBalanceX18 = t1(amBalance, amDcm)
329329 let prBalance = getAccBalance(prId)
330330 let prBalanceX18 = t1(prBalance, prDcm)
331331 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
332332 let curPrice = f1(curPriceX18, scale8)
333333 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
334334 let lpEmissX18 = t1(lpEmiss, scale8)
335335 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
336336 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
337337 let outAmAmt = fromX18Round(outAmAmtX18, amDcm, FLOOR)
338338 let outPrAmt = fromX18Round(outPrAmtX18, prDcm, FLOOR)
339339 let state = if ((txId58 == ""))
340340 then nil
341341 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
342342 then unit
343343 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
344344 then unit
345345 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)]
346346 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
347347 }
348348 }
349349
350350
351351 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
352352 let cfg = gpc()
353353 let lpId = fromBase58String(cfg[idxLPAsId])
354354 let amIdStr = cfg[idxAmAsId]
355355 let prIdStr = cfg[idxPrAsId]
356356 let inAmIdStr = cfg[idxIAmtAsId]
357357 let inPrIdStr = cfg[idxIPriceAsId]
358358 let amtDcm = parseIntValue(cfg[idxAmtAsDcm])
359359 let priceDcm = parseIntValue(cfg[idxPriceAsDcm])
360360 let sts = cfg[idxPoolSt]
361361 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
362362 let amBalance = if (isEval)
363363 then getAccBalance(amIdStr)
364364 else if (if (isOneAsset)
365365 then (pmtId == amIdStr)
366366 else false)
367367 then (getAccBalance(amIdStr) - pmtAmt)
368368 else if (isOneAsset)
369369 then getAccBalance(amIdStr)
370370 else (getAccBalance(amIdStr) - inAmAmt)
371371 let prBalance = if (isEval)
372372 then getAccBalance(prIdStr)
373373 else if (if (isOneAsset)
374374 then (pmtId == prIdStr)
375375 else false)
376376 then (getAccBalance(prIdStr) - pmtAmt)
377377 else if (isOneAsset)
378378 then getAccBalance(prIdStr)
379379 else (getAccBalance(prIdStr) - inPrAmt)
380380 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
381381 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
382382 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
383383 let amBalanceX18 = t1(amBalance, amtDcm)
384384 let prBalanceX18 = t1(prBalance, priceDcm)
385385 let r = if ((lpEm == 0))
386386 then {
387387 let curPriceX18 = zeroBigInt
388388 let slippageX18 = zeroBigInt
389389 let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN)
390390 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
391391 }
392392 else {
393393 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
394394 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
395395 let slippageX18 = t1(slippage, scale8)
396396 if (if (if (validateSlippage)
397397 then (curPriceX18 != zeroBigInt)
398398 else false)
399399 then (slippageRealX18 > slippageX18)
400400 else false)
401401 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
402402 else {
403403 let lpEmissionX18 = t1(lpEm, scale8)
404404 let prViaAmX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
405405 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
406406 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
407407 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
408408 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
409409 let expAmtAssetAmtX18 = expectedAmts._1
410410 let expPriceAssetAmtX18 = expectedAmts._2
411411 let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18)
412412 $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18)
413413 }
414414 }
415415 let calcLpAmt = r._1
416416 let calcAmAssetPmt = r._2
417417 let calcPrAssetPmt = r._3
418418 let curPrice = f1(r._4, scale8)
419419 let slippageCalc = f1(r._5, scale8)
420420 if ((0 >= calcLpAmt))
421421 then throw("LP <= 0")
422422 else {
423423 let emitLpAmt = if (!(emitLp))
424424 then 0
425425 else calcLpAmt
426426 let amDiff = (inAmAmt - calcAmAssetPmt)
427427 let prDiff = (inPrAmt - calcPrAssetPmt)
428428 let $t01811218457 = if (if (isOneAsset)
429429 then (pmtId == amIdStr)
430430 else false)
431431 then $Tuple2(pmtAmt, 0)
432432 else if (if (isOneAsset)
433433 then (pmtId == prIdStr)
434434 else false)
435435 then $Tuple2(0, pmtAmt)
436436 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
437437 let writeAmAmt = $t01811218457._1
438438 let writePrAmt = $t01811218457._2
439439 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))]
440440 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
441441 }
442442 }
443443
444444
445445 func getD (xp) = {
446446 let xp0 = xp[0]
447447 let xp1 = xp[1]
448448 let s = (xp0 + xp1)
449449 if ((s == big0))
450450 then big0
451451 else {
452452 let a = parseIntValue(A)
453453 let ann = (a * 2)
454454 let p = fraction(xp0, xp1, big1)
455455 let xp0_xp1_n_n = fraction(p, big4, big1)
456456 let ann_s = fraction(toBigInt(ann), s, big1)
457457 let ann_1 = toBigInt((ann - 1))
458458 func calcDNext (d) = {
459459 let dd = fraction(d, d, big1)
460460 let ddd = fraction(dd, d, big1)
461461 let dp = fraction(ddd, big1, xp0_xp1_n_n)
462462 fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)), CEILING)
463463 }
464464
465465 func calc (acc,i) = if (acc._2)
466466 then acc
467467 else {
468468 let d = acc._1
469469 let dNext = calcDNext(d)
470470 let dDiffRaw = toInt((dNext - value(d)))
471471 let dDiff = if ((0 > dDiffRaw))
472472 then -(dDiffRaw)
473473 else dDiffRaw
474474 if ((1 >= dDiff))
475475 then $Tuple2(dNext, true)
476476 else $Tuple2(dNext, false)
477477 }
478478
479479 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
480480 let $t02038520433 = {
481481 let $l = arr
482482 let $s = size($l)
483483 let $acc0 = $Tuple2(s, false)
484484 func $f0_1 ($a,$i) = if (($i >= $s))
485485 then $a
486486 else calc($a, $l[$i])
487487
488488 func $f0_2 ($a,$i) = if (($i >= $s))
489489 then $a
490490 else throw("List size exceeds 15")
491491
492492 $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)
493493 }
494494 let d = $t02038520433._1
495495 let found = $t02038520433._2
496496 if (found)
497497 then d
498498 else throw(("D calculation error, D = " + toString(d)))
499499 }
500500 }
501501
502502
503503 func getDOld (xp) = {
504504 let n = big2
505505 let xp0 = xp[0]
506506 let xp1 = xp[1]
507507 let aPrecision = parseBigIntValue(Amult)
508508 let a = (parseBigIntValue(A) * aPrecision)
509509 let s = (xp0 + xp1)
510510 if ((s == big0))
511511 then big0
512512 else {
513513 let ann = (a * n)
514514 let xp0_xp1_n_n = (((xp0 * xp1) * n) * n)
515515 let ann_s_aPrecision = ((ann * s) / aPrecision)
516516 let ann_aPrecision = (ann - aPrecision)
517517 let n1 = (n + big1)
518518 func calc (acc,cur) = {
519519 let $t02106221082 = acc
520520 let d = $t02106221082._1
521521 let found = $t02106221082._2
522522 if ((found != unit))
523523 then acc
524524 else {
525525 let dp = (((d * d) * d) / xp0_xp1_n_n)
526526 let dNext = (((ann_s_aPrecision + (dp * n)) * d) / (((ann_aPrecision * d) / aPrecision) + (n1 * dp)))
527527 let dDiff = absBigInt((dNext - value(d)))
528528 if ((big1 >= dDiff))
529529 then $Tuple2(dNext, cur)
530530 else $Tuple2(dNext, unit)
531531 }
532532 }
533533
534534 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
535535 let $t02150321550 = {
536536 let $l = arr
537537 let $s = size($l)
538538 let $acc0 = $Tuple2(s, unit)
539539 func $f0_1 ($a,$i) = if (($i >= $s))
540540 then $a
541541 else calc($a, $l[$i])
542542
543543 func $f0_2 ($a,$i) = if (($i >= $s))
544544 then $a
545545 else throw("List size exceeds 15")
546546
547547 $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)
548548 }
549549 let d = $t02150321550._1
550550 let found = $t02150321550._2
551551 if ((found != unit))
552552 then d
553553 else throw(("D calculation error, D = " + toString(d)))
554554 }
555555 }
556556
557557
558558 func getYD (xp,i,D) = {
559559 let n = big2
560560 let x = xp[if ((i == 0))
561561 then 1
562562 else 0]
563563 let aPrecision = parseBigIntValue(Amult)
564564 let a = (parseBigIntValue(A) * aPrecision)
565565 let s = x
566566 let ann = (a * n)
567567 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
568568 let b = ((s + ((D * aPrecision) / ann)) - D)
569569 func calc (acc,cur) = {
570570 let $t02205022070 = acc
571571 let y = $t02205022070._1
572572 let found = $t02205022070._2
573573 if ((found != unit))
574574 then acc
575575 else {
576576 let yNext = (((y * y) + c) / ((big2 * y) + b))
577577 let yDiff = absBigInt((yNext - value(y)))
578578 if ((big1 >= yDiff))
579579 then $Tuple2(yNext, cur)
580580 else $Tuple2(yNext, unit)
581581 }
582582 }
583583
584584 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
585585 let $t02237722424 = {
586586 let $l = arr
587587 let $s = size($l)
588588 let $acc0 = $Tuple2(D, unit)
589589 func $f0_1 ($a,$i) = if (($i >= $s))
590590 then $a
591591 else calc($a, $l[$i])
592592
593593 func $f0_2 ($a,$i) = if (($i >= $s))
594594 then $a
595595 else throw("List size exceeds 15")
596596
597597 $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)
598598 }
599599 let y = $t02237722424._1
600600 let found = $t02237722424._2
601601 if ((found != unit))
602602 then y
603603 else throw(("Y calculation error, Y = " + toString(y)))
604604 }
605605
606606
607607 func calcDLp (amountBalance,priceBalance,lpEmission) = {
608608 let updatedDLp = fraction(getD([amountBalance, priceBalance]), scale18, lpEmission)
609609 if ((lpEmission == big0))
610610 then big0
611611 else updatedDLp
612612 }
613613
614614
615615 func calcCurrentDLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
616616 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
617617 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
618618 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
619619 let currentDLp = calcDLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
620620 currentDLp
621621 }
622622
623623
624624 func refreshDLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
625625 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
626626 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
627627 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
628628 let updatedDLp = calcDLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
629629 let actions = [IntegerEntry(keyDLpRefreshedHeight, height), StringEntry(keyDLp, toString(updatedDLp))]
630630 $Tuple2(actions, updatedDLp)
631631 }
632632
633633
634634 func validateUpdatedDLp (oldDLp,updatedDLp) = if ((updatedDLp >= oldDLp))
635635 then true
636636 else throwErr("updated DLp lower than current DLp")
637637
638638
639639 func validateMatcherOrderAllowed (order) = {
640640 let amountAssetAmount = order.amount
641641 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
642642 let $t02436324575 = if ((order.orderType == Buy))
643643 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
644644 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
645645 let amountAssetBalanceDelta = $t02436324575._1
646646 let priceAssetBalanceDelta = $t02436324575._2
647647 if (if (if (igs())
648648 then true
649649 else (cfgPoolStatus == PoolMatcherDis))
650650 then true
651651 else (cfgPoolStatus == PoolShutdown))
652652 then throw("Admin blocked")
653653 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
654654 then true
655655 else (order.assetPair.priceAsset != cfgPriceAssetId))
656656 then throw("Wr assets")
657657 else {
658658 let dLp = parseBigIntValue(getStringValue(this, keyDLp))
659659 let $t02490525005 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
660660 let unusedActions = $t02490525005._1
661661 let dLpNew = $t02490525005._2
662662 let isOrderValid = (dLpNew >= dLp)
663663 isOrderValid
664664 }
665665 }
666666
667667
668668 func cg (i) = if ((size(i.payments) != 1))
669669 then throw("1 pmnt exp")
670670 else {
671671 let pmt = value(i.payments[0])
672672 let pmtAssetId = value(pmt.assetId)
673673 let pmtAmt = pmt.amount
674674 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
675675 let outAmAmt = r._1
676676 let outPrAmt = r._2
677677 let sts = parseIntValue(r._9)
678678 let state = r._10
679679 if (if (igs())
680680 then true
681681 else (sts == PoolShutdown))
682682 then throw(("Admin blocked: " + toString(sts)))
683683 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
684684 }
685685
686686
687687 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
688688 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
689689 let sts = parseIntValue(r._8)
690690 if (if (if (igs())
691691 then true
692692 else (sts == PoolPutDis))
693693 then true
694694 else (sts == PoolShutdown))
695695 then throw(("Blocked:" + toString(sts)))
696696 else r
697697 }
698698
699699
700700 func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = {
701701 let poolConfig = gpc()
702702 let amId = poolConfig[idxAmAsId]
703703 let prId = poolConfig[idxPrAsId]
704704 let lpId = poolConfig[idxLPAsId]
705705 let amtDcm = parseIntValue(poolConfig[idxAmtAsDcm])
706706 let priceDcm = parseIntValue(poolConfig[idxPriceAsDcm])
707707 let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
708708 let chechEmission = if ((lpAssetEmission > big0))
709709 then true
710710 else throw("initial deposit requires all coins")
711711 if ((chechEmission == chechEmission))
712712 then {
713713 let amBalance = getAccBalance(amId)
714714 let prBalance = getAccBalance(prId)
715715 let $t02732227784 = if ((txId == ""))
716716 then $Tuple2(amBalance, prBalance)
717717 else if ((pmtAssetId == amId))
718718 then if ((pmtAmtRaw > amBalance))
719719 then throw("invalid payment amount")
720720 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
721721 else if ((pmtAssetId == prId))
722722 then if ((pmtAmtRaw > prBalance))
723723 then throw("invalid payment amount")
724724 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
725725 else throw("wrong pmtAssetId")
726726 let amBalanceOld = $t02732227784._1
727727 let prBalanceOld = $t02732227784._2
728728 let $t02779027966 = if ((pmtAssetId == amId))
729729 then $Tuple2(pmtAmtRaw, 0)
730730 else if ((pmtAssetId == prId))
731731 then $Tuple2(0, pmtAmtRaw)
732732 else throw("invalid payment")
733733 let amAmountRaw = $t02779027966._1
734734 let prAmountRaw = $t02779027966._2
735735 let $t02797028209 = if (withTakeFee)
736736 then $Tuple3(takeFee(amAmountRaw)._1, takeFee(prAmountRaw)._1, takeFee(pmtAmtRaw)._2)
737737 else $Tuple3(amAmountRaw, prAmountRaw, 0)
738738 let amAmount = $t02797028209._1
739739 let prAmount = $t02797028209._2
740740 let feeAmount = $t02797028209._3
741741 let amBalanceNew = (amBalanceOld + amAmount)
742742 let prBalanceNew = (prBalanceOld + prAmount)
743743 let D0 = getD([toBigInt(amBalanceOld), toBigInt(prBalanceOld)])
744744 let D1 = getD([toBigInt(amBalanceNew), toBigInt(prBalanceNew)])
745745 let checkD = if ((D1 > D0))
746746 then true
747747 else throw()
748748 if ((checkD == checkD))
749749 then {
750750 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0, FLOOR)
751751 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
752752 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))]
753753 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
754754 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
755755 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
756756 let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
757757 let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
758758 $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
759759 }
760760 else throw("Strict value is not equal to itself.")
761761 }
762762 else throw("Strict value is not equal to itself.")
763763 }
764764
765765
766766 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
767767 let poolConfig = gpc()
768768 let lpId = poolConfig[idxLPAsId]
769769 let amId = poolConfig[idxAmAsId]
770770 let prId = poolConfig[idxPrAsId]
771771 let amDecimals = parseIntValue(poolConfig[idxAmtAsDcm])
772772 let prDecimals = parseIntValue(poolConfig[idxPriceAsDcm])
773773 let poolStatus = poolConfig[idxPoolSt]
774774 let userAddress = if ((caller == restContract))
775775 then originCaller
776776 else caller
777777 let pmt = value(payments[0])
778778 let pmtAssetId = value(pmt.assetId)
779779 let pmtAmt = pmt.amount
780- let currentDLp = calcCurrentDLp(big0, big0, big0)
780+ let currentDLp = calcCurrentDLp(big0, big0, toBigInt(pmtAmt))
781781 if ((currentDLp == currentDLp))
782782 then {
783783 let txId58 = toBase58String(transactionId)
784784 if ((lpId != toBase58String(pmtAssetId)))
785785 then throw("Wrong LP")
786786 else {
787787 let amBalance = getAccBalance(amId)
788788 let prBalance = getAccBalance(prId)
789- let $t03027430385 = {
789+ let $t03028730398 = {
790790 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
791791 if ($isInstanceOf(@, "(Int, Int)"))
792792 then @
793793 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
794794 }
795- if (($t03027430385 == $t03027430385))
795+ if (($t03028730398 == $t03028730398))
796796 then {
797- let feeAmount = $t03027430385._2
798- let totalGet = $t03027430385._1
797+ let feeAmount = $t03028730398._2
798+ let totalGet = $t03028730398._1
799799 let totalAmount = if (if ((minOutAmount > 0))
800800 then (minOutAmount > totalGet)
801801 else false)
802802 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
803803 else totalGet
804- let $t03057530882 = if ((outAssetId == amId))
804+ let $t03058830895 = if ((outAssetId == amId))
805805 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
806806 else if ((outAssetId == prId))
807807 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
808808 else throw("invalid out asset id")
809- let outAm = $t03057530882._1
810- let outPr = $t03057530882._2
811- let amBalanceNew = $t03057530882._3
812- let prBalanceNew = $t03057530882._4
809+ let outAm = $t03058830895._1
810+ let outPr = $t03058830895._2
811+ let amBalanceNew = $t03058830895._3
812+ let prBalanceNew = $t03058830895._4
813813 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
814814 let curPr = f1(curPrX18, scale8)
815815 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
816816 then unit
817817 else fromBase58String(outAssetId)
818818 let sendFeeToMatcher = if ((feeAmount > 0))
819819 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
820820 else nil
821821 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)
822822 if ((state == state))
823823 then {
824824 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
825825 if ((burn == burn))
826826 then {
827- let $t03166732017 = {
827+ let $t03168032030 = {
828828 let feeAmountForCalc = if ((this == feeCollectorAddress))
829829 then 0
830830 else feeAmount
831831 let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId))
832832 then true
833833 else false
834834 if (outInAmountAsset)
835835 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
836836 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
837837 }
838- let amountAssetBalanceDelta = $t03166732017._1
839- let priceAssetBalanceDelta = $t03166732017._2
840- let $t03202032128 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
841- let refreshDLpActions = $t03202032128._1
842- let updatedDLp = $t03202032128._2
838+ let amountAssetBalanceDelta = $t03168032030._1
839+ let priceAssetBalanceDelta = $t03168032030._2
840+ let $t03203332141 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
841+ let refreshDLpActions = $t03203332141._1
842+ let updatedDLp = $t03203332141._2
843843 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
844844 if ((isUpdatedDLpValid == isUpdatedDLpValid))
845845 then $Tuple2((state ++ refreshDLpActions), totalAmount)
846846 else throw("Strict value is not equal to itself.")
847847 }
848848 else throw("Strict value is not equal to itself.")
849849 }
850850 else throw("Strict value is not equal to itself.")
851851 }
852852 else throw("Strict value is not equal to itself.")
853853 }
854854 }
855855 else throw("Strict value is not equal to itself.")
856856 }
857857
858858
859859 func m () = match getString(mpk()) {
860860 case s: String =>
861861 fromBase58String(s)
862862 case _: Unit =>
863863 unit
864864 case _ =>
865865 throw("Match error")
866866 }
867867
868868
869869 func pm () = match getString(pmpk()) {
870870 case s: String =>
871871 fromBase58String(s)
872872 case _: Unit =>
873873 unit
874874 case _ =>
875875 throw("Match error")
876876 }
877877
878878
879879 let pd = throw("Permission denied")
880880
881881 func isManager (i) = match m() {
882882 case pk: ByteVector =>
883883 (i.callerPublicKey == pk)
884884 case _: Unit =>
885885 (i.caller == this)
886886 case _ =>
887887 throw("Match error")
888888 }
889889
890890
891891 func mm (i) = match m() {
892892 case pk: ByteVector =>
893893 if ((i.callerPublicKey == pk))
894894 then true
895895 else pd
896896 case _: Unit =>
897897 if ((i.caller == this))
898898 then true
899899 else pd
900900 case _ =>
901901 throw("Match error")
902902 }
903903
904904
905905 @Callable(i)
906906 func constructor (fc) = {
907907 let c = mm(i)
908908 if ((c == c))
909909 then [StringEntry(fc(), fc)]
910910 else throw("Strict value is not equal to itself.")
911911 }
912912
913913
914914
915915 @Callable(i)
916916 func setManager (pendingManagerPublicKey) = {
917917 let c = mm(i)
918918 if ((c == c))
919919 then {
920920 let cm = fromBase58String(pendingManagerPublicKey)
921921 if ((cm == cm))
922922 then [StringEntry(pmpk(), pendingManagerPublicKey)]
923923 else throw("Strict value is not equal to itself.")
924924 }
925925 else throw("Strict value is not equal to itself.")
926926 }
927927
928928
929929
930930 @Callable(i)
931931 func confirmManager () = {
932932 let p = pm()
933933 let hpm = if (isDefined(p))
934934 then true
935935 else throw("No pending manager")
936936 if ((hpm == hpm))
937937 then {
938938 let cpm = if ((i.callerPublicKey == value(p)))
939939 then true
940940 else throw("You are not pending manager")
941941 if ((cpm == cpm))
942942 then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())]
943943 else throw("Strict value is not equal to itself.")
944944 }
945945 else throw("Strict value is not equal to itself.")
946946 }
947947
948948
949949
950950 @Callable(i)
951951 func put (slip,autoStake) = {
952952 let factCfg = gfc()
953953 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
954954 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
955955 if ((0 > slip))
956956 then throw("Wrong slippage")
957957 else if ((size(i.payments) != 2))
958958 then throw("2 pmnts expd")
959959 else {
960960 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
961961 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
962962 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
963963 if ((currentDLp == currentDLp))
964964 then {
965965 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, "")
966966 let emitLpAmt = e._2
967967 let lpAssetId = e._7
968968 let state = e._9
969969 let amDiff = e._10
970970 let prDiff = e._11
971971 let amId = e._12
972972 let prId = e._13
973973 let r = invoke(fca, "emit", [emitLpAmt], nil)
974974 if ((r == r))
975975 then {
976976 let el = match r {
977977 case legacy: Address =>
978978 invoke(legacy, "emit", [emitLpAmt], nil)
979979 case _ =>
980980 unit
981981 }
982982 if ((el == el))
983983 then {
984984 let sa = if ((amDiff > 0))
985985 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
986986 else nil
987987 if ((sa == sa))
988988 then {
989989 let sp = if ((prDiff > 0))
990990 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
991991 else nil
992992 if ((sp == sp))
993993 then {
994994 let lpTrnsfr = if (autoStake)
995995 then {
996996 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
997997 if ((ss == ss))
998998 then nil
999999 else throw("Strict value is not equal to itself.")
10001000 }
10011001 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1002- let $t03598436049 = refreshDLpInternal(0, 0, 0)
1003- let refreshDLpActions = $t03598436049._1
1004- let updatedDLp = $t03598436049._2
1002+ let $t03599736062 = refreshDLpInternal(0, 0, 0)
1003+ let refreshDLpActions = $t03599736062._1
1004+ let updatedDLp = $t03599736062._2
10051005 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
10061006 if ((isUpdatedDLpValid == isUpdatedDLpValid))
10071007 then ((state ++ lpTrnsfr) ++ refreshDLpActions)
10081008 else throw("Strict value is not equal to itself.")
10091009 }
10101010 else throw("Strict value is not equal to itself.")
10111011 }
10121012 else throw("Strict value is not equal to itself.")
10131013 }
10141014 else throw("Strict value is not equal to itself.")
10151015 }
10161016 else throw("Strict value is not equal to itself.")
10171017 }
10181018 else throw("Strict value is not equal to itself.")
10191019 }
10201020 }
10211021
10221022
10231023
10241024 @Callable(i)
10251025 func putOneTknV2 (minOutAmount,autoStake) = {
10261026 let isPoolOneTokenOperationsDisabled = {
10271027 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
10281028 if ($isInstanceOf(@, "Boolean"))
10291029 then @
10301030 else throw(($getType(@) + " couldn't be cast to Boolean"))
10311031 }
10321032 let isPutDisabled = if (if (if (igs())
10331033 then true
10341034 else (cfgPoolStatus == PoolPutDis))
10351035 then true
10361036 else (cfgPoolStatus == PoolShutdown))
10371037 then true
10381038 else isPoolOneTokenOperationsDisabled
10391039 let checks = [if (if (!(isPutDisabled))
10401040 then true
10411041 else isManager(i))
10421042 then true
10431043 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
10441044 then true
10451045 else throwErr("exactly 1 payment are expected")]
10461046 if ((checks == checks))
10471047 then {
10481048 let poolConfig = gpc()
10491049 let amId = poolConfig[idxAmAsId]
10501050 let prId = poolConfig[idxPrAsId]
10511051 let lpId = fromBase58String(poolConfig[idxLPAsId])
10521052 let amDecimals = parseIntValue(poolConfig[idxAmtAsDcm])
10531053 let prDecimals = parseIntValue(poolConfig[idxPriceAsDcm])
10541054 let userAddress = if ((i.caller == this))
10551055 then i.originCaller
10561056 else i.caller
10571057 let pmt = value(i.payments[0])
10581058 let pmtAssetId = toBase58String(value(pmt.assetId))
10591059 let pmtAmt = pmt.amount
1060- let $t03718637344 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1061- if (($t03718637344 == $t03718637344))
1060+ let currentDLp = if ((pmt.assetId == cfgAmountAssetId))
1061+ then calcCurrentDLp(toBigInt(pmtAmt), toBigInt(0), toBigInt(0))
1062+ else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
1063+ if ((currentDLp == currentDLp))
10621064 then {
1063- let feeAmount = $t03718637344._3
1064- let state = $t03718637344._2
1065- let estimLP = $t03718637344._1
1066- let emitLpAmt = if (if ((minOutAmount > 0))
1067- then (minOutAmount > estimLP)
1068- else false)
1069- then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
1070- else estimLP
1071- let e = invoke(fca, "emit", [emitLpAmt], nil)
1072- if ((e == e))
1065+ let $t03741337571 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1066+ if (($t03741337571 == $t03741337571))
10731067 then {
1074- let el = match e {
1075- case legacy: Address =>
1076- invoke(legacy, "emit", [emitLpAmt], nil)
1077- case _ =>
1078- unit
1079- }
1080- if ((el == el))
1068+ let feeAmount = $t03741337571._3
1069+ let state = $t03741337571._2
1070+ let estimLP = $t03741337571._1
1071+ let emitLpAmt = if (if ((minOutAmount > 0))
1072+ then (minOutAmount > estimLP)
1073+ else false)
1074+ then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
1075+ else estimLP
1076+ let e = invoke(fca, "emit", [emitLpAmt], nil)
1077+ if ((e == e))
10811078 then {
1082- let lpTrnsfr = if (autoStake)
1079+ let el = match e {
1080+ case legacy: Address =>
1081+ invoke(legacy, "emit", [emitLpAmt], nil)
1082+ case _ =>
1083+ unit
1084+ }
1085+ if ((el == el))
10831086 then {
1084- let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)])
1085- if ((ss == ss))
1086- then nil
1087+ let lpTrnsfr = if (autoStake)
1088+ then {
1089+ let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)])
1090+ if ((ss == ss))
1091+ then nil
1092+ else throw("Strict value is not equal to itself.")
1093+ }
1094+ else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
1095+ let sendFeeToMatcher = if ((feeAmount > 0))
1096+ then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
1097+ else nil
1098+ let $t03838638735 = if ((this == feeCollectorAddress))
1099+ then $Tuple2(0, 0)
1100+ else {
1101+ let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
1102+ then true
1103+ else false
1104+ if (paymentInAmountAsset)
1105+ then $Tuple2(-(feeAmount), 0)
1106+ else $Tuple2(0, -(feeAmount))
1107+ }
1108+ let amountAssetBalanceDelta = $t03838638735._1
1109+ let priceAssetBalanceDelta = $t03838638735._2
1110+ let $t03873838846 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1111+ let refreshDLpActions = $t03873838846._1
1112+ let updatedDLp = $t03873838846._2
1113+ let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
1114+ if ((isUpdatedDLpValid == isUpdatedDLpValid))
1115+ then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
10871116 else throw("Strict value is not equal to itself.")
10881117 }
1089- else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
1090- let sendFeeToMatcher = if ((feeAmount > 0))
1091- then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
1092- else nil
1093- let $t03815938508 = if ((this == feeCollectorAddress))
1094- then $Tuple2(0, 0)
1095- else {
1096- let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
1097- then true
1098- else false
1099- if (paymentInAmountAsset)
1100- then $Tuple2(-(feeAmount), 0)
1101- else $Tuple2(0, -(feeAmount))
1102- }
1103- let amountAssetBalanceDelta = $t03815938508._1
1104- let priceAssetBalanceDelta = $t03815938508._2
1105- let $t03851138619 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1106- let refreshDLpActions = $t03851138619._1
1107- let updatedDLp = $t03851138619._2
1108- $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
1118+ else throw("Strict value is not equal to itself.")
11091119 }
11101120 else throw("Strict value is not equal to itself.")
11111121 }
11121122 else throw("Strict value is not equal to itself.")
11131123 }
11141124 else throw("Strict value is not equal to itself.")
11151125 }
11161126 else throw("Strict value is not equal to itself.")
11171127 }
11181128
11191129
11201130
11211131 @Callable(i)
11221132 func putForFree (maxSlpg) = if ((0 > maxSlpg))
11231133 then throw("Wrong slpg")
11241134 else if ((size(i.payments) != 2))
11251135 then throw("2 pmnts expd")
11261136 else {
11271137 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, "")
11281138 let state = estPut._9
11291139 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
11301140 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
11311141 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
11321142 if ((currentDLp == currentDLp))
11331143 then {
1134- let $t03957839643 = refreshDLpInternal(0, 0, 0)
1135- let refreshDLpActions = $t03957839643._1
1136- let updatedDLp = $t03957839643._2
1144+ let $t03987639941 = refreshDLpInternal(0, 0, 0)
1145+ let refreshDLpActions = $t03987639941._1
1146+ let updatedDLp = $t03987639941._2
11371147 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
11381148 if ((isUpdatedDLpValid == isUpdatedDLpValid))
11391149 then (state ++ refreshDLpActions)
11401150 else throw("Strict value is not equal to itself.")
11411151 }
11421152 else throw("Strict value is not equal to itself.")
11431153 }
11441154
11451155
11461156
11471157 @Callable(i)
11481158 func get () = {
1149- let r = cg(i)
1150- let outAmtAmt = r._1
1151- let outPrAmt = r._2
1152- let pmtAmt = r._3
1153- let pmtAssetId = r._4
1154- let state = r._5
1155- let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
1156- if ((b == b))
1159+ let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(value(i.payments[0]).amount))
1160+ if ((currentDLp == currentDLp))
11571161 then {
1158- let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(pmtAmt))
1159- let $t04043240514 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1160- let refreshDLpActions = $t04043240514._1
1161- let updatedDLp = $t04043240514._2
1162- let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
1163- if ((isUpdatedDLpValid == isUpdatedDLpValid))
1164- then (state ++ refreshDLpActions)
1162+ let r = cg(i)
1163+ let outAmtAmt = r._1
1164+ let outPrAmt = r._2
1165+ let pmtAmt = r._3
1166+ let pmtAssetId = r._4
1167+ let state = r._5
1168+ let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
1169+ if ((b == b))
1170+ then {
1171+ let $t04075540837 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1172+ let refreshDLpActions = $t04075540837._1
1173+ let updatedDLp = $t04075540837._2
1174+ let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
1175+ if ((isUpdatedDLpValid == isUpdatedDLpValid))
1176+ then (state ++ refreshDLpActions)
1177+ else throw("Strict value is not equal to itself.")
1178+ }
11651179 else throw("Strict value is not equal to itself.")
11661180 }
11671181 else throw("Strict value is not equal to itself.")
11681182 }
11691183
11701184
11711185
11721186 @Callable(i)
11731187 func getOneTknV2 (outAssetId,minOutAmount) = {
11741188 let isPoolOneTokenOperationsDisabled = {
11751189 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
11761190 if ($isInstanceOf(@, "Boolean"))
11771191 then @
11781192 else throw(($getType(@) + " couldn't be cast to Boolean"))
11791193 }
11801194 let isGetDisabled = if (if (igs())
11811195 then true
11821196 else (cfgPoolStatus == PoolShutdown))
11831197 then true
11841198 else isPoolOneTokenOperationsDisabled
11851199 let checks = [if (if (!(isGetDisabled))
11861200 then true
11871201 else isManager(i))
11881202 then true
11891203 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
11901204 then true
11911205 else throwErr("exactly 1 payment are expected")]
11921206 if ((checks == checks))
11931207 then {
1194- let $t04113241287 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1195- let state = $t04113241287._1
1196- let totalAmount = $t04113241287._2
1208+ let $t04145541610 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1209+ let state = $t04145541610._1
1210+ let totalAmount = $t04145541610._2
11971211 $Tuple2(state, totalAmount)
11981212 }
11991213 else throw("Strict value is not equal to itself.")
12001214 }
12011215
12021216
12031217
12041218 @Callable(i)
12051219 func refreshDLp () = {
12061220 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyDLpRefreshedHeight), 0)
12071221 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= dLpRefreshDelay))
12081222 then unit
12091223 else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], ""))
12101224 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
12111225 then {
12121226 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1213- let $t04181141875 = refreshDLpInternal(0, 0, 0)
1214- let dLpUpdateActions = $t04181141875._1
1215- let updatedDLp = $t04181141875._2
1227+ let $t04213442198 = refreshDLpInternal(0, 0, 0)
1228+ let dLpUpdateActions = $t04213442198._1
1229+ let updatedDLp = $t04213442198._2
12161230 let actions = if ((dLp != updatedDLp))
12171231 then dLpUpdateActions
12181232 else throwErr("nothing to refresh")
12191233 $Tuple2(actions, toString(updatedDLp))
12201234 }
12211235 else throw("Strict value is not equal to itself.")
12221236 }
12231237
12241238
12251239
12261240 @Callable(i)
12271241 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
12281242 let poolConfig = gpc()
12291243 let amId = poolConfig[idxAmAsId]
12301244 let prId = poolConfig[idxPrAsId]
12311245 let lpId = poolConfig[idxLPAsId]
12321246 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
12331247 let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
12341248 let D0 = getD(xp)
12351249 let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
12361250 let index = if ((outAssetId == amId))
12371251 then 0
12381252 else if ((outAssetId == prId))
12391253 then 1
12401254 else throw("invalid out asset id")
12411255 let newY = getYD(xp, index, D1)
12421256 let dy = (xp[index] - newY)
12431257 let totalGetRaw = max([0, toInt((dy - big1))])
1244- let $t04277542824 = takeFee(totalGetRaw)
1245- let totalGet = $t04277542824._1
1246- let feeAmount = $t04277542824._2
1258+ let $t04309843147 = takeFee(totalGetRaw)
1259+ let totalGet = $t04309843147._1
1260+ let feeAmount = $t04309843147._2
12471261 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
12481262 }
12491263
12501264
12511265
12521266 @Callable(i)
12531267 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
12541268 let poolConfig = gpc()
12551269 let amId = poolConfig[idxAmAsId]
12561270 let prId = poolConfig[idxPrAsId]
12571271 let lpId = poolConfig[idxLPAsId]
12581272 let amBalance = getAccBalance(amId)
12591273 let prBalance = getAccBalance(prId)
1260- let $t04316943284 = {
1274+ let $t04349243607 = {
12611275 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
12621276 if ($isInstanceOf(@, "(Int, Int)"))
12631277 then @
12641278 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
12651279 }
1266- let totalGet = $t04316943284._1
1267- let feeAmount = $t04316943284._2
1280+ let totalGet = $t04349243607._1
1281+ let feeAmount = $t04349243607._2
12681282 let r = ego("", lpId, lpAssetAmount, this)
12691283 let outAmAmt = r._1
12701284 let outPrAmt = r._2
12711285 let sumOfGetAssets = (outAmAmt + outPrAmt)
12721286 let bonus = if ((sumOfGetAssets == 0))
12731287 then if ((totalGet == 0))
12741288 then 0
12751289 else throw("bonus calculation error")
12761290 else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
12771291 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
12781292 }
12791293
12801294
12811295
12821296 @Callable(i)
12831297 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
12841298 let r = cg(i)
12851299 let outAmAmt = r._1
12861300 let outPrAmt = r._2
12871301 let pmtAmt = r._3
12881302 let pmtAssetId = r._4
12891303 let state = r._5
12901304 if ((noLessThenAmtAsset > outAmAmt))
12911305 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
12921306 else if ((noLessThenPriceAsset > outPrAmt))
12931307 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
12941308 else {
12951309 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(pmtAmt))
12961310 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
12971311 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
12981312 then {
1299- let $t04445244533 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1300- let refreshDLpActions = $t04445244533._1
1301- let updatedDLp = $t04445244533._2
1313+ let $t04477544856 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1314+ let refreshDLpActions = $t04477544856._1
1315+ let updatedDLp = $t04477544856._2
13021316 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13031317 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13041318 then (state ++ refreshDLpActions)
13051319 else throw("Strict value is not equal to itself.")
13061320 }
13071321 else throw("Strict value is not equal to itself.")
13081322 }
13091323 }
13101324
13111325
13121326
13131327 @Callable(i)
13141328 func unstakeAndGet (amount) = {
13151329 let checkPayments = if ((size(i.payments) != 0))
13161330 then throw("No pmnts expd")
13171331 else true
13181332 if ((checkPayments == checkPayments))
13191333 then {
13201334 let cfg = gpc()
13211335 let factoryCfg = gfc()
13221336 let lpAssetId = fromBase58String(cfg[idxLPAsId])
13231337 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
13241338 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
13251339 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
13261340 if ((unstakeInv == unstakeInv))
13271341 then {
13281342 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
13291343 let outAmAmt = r._1
13301344 let outPrAmt = r._2
13311345 let sts = parseIntValue(r._9)
13321346 let state = r._10
13331347 let v = if (if (igs())
13341348 then true
13351349 else (sts == PoolShutdown))
13361350 then throw(("Blocked: " + toString(sts)))
13371351 else true
13381352 if ((v == v))
13391353 then {
13401354 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
13411355 if ((burnA == burnA))
13421356 then {
1343- let $t04559645677 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1344- let refreshDLpActions = $t04559645677._1
1345- let updatedDLp = $t04559645677._2
1357+ let $t04591946000 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1358+ let refreshDLpActions = $t04591946000._1
1359+ let updatedDLp = $t04591946000._2
13461360 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13471361 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13481362 then (state ++ refreshDLpActions)
13491363 else throw("Strict value is not equal to itself.")
13501364 }
13511365 else throw("Strict value is not equal to itself.")
13521366 }
13531367 else throw("Strict value is not equal to itself.")
13541368 }
13551369 else throw("Strict value is not equal to itself.")
13561370 }
13571371 else throw("Strict value is not equal to itself.")
13581372 }
13591373
13601374
13611375
13621376 @Callable(i)
13631377 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
13641378 let isGetDisabled = if (igs())
13651379 then true
13661380 else (cfgPoolStatus == PoolShutdown)
13671381 let checks = [if (!(isGetDisabled))
13681382 then true
13691383 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
13701384 then true
13711385 else throw("no payments are expected")]
13721386 if ((checks == checks))
13731387 then {
13741388 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
13751389 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
13761390 if ((unstakeInv == unstakeInv))
13771391 then {
13781392 let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
13791393 let outAmAmt = res._1
13801394 let outPrAmt = res._2
13811395 let state = res._10
13821396 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
13831397 then true
13841398 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
13851399 then true
13861400 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
13871401 if ((checkAmounts == checkAmounts))
13881402 then {
13891403 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
13901404 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
13911405 then {
1392- let $t04692547006 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1393- let refreshDLpActions = $t04692547006._1
1394- let updatedDLp = $t04692547006._2
1406+ let $t04724847329 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1407+ let refreshDLpActions = $t04724847329._1
1408+ let updatedDLp = $t04724847329._2
13951409 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13961410 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13971411 then (state ++ refreshDLpActions)
13981412 else throw("Strict value is not equal to itself.")
13991413 }
14001414 else throw("Strict value is not equal to itself.")
14011415 }
14021416 else throw("Strict value is not equal to itself.")
14031417 }
14041418 else throw("Strict value is not equal to itself.")
14051419 }
14061420 else throw("Strict value is not equal to itself.")
14071421 }
14081422
14091423
14101424
14111425 @Callable(i)
14121426 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
14131427 let isPoolOneTokenOperationsDisabled = {
14141428 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
14151429 if ($isInstanceOf(@, "Boolean"))
14161430 then @
14171431 else throw(($getType(@) + " couldn't be cast to Boolean"))
14181432 }
14191433 let isGetDisabled = if (if (igs())
14201434 then true
14211435 else (cfgPoolStatus == PoolShutdown))
14221436 then true
14231437 else isPoolOneTokenOperationsDisabled
14241438 let checks = [if (if (!(isGetDisabled))
14251439 then true
14261440 else isManager(i))
14271441 then true
14281442 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
14291443 then true
14301444 else throwErr("no payments are expected")]
14311445 if ((checks == checks))
14321446 then {
14331447 let cfg = gpc()
14341448 let factoryCfg = gfc()
14351449 let lpAssetId = fromBase58String(cfg[idxLPAsId])
14361450 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
14371451 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), unstakeAmount], nil)
14381452 if ((unstakeInv == unstakeInv))
14391453 then {
1440- let $t04794048128 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1441- let state = $t04794048128._1
1442- let totalAmount = $t04794048128._2
1454+ let $t04826348451 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1455+ let state = $t04826348451._1
1456+ let totalAmount = $t04826348451._2
14431457 $Tuple2(state, totalAmount)
14441458 }
14451459 else throw("Strict value is not equal to itself.")
14461460 }
14471461 else throw("Strict value is not equal to itself.")
14481462 }
14491463
14501464
14511465
14521466 @Callable(i)
14531467 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
14541468 let poolConfig = gpc()
14551469 let amId = poolConfig[idxAmAsId]
14561470 let prId = poolConfig[idxPrAsId]
14571471 let lpId = poolConfig[idxLPAsId]
1458- let $t04838748490 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1459- let lpAmount = $t04838748490._1
1460- let state = $t04838748490._2
1461- let feeAmount = $t04838748490._3
1462- let bonus = $t04838748490._4
1472+ let $t04871048813 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1473+ let lpAmount = $t04871048813._1
1474+ let state = $t04871048813._2
1475+ let feeAmount = $t04871048813._3
1476+ let bonus = $t04871048813._4
14631477 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
14641478 }
14651479
14661480
14671481
14681482 @Callable(i)
14691483 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
14701484 let poolConfig = gpc()
14711485 let amId = poolConfig[idxAmAsId]
14721486 let prId = poolConfig[idxPrAsId]
14731487 let lpId = poolConfig[idxLPAsId]
1474- let $t04876948873 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1475- let lpAmount = $t04876948873._1
1476- let state = $t04876948873._2
1477- let feeAmount = $t04876948873._3
1478- let bonus = $t04876948873._4
1488+ let $t04909249196 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1489+ let lpAmount = $t04909249196._1
1490+ let state = $t04909249196._2
1491+ let feeAmount = $t04909249196._3
1492+ let bonus = $t04909249196._4
14791493 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
14801494 }
14811495
14821496
14831497
14841498 @Callable(i)
14851499 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
14861500 then throw("denied")
14871501 else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
14881502
14891503
14901504
14911505 @Callable(i)
14921506 func setS (k,v) = if ((toString(i.caller) != strf(this, ada())))
14931507 then pd
14941508 else [StringEntry(k, v)]
14951509
14961510
14971511
14981512 @Callable(i)
14991513 func setI (k,v) = if ((toString(i.caller) != strf(this, ada())))
15001514 then pd
15011515 else [IntegerEntry(k, v)]
15021516
15031517
15041518
15051519 @Callable(i)
15061520 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
15071521
15081522
15091523
15101524 @Callable(i)
15111525 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
15121526
15131527
15141528
15151529 @Callable(i)
15161530 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
15171531 let pr = calcPrices(amAmt, prAmt, lpAmt)
15181532 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
15191533 }
15201534
15211535
15221536
15231537 @Callable(i)
15241538 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
15251539
15261540
15271541
15281542 @Callable(i)
15291543 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
15301544
15311545
15321546
15331547 @Callable(i)
15341548 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
15351549
15361550
15371551
15381552 @Callable(i)
15391553 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, ""))
15401554
15411555
15421556
15431557 @Callable(i)
15441558 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
15451559 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
15461560 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
15471561 }
15481562
15491563
15501564
15511565 @Callable(i)
15521566 func getFeeREADONLY () = $Tuple2(nil, fee)
15531567
15541568
15551569 @Verifier(tx)
15561570 func verify () = {
15571571 let targetPublicKey = match m() {
15581572 case pk: ByteVector =>
15591573 pk
15601574 case _: Unit =>
15611575 tx.senderPublicKey
15621576 case _ =>
15631577 throw("Match error")
15641578 }
15651579 match tx {
15661580 case order: Order =>
15671581 let matcherPub = mp()
15681582 let orderValid = validateMatcherOrderAllowed(order)
15691583 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
15701584 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
15711585 if (if (if (orderValid)
15721586 then senderValid
15731587 else false)
15741588 then matcherValid
15751589 else false)
15761590 then true
15771591 else toe(orderValid, senderValid, matcherValid)
15781592 case s: SetScriptTransaction =>
15791593 let newHash = blake2b256(value(s.script))
15801594 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
15811595 let currentHash = scriptHash(this)
15821596 if (if ((allowedHash == newHash))
15831597 then (currentHash != newHash)
15841598 else false)
15851599 then true
15861600 else sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
15871601 case _ =>
15881602 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
15891603 }
15901604 }
15911605

github/deemru/w8io/169f3d6 
216.09 ms