tx · 8bVEnGxcTvQfrHMV95qHcB6s8FGSHdENQHVrWDbJbGxo

3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA:  -0.04100000 Waves

2023.08.14 17:43 [2710366] smart account 3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA > SELF 0.00000000 Waves

{ "type": 13, "id": "8bVEnGxcTvQfrHMV95qHcB6s8FGSHdENQHVrWDbJbGxo", "fee": 4100000, "feeAssetId": null, "timestamp": 1692024187223, "version": 2, "chainId": 84, "sender": "3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA", "senderPublicKey": "35yd3qw1gxKDxKwGAykHN9fANbXNWwseaUwbWDj24o3x", "proofs": [ "MDjENi7rYZnAwVZ4vViAaHrG2abjuNoByBifTngNoxkvFoM5tjKpijYLNzdUDbAb9HEjPQu3vYp8QMbatfPCiPk" ], "script": "base64:BgKALQgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgQKAgEEEgQKAgEEEgMKAQESABIECgIIARIAEgQKAggBEgQKAggBEgQKAgEBEgMKAQESBQoDAQEBEgUKAwEIARIECgIBCBIECgIBCBIECgIICBIAEgMKAQgSBQoDAQEBEgQKAggBEgQKAgEBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEIEgAiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgRiaWcwIgRiaWcxIgRiaWcyIgRiaWczIgRiaWc0IgpzbGlwcGFnZTREIgt3YXZlc1N0cmluZyIKYW1wSW5pdGlhbCIFQW11bHQiBURjb252IgNTRVAiBUVNUFRZIgpQb29sQWN0aXZlIgpQb29sUHV0RGlzIg5Qb29sTWF0Y2hlckRpcyIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyIJaWR4UG9vbFN0IglpZHhMUEFzSWQiCWlkeEFtQXNJZCIJaWR4UHJBc0lkIgtpZHhBbXRBc0RjbSINaWR4UHJpY2VBc0RjbSILaWR4SUFtdEFzSWQ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JpeAkBAmJpAAQCaXkDCQECZ0IACQCUCgIGAgAJAQJmZQEFAmZmBAJhSwgFAml5Al8xBAJhTAgFAml5Al8yBAJhTQkA9AMDCAUCZmYJYm9keUJ5dGVzCQCRAwIIBQJmZgZwcm9vZnMAAAgFAmZmD3NlbmRlclB1YmxpY0tleQQCYU4JAPQDAwgFAmZmCWJvZHlCeXRlcwkAkQMCCAUCZmYGcHJvb2ZzAAEFAml4AwMDBQJhSwUCYU0HBQJhTgcGCQECYUoEBQJhSwUCYUwFAmFNBQJhTgMJAAECBQJhUQIUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAmFWBQJhUQMJAPQDAwgFAml1CWJvZHlCeXRlcwkAkQMCCAUCaXUGcHJvb2ZzAAAFAml3BgQCaXoJAPYDAQkBBXZhbHVlAQgFAmFWBnNjcmlwdAQCaUEJANsEAQkBBXZhbHVlAQkAnQgCBQJhVQkBAmFGAAQCaUIJAPEHAQUEdGhpcwMJAAACBQJpQQUCaXoJAQIhPQIFAmlCBQJpegcJAPQDAwgFAml1CWJvZHlCeXRlcwkAkQMCCAUCaXUGcHJvb2ZzAAAFAml3HraL3A==", "height": 2710366, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 47i53UrnX2ht5Tr49XFC3R6zYfW6R4Xdgd6UNdUaDbZ9 Next: 6faV9THtV3Ht8RK8hmYbgKanU8j9sfbGT5CHzZVH2r1W Diff:
OldNewDifferences
10511051 then true
10521052 else throw("new D is fewer error")
10531053 if ((checkD == checkD))
1054- then $Tuple2([ScriptTransfer(addressFromStringValue(addressTo), totalGetRaw, parseAssetId(assetOut))], totalGetRaw)
1054+ then {
1055+ let refreshDLpActions = refreshDLpInternal(0, 0, 0)._1
1056+ if ((refreshDLpActions == refreshDLpActions))
1057+ then $Tuple2(([ScriptTransfer(addressFromStringValue(addressTo), totalGetRaw, parseAssetId(assetOut))] ++ refreshDLpActions), totalGetRaw)
1058+ else throw("Strict value is not equal to itself.")
1059+ }
10551060 else throw("Strict value is not equal to itself.")
10561061 }
10571062 else throw("Strict value is not equal to itself.")
11321137 else throw("Strict value is not equal to itself.")
11331138 }
11341139 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1135- let $t04203442176 = refreshDLpInternal(0, 0, 0)
1136- let refreshDLpActions = $t04203442176._1
1137- let updatedDLp = $t04203442176._2
1140+ let $t04211642258 = refreshDLpInternal(0, 0, 0)
1141+ let refreshDLpActions = $t04211642258._1
1142+ let updatedDLp = $t04211642258._2
11381143 let check = if ((updatedDLp >= currentDLp))
11391144 then true
11401145 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
12071212 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12081213 if ((currentDLp == currentDLp))
12091214 then {
1210- let $t04381743975 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1211- if (($t04381743975 == $t04381743975))
1215+ let $t04389944057 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1216+ if (($t04389944057 == $t04389944057))
12121217 then {
1213- let feeAmount = $t04381743975._3
1214- let state = $t04381743975._2
1215- let estimLP = $t04381743975._1
1218+ let feeAmount = $t04389944057._3
1219+ let state = $t04389944057._2
1220+ let estimLP = $t04389944057._1
12161221 let emitLpAmt = if (if ((minOutAmount > 0))
12171222 then (minOutAmount > estimLP)
12181223 else false)
12401245 let sendFeeToMatcher = if ((feeAmount > 0))
12411246 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12421247 else nil
1243- let $t04486045209 = if ((this == feeCollectorAddress))
1248+ let $t04494245291 = if ((this == feeCollectorAddress))
12441249 then $Tuple2(0, 0)
12451250 else {
12461251 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12501255 then $Tuple2(-(feeAmount), 0)
12511256 else $Tuple2(0, -(feeAmount))
12521257 }
1253- let amountAssetBalanceDelta = $t04486045209._1
1254- let priceAssetBalanceDelta = $t04486045209._2
1255- let $t04521245320 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1256- let refreshDLpActions = $t04521245320._1
1257- let updatedDLp = $t04521245320._2
1258+ let amountAssetBalanceDelta = $t04494245291._1
1259+ let priceAssetBalanceDelta = $t04494245291._2
1260+ let $t04529445402 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1261+ let refreshDLpActions = $t04529445402._1
1262+ let updatedDLp = $t04529445402._2
12581263 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12591264 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12601265 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
12861291 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
12871292 if ((currentDLp == currentDLp))
12881293 then {
1289- let $t04635046415 = refreshDLpInternal(0, 0, 0)
1290- let refreshDLpActions = $t04635046415._1
1291- let updatedDLp = $t04635046415._2
1294+ let $t04643246497 = refreshDLpInternal(0, 0, 0)
1295+ let refreshDLpActions = $t04643246497._1
1296+ let updatedDLp = $t04643246497._2
12921297 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12931298 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12941299 then (state ++ refreshDLpActions)
13131318 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13141319 if ((b == b))
13151320 then {
1316- let $t04758847670 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1317- let refreshDLpActions = $t04758847670._1
1318- let updatedDLp = $t04758847670._2
1321+ let $t04767047752 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1322+ let refreshDLpActions = $t04767047752._1
1323+ let updatedDLp = $t04767047752._2
13191324 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13201325 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13211326 then (state ++ refreshDLpActions)
13501355 else throwErr("exactly 1 payment are expected")]
13511356 if ((checks == checks))
13521357 then {
1353- let $t04828848443 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1354- let state = $t04828848443._1
1355- let totalAmount = $t04828848443._2
1358+ let $t04837048525 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1359+ let state = $t04837048525._1
1360+ let totalAmount = $t04837048525._2
13561361 $Tuple2(state, totalAmount)
13571362 }
13581363 else throw("Strict value is not equal to itself.")
13691374 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13701375 then {
13711376 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1372- let $t04896749031 = refreshDLpInternal(0, 0, 0)
1373- let dLpUpdateActions = $t04896749031._1
1374- let updatedDLp = $t04896749031._2
1377+ let $t04904949113 = refreshDLpInternal(0, 0, 0)
1378+ let dLpUpdateActions = $t04904949113._1
1379+ let updatedDLp = $t04904949113._2
13751380 let actions = if ((dLp != updatedDLp))
13761381 then dLpUpdateActions
13771382 else throwErr("nothing to refresh")
13991404 let newY = getYD(xp, index, D1)
14001405 let dy = (xp[index] - newY)
14011406 let totalGetRaw = max([0, toInt((dy - big1))])
1402- let $t05004150096 = takeFee(totalGetRaw, outFee)
1403- let totalGet = $t05004150096._1
1404- let feeAmount = $t05004150096._2
1407+ let $t05012350178 = takeFee(totalGetRaw, outFee)
1408+ let totalGet = $t05012350178._1
1409+ let feeAmount = $t05012350178._2
14051410 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14061411 }
14071412
14141419 let lpId = toBase58String(value(cfgLpAssetId))
14151420 let amBalance = getAccBalance(amId)
14161421 let prBalance = getAccBalance(prId)
1417- let $t05047150586 = {
1422+ let $t05055350668 = {
14181423 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14191424 if ($isInstanceOf(@, "(Int, Int)"))
14201425 then @
14211426 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14221427 }
1423- let totalGet = $t05047150586._1
1424- let feeAmount = $t05047150586._2
1428+ let totalGet = $t05055350668._1
1429+ let feeAmount = $t05055350668._2
14251430 let r = ego("", lpId, lpAssetAmount, this)
14261431 let outAmAmt = r._1
14271432 let outPrAmt = r._2
14551460 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14561461 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14571462 then {
1458- let $t05175251833 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1459- let refreshDLpActions = $t05175251833._1
1460- let updatedDLp = $t05175251833._2
1463+ let $t05183451915 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1464+ let refreshDLpActions = $t05183451915._1
1465+ let updatedDLp = $t05183451915._2
14611466 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14621467 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14631468 then (state ++ refreshDLpActions)
15021507 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15031508 if ((burnA == burnA))
15041509 then {
1505- let $t05286052941 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1506- let refreshDLpActions = $t05286052941._1
1507- let updatedDLp = $t05286052941._2
1510+ let $t05294253023 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1511+ let refreshDLpActions = $t05294253023._1
1512+ let updatedDLp = $t05294253023._2
15081513 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15091514 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15101515 then (state ++ refreshDLpActions)
15551560 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15561561 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15571562 then {
1558- let $t05419254273 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1559- let refreshDLpActions = $t05419254273._1
1560- let updatedDLp = $t05419254273._2
1563+ let $t05427454355 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1564+ let refreshDLpActions = $t05427454355._1
1565+ let updatedDLp = $t05427454355._2
15611566 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15621567 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15631568 then (state ++ refreshDLpActions)
16061611 let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
16071612 if ((unstakeInv == unstakeInv))
16081613 then {
1609- let $t05529555483 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1610- let state = $t05529555483._1
1611- let totalAmount = $t05529555483._2
1614+ let $t05537755565 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1615+ let state = $t05537755565._1
1616+ let totalAmount = $t05537755565._2
16121617 $Tuple2(state, totalAmount)
16131618 }
16141619 else throw("Strict value is not equal to itself.")
16201625
16211626 @Callable(i)
16221627 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1623- let $t05561155714 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1624- let lpAmount = $t05561155714._1
1625- let state = $t05561155714._2
1626- let feeAmount = $t05561155714._3
1627- let bonus = $t05561155714._4
1628+ let $t05569355796 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1629+ let lpAmount = $t05569355796._1
1630+ let state = $t05569355796._2
1631+ let feeAmount = $t05569355796._3
1632+ let bonus = $t05569355796._4
16281633 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16291634 }
16301635
16321637
16331638 @Callable(i)
16341639 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1635- let $t05586255966 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1636- let lpAmount = $t05586255966._1
1637- let state = $t05586255966._2
1638- let feeAmount = $t05586255966._3
1639- let bonus = $t05586255966._4
1640+ let $t05594456048 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1641+ let lpAmount = $t05594456048._1
1642+ let state = $t05594456048._2
1643+ let feeAmount = $t05594456048._3
1644+ let bonus = $t05594456048._4
16401645 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16411646 }
16421647
16981703 @Callable(i)
16991704 func changeAmp () = {
17001705 let cfg = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1701- let $t05844658645 = match cfg {
1706+ let $t05852858727 = match cfg {
17021707 case list: List[Any] =>
17031708 $Tuple3({
17041709 let @ = list[0]
17191724 case _ =>
17201725 throwErr("invalid entry type")
17211726 }
1722- let delay = $t05844658645._1
1723- let delta = $t05844658645._2
1724- let target = $t05844658645._3
1727+ let delay = $t05852858727._1
1728+ let delta = $t05852858727._2
1729+ let target = $t05852858727._3
17251730 let curAmp = parseIntValue(getStringValue(amp()))
17261731 let newAmpRaw = (curAmp + delta)
17271732 let newAmp = if ((0 > delta))
17571762 match tx {
17581763 case order: Order =>
17591764 let matcherPub = mp()
1760- let $t05957859695 = if (skipOrderValidation())
1765+ let $t05966059777 = if (skipOrderValidation())
17611766 then $Tuple2(true, "")
17621767 else validateMatcherOrderAllowed(order)
1763- let orderValid = $t05957859695._1
1764- let orderValidInfo = $t05957859695._2
1768+ let orderValid = $t05966059777._1
1769+ let orderValidInfo = $t05966059777._2
17651770 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17661771 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17671772 if (if (if (orderValid)
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 ampInitial = 50
2727
2828 let Amult = "100"
2929
3030 let Dconv = "1"
3131
3232 let SEP = "__"
3333
3434 let EMPTY = ""
3535
3636 let PoolActive = 1
3737
3838 let PoolPutDis = 2
3939
4040 let PoolMatcherDis = 3
4141
4242 let PoolShutdown = 4
4343
4444 let idxPoolAddress = 1
4545
4646 let idxPoolSt = 2
4747
4848 let idxLPAsId = 3
4949
5050 let idxAmAsId = 4
5151
5252 let idxPrAsId = 5
5353
5454 let idxAmtAsDcm = 6
5555
5656 let idxPriceAsDcm = 7
5757
5858 let idxIAmtAsId = 8
5959
6060 let idxIPriceAsId = 9
6161
6262 let idxFactStakCntr = 1
6363
6464 let idxFactoryRestCntr = 6
6565
6666 let idxFactSlippCntr = 7
6767
6868 let idxFactGwxRewCntr = 10
6969
7070 let feeDefault = fraction(10, scale8, 10000)
7171
7272 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
7373
7474
7575 func t1BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult)
7676
7777
7878 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
7979
8080
8181 func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
8282
8383
8484 func t2 (origVal,origScaleMult) = fraction(origVal, scale18, toBigInt(origScaleMult))
8585
8686
8787 func f2 (val,resultScaleMult) = fraction(val, toBigInt(resultScaleMult), scale18)
8888
8989
9090 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
9191
9292
9393 func abs (val) = if ((zeroBigInt > val))
9494 then -(val)
9595 else val
9696
9797
9898 func absBigInt (val) = if ((zeroBigInt > val))
9999 then -(val)
100100 else val
101101
102102
103103 func fc () = "%s__factoryContract"
104104
105105
106106 func keyManagerPublicKey () = "%s__managerPublicKey"
107107
108108
109109 func keyManagerVaultAddress () = "%s__managerVaultAddress"
110110
111111
112112 func pl () = "%s%s__price__last"
113113
114114
115115 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
116116
117117
118118 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
119119
120120
121121 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
122122
123123
124124 func aa () = "%s__amountAsset"
125125
126126
127127 func pa () = "%s__priceAsset"
128128
129129
130130 func amp () = "%s__amp"
131131
132132
133133 func keyAmpHistory (heightBlocks) = ("%s%d__amp__" + toString(heightBlocks))
134134
135135
136136 func keyChangeAmpLastCall () = "%s__changeAmpLastCall"
137137
138138
139139 let keyFee = "%s__fee"
140140
141141 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
142142
143143 let keyDLp = makeString(["%s", "dLp"], SEP)
144144
145145 let keyDLpRefreshedHeight = makeString(["%s", "dLpRefreshedHeight"], SEP)
146146
147147 let keyDLpRefreshDelay = makeString(["%s", "refreshDLpDelay"], SEP)
148148
149149 let dLpRefreshDelayDefault = 30
150150
151151 let dLpRefreshDelay = valueOrElse(getInteger(this, keyDLpRefreshDelay), dLpRefreshDelayDefault)
152152
153153 func fcfg () = "%s__factoryConfig"
154154
155155
156156 func mtpk () = "%s%s__matcher__publicKey"
157157
158158
159159 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
160160
161161
162162 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
163163
164164
165165 func aps () = "%s__shutdown"
166166
167167
168168 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
169169
170170
171171 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
172172
173173
174174 func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress)
175175
176176
177177 func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
178178
179179
180180 func addressFromStringOrThis (addressString) = match addressFromString(addressString) {
181181 case a: Address =>
182182 a
183183 case _ =>
184184 this
185185 }
186186
187187
188188 func getManagerVaultAddressOrThis () = {
189189 let factoryAddress = match getString(fc()) {
190190 case fca: String =>
191191 addressFromStringOrThis(fca)
192192 case _ =>
193193 this
194194 }
195195 match getString(factoryAddress, keyManagerVaultAddress()) {
196196 case s: String =>
197197 addressFromStringOrThis(s)
198198 case _ =>
199199 this
200200 }
201201 }
202202
203203
204204 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
205205
206206
207207 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
208208
209209
210210 func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
211211
212212
213213 func fmtErr (msg) = makeString(["lp_stable.ride:", msg], " ")
214214
215215
216216 let fca = addressFromStringValue(strf(this, fc()))
217217
218218 let inFee = {
219219 let @ = invoke(fca, "getInFeeREADONLY", [toString(this)], nil)
220220 if ($isInstanceOf(@, "Int"))
221221 then @
222222 else throw(($getType(@) + " couldn't be cast to Int"))
223223 }
224224
225225 let outFee = {
226226 let @ = invoke(fca, "getOutFeeREADONLY", [toString(this)], nil)
227227 if ($isInstanceOf(@, "Int"))
228228 then @
229229 else throw(($getType(@) + " couldn't be cast to Int"))
230230 }
231231
232232 let A = strf(this, amp())
233233
234234 func igs () = valueOrElse(getBoolean(fca, aps()), false)
235235
236236
237237 func mp () = fromBase58String(strf(fca, mtpk()))
238238
239239
240240 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
241241
242242 func gpc () = {
243243 let amtAs = strf(this, aa())
244244 let priceAs = strf(this, pa())
245245 let iPriceAs = intf(fca, mba(priceAs))
246246 let iAmtAs = intf(fca, mba(amtAs))
247247 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
248248 }
249249
250250
251251 func parseAssetId (input) = if ((input == wavesString))
252252 then unit
253253 else fromBase58String(input)
254254
255255
256256 func assetIdToString (input) = if ((input == unit))
257257 then wavesString
258258 else toBase58String(value(input))
259259
260260
261261 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]))
262262
263263
264264 let poolConfigParsed = parsePoolConfig(gpc())
265265
266266 let $t086088794 = poolConfigParsed
267267
268268 let cfgPoolAddress = $t086088794._1
269269
270270 let cfgPoolStatus = $t086088794._2
271271
272272 let cfgLpAssetId = $t086088794._3
273273
274274 let cfgAmountAssetId = $t086088794._4
275275
276276 let cfgPriceAssetId = $t086088794._5
277277
278278 let cfgAmountAssetDecimals = $t086088794._6
279279
280280 let cfgPriceAssetDecimals = $t086088794._7
281281
282282 func gfc () = split(strf(fca, fcfg()), SEP)
283283
284284
285285 let factoryConfig = gfc()
286286
287287 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
288288
289289 let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
290290
291291 let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
292292
293293 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
294294
295295 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)
296296
297297
298298 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)
299299
300300
301301 func getAccBalance (assetId) = if ((assetId == "WAVES"))
302302 then wavesBalance(this).available
303303 else assetBalance(this, fromBase58String(assetId))
304304
305305
306306 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
307307
308308
309309 func cpbir (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
310310
311311
312312 func vad (A1,A2,slippage) = {
313313 let diff = fraction((A1 - A2), scale8BigInt, A2)
314314 let pass = ((slippage - abs(diff)) > zeroBigInt)
315315 if (!(pass))
316316 then throw(("Big slpg: " + toString(diff)))
317317 else $Tuple2(pass, min([A1, A2]))
318318 }
319319
320320
321321 func vd (D1,D0,slpg) = {
322322 let diff = fraction(D0, scale8BigInt, D1)
323323 let fail = (slpg > diff)
324324 if (if (fail)
325325 then true
326326 else (D0 > D1))
327327 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
328328 else fail
329329 }
330330
331331
332332 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
333333 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
334334 let prAsAmtX18 = t1(prAmt, prAssetDcm)
335335 cpbi(prAsAmtX18, amtAsAmtX18)
336336 }
337337
338338
339339 func calcPrices (amAmt,prAmt,lpAmt) = {
340340 let amtAsDcm = cfgAmountAssetDecimals
341341 let prAsDcm = cfgPriceAssetDecimals
342342 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
343343 let amAmtX18 = t1(amAmt, amtAsDcm)
344344 let prAmtX18 = t1(prAmt, prAsDcm)
345345 let lpAmtX18 = t1(lpAmt, scale8)
346346 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
347347 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
348348 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
349349 }
350350
351351
352352 func calculatePrices (amAmt,prAmt,lpAmt) = {
353353 let p = calcPrices(amAmt, prAmt, lpAmt)
354354 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
355355 }
356356
357357
358358 func takeFee (amount,fee) = {
359359 let feeAmount = if ((fee == 0))
360360 then 0
361361 else fraction(amount, fee, scale8)
362362 $Tuple2((amount - feeAmount), feeAmount)
363363 }
364364
365365
366366 func getD (xp) = {
367367 let xp0 = xp[0]
368368 let xp1 = xp[1]
369369 let s = (xp0 + xp1)
370370 if ((s == big0))
371371 then big0
372372 else {
373373 let a = parseIntValue(A)
374374 let ann = (a * 2)
375375 let p = fraction(xp0, xp1, big1)
376376 let xp0_xp1_n_n = fraction(p, big4, big1)
377377 let ann_s = fraction(toBigInt(ann), s, big1)
378378 let ann_1 = toBigInt((ann - 1))
379379 func calcDNext (d) = {
380380 let dd = fraction(d, d, big1)
381381 let ddd = fraction(dd, d, big1)
382382 let dp = fraction(ddd, big1, xp0_xp1_n_n)
383383 fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)))
384384 }
385385
386386 func calc (acc,i) = if (acc._2)
387387 then acc
388388 else {
389389 let d = acc._1
390390 let dNext = calcDNext(d)
391391 let dDiffRaw = (dNext - value(d))
392392 let dDiff = if ((big0 > dDiffRaw))
393393 then -(dDiffRaw)
394394 else dDiffRaw
395395 if ((big1 >= dDiff))
396396 then $Tuple2(dNext, true)
397397 else $Tuple2(dNext, false)
398398 }
399399
400400 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
401401 let $t01329913347 = {
402402 let $l = arr
403403 let $s = size($l)
404404 let $acc0 = $Tuple2(s, false)
405405 func $f0_1 ($a,$i) = if (($i >= $s))
406406 then $a
407407 else calc($a, $l[$i])
408408
409409 func $f0_2 ($a,$i) = if (($i >= $s))
410410 then $a
411411 else throw("List size exceeds 17")
412412
413413 $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($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17)
414414 }
415415 let d = $t01329913347._1
416416 let found = $t01329913347._2
417417 if (found)
418418 then d
419419 else throw(("D calculation error, D = " + toString(d)))
420420 }
421421 }
422422
423423
424424 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
425425 let lpId = cfgLpAssetId
426426 let amId = toBase58String(value(cfgAmountAssetId))
427427 let prId = toBase58String(value(cfgPriceAssetId))
428428 let amDcm = cfgAmountAssetDecimals
429429 let prDcm = cfgPriceAssetDecimals
430430 let sts = toString(cfgPoolStatus)
431431 let lpEmiss = valueOrErrorMessage(assetInfo(lpId), "Wrong LP id").quantity
432432 if ((toBase58String(lpId) != pmtAssetId))
433433 then throw("Wrong pmt asset")
434434 else {
435435 let amBalance = getAccBalance(amId)
436436 let amBalanceX18 = t1(amBalance, amDcm)
437437 let prBalance = getAccBalance(prId)
438438 let prBalanceX18 = t1(prBalance, prDcm)
439439 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
440440 let curPrice = f1(curPriceX18, scale8)
441441 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
442442 let lpEmissX18 = t1(lpEmiss, scale8)
443443 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
444444 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
445445 let outAmAmt = fromX18Round(outAmAmtX18, amDcm, FLOOR)
446446 let outPrAmt = fromX18Round(outPrAmtX18, prDcm, FLOOR)
447447 let state = if ((txId58 == ""))
448448 then nil
449449 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
450450 then unit
451451 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
452452 then unit
453453 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)]
454454 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
455455 }
456456 }
457457
458458
459459 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
460460 let lpId = cfgLpAssetId
461461 let amIdStr = toBase58String(value(cfgAmountAssetId))
462462 let prIdStr = toBase58String(value(cfgPriceAssetId))
463463 let amtDcm = cfgAmountAssetDecimals
464464 let priceDcm = cfgPriceAssetDecimals
465465 let sts = toString(cfgPoolStatus)
466466 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
467467 let amBalance = if (isEval)
468468 then getAccBalance(amIdStr)
469469 else if (if (isOneAsset)
470470 then (pmtId == amIdStr)
471471 else false)
472472 then (getAccBalance(amIdStr) - pmtAmt)
473473 else if (isOneAsset)
474474 then getAccBalance(amIdStr)
475475 else (getAccBalance(amIdStr) - inAmAmt)
476476 let prBalance = if (isEval)
477477 then getAccBalance(prIdStr)
478478 else if (if (isOneAsset)
479479 then (pmtId == prIdStr)
480480 else false)
481481 then (getAccBalance(prIdStr) - pmtAmt)
482482 else if (isOneAsset)
483483 then getAccBalance(prIdStr)
484484 else (getAccBalance(prIdStr) - inPrAmt)
485485 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
486486 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
487487 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
488488 let amBalanceX18 = t1(amBalance, amtDcm)
489489 let prBalanceX18 = t1(prBalance, priceDcm)
490490 let D0 = getD([amBalanceX18, prBalanceX18])
491491 let r = if ((lpEm == 0))
492492 then {
493493 let D1 = getD([(amBalanceX18 + inAmAssetAmtX18), (prBalanceX18 + inPrAssetAmtX18)])
494494 let checkD = if ((D1 > D0))
495495 then true
496496 else throw("D1 should be greater than D0")
497497 if ((checkD == checkD))
498498 then {
499499 let curPriceX18 = zeroBigInt
500500 let slippageX18 = zeroBigInt
501501 let lpAmtX18 = D1
502502 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
503503 }
504504 else throw("Strict value is not equal to itself.")
505505 }
506506 else {
507507 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
508508 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
509509 let slippageX18 = t1(slippage, scale8)
510510 if (if (if (validateSlippage)
511511 then (curPriceX18 != zeroBigInt)
512512 else false)
513513 then (slippageRealX18 > slippageX18)
514514 else false)
515515 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
516516 else {
517517 let lpEmissionX18 = t1(lpEm, scale8)
518518 let prViaAmX18 = fraction(inAmAssetAmtX18, cpbir(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING)
519519 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, cpbir(prBalanceX18, amBalanceX18, FLOOR), CEILING)
520520 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
521521 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
522522 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
523523 let expAmtAssetAmtX18 = expectedAmts._1
524524 let expPriceAssetAmtX18 = expectedAmts._2
525525 let D1 = getD([(amBalanceX18 + expAmtAssetAmtX18), (prBalanceX18 + expPriceAssetAmtX18)])
526526 let checkD = if ((D1 > D0))
527527 then true
528528 else throw("D1 should be greater than D0")
529529 if ((checkD == checkD))
530530 then {
531531 let lpAmtX18 = fraction(lpEmissionX18, (D1 - D0), D0)
532532 $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18)
533533 }
534534 else throw("Strict value is not equal to itself.")
535535 }
536536 }
537537 let calcLpAmt = r._1
538538 let calcAmAssetPmt = r._2
539539 let calcPrAssetPmt = r._3
540540 let curPrice = f1(r._4, scale8)
541541 let slippageCalc = f1(r._5, scale8)
542542 if ((0 >= calcLpAmt))
543543 then throw("LP <= 0")
544544 else {
545545 let emitLpAmt = if (!(emitLp))
546546 then 0
547547 else calcLpAmt
548548 let amDiff = (inAmAmt - calcAmAssetPmt)
549549 let prDiff = (inPrAmt - calcPrAssetPmt)
550550 let $t02110921454 = if (if (isOneAsset)
551551 then (pmtId == amIdStr)
552552 else false)
553553 then $Tuple2(pmtAmt, 0)
554554 else if (if (isOneAsset)
555555 then (pmtId == prIdStr)
556556 else false)
557557 then $Tuple2(0, pmtAmt)
558558 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
559559 let writeAmAmt = $t02110921454._1
560560 let writePrAmt = $t02110921454._2
561561 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))]
562562 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
563563 }
564564 }
565565
566566
567567 func getYD (xp,i,D) = {
568568 let n = big2
569569 let x = xp[if ((i == 0))
570570 then 1
571571 else 0]
572572 let aPrecision = parseBigIntValue(Amult)
573573 let a = (parseBigIntValue(A) * aPrecision)
574574 let s = x
575575 let ann = (a * n)
576576 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
577577 let b = ((s + ((D * aPrecision) / ann)) - D)
578578 func calc (acc,cur) = {
579579 let $t02264922669 = acc
580580 let y = $t02264922669._1
581581 let found = $t02264922669._2
582582 if ((found != unit))
583583 then acc
584584 else {
585585 let yNext = (((y * y) + c) / ((big2 * y) + b))
586586 let yDiff = absBigInt((yNext - value(y)))
587587 if ((big1 >= yDiff))
588588 then $Tuple2(yNext, cur)
589589 else $Tuple2(yNext, unit)
590590 }
591591 }
592592
593593 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
594594 let $t02297623023 = {
595595 let $l = arr
596596 let $s = size($l)
597597 let $acc0 = $Tuple2(D, unit)
598598 func $f0_1 ($a,$i) = if (($i >= $s))
599599 then $a
600600 else calc($a, $l[$i])
601601
602602 func $f0_2 ($a,$i) = if (($i >= $s))
603603 then $a
604604 else throw("List size exceeds 15")
605605
606606 $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)
607607 }
608608 let y = $t02297623023._1
609609 let found = $t02297623023._2
610610 if ((found != unit))
611611 then y
612612 else throw(("Y calculation error, Y = " + toString(y)))
613613 }
614614
615615
616616 func calcDLp (amountBalance,priceBalance,lpEmission) = {
617617 let updatedDLp = fraction(getD([t1BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals)), t1BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))]), scale18, lpEmission)
618618 if ((lpEmission == big0))
619619 then big0
620620 else updatedDLp
621621 }
622622
623623
624624 func calcCurrentDLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
625625 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
626626 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
627627 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
628628 let currentDLp = calcDLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
629629 currentDLp
630630 }
631631
632632
633633 func refreshDLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
634634 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
635635 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
636636 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
637637 let updatedDLp = calcDLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
638638 let actions = [IntegerEntry(keyDLpRefreshedHeight, height), StringEntry(keyDLp, toString(updatedDLp))]
639639 $Tuple2(actions, updatedDLp)
640640 }
641641
642642
643643 func validateUpdatedDLp (oldDLp,updatedDLp) = if ((updatedDLp >= oldDLp))
644644 then true
645645 else throwErr("updated DLp lower than current DLp")
646646
647647
648648 func validateMatcherOrderAllowed (order) = {
649649 let amountAssetBalance = getAccBalance(assetIdToString(cfgAmountAssetId))
650650 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
651651 let amountAssetAmount = order.amount
652652 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
653653 let $t02522125433 = if ((order.orderType == Buy))
654654 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
655655 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
656656 let amountAssetBalanceDelta = $t02522125433._1
657657 let priceAssetBalanceDelta = $t02522125433._2
658658 if (if (if (igs())
659659 then true
660660 else (cfgPoolStatus == PoolMatcherDis))
661661 then true
662662 else (cfgPoolStatus == PoolShutdown))
663663 then throw("Admin blocked")
664664 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
665665 then true
666666 else (order.assetPair.priceAsset != cfgPriceAssetId))
667667 then throw("Wr assets")
668668 else {
669669 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
670670 let $t02577525875 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
671671 let unusedActions = $t02577525875._1
672672 let dLpNew = $t02577525875._2
673673 let isOrderValid = (dLpNew >= dLp)
674674 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
675675 $Tuple2(isOrderValid, info)
676676 }
677677 }
678678
679679
680680 func cg (i) = if ((size(i.payments) != 1))
681681 then throw("1 pmnt exp")
682682 else {
683683 let pmt = value(i.payments[0])
684684 let pmtAssetId = value(pmt.assetId)
685685 let pmtAmt = pmt.amount
686686 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
687687 let outAmAmt = r._1
688688 let outPrAmt = r._2
689689 let sts = parseIntValue(r._9)
690690 let state = r._10
691691 if (if (igs())
692692 then true
693693 else (sts == PoolShutdown))
694694 then throw(("Admin blocked: " + toString(sts)))
695695 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
696696 }
697697
698698
699699 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
700700 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
701701 let sts = parseIntValue(r._8)
702702 if (if (if (igs())
703703 then true
704704 else (sts == PoolPutDis))
705705 then true
706706 else (sts == PoolShutdown))
707707 then throw(("Blocked:" + toString(sts)))
708708 else r
709709 }
710710
711711
712712 func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = {
713713 let amId = toBase58String(value(cfgAmountAssetId))
714714 let prId = toBase58String(value(cfgPriceAssetId))
715715 let lpId = cfgLpAssetId
716716 let amtDcm = cfgAmountAssetDecimals
717717 let priceDcm = cfgPriceAssetDecimals
718718 let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(lpId), "invalid lp asset").quantity)
719719 let chechEmission = if ((lpAssetEmission > big0))
720720 then true
721721 else throw("initial deposit requires all coins")
722722 if ((chechEmission == chechEmission))
723723 then {
724724 let amBalance = getAccBalance(amId)
725725 let prBalance = getAccBalance(prId)
726726 let $t02853128993 = if ((txId == ""))
727727 then $Tuple2(amBalance, prBalance)
728728 else if ((pmtAssetId == amId))
729729 then if ((pmtAmtRaw > amBalance))
730730 then throw("invalid payment amount")
731731 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
732732 else if ((pmtAssetId == prId))
733733 then if ((pmtAmtRaw > prBalance))
734734 then throw("invalid payment amount")
735735 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
736736 else throw("wrong pmtAssetId")
737737 let amBalanceOld = $t02853128993._1
738738 let prBalanceOld = $t02853128993._2
739739 let $t02899929175 = if ((pmtAssetId == amId))
740740 then $Tuple2(pmtAmtRaw, 0)
741741 else if ((pmtAssetId == prId))
742742 then $Tuple2(0, pmtAmtRaw)
743743 else throw("invalid payment")
744744 let amAmountRaw = $t02899929175._1
745745 let prAmountRaw = $t02899929175._2
746746 let $t02917929433 = if (withTakeFee)
747747 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
748748 else $Tuple3(amAmountRaw, prAmountRaw, 0)
749749 let amAmount = $t02917929433._1
750750 let prAmount = $t02917929433._2
751751 let feeAmount = $t02917929433._3
752752 let amBalanceNew = (amBalanceOld + amAmount)
753753 let prBalanceNew = (prBalanceOld + prAmount)
754754 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
755755 let D1 = getD([t1(amBalanceNew, cfgAmountAssetDecimals), t1(prBalanceNew, cfgPriceAssetDecimals)])
756756 let checkD = if ((D1 > D0))
757757 then true
758758 else throw()
759759 if ((checkD == checkD))
760760 then {
761761 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0, FLOOR)
762762 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
763763 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))]
764764 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
765765 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
766766 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
767767 let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
768768 let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
769769 $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
770770 }
771771 else throw("Strict value is not equal to itself.")
772772 }
773773 else throw("Strict value is not equal to itself.")
774774 }
775775
776776
777777 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
778778 let lpId = toBase58String(value(cfgLpAssetId))
779779 let amId = toBase58String(value(cfgAmountAssetId))
780780 let prId = toBase58String(value(cfgPriceAssetId))
781781 let amDecimals = cfgAmountAssetDecimals
782782 let prDecimals = cfgPriceAssetDecimals
783783 let poolStatus = cfgPoolStatus
784784 let userAddress = if ((caller == restContract))
785785 then originCaller
786786 else caller
787787 let pmt = value(payments[0])
788788 let pmtAssetId = value(pmt.assetId)
789789 let pmtAmt = pmt.amount
790790 let currentDLp = calcCurrentDLp(big0, big0, big0)
791791 if ((currentDLp == currentDLp))
792792 then {
793793 let txId58 = toBase58String(transactionId)
794794 if ((lpId != toBase58String(pmtAssetId)))
795795 then throw("Wrong LP")
796796 else {
797797 let amBalance = getAccBalance(amId)
798798 let prBalance = getAccBalance(prId)
799799 let $t03154531656 = {
800800 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
801801 if ($isInstanceOf(@, "(Int, Int)"))
802802 then @
803803 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
804804 }
805805 if (($t03154531656 == $t03154531656))
806806 then {
807807 let feeAmount = $t03154531656._2
808808 let totalGet = $t03154531656._1
809809 let totalAmount = if (if ((minOutAmount > 0))
810810 then (minOutAmount > totalGet)
811811 else false)
812812 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
813813 else totalGet
814814 let $t03184632153 = if ((outAssetId == amId))
815815 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
816816 else if ((outAssetId == prId))
817817 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
818818 else throw("invalid out asset id")
819819 let outAm = $t03184632153._1
820820 let outPr = $t03184632153._2
821821 let amBalanceNew = $t03184632153._3
822822 let prBalanceNew = $t03184632153._4
823823 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
824824 let curPr = f1(curPrX18, scale8)
825825 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
826826 then unit
827827 else fromBase58String(outAssetId)
828828 let sendFeeToMatcher = if ((feeAmount > 0))
829829 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
830830 else nil
831831 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)
832832 if ((state == state))
833833 then {
834834 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
835835 if ((burn == burn))
836836 then {
837837 let $t03293833288 = {
838838 let feeAmountForCalc = if ((this == feeCollectorAddress))
839839 then 0
840840 else feeAmount
841841 let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId))
842842 then true
843843 else false
844844 if (outInAmountAsset)
845845 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
846846 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
847847 }
848848 let amountAssetBalanceDelta = $t03293833288._1
849849 let priceAssetBalanceDelta = $t03293833288._2
850850 let $t03329133399 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
851851 let refreshDLpActions = $t03329133399._1
852852 let updatedDLp = $t03329133399._2
853853 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
854854 if ((isUpdatedDLpValid == isUpdatedDLpValid))
855855 then $Tuple2((state ++ refreshDLpActions), totalAmount)
856856 else throw("Strict value is not equal to itself.")
857857 }
858858 else throw("Strict value is not equal to itself.")
859859 }
860860 else throw("Strict value is not equal to itself.")
861861 }
862862 else throw("Strict value is not equal to itself.")
863863 }
864864 }
865865 else throw("Strict value is not equal to itself.")
866866 }
867867
868868
869869 func managerPublicKeyOrUnit () = {
870870 let managerVaultAddress = getManagerVaultAddressOrThis()
871871 match getString(managerVaultAddress, keyManagerPublicKey()) {
872872 case s: String =>
873873 fromBase58String(s)
874874 case _: Unit =>
875875 unit
876876 case _ =>
877877 throw("Match error")
878878 }
879879 }
880880
881881
882882 let pd = throw("Permission denied")
883883
884884 func isManager (i) = match managerPublicKeyOrUnit() {
885885 case pk: ByteVector =>
886886 (i.callerPublicKey == pk)
887887 case _: Unit =>
888888 (i.caller == this)
889889 case _ =>
890890 throw("Match error")
891891 }
892892
893893
894894 func mustManager (i) = match managerPublicKeyOrUnit() {
895895 case pk: ByteVector =>
896896 if ((i.callerPublicKey == pk))
897897 then true
898898 else pd
899899 case _: Unit =>
900900 if ((i.caller == this))
901901 then true
902902 else pd
903903 case _ =>
904904 throw("Match error")
905905 }
906906
907907
908908 func getY (isReverse,D,poolAmountInBalance) = {
909909 let poolConfig = gpc()
910910 let amId = poolConfig[idxAmAsId]
911911 let prId = poolConfig[idxPrAsId]
912912 let n = big2
913913 let aPrecision = parseBigIntValue(Amult)
914914 let a = (parseBigIntValue(A) * aPrecision)
915915 let xp = if ((isReverse == false))
916916 then [(toBigInt(getAccBalance(amId)) + poolAmountInBalance), toBigInt(getAccBalance(prId))]
917917 else [(toBigInt(getAccBalance(prId)) + poolAmountInBalance), toBigInt(getAccBalance(amId))]
918918 let x = xp[0]
919919 let s = x
920920 let ann = (a * n)
921921 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
922922 let b = ((s + ((D * aPrecision) / ann)) - D)
923923 func calc (acc,cur) = {
924924 let $t03488634906 = acc
925925 let y = $t03488634906._1
926926 let found = $t03488634906._2
927927 if ((found != unit))
928928 then acc
929929 else {
930930 let yNext = (((y * y) + c) / ((big2 * y) + b))
931931 let yDiff = absBigInt((yNext - value(y)))
932932 if ((big1 >= yDiff))
933933 then $Tuple2(yNext, cur)
934934 else $Tuple2(yNext, unit)
935935 }
936936 }
937937
938938 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
939939 let $t03523735284 = {
940940 let $l = arr
941941 let $s = size($l)
942942 let $acc0 = $Tuple2(D, unit)
943943 func $f0_1 ($a,$i) = if (($i >= $s))
944944 then $a
945945 else calc($a, $l[$i])
946946
947947 func $f0_2 ($a,$i) = if (($i >= $s))
948948 then $a
949949 else throw("List size exceeds 15")
950950
951951 $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)
952952 }
953953 let y = $t03523735284._1
954954 let found = $t03523735284._2
955955 if ((found != unit))
956956 then y
957957 else throw(("Y calculation error, Y = " + toString(y)))
958958 }
959959
960960
961961 func skipOrderValidation () = valueOrElse(getBoolean(fca, keySkipOrderValidation(toString(this))), false)
962962
963963
964964 @Callable(i)
965965 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
966966 let $t03563636060 = if ((isReverse == false))
967967 then {
968968 let assetOut = strf(this, pa())
969969 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
970970 $Tuple2(assetOut, poolAmountInBalance)
971971 }
972972 else {
973973 let assetOut = strf(this, aa())
974974 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
975975 $Tuple2(assetOut, poolAmountInBalance)
976976 }
977977 let assetOut = $t03563636060._1
978978 let poolAmountInBalance = $t03563636060._2
979979 let poolConfig = gpc()
980980 let amId = poolConfig[idxAmAsId]
981981 let prId = poolConfig[idxPrAsId]
982982 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
983983 let D = getD(xp)
984984 let y = getY(isReverse, D, toBigInt(cleanAmountIn))
985985 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
986986 let totalGetRaw = max([0, toInt(dy)])
987987 let newXp = if ((isReverse == false))
988988 then [((toBigInt(getAccBalance(amId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
989989 else [(toBigInt(getAccBalance(amId)) - dy), ((toBigInt(getAccBalance(prId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount))]
990990 let newD = getD(newXp)
991991 let checkD = if ((newD >= D))
992992 then true
993993 else throw(makeString(["new D is fewer error", toString(D), toString(newD)], "__"))
994994 if ((checkD == checkD))
995995 then $Tuple2(nil, totalGetRaw)
996996 else throw("Strict value is not equal to itself.")
997997 }
998998
999999
10001000
10011001 @Callable(i)
10021002 func calculateAmountOutForSwapAndSendTokens (cleanAmountIn,isReverse,amountOutMin,addressTo,feePoolAmount) = {
10031003 let swapContact = {
10041004 let @ = invoke(fca, "getSwapContractREADONLY", nil, nil)
10051005 if ($isInstanceOf(@, "String"))
10061006 then @
10071007 else throw(($getType(@) + " couldn't be cast to String"))
10081008 }
10091009 let checks = [if ((value(i.payments[0]).amount >= cleanAmountIn))
10101010 then true
10111011 else throwErr("Wrong amount"), if ((i.caller == addressFromStringValue(swapContact)))
10121012 then true
10131013 else throwErr("Permission denied")]
10141014 if ((checks == checks))
10151015 then {
10161016 let pmt = value(i.payments[0])
10171017 let assetIn = assetIdToString(pmt.assetId)
10181018 let $t03749637890 = if ((isReverse == false))
10191019 then {
10201020 let assetOut = strf(this, pa())
10211021 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10221022 $Tuple2(assetOut, poolAmountInBalance)
10231023 }
10241024 else {
10251025 let assetOut = strf(this, aa())
10261026 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10271027 $Tuple2(assetOut, poolAmountInBalance)
10281028 }
10291029 let assetOut = $t03749637890._1
10301030 let poolAmountInBalance = $t03749637890._2
10311031 let poolConfig = gpc()
10321032 let amId = poolConfig[idxAmAsId]
10331033 let prId = poolConfig[idxPrAsId]
10341034 let xp = if ((isReverse == false))
10351035 then [(toBigInt(getAccBalance(amId)) - toBigInt(value(i.payments[0]).amount)), toBigInt(getAccBalance(prId))]
10361036 else [toBigInt(getAccBalance(amId)), (toBigInt(getAccBalance(prId)) - toBigInt(value(i.payments[0]).amount))]
10371037 let D = getD(xp)
10381038 let y = getY(isReverse, D, toBigInt(0))
10391039 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
10401040 let totalGetRaw = max([0, toInt(dy)])
10411041 let checkMin = if ((totalGetRaw >= amountOutMin))
10421042 then true
10431043 else throw("Exchange result is fewer coins than expected")
10441044 if ((checkMin == checkMin))
10451045 then {
10461046 let newXp = if ((isReverse == false))
10471047 then [(toBigInt(getAccBalance(amId)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
10481048 else [(toBigInt(getAccBalance(amId)) - dy), (toBigInt(getAccBalance(prId)) + toBigInt(feePoolAmount))]
10491049 let newD = getD(newXp)
10501050 let checkD = if ((newD >= D))
10511051 then true
10521052 else throw("new D is fewer error")
10531053 if ((checkD == checkD))
1054- then $Tuple2([ScriptTransfer(addressFromStringValue(addressTo), totalGetRaw, parseAssetId(assetOut))], totalGetRaw)
1054+ then {
1055+ let refreshDLpActions = refreshDLpInternal(0, 0, 0)._1
1056+ if ((refreshDLpActions == refreshDLpActions))
1057+ then $Tuple2(([ScriptTransfer(addressFromStringValue(addressTo), totalGetRaw, parseAssetId(assetOut))] ++ refreshDLpActions), totalGetRaw)
1058+ else throw("Strict value is not equal to itself.")
1059+ }
10551060 else throw("Strict value is not equal to itself.")
10561061 }
10571062 else throw("Strict value is not equal to itself.")
10581063 }
10591064 else throw("Strict value is not equal to itself.")
10601065 }
10611066
10621067
10631068
10641069 @Callable(i)
10651070 func constructor (fc) = {
10661071 let c = mustManager(i)
10671072 if ((c == c))
10681073 then [StringEntry(fc(), fc)]
10691074 else throw("Strict value is not equal to itself.")
10701075 }
10711076
10721077
10731078
10741079 @Callable(i)
10751080 func put (slip,autoStake) = {
10761081 let factCfg = gfc()
10771082 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
10781083 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
10791084 if ((0 > slip))
10801085 then throw("Wrong slippage")
10811086 else if ((size(i.payments) != 2))
10821087 then throw("2 pmnts expd")
10831088 else {
10841089 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
10851090 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
10861091 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amAssetPmt)
10871092 if ((amountAssetBalance == amountAssetBalance))
10881093 then {
10891094 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - prAssetPmt)
10901095 if ((priceAssetBalance == priceAssetBalance))
10911096 then {
10921097 let lpAssetEmission = toBigInt(value(assetInfo(cfgLpAssetId)).quantity)
10931098 if ((lpAssetEmission == lpAssetEmission))
10941099 then {
10951100 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
10961101 if ((currentDLp == currentDLp))
10971102 then {
10981103 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, "")
10991104 let emitLpAmt = e._2
11001105 let lpAssetId = e._7
11011106 let state = e._9
11021107 let amDiff = e._10
11031108 let prDiff = e._11
11041109 let amId = e._12
11051110 let prId = e._13
11061111 let r = invoke(fca, "emit", [emitLpAmt], nil)
11071112 if ((r == r))
11081113 then {
11091114 let el = match r {
11101115 case legacy: Address =>
11111116 invoke(legacy, "emit", [emitLpAmt], nil)
11121117 case _ =>
11131118 unit
11141119 }
11151120 if ((el == el))
11161121 then {
11171122 let sa = if ((amDiff > 0))
11181123 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
11191124 else nil
11201125 if ((sa == sa))
11211126 then {
11221127 let sp = if ((prDiff > 0))
11231128 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
11241129 else nil
11251130 if ((sp == sp))
11261131 then {
11271132 let lpTrnsfr = if (autoStake)
11281133 then {
11291134 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
11301135 if ((ss == ss))
11311136 then nil
11321137 else throw("Strict value is not equal to itself.")
11331138 }
11341139 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1135- let $t04203442176 = refreshDLpInternal(0, 0, 0)
1136- let refreshDLpActions = $t04203442176._1
1137- let updatedDLp = $t04203442176._2
1140+ let $t04211642258 = refreshDLpInternal(0, 0, 0)
1141+ let refreshDLpActions = $t04211642258._1
1142+ let updatedDLp = $t04211642258._2
11381143 let check = if ((updatedDLp >= currentDLp))
11391144 then true
11401145 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
11411146 if ((check == check))
11421147 then {
11431148 let lpAssetEmissionAfter = value(assetInfo(cfgLpAssetId)).quantity
11441149 if ((lpAssetEmissionAfter == lpAssetEmissionAfter))
11451150 then ((state ++ lpTrnsfr) ++ refreshDLpActions)
11461151 else throw("Strict value is not equal to itself.")
11471152 }
11481153 else throw("Strict value is not equal to itself.")
11491154 }
11501155 else throw("Strict value is not equal to itself.")
11511156 }
11521157 else throw("Strict value is not equal to itself.")
11531158 }
11541159 else throw("Strict value is not equal to itself.")
11551160 }
11561161 else throw("Strict value is not equal to itself.")
11571162 }
11581163 else throw("Strict value is not equal to itself.")
11591164 }
11601165 else throw("Strict value is not equal to itself.")
11611166 }
11621167 else throw("Strict value is not equal to itself.")
11631168 }
11641169 else throw("Strict value is not equal to itself.")
11651170 }
11661171 }
11671172
11681173
11691174
11701175 @Callable(i)
11711176 func putOneTknV2 (minOutAmount,autoStake) = {
11721177 let isPoolOneTokenOperationsDisabled = {
11731178 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
11741179 if ($isInstanceOf(@, "Boolean"))
11751180 then @
11761181 else throw(($getType(@) + " couldn't be cast to Boolean"))
11771182 }
11781183 let isPutDisabled = if (if (if (igs())
11791184 then true
11801185 else (cfgPoolStatus == PoolPutDis))
11811186 then true
11821187 else (cfgPoolStatus == PoolShutdown))
11831188 then true
11841189 else isPoolOneTokenOperationsDisabled
11851190 let checks = [if (if (!(isPutDisabled))
11861191 then true
11871192 else isManager(i))
11881193 then true
11891194 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
11901195 then true
11911196 else throwErr("exactly 1 payment are expected")]
11921197 if ((checks == checks))
11931198 then {
11941199 let amId = toBase58String(value(cfgAmountAssetId))
11951200 let prId = toBase58String(value(cfgPriceAssetId))
11961201 let lpId = cfgLpAssetId
11971202 let amDecimals = cfgAmountAssetDecimals
11981203 let prDecimals = cfgPriceAssetDecimals
11991204 let userAddress = if ((i.caller == this))
12001205 then i.originCaller
12011206 else i.caller
12021207 let pmt = value(i.payments[0])
12031208 let pmtAssetId = toBase58String(value(pmt.assetId))
12041209 let pmtAmt = pmt.amount
12051210 let currentDLp = if ((pmt.assetId == cfgAmountAssetId))
12061211 then calcCurrentDLp(toBigInt(pmtAmt), toBigInt(0), toBigInt(0))
12071212 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12081213 if ((currentDLp == currentDLp))
12091214 then {
1210- let $t04381743975 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1211- if (($t04381743975 == $t04381743975))
1215+ let $t04389944057 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1216+ if (($t04389944057 == $t04389944057))
12121217 then {
1213- let feeAmount = $t04381743975._3
1214- let state = $t04381743975._2
1215- let estimLP = $t04381743975._1
1218+ let feeAmount = $t04389944057._3
1219+ let state = $t04389944057._2
1220+ let estimLP = $t04389944057._1
12161221 let emitLpAmt = if (if ((minOutAmount > 0))
12171222 then (minOutAmount > estimLP)
12181223 else false)
12191224 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
12201225 else estimLP
12211226 let e = invoke(fca, "emit", [emitLpAmt], nil)
12221227 if ((e == e))
12231228 then {
12241229 let el = match e {
12251230 case legacy: Address =>
12261231 invoke(legacy, "emit", [emitLpAmt], nil)
12271232 case _ =>
12281233 unit
12291234 }
12301235 if ((el == el))
12311236 then {
12321237 let lpTrnsfr = if (autoStake)
12331238 then {
12341239 let ss = invoke(stakingContract, "stakeFor", [toString(i.caller)], [AttachedPayment(lpId, emitLpAmt)])
12351240 if ((ss == ss))
12361241 then nil
12371242 else throw("Strict value is not equal to itself.")
12381243 }
12391244 else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
12401245 let sendFeeToMatcher = if ((feeAmount > 0))
12411246 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12421247 else nil
1243- let $t04486045209 = if ((this == feeCollectorAddress))
1248+ let $t04494245291 = if ((this == feeCollectorAddress))
12441249 then $Tuple2(0, 0)
12451250 else {
12461251 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12471252 then true
12481253 else false
12491254 if (paymentInAmountAsset)
12501255 then $Tuple2(-(feeAmount), 0)
12511256 else $Tuple2(0, -(feeAmount))
12521257 }
1253- let amountAssetBalanceDelta = $t04486045209._1
1254- let priceAssetBalanceDelta = $t04486045209._2
1255- let $t04521245320 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1256- let refreshDLpActions = $t04521245320._1
1257- let updatedDLp = $t04521245320._2
1258+ let amountAssetBalanceDelta = $t04494245291._1
1259+ let priceAssetBalanceDelta = $t04494245291._2
1260+ let $t04529445402 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1261+ let refreshDLpActions = $t04529445402._1
1262+ let updatedDLp = $t04529445402._2
12581263 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12591264 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12601265 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
12611266 else throw("Strict value is not equal to itself.")
12621267 }
12631268 else throw("Strict value is not equal to itself.")
12641269 }
12651270 else throw("Strict value is not equal to itself.")
12661271 }
12671272 else throw("Strict value is not equal to itself.")
12681273 }
12691274 else throw("Strict value is not equal to itself.")
12701275 }
12711276 else throw("Strict value is not equal to itself.")
12721277 }
12731278
12741279
12751280
12761281 @Callable(i)
12771282 func putForFree (maxSlpg) = if ((0 > maxSlpg))
12781283 then throw("Wrong slpg")
12791284 else if ((size(i.payments) != 2))
12801285 then throw("2 pmnts expd")
12811286 else {
12821287 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, "")
12831288 let state = estPut._9
12841289 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
12851290 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
12861291 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
12871292 if ((currentDLp == currentDLp))
12881293 then {
1289- let $t04635046415 = refreshDLpInternal(0, 0, 0)
1290- let refreshDLpActions = $t04635046415._1
1291- let updatedDLp = $t04635046415._2
1294+ let $t04643246497 = refreshDLpInternal(0, 0, 0)
1295+ let refreshDLpActions = $t04643246497._1
1296+ let updatedDLp = $t04643246497._2
12921297 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12931298 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12941299 then (state ++ refreshDLpActions)
12951300 else throw("Strict value is not equal to itself.")
12961301 }
12971302 else throw("Strict value is not equal to itself.")
12981303 }
12991304
13001305
13011306
13021307 @Callable(i)
13031308 func get () = {
13041309 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
13051310 if ((currentDLp == currentDLp))
13061311 then {
13071312 let r = cg(i)
13081313 let outAmtAmt = r._1
13091314 let outPrAmt = r._2
13101315 let pmtAmt = r._3
13111316 let pmtAssetId = r._4
13121317 let state = r._5
13131318 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13141319 if ((b == b))
13151320 then {
1316- let $t04758847670 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1317- let refreshDLpActions = $t04758847670._1
1318- let updatedDLp = $t04758847670._2
1321+ let $t04767047752 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1322+ let refreshDLpActions = $t04767047752._1
1323+ let updatedDLp = $t04767047752._2
13191324 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13201325 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13211326 then (state ++ refreshDLpActions)
13221327 else throw("Strict value is not equal to itself.")
13231328 }
13241329 else throw("Strict value is not equal to itself.")
13251330 }
13261331 else throw("Strict value is not equal to itself.")
13271332 }
13281333
13291334
13301335
13311336 @Callable(i)
13321337 func getOneTknV2 (outAssetId,minOutAmount) = {
13331338 let isPoolOneTokenOperationsDisabled = {
13341339 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
13351340 if ($isInstanceOf(@, "Boolean"))
13361341 then @
13371342 else throw(($getType(@) + " couldn't be cast to Boolean"))
13381343 }
13391344 let isGetDisabled = if (if (igs())
13401345 then true
13411346 else (cfgPoolStatus == PoolShutdown))
13421347 then true
13431348 else isPoolOneTokenOperationsDisabled
13441349 let checks = [if (if (!(isGetDisabled))
13451350 then true
13461351 else isManager(i))
13471352 then true
13481353 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
13491354 then true
13501355 else throwErr("exactly 1 payment are expected")]
13511356 if ((checks == checks))
13521357 then {
1353- let $t04828848443 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1354- let state = $t04828848443._1
1355- let totalAmount = $t04828848443._2
1358+ let $t04837048525 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1359+ let state = $t04837048525._1
1360+ let totalAmount = $t04837048525._2
13561361 $Tuple2(state, totalAmount)
13571362 }
13581363 else throw("Strict value is not equal to itself.")
13591364 }
13601365
13611366
13621367
13631368 @Callable(i)
13641369 func refreshDLp () = {
13651370 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyDLpRefreshedHeight), 0)
13661371 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= dLpRefreshDelay))
13671372 then unit
13681373 else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], ""))
13691374 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13701375 then {
13711376 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1372- let $t04896749031 = refreshDLpInternal(0, 0, 0)
1373- let dLpUpdateActions = $t04896749031._1
1374- let updatedDLp = $t04896749031._2
1377+ let $t04904949113 = refreshDLpInternal(0, 0, 0)
1378+ let dLpUpdateActions = $t04904949113._1
1379+ let updatedDLp = $t04904949113._2
13751380 let actions = if ((dLp != updatedDLp))
13761381 then dLpUpdateActions
13771382 else throwErr("nothing to refresh")
13781383 $Tuple2(actions, toString(updatedDLp))
13791384 }
13801385 else throw("Strict value is not equal to itself.")
13811386 }
13821387
13831388
13841389
13851390 @Callable(i)
13861391 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
13871392 let amId = toBase58String(value(cfgAmountAssetId))
13881393 let prId = toBase58String(value(cfgPriceAssetId))
13891394 let lpId = toBase58String(value(cfgLpAssetId))
13901395 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
13911396 let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
13921397 let D0 = getD(xp)
13931398 let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
13941399 let index = if ((outAssetId == amId))
13951400 then 0
13961401 else if ((outAssetId == prId))
13971402 then 1
13981403 else throw("invalid out asset id")
13991404 let newY = getYD(xp, index, D1)
14001405 let dy = (xp[index] - newY)
14011406 let totalGetRaw = max([0, toInt((dy - big1))])
1402- let $t05004150096 = takeFee(totalGetRaw, outFee)
1403- let totalGet = $t05004150096._1
1404- let feeAmount = $t05004150096._2
1407+ let $t05012350178 = takeFee(totalGetRaw, outFee)
1408+ let totalGet = $t05012350178._1
1409+ let feeAmount = $t05012350178._2
14051410 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14061411 }
14071412
14081413
14091414
14101415 @Callable(i)
14111416 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
14121417 let amId = toBase58String(value(cfgAmountAssetId))
14131418 let prId = toBase58String(value(cfgPriceAssetId))
14141419 let lpId = toBase58String(value(cfgLpAssetId))
14151420 let amBalance = getAccBalance(amId)
14161421 let prBalance = getAccBalance(prId)
1417- let $t05047150586 = {
1422+ let $t05055350668 = {
14181423 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14191424 if ($isInstanceOf(@, "(Int, Int)"))
14201425 then @
14211426 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14221427 }
1423- let totalGet = $t05047150586._1
1424- let feeAmount = $t05047150586._2
1428+ let totalGet = $t05055350668._1
1429+ let feeAmount = $t05055350668._2
14251430 let r = ego("", lpId, lpAssetAmount, this)
14261431 let outAmAmt = r._1
14271432 let outPrAmt = r._2
14281433 let sumOfGetAssets = (outAmAmt + outPrAmt)
14291434 let bonus = if ((sumOfGetAssets == 0))
14301435 then if ((totalGet == 0))
14311436 then 0
14321437 else throw("bonus calculation error")
14331438 else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
14341439 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
14351440 }
14361441
14371442
14381443
14391444 @Callable(i)
14401445 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
14411446 let r = cg(i)
14421447 let outAmAmt = r._1
14431448 let outPrAmt = r._2
14441449 let pmtAmt = r._3
14451450 let pmtAssetId = r._4
14461451 let state = r._5
14471452 if ((noLessThenAmtAsset > outAmAmt))
14481453 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
14491454 else if ((noLessThenPriceAsset > outPrAmt))
14501455 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
14511456 else {
14521457 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14531458 if ((currentDLp == currentDLp))
14541459 then {
14551460 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14561461 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14571462 then {
1458- let $t05175251833 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1459- let refreshDLpActions = $t05175251833._1
1460- let updatedDLp = $t05175251833._2
1463+ let $t05183451915 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1464+ let refreshDLpActions = $t05183451915._1
1465+ let updatedDLp = $t05183451915._2
14611466 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14621467 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14631468 then (state ++ refreshDLpActions)
14641469 else throw("Strict value is not equal to itself.")
14651470 }
14661471 else throw("Strict value is not equal to itself.")
14671472 }
14681473 else throw("Strict value is not equal to itself.")
14691474 }
14701475 }
14711476
14721477
14731478
14741479 @Callable(i)
14751480 func unstakeAndGet (amount) = {
14761481 let checkPayments = if ((size(i.payments) != 0))
14771482 then throw("No pmnts expd")
14781483 else true
14791484 if ((checkPayments == checkPayments))
14801485 then {
14811486 let factoryCfg = gfc()
14821487 let lpAssetId = cfgLpAssetId
14831488 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
14841489 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14851490 if ((currentDLp == currentDLp))
14861491 then {
14871492 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
14881493 if ((unstakeInv == unstakeInv))
14891494 then {
14901495 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
14911496 let outAmAmt = r._1
14921497 let outPrAmt = r._2
14931498 let sts = parseIntValue(r._9)
14941499 let state = r._10
14951500 let v = if (if (igs())
14961501 then true
14971502 else (sts == PoolShutdown))
14981503 then throw(("Blocked: " + toString(sts)))
14991504 else true
15001505 if ((v == v))
15011506 then {
15021507 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15031508 if ((burnA == burnA))
15041509 then {
1505- let $t05286052941 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1506- let refreshDLpActions = $t05286052941._1
1507- let updatedDLp = $t05286052941._2
1510+ let $t05294253023 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1511+ let refreshDLpActions = $t05294253023._1
1512+ let updatedDLp = $t05294253023._2
15081513 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15091514 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15101515 then (state ++ refreshDLpActions)
15111516 else throw("Strict value is not equal to itself.")
15121517 }
15131518 else throw("Strict value is not equal to itself.")
15141519 }
15151520 else throw("Strict value is not equal to itself.")
15161521 }
15171522 else throw("Strict value is not equal to itself.")
15181523 }
15191524 else throw("Strict value is not equal to itself.")
15201525 }
15211526 else throw("Strict value is not equal to itself.")
15221527 }
15231528
15241529
15251530
15261531 @Callable(i)
15271532 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
15281533 let isGetDisabled = if (igs())
15291534 then true
15301535 else (cfgPoolStatus == PoolShutdown)
15311536 let checks = [if (!(isGetDisabled))
15321537 then true
15331538 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
15341539 then true
15351540 else throw("no payments are expected")]
15361541 if ((checks == checks))
15371542 then {
15381543 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15391544 if ((currentDLp == currentDLp))
15401545 then {
15411546 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
15421547 if ((unstakeInv == unstakeInv))
15431548 then {
15441549 let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
15451550 let outAmAmt = res._1
15461551 let outPrAmt = res._2
15471552 let state = res._10
15481553 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
15491554 then true
15501555 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
15511556 then true
15521557 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
15531558 if ((checkAmounts == checkAmounts))
15541559 then {
15551560 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15561561 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15571562 then {
1558- let $t05419254273 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1559- let refreshDLpActions = $t05419254273._1
1560- let updatedDLp = $t05419254273._2
1563+ let $t05427454355 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1564+ let refreshDLpActions = $t05427454355._1
1565+ let updatedDLp = $t05427454355._2
15611566 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15621567 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15631568 then (state ++ refreshDLpActions)
15641569 else throw("Strict value is not equal to itself.")
15651570 }
15661571 else throw("Strict value is not equal to itself.")
15671572 }
15681573 else throw("Strict value is not equal to itself.")
15691574 }
15701575 else throw("Strict value is not equal to itself.")
15711576 }
15721577 else throw("Strict value is not equal to itself.")
15731578 }
15741579 else throw("Strict value is not equal to itself.")
15751580 }
15761581
15771582
15781583
15791584 @Callable(i)
15801585 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
15811586 let isPoolOneTokenOperationsDisabled = {
15821587 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
15831588 if ($isInstanceOf(@, "Boolean"))
15841589 then @
15851590 else throw(($getType(@) + " couldn't be cast to Boolean"))
15861591 }
15871592 let isGetDisabled = if (if (igs())
15881593 then true
15891594 else (cfgPoolStatus == PoolShutdown))
15901595 then true
15911596 else isPoolOneTokenOperationsDisabled
15921597 let checks = [if (if (!(isGetDisabled))
15931598 then true
15941599 else isManager(i))
15951600 then true
15961601 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
15971602 then true
15981603 else throwErr("no payments are expected")]
15991604 if ((checks == checks))
16001605 then {
16011606 let factoryCfg = gfc()
16021607 let lpAssetId = cfgLpAssetId
16031608 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
16041609 let userAddress = i.caller
16051610 let lpAssetRecipientAddress = this
16061611 let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
16071612 if ((unstakeInv == unstakeInv))
16081613 then {
1609- let $t05529555483 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1610- let state = $t05529555483._1
1611- let totalAmount = $t05529555483._2
1614+ let $t05537755565 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1615+ let state = $t05537755565._1
1616+ let totalAmount = $t05537755565._2
16121617 $Tuple2(state, totalAmount)
16131618 }
16141619 else throw("Strict value is not equal to itself.")
16151620 }
16161621 else throw("Strict value is not equal to itself.")
16171622 }
16181623
16191624
16201625
16211626 @Callable(i)
16221627 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1623- let $t05561155714 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1624- let lpAmount = $t05561155714._1
1625- let state = $t05561155714._2
1626- let feeAmount = $t05561155714._3
1627- let bonus = $t05561155714._4
1628+ let $t05569355796 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1629+ let lpAmount = $t05569355796._1
1630+ let state = $t05569355796._2
1631+ let feeAmount = $t05569355796._3
1632+ let bonus = $t05569355796._4
16281633 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16291634 }
16301635
16311636
16321637
16331638 @Callable(i)
16341639 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1635- let $t05586255966 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1636- let lpAmount = $t05586255966._1
1637- let state = $t05586255966._2
1638- let feeAmount = $t05586255966._3
1639- let bonus = $t05586255966._4
1640+ let $t05594456048 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1641+ let lpAmount = $t05594456048._1
1642+ let state = $t05594456048._2
1643+ let feeAmount = $t05594456048._3
1644+ let bonus = $t05594456048._4
16401645 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16411646 }
16421647
16431648
16441649
16451650 @Callable(i)
16461651 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
16471652 then throw("denied")
16481653 else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr), StringEntry(amp(), toString(ampInitial)), StringEntry(keyAmpHistory(height), toString(ampInitial))], "success")
16491654
16501655
16511656
16521657 @Callable(i)
16531658 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
16541659
16551660
16561661
16571662 @Callable(i)
16581663 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
16591664
16601665
16611666
16621667 @Callable(i)
16631668 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
16641669 let pr = calcPrices(amAmt, prAmt, lpAmt)
16651670 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
16661671 }
16671672
16681673
16691674
16701675 @Callable(i)
16711676 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
16721677
16731678
16741679
16751680 @Callable(i)
16761681 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
16771682
16781683
16791684
16801685 @Callable(i)
16811686 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
16821687
16831688
16841689
16851690 @Callable(i)
16861691 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, ""))
16871692
16881693
16891694
16901695 @Callable(i)
16911696 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
16921697 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
16931698 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
16941699 }
16951700
16961701
16971702
16981703 @Callable(i)
16991704 func changeAmp () = {
17001705 let cfg = invoke(fca, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1701- let $t05844658645 = match cfg {
1706+ let $t05852858727 = match cfg {
17021707 case list: List[Any] =>
17031708 $Tuple3({
17041709 let @ = list[0]
17051710 if ($isInstanceOf(@, "Int"))
17061711 then @
17071712 else throw(($getType(@) + " couldn't be cast to Int"))
17081713 }, {
17091714 let @ = list[1]
17101715 if ($isInstanceOf(@, "Int"))
17111716 then @
17121717 else throw(($getType(@) + " couldn't be cast to Int"))
17131718 }, {
17141719 let @ = list[2]
17151720 if ($isInstanceOf(@, "Int"))
17161721 then @
17171722 else throw(($getType(@) + " couldn't be cast to Int"))
17181723 })
17191724 case _ =>
17201725 throwErr("invalid entry type")
17211726 }
1722- let delay = $t05844658645._1
1723- let delta = $t05844658645._2
1724- let target = $t05844658645._3
1727+ let delay = $t05852858727._1
1728+ let delta = $t05852858727._2
1729+ let target = $t05852858727._3
17251730 let curAmp = parseIntValue(getStringValue(amp()))
17261731 let newAmpRaw = (curAmp + delta)
17271732 let newAmp = if ((0 > delta))
17281733 then if ((target > newAmpRaw))
17291734 then target
17301735 else newAmpRaw
17311736 else if ((newAmpRaw > target))
17321737 then target
17331738 else newAmpRaw
17341739 let lastCall = valueOrElse(getInteger(keyChangeAmpLastCall()), 0)
17351740 let wait = (lastCall + delay)
17361741 let checks = [if ((height > wait))
17371742 then true
17381743 else throwErr("try again in few blocks"), if ((curAmp != newAmp))
17391744 then true
17401745 else throwErr("already reached target")]
17411746 if ((checks == checks))
17421747 then [IntegerEntry(keyChangeAmpLastCall(), height), StringEntry(amp(), toString(newAmp)), StringEntry(keyAmpHistory(height), toString(newAmp))]
17431748 else throw("Strict value is not equal to itself.")
17441749 }
17451750
17461751
17471752 @Verifier(tx)
17481753 func verify () = {
17491754 let targetPublicKey = match managerPublicKeyOrUnit() {
17501755 case pk: ByteVector =>
17511756 pk
17521757 case _: Unit =>
17531758 tx.senderPublicKey
17541759 case _ =>
17551760 throw("Match error")
17561761 }
17571762 match tx {
17581763 case order: Order =>
17591764 let matcherPub = mp()
1760- let $t05957859695 = if (skipOrderValidation())
1765+ let $t05966059777 = if (skipOrderValidation())
17611766 then $Tuple2(true, "")
17621767 else validateMatcherOrderAllowed(order)
1763- let orderValid = $t05957859695._1
1764- let orderValidInfo = $t05957859695._2
1768+ let orderValid = $t05966059777._1
1769+ let orderValidInfo = $t05966059777._2
17651770 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17661771 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17671772 if (if (if (orderValid)
17681773 then senderValid
17691774 else false)
17701775 then matcherValid
17711776 else false)
17721777 then true
17731778 else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
17741779 case s: SetScriptTransaction =>
17751780 if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
17761781 then true
17771782 else {
17781783 let newHash = blake2b256(value(s.script))
17791784 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
17801785 let currentHash = scriptHash(this)
17811786 if ((allowedHash == newHash))
17821787 then (currentHash != newHash)
17831788 else false
17841789 }
17851790 case _ =>
17861791 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
17871792 }
17881793 }
17891794

github/deemru/w8io/026f985 
289.53 ms