tx · 45EcZ4Gs9aJD2wdXAf97tZHLipSGDFcahParJbc6iX5Q

3Mw8ZcMK47vENHqhYYhCZTCPDXhff6ZQVwt:  -0.06200000 Waves

2023.08.10 15:30 [2704489] smart account 3Mw8ZcMK47vENHqhYYhCZTCPDXhff6ZQVwt > SELF 0.00000000 Waves

{ "type": 13, "id": "45EcZ4Gs9aJD2wdXAf97tZHLipSGDFcahParJbc6iX5Q", "fee": 6200000, "feeAssetId": null, "timestamp": 1691670379489, "version": 2, "chainId": 84, "sender": "3Mw8ZcMK47vENHqhYYhCZTCPDXhff6ZQVwt", "senderPublicKey": "3fNYAZ872D7hsaic3sPDZd5uAk59U5CiWiA153FUZ6Qv", "proofs": [ "5nBCEuWobsj2TP34WJ3vGiJhENRwZHBWVt3T2EtPSraxgNyCcFi2wubyG1wEL6tMacMurqKcc2Z6KYDNJDXgmkwx" ], "script": "base64:BgJxCAISEAoOGBgBAQgIAQEBAQEIAQgSAwoBARIDCgEBEgASBAoCCAESBAoCCAESAwoBARIECgIIARIDCgEBEgQKAggBEgUKAwgIARIDCgEIEgASABIDCgEIEgASAwoBARIDCgEIEgASABIDCgEIEgMKAQhzAANTRVACAl9fAAVXQVZFUwIFd2F2ZXMAB01BWF9JTlQA//////////9/AAdNQVhfRkVFAMCEPQANTUFYX0FNUExJRklFUgDAhD0AFE1BWF9XRUlHSFRfQU1QTElGSUVSAMCEPQAKTUFYX1dFSUdIVADAhD0AFFNMSVBQQUdFX1JBVEVfRkFDVE9SAMCEPQAPRkVFX1JBVEVfRkFDVE9SAMCEPQALUkFURV9GQUNUT1IAwIQ9AA5QRVJDRU5UX0ZBQ1RPUgkAtgIBAICAkLu61q3wDQAQWkVST19JTlRfTElTVF8xMAkAzAgCAAAJAMwIAgAACQDMCAIAAAkAzAgCAAAJAMwIAgAACQDMCAIAAAkAzAgCAAAJAMwIAgAACQDMCAIAAAkAzAgCAAAFA25pbAAQWkVST19JTlRfTElTVF8xMQkAzQgCBRBaRVJPX0lOVF9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ck5hdGl2ZSgxMDYyKQEFCG11bHRpc2lnCQC5CQIJAMwIAgUKS0VZX1NUQVRVUwkAzAgCCQClCAEFBHRoaXMJAMwIAgkA2AQBCAUCdHgCaWQFA25pbAUDU0VQBwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleci/vCw=", "height": 2704489, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: C7AFEknEoWCDGjqRfurQsA28eowsH5pUcEpec9G8QH6q Next: 7EYmVN4bsGkpXRNwu8omCtmm7inQu7pZqWhPjn9m9t5S Diff:
OldNewDifferences
2121
2222 let RATE_FACTOR = 1000000
2323
24-let PERCENT_FACTOR = toBigInt(1000000000000)
24+let PERCENT_FACTOR = toBigInt(1000000000000000000)
2525
2626 let ZERO_INT_LIST_10 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
2727
960960 let newAssetsRate = fraction((assetTotalSupply_ - _calculateFee(assetBalances_, assetTotalSupply_, assetWeights_, sigmaWeight_, weightAmplifier_, slippageRate_, feeMaxRate_)), RATE_FACTOR, lpTotalSupply_)
961961 let diff = (newAssetsRate - prevAssetsRate)
962962 if (if ((0 >= diff))
963- then ((-1 * RATE_FACTOR) > diff)
963+ then ((-1 * _loadPrecision()) > diff)
964964 else false)
965965 then throw(("_validateLiquidityInvariant: revert: diff=" + toString(diff)))
966966 else true
972972 let newUtil = (assetTotalSupply_ - _calculateFee(assetBalances_, assetTotalSupply_, assetWeights_, sigmaWeight_, weightAmplifier_, slippageRate_, feeMaxRate_))
973973 let diff = (newUtil - prevUtil)
974974 if (if ((0 >= diff))
975- then ((-1 * RATE_FACTOR) > diff)
975+ then ((-1 * _loadPrecision()) > diff)
976976 else false)
977977 then throw(("_validateSwapInvariant: revert: diff=" + toString(diff)))
978978 else true
997997 else if ((maxAllocation > balance_))
998998 then if ((prevBalance_ > prevMaxAllocation))
999999 then throw("_validateAssetAllocation: new down")
1000- else if (((prevMaxAllocation - prevBalance_) > (maxAllocation - balance_)))
1000+ else if (((maxAllocation - balance_) > (prevMaxAllocation - prevBalance_)))
10011001 then throw("_validateAssetAllocation: still down")
10021002 else true
10031003 else true
10411041 $Tuple2((index + 1), (acc._2 :+ profitUpdated))
10421042 }
10431043
1044- let $t02458924662 = {
1044+ let $t02460524678 = {
10451045 let $l = ZERO_INT_LIST_11
10461046 let $s = size($l)
10471047 let $acc0 = $Tuple2(0, nil)
10551055
10561056 $f0_2($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)
10571057 }
1058- let idx = $t02458924662._1
1059- let profitsUpdated = $t02458924662._2
1058+ let idx = $t02460524678._1
1059+ let profitsUpdated = $t02460524678._2
10601060 $Tuple2((_saveUserProfits(user_, profitsUpdated) ++ _saveUserSigmaFeePerLp(user_, sigmaFeePerLp)), profitsUpdated)
10611061 }
10621062
10701070 $Tuple2((index + 1), (acc._2 :+ sigmaFeePerLpUpdated))
10711071 }
10721072
1073- let $t02531225391 = {
1073+ let $t02532825407 = {
10741074 let $l = ZERO_INT_LIST_11
10751075 let $s = size($l)
10761076 let $acc0 = $Tuple2(0, nil)
10841084
10851085 $f0_2($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)
10861086 }
1087- let idx = $t02531225391._1
1088- let sigmaFeePerLpUpdated = $t02531225391._2
1087+ let idx = $t02532825407._1
1088+ let sigmaFeePerLpUpdated = $t02532825407._2
10891089 sigmaFeePerLpUpdated
10901090 }
10911091
10931093 func _calculateLpAndProtocolFees (assetIndex_,amount_,lpFeeRate_,protocolFeeRate_) = {
10941094 let sigmaFeePerLp = _loadSigmaFeePerLp()
10951095 let totalLp = _loadTotalLp()
1096- let $t02561225887 = if ((totalLp == 0))
1096+ let $t02562825903 = if ((totalLp == 0))
10971097 then $Tuple2(0, fraction(amount_, protocolFeeRate_, MAX_FEE))
10981098 else $Tuple2(fraction(amount_, lpFeeRate_, MAX_FEE), fraction(amount_, protocolFeeRate_, MAX_FEE))
1099- let lpFee = $t02561225887._1
1100- let protocolFee = $t02561225887._2
1099+ let lpFee = $t02562825903._1
1100+ let protocolFee = $t02562825903._2
11011101 let sigmaFeePerLpUpdated = if ((lpFee == 0))
11021102 then sigmaFeePerLp
11031103 else _updateSigmaFeePerLp(sigmaFeePerLp, totalLp, assetIndex_, lpFee)
11121112 let slippageRate = storage._8
11131113 let feeMaxRate = storage._9
11141114 let assets = _loadAssets()
1115- let $t02639626449 = _loadAssetWeights()
1116- let assetWeights = $t02639626449._1
1117- let sigmaWeight = $t02639626449._2
1118- let $t02645426522 = _loadAssetBalances()
1119- let prevAssetBalances = $t02645426522._1
1120- let prevAssetTotalSupply = $t02645426522._2
1121- let $t02652827758 = if ((prevAssetTotalSupply == 0))
1115+ let $t02641226465 = _loadAssetWeights()
1116+ let assetWeights = $t02641226465._1
1117+ let sigmaWeight = $t02641226465._2
1118+ let $t02647026538 = _loadAssetBalances()
1119+ let prevAssetBalances = $t02647026538._1
1120+ let prevAssetTotalSupply = $t02647026538._2
1121+ let $t02654427774 = if ((prevAssetTotalSupply == 0))
11221122 then {
11231123 func foldFunc (acc,elem) = {
11241124 let index = acc._1
11261126 $Tuple2((index + 1), (acc._2 :+ requiredAmountNormalized))
11271127 }
11281128
1129- let $t02697027044 = {
1129+ let $t02698627060 = {
11301130 let $l = assets
11311131 let $s = size($l)
11321132 let $acc0 = $Tuple2(0, nil)
11401140
11411141 $f0_2($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)
11421142 }
1143- let idx = $t02697027044._1
1144- let requiredAmountsNormalized = $t02697027044._2
1143+ let idx = $t02698627060._1
1144+ let requiredAmountsNormalized = $t02698627060._2
11451145 $Tuple2(amount_, requiredAmountsNormalized)
11461146 }
11471147 else {
11521152 $Tuple2((index + 1), (acc._2 :+ requiredAmountNormalized))
11531153 }
11541154
1155- let $t02758727662 = {
1155+ let $t02760327678 = {
11561156 let $l = assets
11571157 let $s = size($l)
11581158 let $acc0 = $Tuple2(0, nil)
11661166
11671167 $f0_2($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)
11681168 }
1169- let idx = $t02758727662._1
1170- let requiredAmountsNormalized = $t02758727662._2
1169+ let idx = $t02760327678._1
1170+ let requiredAmountsNormalized = $t02760327678._2
11711171 $Tuple2(fraction(amount_, lpTotalSupply, prevAssetTotalSupply), requiredAmountsNormalized)
11721172 }
1173- let lpTokensToMint = $t02652827758._1
1174- let requiredAmountsNormalized = $t02652827758._2
1175- let $t02776427877 = _incrementBalancesByAmounts(prevAssetBalances, requiredAmountsNormalized)
1176- let assetBalances = $t02776427877._1
1177- let assetTotalSupply = $t02776427877._2
1173+ let lpTokensToMint = $t02654427774._1
1174+ let requiredAmountsNormalized = $t02654427774._2
1175+ let $t02778027893 = _incrementBalancesByAmounts(prevAssetBalances, requiredAmountsNormalized)
1176+ let assetBalances = $t02778027893._1
1177+ let assetTotalSupply = $t02778027893._2
11781178 let err2 = _validateLiquidityInvariant(prevAssetBalances, prevAssetTotalSupply, assetBalances, assetTotalSupply, lpTotalSupply, (lpTotalSupply + lpTokensToMint), assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate)
11791179 if ((err2 == err2))
11801180 then $Tuple3(lpTokensToMint, requiredAmountsNormalized, assetBalances)
11851185 func _deposit (assetId_,amount_) = {
11861186 let storage = _loadStorage()
11871187 let lpTotalSupply = storage._3
1188+ let lpFeeRate = storage._4
1189+ let protocolFeeRate = storage._5
11881190 let maxAllocAmplifier = storage._6
11891191 let weightAmplifier = storage._7
11901192 let slippageRate = storage._8
11911193 let feeMaxRate = storage._9
11921194 let assets = _loadAssets()
1193- let $t02857228625 = _loadAssetWeights()
1194- let assetWeights = $t02857228625._1
1195- let sigmaWeight = $t02857228625._2
1196- let $t02863028744 = _loadAssetBalances()
1197- let prevAssetBalances = $t02863028744._1
1198- let prevAssetTotalSupply = $t02863028744._2
1195+ let $t02865628709 = _loadAssetWeights()
1196+ let assetWeights = $t02865628709._1
1197+ let sigmaWeight = $t02865628709._2
1198+ let $t02871428828 = _loadAssetBalances()
1199+ let prevAssetBalances = $t02871428828._1
1200+ let prevAssetTotalSupply = $t02871428828._2
11991201 let assetBalances = _incrementBalanceByIndex(prevAssetBalances, value(indexOf(assets, assetId_)), amount_)
12001202 let assetTotalSupply = (prevAssetTotalSupply + amount_)
12011203 let err2 = _validateAllocation(assetBalances, assetTotalSupply, prevAssetBalances, prevAssetTotalSupply, assetWeights, sigmaWeight, maxAllocAmplifier)
12041206 let prevFee = _calculateFee(prevAssetBalances, prevAssetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate)
12051207 let fee = _calculateFee(assetBalances, assetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate)
12061208 let lpTokensToMint = if ((lpTotalSupply == 0))
1207- then (assetTotalSupply - fee)
1209+ then throw("_deposit: empty pool")
12081210 else {
12091211 let assetDiff = (assetTotalSupply - prevAssetTotalSupply)
12101212 let feeDiff = (fee - prevFee)
12151217 then lpTokensToMintInner
12161218 else throw("Strict value is not equal to itself.")
12171219 }
1218- $Tuple2(lpTokensToMint, assetBalances)
1220+ let $t03049030621 = _calculateLpAndProtocolFees(0, lpTokensToMint, (lpFeeRate / 2), (protocolFeeRate / 2))
1221+ let lpFee = $t03049030621._1
1222+ let protocolFee = $t03049030621._2
1223+ let sigmaFeePerLpUpdated = $t03049030621._3
1224+ $Tuple5(lpTokensToMint, assetBalances, lpFee, protocolFee, sigmaFeePerLpUpdated)
12191225 }
12201226 else throw("Strict value is not equal to itself.")
12211227 }
12241230 func _withdrawAll (amount_) = {
12251231 let storage = _loadStorage()
12261232 let lpTotalSupply = storage._3
1227- let lpFeeRate = storage._4
1228- let protocolFeeRate = storage._5
12291233 let maxAllocAmplifier = storage._6
12301234 let weightAmplifier = storage._7
12311235 let slippageRate = storage._8
12321236 let feeMaxRate = storage._9
1233- let $t03067130739 = _loadAssetBalances()
1234- let prevAssetBalances = $t03067130739._1
1235- let prevAssetTotalSupply = $t03067130739._2
1236- let $t03074430797 = _loadAssetWeights()
1237- let assetWeights = $t03074430797._1
1238- let sigmaWeight = $t03074430797._2
1239- let $t03080330919 = _calculateLpAndProtocolFees(0, amount_, lpFeeRate, protocolFeeRate)
1240- let lpFee = $t03080330919._1
1241- let protocolFee = $t03080330919._2
1242- let sigmaFeePerLpUpdated = $t03080330919._3
1243- let lpTokensToBurn = ((amount_ - lpFee) - protocolFee)
1237+ let $t03095531023 = _loadAssetBalances()
1238+ let prevAssetBalances = $t03095531023._1
1239+ let prevAssetTotalSupply = $t03095531023._2
1240+ let $t03102831081 = _loadAssetWeights()
1241+ let assetWeights = $t03102831081._1
1242+ let sigmaWeight = $t03102831081._2
1243+ let lpTokensToBurn = amount_
12441244 let err = _validateInt(lpTokensToBurn, 0, MAX_INT, "_withdrawAll: lpTokensToBurn less than 0")
12451245 if ((err == err))
12461246 then {
1247- let $t03108231215 = _decrementBalancesByLpAmount(prevAssetBalances, lpTokensToBurn, lpTotalSupply)
1248- let assetBalances = $t03108231215._1
1249- let assetTotalSupply = $t03108231215._2
1250- let balancesToPay = $t03108231215._3
1247+ let $t03122331356 = _decrementBalancesByLpAmount(prevAssetBalances, lpTokensToBurn, lpTotalSupply)
1248+ let assetBalances = $t03122331356._1
1249+ let assetTotalSupply = $t03122331356._2
1250+ let balancesToPay = $t03122331356._3
12511251 let err2 = _validateLiquidityInvariant(prevAssetBalances, prevAssetTotalSupply, assetBalances, assetTotalSupply, lpTotalSupply, (lpTotalSupply - lpTokensToBurn), assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate)
12521252 if ((err2 == err2))
1253- then $Tuple6(lpTokensToBurn, balancesToPay, assetBalances, lpFee, protocolFee, sigmaFeePerLpUpdated)
1253+ then $Tuple3(lpTokensToBurn, balancesToPay, assetBalances)
12541254 else throw("Strict value is not equal to itself.")
12551255 }
12561256 else throw("Strict value is not equal to itself.")
12681268 let feeMaxRate = storage._9
12691269 let precision = _loadPrecision()
12701270 let assets = _loadAssets()
1271- let $t03204932117 = _loadAssetBalances()
1272- let prevAssetBalances = $t03204932117._1
1273- let prevAssetTotalSupply = $t03204932117._2
1274- let $t03212232175 = _loadAssetWeights()
1275- let assetWeights = $t03212232175._1
1276- let sigmaWeight = $t03212232175._2
1271+ let $t03214832216 = _loadAssetBalances()
1272+ let prevAssetBalances = $t03214832216._1
1273+ let prevAssetTotalSupply = $t03214832216._2
1274+ let $t03222132274 = _loadAssetWeights()
1275+ let assetWeights = $t03222132274._1
1276+ let sigmaWeight = $t03222132274._2
12771277 let targetAssetIndex = value(indexOf(assets, assetId_))
12781278 let prevFee = _calculateFee(prevAssetBalances, prevAssetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate)
12791279 let prevUtilValue = (prevAssetTotalSupply - prevFee)
12881288 let tempAssetBalances = _decrementBalanceByIndex(prevAssetBalances, targetAssetIndex, currentAmount)
12891289 let tempAssetTotalSupply = (prevAssetTotalSupply - currentAmount)
12901290 let utilValue = (tempAssetTotalSupply - _calculateFee(tempAssetBalances, tempAssetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate))
1291- if (if ((precision > (utilValue - prevUtilValueWithK)))
1292- then ((utilValue - prevUtilValueWithK) >= 0)
1291+ if (if (((utilValue - prevUtilValueWithK) > (-1 * precision)))
1292+ then (precision > (utilValue - prevUtilValueWithK))
12931293 else false)
12941294 then $Tuple4(true, startInner, stopInner, currentAmount)
12951295 else if ((0 > (utilValue - prevUtilValueWithK)))
1296- then $Tuple4(false, startInner, currentAmount, 0)
1297- else $Tuple4(false, currentAmount, stopInner, 0)
1296+ then $Tuple4(false, startInner, currentAmount, currentAmount)
1297+ else $Tuple4(false, currentAmount, stopInner, currentAmount)
12981298 }
12991299
13001300 let targetAmount = {
1301- let targetAmount = lpAmount_
1302- let tempAssetBalances = _decrementBalanceByIndex(prevAssetBalances, targetAssetIndex, targetAmount)
1303- let tempAssetTotalSupply = (prevAssetTotalSupply - targetAmount)
1304- let fee = _calculateFee(tempAssetBalances, tempAssetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate)
1305- let feeDiff = (fee - prevFee)
1306- if ((feeDiff == 0))
1307- then targetAmount
1308- else {
1309- let $t03414034255 = {
1310- let $l = LIST_64
1311- let $s = size($l)
1312- let $acc0 = $Tuple4(false, 0, (lpAmount_ + prevFee), 0)
1313- func $f0_1 ($a,$i) = if (($i >= $s))
1314- then $a
1315- else foldFunc($a, $l[$i])
1316-
1317- func $f0_2 ($a,$i) = if (($i >= $s))
1318- then $a
1319- else throw("List size exceeds 64")
1320-
1321- $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($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($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($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), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64)
1322- }
1323- let success = $t03414034255._1
1324- let startOut = $t03414034255._2
1325- let stopOut = $t03414034255._3
1326- let targetAmountOut = $t03414034255._4
1327- if (!(success))
1328- then throw(("_withdraw: can't calculate targetAmount=" + toString(targetAmountOut)))
1329- else targetAmountOut
1330- }
1301+ let $t03380933924 = {
1302+ let $l = LIST_64
1303+ let $s = size($l)
1304+ let $acc0 = $Tuple4(false, 0, (lpAmount_ + prevFee), 0)
1305+ func $f0_1 ($a,$i) = if (($i >= $s))
1306+ then $a
1307+ else foldFunc($a, $l[$i])
1308+
1309+ func $f0_2 ($a,$i) = if (($i >= $s))
1310+ then $a
1311+ else throw("List size exceeds 64")
1312+
1313+ $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($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($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($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), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64)
1314+ }
1315+ let success = $t03380933924._1
1316+ let startOut = $t03380933924._2
1317+ let stopOut = $t03380933924._3
1318+ let targetAmountOut = $t03380933924._4
1319+ if (!(success))
1320+ then throw(("_withdraw: can't calculate targetAmount=" + toString(targetAmountOut)))
1321+ else targetAmountOut
13311322 }
13321323 let finalAssetBalances = _decrementBalanceByIndex(prevAssetBalances, targetAssetIndex, targetAmount)
13331324 let finalAssetTotalSupply = (prevAssetTotalSupply - targetAmount)
13361327 else false
13371328 if ((err1 == err1))
13381329 then {
1339- let $t03514235282 = _calculateLpAndProtocolFees((targetAssetIndex + 1), targetAmount, lpFeeRate, protocolFeeRate)
1340- let lpFee = $t03514235282._1
1341- let protocolFee = $t03514235282._2
1342- let sigmaFeePerLpUpdated = $t03514235282._3
1330+ let $t03488235030 = _calculateLpAndProtocolFees((targetAssetIndex + 1), targetAmount, (lpFeeRate / 2), (protocolFeeRate / 2))
1331+ let lpFee = $t03488235030._1
1332+ let protocolFee = $t03488235030._2
1333+ let sigmaFeePerLpUpdated = $t03488235030._3
13431334 $Tuple5(targetAmount, finalAssetBalances, lpFee, protocolFee, sigmaFeePerLpUpdated)
13441335 }
13451336 else throw("Strict value is not equal to itself.")
13581349 let slippageRate = storage._8
13591350 let feeMaxRate = storage._9
13601351 let precision = _loadPrecision()
1361- let $t03586435932 = _loadAssetBalances()
1362- let prevAssetBalances = $t03586435932._1
1363- let prevAssetTotalSupply = $t03586435932._2
1364- let $t03593735990 = _loadAssetWeights()
1365- let assetWeights = $t03593735990._1
1366- let sigmaWeight = $t03593735990._2
1352+ let $t03561235680 = _loadAssetBalances()
1353+ let prevAssetBalances = $t03561235680._1
1354+ let prevAssetTotalSupply = $t03561235680._2
1355+ let $t03568535738 = _loadAssetWeights()
1356+ let assetWeights = $t03568535738._1
1357+ let sigmaWeight = $t03568535738._2
13671358 let assetBalances = _incrementBalanceByIndex(prevAssetBalances, sourceAssetIndex_, sourceAmount_)
13681359 let assetTotalSupply = (prevAssetTotalSupply + sourceAmount_)
13691360 let prevFee = _calculateFee(prevAssetBalances, prevAssetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate)
13771368 let tempAssetBalances = _decrementBalanceByIndex(assetBalances, targetAssetIndex_, currentAmount)
13781369 let tempAssetTotalSupply = (assetTotalSupply - currentAmount)
13791370 let utilValue = (tempAssetTotalSupply - _calculateFee(tempAssetBalances, tempAssetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate))
1380- if (if ((precision > (utilValue - prevUtilValue)))
1381- then ((utilValue - prevUtilValue) >= 0)
1371+ if (if (((utilValue - prevUtilValue) > (-1 * precision)))
1372+ then (precision > (utilValue - prevUtilValue))
13821373 else false)
13831374 then $Tuple4(true, startInner, stopInner, currentAmount)
13841375 else if ((0 > (utilValue - prevUtilValue)))
1385- then $Tuple4(false, startInner, currentAmount, 0)
1386- else $Tuple4(false, currentAmount, stopInner, 0)
1376+ then $Tuple4(false, startInner, currentAmount, currentAmount)
1377+ else $Tuple4(false, currentAmount, stopInner, currentAmount)
13871378 }
13881379
13891380 let targetAmount = {
13951386 if ((feeDiff == 0))
13961387 then targetAmount
13971388 else {
1398- let $t03784137960 = {
1389+ let $t03762537744 = {
13991390 let $l = LIST_64
14001391 let $s = size($l)
14011392 let $acc0 = $Tuple4(false, 0, (sourceAmount_ + prevFee), 0)
14091400
14101401 $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($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($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($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), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64)
14111402 }
1412- let success = $t03784137960._1
1413- let startOut = $t03784137960._2
1414- let stopOut = $t03784137960._3
1415- let targetAmountOut = $t03784137960._4
1403+ let success = $t03762537744._1
1404+ let startOut = $t03762537744._2
1405+ let stopOut = $t03762537744._3
1406+ let targetAmountOut = $t03762537744._4
14161407 if (!(success))
14171408 then throw(("_swap: can't calculate targetAmount=" + toString(targetAmountOut)))
14181409 else targetAmountOut
14251416 else false
14261417 if ((err1 == err1))
14271418 then {
1428- let $t03877338914 = _calculateLpAndProtocolFees((targetAssetIndex_ + 1), targetAmount, lpFeeRate, protocolFeeRate)
1429- let lpFee = $t03877338914._1
1430- let protocolFee = $t03877338914._2
1431- let sigmaFeePerLpUpdated = $t03877338914._3
1419+ let $t03855738698 = _calculateLpAndProtocolFees((targetAssetIndex_ + 1), targetAmount, lpFeeRate, protocolFeeRate)
1420+ let lpFee = $t03855738698._1
1421+ let protocolFee = $t03855738698._2
1422+ let sigmaFeePerLpUpdated = $t03855738698._3
14321423 $Tuple5(targetAmount, finalAssetBalances, lpFee, protocolFee, sigmaFeePerLpUpdated)
14331424 }
14341425 else throw("Strict value is not equal to itself.")
14361427
14371428
14381429 @Callable(i)
1439-func init (assets_,assetWeights_,lpFeeRate_,protocolFeeRate_,lpTokenName_,lpTokenDescr_,lpTokenDecimals_,maxAllocationAmplifier_,weightAmplifier_,slippageRate_,feeMaxRate_,protocolFeeContract_,precision_) = {
1440- let err = if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (_onlyThisContract(i.caller))
1430+func init (assets_,assetWeights_,lpFeeRate_,protocolFeeRate_,lpTokenName_,lpTokenDescr_,lpTokenDecimals_,maxAllocationAmplifier_,weightAmplifier_,slippageRate_,feeMaxRate_,protocolFeeContract_,precision_,pauser_) = {
1431+ let err = if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (_onlyThisContract(i.caller))
14411432 then _whenNotInitialized()
14421433 else false)
14431434 then _whenMultisigSet()
14441435 else false)
14451436 then _validateAssets(assets_, "init: invalid assets")
14461437 else false)
1447- then _validateIntList(assetWeights_, 0, MAX_WEIGHT, "init: invalid assetWeights")
1438+ then _validateIntList(assetWeights_, 1, MAX_WEIGHT, "init: invalid assetWeights")
14481439 else false)
14491440 then _validateIntEquals(size(assets_), size(assetWeights_), "init: invalid assetWeights size")
14501441 else false)
14681459 else false)
14691460 then _validateAddress(protocolFeeContract_, "init: invalid protocolFeeContract")
14701461 else false)
1471- then _validateInt(precision_, 0, MAX_INT, "init: invalid precision")
1462+ then _validateInt(precision_, 1, MAX_INT, "init: invalid precision")
1463+ else false)
1464+ then _validateAddress(pauser_, "init: invalid pauser")
14721465 else false
14731466 if ((err == err))
14741467 then {
1475- let $t04069540764 = _prepareAssetWeights(assetWeights_)
1476- let assetWeights = $t04069540764._1
1477- let sigmaWeight = $t04069540764._2
1468+ let $t04056140630 = _prepareAssetWeights(assetWeights_)
1469+ let assetWeights = $t04056140630._1
1470+ let sigmaWeight = $t04056140630._2
14781471 let assetBalances = _prepareAssetBalances(assets_)
14791472 let issue = Issue(lpTokenName_, lpTokenDescr_, 0, lpTokenDecimals_, true)
14801473 let lpAssetId = calculateAssetId(issue)
14811474 let storageUpdated = $Tuple10(lpAssetId, true, 0, lpFeeRate_, protocolFeeRate_, maxAllocationAmplifier_, weightAmplifier_, slippageRate_, feeMaxRate_, addressFromStringValue(protocolFeeContract_))
1482- $Tuple2((((((([issue] ++ _saveStorage(storageUpdated)) ++ _saveAssets(assets_)) ++ _saveAssetBalances(assetBalances)) ++ _saveAssetWeights(assetWeights)) ++ _savePrecision(precision_)) ++ _saveSigmaFeePerLp(_loadSigmaFeePerLp())), unit)
1475+ $Tuple2(((((((([issue] ++ _saveStorage(storageUpdated)) ++ _saveAssets(assets_)) ++ _saveAssetBalances(assetBalances)) ++ _saveAssetWeights(assetWeights)) ++ _savePrecision(precision_)) ++ _saveSigmaFeePerLp(_loadSigmaFeePerLp())) ++ _savePauser(addressFromStringValue(pauser_))), unit)
14831476 }
14841477 else throw("Strict value is not equal to itself.")
14851478 }
14991492 let lpAssetId = storage._1
15001493 let lpDecimals = _getDecimals(toBase58String(lpAssetId))
15011494 let assets = _loadAssets()
1502- let $t04245742542 = _depositAll(amount_)
1503- let lpTokensToMint = $t04245742542._1
1504- let requiredAmountsNormalized = $t04245742542._2
1505- let assetBalances = $t04245742542._3
1495+ let $t04238042465 = _depositAll(amount_)
1496+ let lpTokensToMint = $t04238042465._1
1497+ let requiredAmountsNormalized = $t04238042465._2
1498+ let assetBalances = $t04238042465._3
15061499 func foldFunc (acc,elem) = {
15071500 let index = acc._1
15081501 let paymentAssetStr = _assetToStr(i.payments[index].assetId)
15261519 else throw("Strict value is not equal to itself.")
15271520 }
15281521
1529- let $t04368543747 = {
1522+ let $t04360843670 = {
15301523 let $l = assets
15311524 let $s = size($l)
15321525 let $acc0 = $Tuple2(0, nil)
15401533
15411534 $f0_2($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)
15421535 }
1543- let idx = $t04368543747._1
1544- let changeActions = $t04368543747._2
1536+ let idx = $t04360843670._1
1537+ let changeActions = $t04360843670._2
15451538 let storageUpdated = $Tuple10(storage._1, storage._2, (storage._3 + lpTokensToMint), storage._4, storage._5, storage._6, storage._7, storage._8, storage._9, storage._10)
15461539 $Tuple2(((([Reissue(lpAssetId, lpTokensToMint, true), ScriptTransfer(i.caller, lpTokensToMint, lpAssetId)] ++ _saveStorage(storageUpdated)) ++ _saveAssetBalances(assetBalances)) ++ changeActions), unit)
15471540 }
15571550 then {
15581551 let storage = _loadStorage()
15591552 let lpAssetId = storage._1
1560- let lpDecimals = _getDecimals(toBase58String(lpAssetId))
1553+ let lpAssetIdStr = _assetToStr(lpAssetId)
1554+ let lpDecimals = _getDecimals(lpAssetIdStr)
15611555 let err1 = if (if (if (if (_whenInitialized())
15621556 then _whenNotPaused()
15631557 else false)
15651559 else false)
15661560 then _validateListContains(_loadAssets(), _assetToStr(i.payments[0].assetId), "deposit: invalid payment asset")
15671561 else false)
1568- then _validateInt(i.payments[0].amount, 0, MAX_INT, "deposit: invalid payment amount")
1562+ then _validateInt(i.payments[0].amount, 1, MAX_INT, "deposit: invalid payment amount")
15691563 else false
15701564 if ((err1 == err1))
15711565 then {
15721566 let assetStr = _assetToStr(i.payments[0].assetId)
15731567 let assetDecimals = _getDecimals(assetStr)
15741568 let amountNormalized = _normalizeDecimals(i.payments[0].amount, assetDecimals, lpDecimals, DOWN)
1575- let $t04512645200 = _deposit(assetStr, amountNormalized)
1576- let lpTokensToMint = $t04512645200._1
1577- let assetBalances = $t04512645200._2
1578- let err2 = _validateInt(lpTokensToMint, minLpAmount_, MAX_INT, "deposit: less than min lp")
1569+ let $t04508245198 = _deposit(assetStr, amountNormalized)
1570+ let lpTokensToMint = $t04508245198._1
1571+ let assetBalances = $t04508245198._2
1572+ let lpFee = $t04508245198._3
1573+ let protocolFee = $t04508245198._4
1574+ let sigmaFeePerLpUpdated = $t04508245198._5
1575+ let lpTokensToSend = ((lpTokensToMint - lpFee) - protocolFee)
1576+ let err2 = _validateInt(lpTokensToSend, minLpAmount_, MAX_INT, "deposit: less than min")
15791577 if ((err2 == err2))
15801578 then {
15811579 let storageUpdated = $Tuple10(storage._1, storage._2, (storage._3 + lpTokensToMint), storage._4, storage._5, storage._6, storage._7, storage._8, storage._9, storage._10)
1582- $Tuple2((([Reissue(lpAssetId, lpTokensToMint, true), ScriptTransfer(i.caller, lpTokensToMint, lpAssetId)] ++ _saveStorage(storageUpdated)) ++ _saveAssetBalances(assetBalances)), unit)
1580+ $Tuple2(((((([Reissue(lpAssetId, lpTokensToMint, true), ScriptTransfer(i.caller, lpTokensToSend, lpAssetId)] ++ _saveStorage(storageUpdated)) ++ _saveAssetBalances(assetBalances)) ++ _saveLpFee(lpAssetIdStr, (lpFee + _loadLpFee(lpAssetIdStr)))) ++ _saveProtocolFee(lpAssetIdStr, (protocolFee + _loadProtocolFee(lpAssetIdStr)))) ++ _saveSigmaFeePerLp(sigmaFeePerLpUpdated)), unit)
15831581 }
15841582 else throw("Strict value is not equal to itself.")
15851583 }
16041602 else false)
16051603 then _validateStringEqual(lpAssetIdStr, _assetToStr(i.payments[0].assetId), "withdrawAll: invalid payment asset")
16061604 else false)
1607- then _validateInt(i.payments[0].amount, 0, MAX_INT, "withdrawAll: invalid payment amount")
1605+ then _validateInt(i.payments[0].amount, 1, MAX_INT, "withdrawAll: invalid payment amount")
16081606 else false
16091607 if ((err == err))
16101608 then {
1611- let $t04642146550 = _withdrawAll(i.payments[0].amount)
1612- let lpTokensToBurn = $t04642146550._1
1613- let balancesToPay = $t04642146550._2
1614- let assetBalances = $t04642146550._3
1615- let lpFee = $t04642146550._4
1616- let protocolFee = $t04642146550._5
1617- let sigmaFeePerLpUpdated = $t04642146550._6
1609+ let $t04668746774 = _withdrawAll(i.payments[0].amount)
1610+ let lpTokensToBurn = $t04668746774._1
1611+ let balancesToPay = $t04668746774._2
1612+ let assetBalances = $t04668746774._3
16181613 let paymentActions = _getPaymentsFromBalances(assets, balancesToPay, i.caller, lpDecimals)
16191614 let storageUpdated = $Tuple10(storage._1, storage._2, (storage._3 - lpTokensToBurn), storage._4, storage._5, storage._6, storage._7, storage._8, storage._9, storage._10)
1620- $Tuple2((((((([Burn(lpAssetId, lpTokensToBurn)] ++ paymentActions) ++ _saveStorage(storageUpdated)) ++ _saveAssetBalances(assetBalances)) ++ _saveLpFee(lpAssetIdStr, (lpFee + _loadLpFee(lpAssetIdStr)))) ++ _saveProtocolFee(lpAssetIdStr, (protocolFee + _loadProtocolFee(lpAssetIdStr)))) ++ _saveSigmaFeePerLp(sigmaFeePerLpUpdated)), unit)
1615+ $Tuple2(((([Burn(lpAssetId, lpTokensToBurn)] ++ paymentActions) ++ _saveStorage(storageUpdated)) ++ _saveAssetBalances(assetBalances)), unit)
16211616 }
16221617 else throw("Strict value is not equal to itself.")
16231618 }
16381633 else false)
16391634 then _validateStringEqual(lpAssetIdStr, _assetToStr(i.payments[0].assetId), "withdraw: invalid payment asset")
16401635 else false)
1641- then _validateInt(i.payments[0].amount, 0, MAX_INT, "withdraw: invalid payment amount")
1636+ then _validateInt(i.payments[0].amount, 1, MAX_INT, "withdraw: invalid payment amount")
16421637 else false)
16431638 then _validateListContains(assets, assetId_, "withdraw: invalid assetId")
16441639 else false)
16461641 else false
16471642 if ((err == err))
16481643 then {
1649- let $t04808648220 = _withdraw(assetId_, i.payments[0].amount)
1650- let targetAmountNormalized = $t04808648220._1
1651- let finalAssetBalances = $t04808648220._2
1652- let lpFee = $t04808648220._3
1653- let protocolFee = $t04808648220._4
1654- let sigmaFeePerLpUpdated = $t04808648220._5
1644+ let $t04810048234 = _withdraw(assetId_, i.payments[0].amount)
1645+ let targetAmountNormalized = $t04810048234._1
1646+ let finalAssetBalances = $t04810048234._2
1647+ let lpFee = $t04810048234._3
1648+ let protocolFee = $t04810048234._4
1649+ let sigmaFeePerLpUpdated = $t04810048234._5
16551650 let finalAmountNormalized = ((targetAmountNormalized - lpFee) - protocolFee)
16561651 let targetDecimals = _getDecimals(assetId_)
16571652 let finalAmount = _normalizeDecimals(finalAmountNormalized, lpDecimals, targetDecimals, DOWN)
1658- let err1 = _validateInt(finalAmount, minAmount_, MAX_INT, "withdraw: insufficient final amount")
1653+ let err1 = _validateInt(finalAmount, minAmount_, MAX_INT, "withdraw: less than min")
16591654 if ((err1 == err1))
16601655 then {
16611656 let storageUpdated = $Tuple10(storage._1, storage._2, (storage._3 - i.payments[0].amount), storage._4, storage._5, storage._6, storage._7, storage._8, storage._9, storage._10)
16871682 else false)
16881683 then _validateInt(minAmount_, 0, MAX_INT, "swap: invalid min target amount")
16891684 else false)
1690- then _validateInt(sourceAmountNormalized, 0, MAX_INT, "swap: invalid source amount")
1685+ then _validateInt(sourceAmountNormalized, 1, MAX_INT, "swap: invalid source amount")
16911686 else false)
16921687 then _validateStringNotEq(sourceAssetStr, targetAssetId_, "swap: same assets")
16931688 else false)
16951690 else false
16961691 if ((err == err))
16971692 then {
1698- let $t05031750475 = _swap(sourceAssetIndex, targetAssetIndex, sourceAmountNormalized)
1699- let targetAmountNormalized = $t05031750475._1
1700- let finalAssetBalances = $t05031750475._2
1701- let lpFee = $t05031750475._3
1702- let protocolFee = $t05031750475._4
1703- let sigmaFeePerLpUpdated = $t05031750475._5
1693+ let $t05031950477 = _swap(sourceAssetIndex, targetAssetIndex, sourceAmountNormalized)
1694+ let targetAmountNormalized = $t05031950477._1
1695+ let finalAssetBalances = $t05031950477._2
1696+ let lpFee = $t05031950477._3
1697+ let protocolFee = $t05031950477._4
1698+ let sigmaFeePerLpUpdated = $t05031950477._5
17041699 let finalAmountNormalized = ((targetAmountNormalized - lpFee) - protocolFee)
17051700 let targetDecimals = _getDecimals(targetAssetId_)
17061701 let finalAmount = _normalizeDecimals(finalAmountNormalized, lpDecimals, targetDecimals, DOWN)
1707- let err1 = _validateInt(finalAmount, minAmount_, MAX_INT, "swap: insufficient final amount")
1702+ let err1 = _validateInt(finalAmount, minAmount_, MAX_INT, "swap: less than min")
17081703 if ((err1 == err1))
17091704 then $Tuple2((((([ScriptTransfer(i.caller, finalAmount, _strToAsset(targetAssetId_))] ++ _saveAssetBalances(finalAssetBalances)) ++ _saveLpFee(targetAssetId_, (lpFee + _loadLpFee(targetAssetId_)))) ++ _saveProtocolFee(targetAssetId_, (protocolFee + _loadProtocolFee(targetAssetId_)))) ++ _saveSigmaFeePerLp(sigmaFeePerLpUpdated)), unit)
17101705 else throw("Strict value is not equal to itself.")
17201715
17211716 @Callable(i)
17221717 func getDepositAll (lpAmount_) = {
1723- let err = _validateInt(lpAmount_, 0, MAX_INT, "getDepositAll: invalid amount")
1718+ let err = _validateInt(lpAmount_, 1, MAX_INT, "getDepositAll: invalid amount")
17241719 if ((err == err))
17251720 then {
1726- let $t05160751694 = _depositAll(lpAmount_)
1727- let lpTokensToMint = $t05160751694._1
1728- let requiredAmountsNormalized = $t05160751694._2
1729- let assetBalances = $t05160751694._3
1721+ let $t05159751684 = _depositAll(lpAmount_)
1722+ let lpTokensToMint = $t05159751684._1
1723+ let requiredAmountsNormalized = $t05159751684._2
1724+ let assetBalances = $t05159751684._3
17301725 $Tuple2(nil, $Tuple2(lpTokensToMint, requiredAmountsNormalized))
17311726 }
17321727 else throw("Strict value is not equal to itself.")
17371732 @Callable(i)
17381733 func getDeposit (assetId_,amount_) = {
17391734 let err = if (_validateListContains(_loadAssets(), assetId_, "getDeposit: invalid asset"))
1740- then _validateInt(amount_, 0, MAX_INT, "getDeposit: invalid amount")
1735+ then _validateInt(amount_, 1, MAX_INT, "getDeposit: invalid amount")
17411736 else false
17421737 if ((err == err))
17431738 then {
17461741 let lpDecimals = _getDecimals(toBase58String(lpAssetId))
17471742 let assetDecimals = _getDecimals(assetId_)
17481743 let amountNormalized = _normalizeDecimals(amount_, assetDecimals, lpDecimals, DOWN)
1749- let $t05245352527 = _deposit(assetId_, amountNormalized)
1750- let lpTokensToMint = $t05245352527._1
1751- let assetBalances = $t05245352527._2
1752- $Tuple2(nil, lpTokensToMint)
1744+ let $t05244352559 = _deposit(assetId_, amountNormalized)
1745+ let lpTokensToMint = $t05244352559._1
1746+ let assetBalances = $t05244352559._2
1747+ let lpFee = $t05244352559._3
1748+ let protocolFee = $t05244352559._4
1749+ let sigmaFeePerLpUpdated = $t05244352559._5
1750+ let lpTokensToSend = ((lpTokensToMint - lpFee) - protocolFee)
1751+ $Tuple2(nil, lpTokensToSend)
17531752 }
17541753 else throw("Strict value is not equal to itself.")
17551754 }
17611760 let err = _validateInt(lpAmount_, 0, MAX_INT, "getWithdrawAll: invalid amount")
17621761 if ((err == err))
17631762 then {
1764- let $t05290453022 = _withdrawAll(lpAmount_)
1765- let lpTokensToBurn = $t05290453022._1
1766- let balancesToGet = $t05290453022._2
1767- let assetBalances = $t05290453022._3
1768- let lpFee = $t05290453022._4
1769- let protocolFee = $t05290453022._5
1770- let sigmaFeePerLpUpdated = $t05290453022._6
1763+ let $t05299853074 = _withdrawAll(lpAmount_)
1764+ let lpTokensToBurn = $t05299853074._1
1765+ let balancesToGet = $t05299853074._2
1766+ let assetBalances = $t05299853074._3
17711767 $Tuple2(nil, balancesToGet)
17721768 }
17731769 else throw("Strict value is not equal to itself.")
17781774 @Callable(i)
17791775 func getWithdraw (assetId_,amount_) = {
17801776 let err = if (_validateListContains(_loadAssets(), assetId_, "getWithdraw: invalid asset"))
1781- then _validateInt(amount_, 0, MAX_INT, "getWithdraw: invalid amount")
1777+ then _validateInt(amount_, 1, MAX_INT, "getWithdraw: invalid amount")
17821778 else false
17831779 if ((err == err))
17841780 then {
17851781 let storage = _loadStorage()
17861782 let lpAssetId = storage._1
17871783 let lpDecimals = _getDecimals(toBase58String(lpAssetId))
1788- let $t05367353789 = _withdraw(assetId_, amount_)
1789- let targetAmountNormalized = $t05367353789._1
1790- let assetBalances = $t05367353789._2
1791- let lpFee = $t05367353789._3
1792- let protocolFee = $t05367353789._4
1793- let sigmaFeePerLpUpdated = $t05367353789._5
1784+ let $t05372553841 = _withdraw(assetId_, amount_)
1785+ let targetAmountNormalized = $t05372553841._1
1786+ let assetBalances = $t05372553841._2
1787+ let lpFee = $t05372553841._3
1788+ let protocolFee = $t05372553841._4
1789+ let sigmaFeePerLpUpdated = $t05372553841._5
17941790 let finalAmountNormalized = ((targetAmountNormalized - lpFee) - protocolFee)
17951791 let targetDecimals = _getDecimals(assetId_)
17961792 let finalAmount = _normalizeDecimals(finalAmountNormalized, lpDecimals, targetDecimals, DOWN)
18141810 if ((targetAssetIndex == targetAssetIndex))
18151811 then {
18161812 let sourceAmountNormalized = _normalizeDecimals(sourceAmount_, _getDecimals(sourceAssetId_), lpDecimals, DOWN)
1817- let err = if (_validateInt(sourceAmountNormalized, 0, MAX_INT, "swap: invalid source amount"))
1813+ let err = if (_validateInt(sourceAmountNormalized, 1, MAX_INT, "swap: invalid source amount"))
18181814 then _validateStringNotEq(sourceAssetId_, targetAssetId_, "swap: same assets")
18191815 else false
18201816 if ((err == err))
18211817 then {
1822- let $t05520355361 = _swap(sourceAssetIndex, targetAssetIndex, sourceAmountNormalized)
1823- let targetAmountNormalized = $t05520355361._1
1824- let finalAssetBalances = $t05520355361._2
1825- let lpFee = $t05520355361._3
1826- let protocolFee = $t05520355361._4
1827- let sigmaFeePerLpUpdated = $t05520355361._5
1818+ let $t05525555413 = _swap(sourceAssetIndex, targetAssetIndex, sourceAmountNormalized)
1819+ let targetAmountNormalized = $t05525555413._1
1820+ let finalAssetBalances = $t05525555413._2
1821+ let lpFee = $t05525555413._3
1822+ let protocolFee = $t05525555413._4
1823+ let sigmaFeePerLpUpdated = $t05525555413._5
18281824 let finalAmountNormalized = ((targetAmountNormalized - lpFee) - protocolFee)
18291825 let targetDecimals = _getDecimals(targetAssetId_)
18301826 let finalAmount = _normalizeDecimals(finalAmountNormalized, lpDecimals, targetDecimals, DOWN)
18441840 let user = if ((size(user_) > 0))
18451841 then valueOrErrorMessage(addressFromString(user_), "getClaim: invalid user")
18461842 else i.caller
1847- let $t05600356059 = _checkpoint(user)
1848- let checkpointActions = $t05600356059._1
1849- let userProfits = $t05600356059._2
1843+ let $t05605556111 = _checkpoint(user)
1844+ let checkpointActions = $t05605556111._1
1845+ let userProfits = $t05605556111._2
18501846 $Tuple2(nil, userProfits)
18511847 }
18521848
18591855 let weightAmplifier = storage._7
18601856 let slippageRate = storage._8
18611857 let feeMaxRate = storage._9
1862- let $t05639256452 = _loadAssetBalances()
1863- let assetBalances = $t05639256452._1
1864- let assetTotalSupply = $t05639256452._2
1865- let $t05645756510 = _loadAssetWeights()
1866- let assetWeights = $t05645756510._1
1867- let sigmaWeight = $t05645756510._2
1858+ let $t05644456504 = _loadAssetBalances()
1859+ let assetBalances = $t05644456504._1
1860+ let assetTotalSupply = $t05644456504._2
1861+ let $t05650956562 = _loadAssetWeights()
1862+ let assetWeights = $t05650956562._1
1863+ let sigmaWeight = $t05650956562._2
18681864 let fee = _calculateFee(assetBalances, assetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate)
18691865 let utilValue = (assetTotalSupply - fee)
18701866 $Tuple2(nil, $Tuple2(utilValue, lpTotalSupply))
1867+ }
1868+
1869+
1870+
1871+@Callable(i)
1872+func getFeeFunc () = {
1873+ let storage = _loadStorage()
1874+ let weightAmplifier = storage._7
1875+ let slippageRate = storage._8
1876+ let feeMaxRate = storage._9
1877+ let $t05699457054 = _loadAssetBalances()
1878+ let assetBalances = $t05699457054._1
1879+ let assetTotalSupply = $t05699457054._2
1880+ let $t05705957112 = _loadAssetWeights()
1881+ let assetWeights = $t05705957112._1
1882+ let sigmaWeight = $t05705957112._2
1883+ let fee = _calculateFee(assetBalances, assetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate)
1884+ $Tuple2(nil, fee)
18711885 }
18721886
18731887
19051919 else false
19061920 if ((err1 == err1))
19071921 then {
1908- let $t05758357643 = _checkpoint(i.caller)
1909- let checkpointActions = $t05758357643._1
1910- let userProfits = $t05758357643._2
1922+ let $t05812058180 = _checkpoint(i.caller)
1923+ let checkpointActions = $t05812058180._1
1924+ let userProfits = $t05812058180._2
19111925 $Tuple2(((checkpointActions ++ _saveUserLp(i.caller, (_loadUserLp(i.caller) + i.payments[0].amount))) ++ _saveTotalLp((_loadTotalLp() + i.payments[0].amount))), unit)
19121926 }
19131927 else throw("Strict value is not equal to itself.")
19301944 let err1 = _validateInt(amount_, 0, userLp, "unstake: invalid amount")
19311945 if ((err1 == err1))
19321946 then {
1933- let $t05815458214 = _checkpoint(i.caller)
1934- let checkpointActions = $t05815458214._1
1935- let userProfits = $t05815458214._2
1947+ let $t05869158751 = _checkpoint(i.caller)
1948+ let checkpointActions = $t05869158751._1
1949+ let userProfits = $t05869158751._2
19361950 $Tuple2(((([ScriptTransfer(i.caller, amount_, lpAssetId)] ++ checkpointActions) ++ _saveUserLp(i.caller, (userLp - amount_))) ++ _saveTotalLp((_loadTotalLp() - amount_))), unit)
19371951 }
19381952 else throw("Strict value is not equal to itself.")
19431957
19441958
19451959 @Callable(i)
1946-func claim (user_,assets_) = {
1947- let err = if (if (_whenInitialized())
1960+func claim (user_) = {
1961+ let err = if (_whenInitialized())
19481962 then _whenNotPaused()
1949- else false)
1950- then _validateInt(size(assets_), 1, 10, "claim: invalid assets size")
19511963 else false
19521964 if ((err == err))
19531965 then {
19601972 let assets = [lpAssetIdStr, _loadAssets()]
19611973 let maxIndex = (size(assets) - 1)
19621974 let userLp = _loadUserLp(user)
1963- let $t05903759093 = _checkpoint(user)
1964- let checkpointActions = $t05903759093._1
1965- let userProfits = $t05903759093._2
1975+ let $t05947459530 = _checkpoint(user)
1976+ let checkpointActions = $t05947459530._1
1977+ let userProfits = $t05947459530._2
19661978 func foldFunc (acc,profit) = {
19671979 let index = acc._1
1968- if ((index > maxIndex))
1969- then $Tuple3((index + 1), (acc._2 :+ profit), acc._3)
1970- else {
1980+ if (if ((maxIndex >= index))
1981+ then (profit > 0)
1982+ else false)
1983+ then {
19711984 let asset = assets[index]
1972- if (containsElement(assets_, asset))
1973- then $Tuple3((index + 1), (acc._2 :+ 0), (acc._3 :+ ScriptTransfer(user, profit, _strToAsset(asset))))
1974- else $Tuple3((index + 1), (acc._2 :+ profit), acc._3)
1985+ $Tuple3((index + 1), (acc._2 :+ 0), (acc._3 :+ ScriptTransfer(user, profit, _strToAsset(asset))))
19751986 }
1987+ else $Tuple3((index + 1), (acc._2 :+ profit), acc._3)
19761988 }
19771989
1978- let $t05958259673 = {
1990+ let $t05990859999 = {
19791991 let $l = userProfits
19801992 let $s = size($l)
19811993 let $acc0 = $Tuple3(0, nil, nil)
19892001
19902002 $f0_2($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)
19912003 }
1992- let idx = $t05958259673._1
1993- let userProfitsUpdated = $t05958259673._2
1994- let profitActions = $t05958259673._3
2004+ let idx = $t05990859999._1
2005+ let userProfitsUpdated = $t05990859999._2
2006+ let profitActions = $t05990859999._3
19952007 $Tuple2(((profitActions ++ removeByIndex(checkpointActions, 0)) ++ _saveUserProfits(user, userProfitsUpdated)), unit)
19962008 }
19972009 else throw("Strict value is not equal to itself.")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 let WAVES = "waves"
77
88 let MAX_INT = 9223372036854775807
99
1010 let MAX_FEE = 1000000
1111
1212 let MAX_AMPLIFIER = 1000000
1313
1414 let MAX_WEIGHT_AMPLIFIER = 1000000
1515
1616 let MAX_WEIGHT = 1000000
1717
1818 let SLIPPAGE_RATE_FACTOR = 1000000
1919
2020 let FEE_RATE_FACTOR = 1000000
2121
2222 let RATE_FACTOR = 1000000
2323
24-let PERCENT_FACTOR = toBigInt(1000000000000)
24+let PERCENT_FACTOR = toBigInt(1000000000000000000)
2525
2626 let ZERO_INT_LIST_10 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
2727
2828 let ZERO_INT_LIST_11 = (ZERO_INT_LIST_10 :+ 0)
2929
3030 let ZERO_BIGINT = toBigInt(0)
3131
3232 let ZERO_BIGINT_LIST_11 = [ZERO_BIGINT, ZERO_BIGINT, ZERO_BIGINT, ZERO_BIGINT, ZERO_BIGINT, ZERO_BIGINT, ZERO_BIGINT, ZERO_BIGINT, ZERO_BIGINT, ZERO_BIGINT, ZERO_BIGINT]
3333
3434 let INT_DECIMALS = 8
3535
3636 let BIGINT_DECIMALS = 18
3737
3838 let LIST_64 = split_51C("0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0", "_")
3939
4040 let KEY_MULTISIG = "MULTISIG"
4141
4242 let KEY_STATUS = "STATUS"
4343
4444 let KEY_PAUSED = "PAUSED"
4545
4646 let KEY_PAUSER = "PAUSER"
4747
4848 let KEY_STORAGE = "STORAGE"
4949
5050 let KEY_ASSETS = "ASSETS"
5151
5252 let KEY_ASSET_BALANCES = "ASSET_BALANCES"
5353
5454 let KEY_ASSET_WEIGHTS = "ASSET_WEIGHTS"
5555
5656 let KEY_LP_FEE = "LP_FEE"
5757
5858 let KEY_PROTOCOL_FEE = "PROTOCOL_FEE"
5959
6060 let KEY_PRECISION = "PRECISION"
6161
6262 let KEY_SIGMA_FEE_PER_LP = "SIGMA_FEE_PER_LP"
6363
6464 let KEY_USER_SIGMA_FEE_PER_LP = "USER_SIGMA_FEE_PER_LP"
6565
6666 let KEY_USER_LP = "USER_LP"
6767
6868 let KEY_TOTAL_LP = "TOTAL_LP"
6969
7070 let KEY_USER_PROFITS = "USER_PROFITS"
7171
7272 func _validateAddress (address_,err_) = match addressFromString(address_) {
7373 case a: Address =>
7474 true
7575 case _ =>
7676 throw(err_)
7777 }
7878
7979
8080 func _validateAsset (assetId_,err_) = if ((assetId_ == WAVES))
8181 then true
8282 else match assetInfo(fromBase58String(assetId_)) {
8383 case a: Asset =>
8484 true
8585 case _ =>
8686 throw(err_)
8787 }
8888
8989
9090 func _validateInt (val_,lowerBoundary_,upperBoundary_,err_) = if (if ((lowerBoundary_ > val_))
9191 then true
9292 else (val_ > upperBoundary_))
9393 then throw(err_)
9494 else true
9595
9696
9797 func _validateBool (val_,target_,err_) = if ((val_ != target_))
9898 then throw(err_)
9999 else true
100100
101101
102102 func _validateStringEqual (val1_,val2_,err_) = if ((val1_ != val2_))
103103 then throw(err_)
104104 else true
105105
106106
107107 func _validateStringNotEq (val1_,val2_,err_) = if ((val1_ == val2_))
108108 then throw(err_)
109109 else true
110110
111111
112112 func _validateIntList (val_,lowerBoundary_,upperBoundary_,err_) = {
113113 func foldFunc (acc,elem) = match parseInt(elem) {
114114 case a: Int =>
115115 if (acc)
116116 then _validateInt(a, lowerBoundary_, upperBoundary_, err_)
117117 else false
118118 case _ =>
119119 throw(err_)
120120 }
121121
122122 let $l = val_
123123 let $s = size($l)
124124 let $acc0 = true
125125 func $f0_1 ($a,$i) = if (($i >= $s))
126126 then $a
127127 else foldFunc($a, $l[$i])
128128
129129 func $f0_2 ($a,$i) = if (($i >= $s))
130130 then $a
131131 else throw("List size exceeds 10")
132132
133133 $f0_2($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)
134134 }
135135
136136
137137 func _validateAssets (assets_,err_) = {
138138 func foldFunc (acc,elem) = if (acc)
139139 then _validateAsset(elem, err_)
140140 else false
141141
142142 let $l = assets_
143143 let $s = size($l)
144144 let $acc0 = true
145145 func $f0_1 ($a,$i) = if (($i >= $s))
146146 then $a
147147 else foldFunc($a, $l[$i])
148148
149149 func $f0_2 ($a,$i) = if (($i >= $s))
150150 then $a
151151 else throw("List size exceeds 10")
152152
153153 $f0_2($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)
154154 }
155155
156156
157157 func _validateIntEquals (val1_,val2_,err_) = if ((val1_ != val2_))
158158 then throw(err_)
159159 else true
160160
161161
162162 func _validateTokenName (val_,err_) = if (if ((4 > size(val_)))
163163 then true
164164 else (size(val_) > 16))
165165 then throw(err_)
166166 else true
167167
168168
169169 func _validateTokenDescr (val_,err_) = if ((size(val_) > 1000))
170170 then throw(err_)
171171 else true
172172
173173
174174 func _validateDecimals (val_,err_) = if (if ((0 > val_))
175175 then true
176176 else (val_ > 8))
177177 then throw(err_)
178178 else true
179179
180180
181181 func _validatePayment (payment_,assetId_,requiredAmount_,err_) = match payment_.assetId {
182182 case a: ByteVector =>
183183 if ((assetId_ != toBase58String(a)))
184184 then throw((err_ + ": asset"))
185185 else if ((requiredAmount_ > payment_.amount))
186186 then throw((err_ + ": amount"))
187187 else true
188188 case _ =>
189189 throw((err_ + ": asset"))
190190 }
191191
192192
193193 func _validateListContains (list_,val_,err_) = if (!(containsElement(list_, val_)))
194194 then throw(err_)
195195 else true
196196
197197
198198 func _assetToStr (asset_) = match asset_ {
199199 case a: ByteVector =>
200200 toBase58String(a)
201201 case _ =>
202202 WAVES
203203 }
204204
205205
206206 func _strToAsset (asset_) = if (if ((asset_ == WAVES))
207207 then true
208208 else (asset_ == ""))
209209 then unit
210210 else fromBase58String(asset_)
211211
212212
213213 func _loadPause () = match getBoolean(KEY_PAUSED) {
214214 case a: Boolean =>
215215 a
216216 case _ =>
217217 false
218218 }
219219
220220
221221 func _savePause (isPaused_) = [BooleanEntry(KEY_PAUSED, isPaused_)]
222222
223223
224224 func _loadPauser () = match getString(KEY_PAUSER) {
225225 case a: String =>
226226 addressFromStringValue(a)
227227 case _ =>
228228 Address(base58'')
229229 }
230230
231231
232232 func _savePauser (pauser_) = [StringEntry(KEY_PAUSER, toString(pauser_))]
233233
234234
235235 func _loadMultisig () = match getString(KEY_MULTISIG) {
236236 case a: String =>
237237 addressFromStringValue(a)
238238 case _ =>
239239 Address(base58'')
240240 }
241241
242242
243243 func _saveMultisig (multisig_) = [StringEntry(KEY_MULTISIG, toString(multisig_))]
244244
245245
246246 func _loadStorage () = match getString(KEY_STORAGE) {
247247 case a: String =>
248248 let struct = split(a, SEP)
249249 $Tuple10(fromBase58String(struct[0]), (struct[1] == "1"), parseIntValue(struct[2]), parseIntValue(struct[3]), parseIntValue(struct[4]), parseIntValue(struct[5]), parseIntValue(struct[6]), parseIntValue(struct[7]), parseIntValue(struct[8]), addressFromStringValue(struct[9]))
250250 case _ =>
251251 $Tuple10(base58'', false, 0, 0, 0, 0, 0, 0, 0, Address(base58''))
252252 }
253253
254254
255255 func _saveStorage (storage_) = [StringEntry(KEY_STORAGE, makeString([toBase58String(storage_._1), if (storage_._2)
256256 then "1"
257257 else "0", toString(storage_._3), toString(storage_._4), toString(storage_._5), toString(storage_._6), toString(storage_._7), toString(storage_._8), toString(storage_._9), toString(storage_._10)], SEP))]
258258
259259
260260 func _loadAssets () = match getString(KEY_ASSETS) {
261261 case a: String =>
262262 if ((size(a) > 0))
263263 then split_51C(a, SEP)
264264 else nil
265265 case _ =>
266266 nil
267267 }
268268
269269
270270 func _saveAssets (assets_) = [StringEntry(KEY_ASSETS, makeString_11C(assets_, SEP))]
271271
272272
273273 func _loadAssetBalances () = {
274274 func foldFunc (acc,elem) = {
275275 let balance = parseIntValue(elem)
276276 $Tuple2((acc._1 :+ balance), (acc._2 + balance))
277277 }
278278
279279 match getString(KEY_ASSET_BALANCES) {
280280 case a: String =>
281281 if ((size(a) > 0))
282282 then {
283283 let $l = split_51C(a, SEP)
284284 let $s = size($l)
285285 let $acc0 = $Tuple2(nil, 0)
286286 func $f0_1 ($a,$i) = if (($i >= $s))
287287 then $a
288288 else foldFunc($a, $l[$i])
289289
290290 func $f0_2 ($a,$i) = if (($i >= $s))
291291 then $a
292292 else throw("List size exceeds 10")
293293
294294 $f0_2($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)
295295 }
296296 else $Tuple2(ZERO_INT_LIST_10, 0)
297297 case _ =>
298298 $Tuple2(ZERO_INT_LIST_10, 0)
299299 }
300300 }
301301
302302
303303 func _saveAssetBalances (balances_) = {
304304 func foldFunc (acc,elem) = (acc :+ toString(elem))
305305
306306 [StringEntry(KEY_ASSET_BALANCES, makeString_11C({
307307 let $l = balances_
308308 let $s = size($l)
309309 let $acc0 = nil
310310 func $f0_1 ($a,$i) = if (($i >= $s))
311311 then $a
312312 else foldFunc($a, $l[$i])
313313
314314 func $f0_2 ($a,$i) = if (($i >= $s))
315315 then $a
316316 else throw("List size exceeds 10")
317317
318318 $f0_2($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)
319319 }, SEP))]
320320 }
321321
322322
323323 func _loadAssetWeights () = {
324324 func foldFunc (acc,elem) = {
325325 let weight = parseIntValue(elem)
326326 $Tuple2((acc._1 :+ weight), (acc._2 + weight))
327327 }
328328
329329 match getString(KEY_ASSET_WEIGHTS) {
330330 case a: String =>
331331 if ((size(a) > 0))
332332 then {
333333 let $l = split_51C(a, SEP)
334334 let $s = size($l)
335335 let $acc0 = $Tuple2(nil, 0)
336336 func $f0_1 ($a,$i) = if (($i >= $s))
337337 then $a
338338 else foldFunc($a, $l[$i])
339339
340340 func $f0_2 ($a,$i) = if (($i >= $s))
341341 then $a
342342 else throw("List size exceeds 10")
343343
344344 $f0_2($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)
345345 }
346346 else $Tuple2(ZERO_INT_LIST_10, 0)
347347 case _ =>
348348 $Tuple2(ZERO_INT_LIST_10, 0)
349349 }
350350 }
351351
352352
353353 func _saveAssetWeights (weights_) = {
354354 func foldFunc (acc,elem) = (acc :+ toString(elem))
355355
356356 [StringEntry(KEY_ASSET_WEIGHTS, makeString_11C({
357357 let $l = weights_
358358 let $s = size($l)
359359 let $acc0 = nil
360360 func $f0_1 ($a,$i) = if (($i >= $s))
361361 then $a
362362 else foldFunc($a, $l[$i])
363363
364364 func $f0_2 ($a,$i) = if (($i >= $s))
365365 then $a
366366 else throw("List size exceeds 10")
367367
368368 $f0_2($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)
369369 }, SEP))]
370370 }
371371
372372
373373 func _loadLpFee (assetId_) = match getInteger(makeString([KEY_LP_FEE, assetId_], SEP)) {
374374 case a: Int =>
375375 a
376376 case _ =>
377377 0
378378 }
379379
380380
381381 func _saveLpFee (assetId_,val_) = [IntegerEntry(makeString([KEY_LP_FEE, assetId_], SEP), val_)]
382382
383383
384384 func _loadProtocolFee (assetId_) = match getInteger(makeString([KEY_PROTOCOL_FEE, assetId_], SEP)) {
385385 case a: Int =>
386386 a
387387 case _ =>
388388 0
389389 }
390390
391391
392392 func _saveProtocolFee (assetId_,val_) = [IntegerEntry(makeString([KEY_PROTOCOL_FEE, assetId_], SEP), val_)]
393393
394394
395395 func _loadPrecision () = match getInteger(KEY_PRECISION) {
396396 case a: Int =>
397397 a
398398 case _ =>
399399 0
400400 }
401401
402402
403403 func _savePrecision (val_) = [IntegerEntry(KEY_PRECISION, val_)]
404404
405405
406406 func _loadSigmaFeePerLp () = {
407407 func foldFunc (acc,elem) = (acc :+ parseBigIntValue(elem))
408408
409409 match getString(KEY_SIGMA_FEE_PER_LP) {
410410 case a: String =>
411411 if ((size(a) > 0))
412412 then {
413413 let $l = split_51C(a, SEP)
414414 let $s = size($l)
415415 let $acc0 = nil
416416 func $f0_1 ($a,$i) = if (($i >= $s))
417417 then $a
418418 else foldFunc($a, $l[$i])
419419
420420 func $f0_2 ($a,$i) = if (($i >= $s))
421421 then $a
422422 else throw("List size exceeds 11")
423423
424424 $f0_2($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)
425425 }
426426 else ZERO_BIGINT_LIST_11
427427 case _ =>
428428 ZERO_BIGINT_LIST_11
429429 }
430430 }
431431
432432
433433 func _saveSigmaFeePerLp (val_) = {
434434 func foldFunc (acc,elem) = (acc :+ toString(elem))
435435
436436 [StringEntry(KEY_SIGMA_FEE_PER_LP, makeString_11C({
437437 let $l = val_
438438 let $s = size($l)
439439 let $acc0 = nil
440440 func $f0_1 ($a,$i) = if (($i >= $s))
441441 then $a
442442 else foldFunc($a, $l[$i])
443443
444444 func $f0_2 ($a,$i) = if (($i >= $s))
445445 then $a
446446 else throw("List size exceeds 11")
447447
448448 $f0_2($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)
449449 }, SEP))]
450450 }
451451
452452
453453 func _loadUserSigmaFeePerLp (user_) = {
454454 func foldFunc (acc,elem) = (acc :+ parseBigIntValue(elem))
455455
456456 match getString(makeString([KEY_USER_SIGMA_FEE_PER_LP, toString(user_)], SEP)) {
457457 case a: String =>
458458 if ((size(a) > 0))
459459 then {
460460 let $l = split_51C(a, SEP)
461461 let $s = size($l)
462462 let $acc0 = nil
463463 func $f0_1 ($a,$i) = if (($i >= $s))
464464 then $a
465465 else foldFunc($a, $l[$i])
466466
467467 func $f0_2 ($a,$i) = if (($i >= $s))
468468 then $a
469469 else throw("List size exceeds 11")
470470
471471 $f0_2($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)
472472 }
473473 else ZERO_BIGINT_LIST_11
474474 case _ =>
475475 ZERO_BIGINT_LIST_11
476476 }
477477 }
478478
479479
480480 func _saveUserSigmaFeePerLp (user_,val_) = {
481481 func foldFunc (acc,elem) = (acc :+ toString(elem))
482482
483483 [StringEntry(makeString([KEY_USER_SIGMA_FEE_PER_LP, toString(user_)], SEP), makeString_11C({
484484 let $l = val_
485485 let $s = size($l)
486486 let $acc0 = nil
487487 func $f0_1 ($a,$i) = if (($i >= $s))
488488 then $a
489489 else foldFunc($a, $l[$i])
490490
491491 func $f0_2 ($a,$i) = if (($i >= $s))
492492 then $a
493493 else throw("List size exceeds 11")
494494
495495 $f0_2($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)
496496 }, SEP))]
497497 }
498498
499499
500500 func _loadUserLp (address_) = match getInteger(makeString([KEY_USER_LP, toString(address_)], SEP)) {
501501 case a: Int =>
502502 a
503503 case _ =>
504504 0
505505 }
506506
507507
508508 func _saveUserLp (address_,val_) = [IntegerEntry(makeString([KEY_USER_LP, toString(address_)], SEP), val_)]
509509
510510
511511 func _loadTotalLp () = match getInteger(KEY_TOTAL_LP) {
512512 case a: Int =>
513513 a
514514 case _ =>
515515 0
516516 }
517517
518518
519519 func _saveTotalLp (val_) = [IntegerEntry(KEY_TOTAL_LP, val_)]
520520
521521
522522 func _loadUserProfits (user_) = {
523523 func foldFunc (acc,elem) = (acc :+ parseIntValue(elem))
524524
525525 match getString(makeString([KEY_USER_PROFITS, toString(user_)], SEP)) {
526526 case a: String =>
527527 if ((size(a) > 0))
528528 then {
529529 let $l = split_51C(a, SEP)
530530 let $s = size($l)
531531 let $acc0 = nil
532532 func $f0_1 ($a,$i) = if (($i >= $s))
533533 then $a
534534 else foldFunc($a, $l[$i])
535535
536536 func $f0_2 ($a,$i) = if (($i >= $s))
537537 then $a
538538 else throw("List size exceeds 11")
539539
540540 $f0_2($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)
541541 }
542542 else ZERO_INT_LIST_11
543543 case _ =>
544544 ZERO_INT_LIST_11
545545 }
546546 }
547547
548548
549549 func _saveUserProfits (user_,val_) = {
550550 func foldFunc (acc,elem) = (acc :+ toString(elem))
551551
552552 [StringEntry(makeString([KEY_USER_PROFITS, toString(user_)], SEP), makeString_11C({
553553 let $l = val_
554554 let $s = size($l)
555555 let $acc0 = nil
556556 func $f0_1 ($a,$i) = if (($i >= $s))
557557 then $a
558558 else foldFunc($a, $l[$i])
559559
560560 func $f0_2 ($a,$i) = if (($i >= $s))
561561 then $a
562562 else throw("List size exceeds 11")
563563
564564 $f0_2($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)
565565 }, SEP))]
566566 }
567567
568568
569569 func _onlyThisContract (caller_) = if ((caller_ != this))
570570 then throw("_onlyThisContract: revert")
571571 else true
572572
573573
574574 func _whenMultisigSet () = if ((_loadMultisig() == Address(base58'')))
575575 then throw("_whenMultisigSet: revert")
576576 else true
577577
578578
579579 func _whenNotInitialized () = {
580580 let storage = _loadStorage()
581581 if ((storage._1 != base58''))
582582 then throw("_whenNotInitialized: revert")
583583 else true
584584 }
585585
586586
587587 func _whenInitialized () = {
588588 let storage = _loadStorage()
589589 if ((storage._1 == base58''))
590590 then throw("_whenInitialized: revert")
591591 else true
592592 }
593593
594594
595595 func _whenNotPaused () = if (_loadPause())
596596 then throw("_whenNotPaused: revert")
597597 else true
598598
599599
600600 func _whenPaused () = if (!(_loadPause()))
601601 then throw("_whenPaused: revert")
602602 else true
603603
604604
605605 func _onlyPauser (caller_) = if ((caller_ != _loadPauser()))
606606 then throw("_onlyPauser: revert")
607607 else true
608608
609609
610610 func _getDecimals (assetId_) = match assetInfo(fromBase58String(assetId_)) {
611611 case a: Asset =>
612612 a.decimals
613613 case _ =>
614614 throw(("_getDecimals: no asset=" + assetId_))
615615 }
616616
617617
618618 func _normalizeDecimals (amount_,sourceDecimals_,targetDecimals_,round_) = if ((sourceDecimals_ >= targetDecimals_))
619619 then fraction(amount_, 1, pow(10, 0, (sourceDecimals_ - targetDecimals_), 0, 0, DOWN), round_)
620620 else (amount_ * pow(10, 0, (targetDecimals_ - sourceDecimals_), 0, 0, DOWN))
621621
622622
623623 func _prepareAssetBalances (assets_) = {
624624 func foldFunc (acc,elem) = (acc :+ 0)
625625
626626 let $l = assets_
627627 let $s = size($l)
628628 let $acc0 = nil
629629 func $f0_1 ($a,$i) = if (($i >= $s))
630630 then $a
631631 else foldFunc($a, $l[$i])
632632
633633 func $f0_2 ($a,$i) = if (($i >= $s))
634634 then $a
635635 else throw("List size exceeds 10")
636636
637637 $f0_2($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)
638638 }
639639
640640
641641 func _prepareAssetWeights (assetWeights_) = {
642642 func foldFunc (acc,elem) = {
643643 let weight = parseIntValue(elem)
644644 $Tuple2((acc._1 :+ weight), (acc._2 + weight))
645645 }
646646
647647 let $l = assetWeights_
648648 let $s = size($l)
649649 let $acc0 = $Tuple2(nil, 0)
650650 func $f0_1 ($a,$i) = if (($i >= $s))
651651 then $a
652652 else foldFunc($a, $l[$i])
653653
654654 func $f0_2 ($a,$i) = if (($i >= $s))
655655 then $a
656656 else throw("List size exceeds 10")
657657
658658 $f0_2($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)
659659 }
660660
661661
662662 func _getAssetBalances (assets_,decimals_) = {
663663 func foldFunc (acc,elem) = {
664664 let assetDecimals = _getDecimals(elem)
665665 let balance = _normalizeDecimals(assetBalance(this, fromBase58String(elem)), assetDecimals, decimals_, DOWN)
666666 $Tuple2((acc._1 :+ balance), (acc._2 + balance))
667667 }
668668
669669 let $l = assets_
670670 let $s = size($l)
671671 let $acc0 = $Tuple2(nil, 0)
672672 func $f0_1 ($a,$i) = if (($i >= $s))
673673 then $a
674674 else foldFunc($a, $l[$i])
675675
676676 func $f0_2 ($a,$i) = if (($i >= $s))
677677 then $a
678678 else throw("List size exceeds 10")
679679
680680 $f0_2($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)
681681 }
682682
683683
684684 func _listIntToString (assets_) = {
685685 func foldFunc (acc,elem) = (acc :+ toString(elem))
686686
687687 makeString({
688688 let $l = assets_
689689 let $s = size($l)
690690 let $acc0 = nil
691691 func $f0_1 ($a,$i) = if (($i >= $s))
692692 then $a
693693 else foldFunc($a, $l[$i])
694694
695695 func $f0_2 ($a,$i) = if (($i >= $s))
696696 then $a
697697 else throw("List size exceeds 11")
698698
699699 $f0_2($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)
700700 }, SEP)
701701 }
702702
703703
704704 func _listBigIntToString (assets_) = {
705705 func foldFunc (acc,elem) = (acc :+ toString(elem))
706706
707707 makeString({
708708 let $l = assets_
709709 let $s = size($l)
710710 let $acc0 = nil
711711 func $f0_1 ($a,$i) = if (($i >= $s))
712712 then $a
713713 else foldFunc($a, $l[$i])
714714
715715 func $f0_2 ($a,$i) = if (($i >= $s))
716716 then $a
717717 else throw("List size exceeds 11")
718718
719719 $f0_2($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)
720720 }, SEP)
721721 }
722722
723723
724724 func _getEquilibriums (sigmaBalances_,weights_,sigmaWeight_) = {
725725 func foldFunc (acc,elem) = (acc :+ fraction(sigmaBalances_, elem, sigmaWeight_))
726726
727727 let $l = weights_
728728 let $s = size($l)
729729 let $acc0 = nil
730730 func $f0_1 ($a,$i) = if (($i >= $s))
731731 then $a
732732 else foldFunc($a, $l[$i])
733733
734734 func $f0_2 ($a,$i) = if (($i >= $s))
735735 then $a
736736 else throw("List size exceeds 10")
737737
738738 $f0_2($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)
739739 }
740740
741741
742742 func _incrementBalancesByAmounts (balances_,amounts_) = {
743743 func foldFunc (acc,elem) = {
744744 let index = acc._1
745745 let amount = amounts_[index]
746746 let newBalance = (elem + amount)
747747 $Tuple3((index + 1), (acc._2 :+ newBalance), (acc._3 + newBalance))
748748 }
749749
750750 let result = {
751751 let $l = balances_
752752 let $s = size($l)
753753 let $acc0 = $Tuple3(0, nil, 0)
754754 func $f0_1 ($a,$i) = if (($i >= $s))
755755 then $a
756756 else foldFunc($a, $l[$i])
757757
758758 func $f0_2 ($a,$i) = if (($i >= $s))
759759 then $a
760760 else throw("List size exceeds 10")
761761
762762 $f0_2($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)
763763 }
764764 $Tuple2(result._2, result._3)
765765 }
766766
767767
768768 func _incrementBalancesByPayments (balances_,payments_,assets_,decimals_,err_) = {
769769 func foldFunc (acc,elem) = {
770770 let index = acc._1
771771 let payment = payments_[index]
772772 let paymentAssetStr = _assetToStr(payment.assetId)
773773 let err = if ((paymentAssetStr != assets_[index]))
774774 then throw(((err_ + ": index=") + toString(index)))
775775 else unit
776776 if ((err == err))
777777 then {
778778 let assetDecimals = _getDecimals(paymentAssetStr)
779779 let newBalance = (elem + _normalizeDecimals(payments_[index].amount, assetDecimals, decimals_, DOWN))
780780 $Tuple3((index + 1), (acc._2 :+ newBalance), (acc._3 + newBalance))
781781 }
782782 else throw("Strict value is not equal to itself.")
783783 }
784784
785785 let result = {
786786 let $l = balances_
787787 let $s = size($l)
788788 let $acc0 = $Tuple3(0, nil, 0)
789789 func $f0_1 ($a,$i) = if (($i >= $s))
790790 then $a
791791 else foldFunc($a, $l[$i])
792792
793793 func $f0_2 ($a,$i) = if (($i >= $s))
794794 then $a
795795 else throw("List size exceeds 10")
796796
797797 $f0_2($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)
798798 }
799799 $Tuple2(result._2, result._3)
800800 }
801801
802802
803803 func _incrementBalanceByIndex (balances_,index_,amount_) = {
804804 func foldFunc (acc,elem) = {
805805 let index = acc._1
806806 if ((index == index_))
807807 then $Tuple2((index + 1), (acc._2 :+ (elem + amount_)))
808808 else $Tuple2((index + 1), (acc._2 :+ elem))
809809 }
810810
811811 let result = {
812812 let $l = balances_
813813 let $s = size($l)
814814 let $acc0 = $Tuple2(0, nil)
815815 func $f0_1 ($a,$i) = if (($i >= $s))
816816 then $a
817817 else foldFunc($a, $l[$i])
818818
819819 func $f0_2 ($a,$i) = if (($i >= $s))
820820 then $a
821821 else throw("List size exceeds 10")
822822
823823 $f0_2($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)
824824 }
825825 result._2
826826 }
827827
828828
829829 func _decrementBalanceByIndex (balances_,index_,amount_) = {
830830 func foldFunc (acc,elem) = {
831831 let index = acc._1
832832 if ((index == index_))
833833 then $Tuple2((index + 1), (acc._2 :+ (elem - amount_)))
834834 else $Tuple2((index + 1), (acc._2 :+ elem))
835835 }
836836
837837 let result = {
838838 let $l = balances_
839839 let $s = size($l)
840840 let $acc0 = $Tuple2(0, nil)
841841 func $f0_1 ($a,$i) = if (($i >= $s))
842842 then $a
843843 else foldFunc($a, $l[$i])
844844
845845 func $f0_2 ($a,$i) = if (($i >= $s))
846846 then $a
847847 else throw("List size exceeds 10")
848848
849849 $f0_2($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)
850850 }
851851 result._2
852852 }
853853
854854
855855 func _decrementBalancesByLpAmount (balances_,amount_,lpTotalSupply_) = {
856856 let rate = fraction((lpTotalSupply_ - amount_), RATE_FACTOR, lpTotalSupply_, CEILING)
857857 func foldFunc (acc,elem) = {
858858 let newBalance = fraction(elem, rate, RATE_FACTOR, CEILING)
859859 let deltaBalance = (elem - newBalance)
860860 $Tuple3((acc._1 :+ newBalance), (acc._2 + newBalance), (acc._3 :+ deltaBalance))
861861 }
862862
863863 let $l = balances_
864864 let $s = size($l)
865865 let $acc0 = $Tuple3(nil, 0, nil)
866866 func $f0_1 ($a,$i) = if (($i >= $s))
867867 then $a
868868 else foldFunc($a, $l[$i])
869869
870870 func $f0_2 ($a,$i) = if (($i >= $s))
871871 then $a
872872 else throw("List size exceeds 10")
873873
874874 $f0_2($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)
875875 }
876876
877877
878878 func _getPaymentsFromBalances (assets_,balances_,recipient_,sourceDecimals_) = {
879879 func foldFunc (acc,elem) = {
880880 let index = acc._1
881881 $Tuple2((index + 1), (acc._2 :+ ScriptTransfer(recipient_, _normalizeDecimals(balances_[index], sourceDecimals_, _getDecimals(elem), DOWN), _strToAsset(elem))))
882882 }
883883
884884 let result = {
885885 let $l = assets_
886886 let $s = size($l)
887887 let $acc0 = $Tuple2(0, nil)
888888 func $f0_1 ($a,$i) = if (($i >= $s))
889889 then $a
890890 else foldFunc($a, $l[$i])
891891
892892 func $f0_2 ($a,$i) = if (($i >= $s))
893893 then $a
894894 else throw("List size exceeds 10")
895895
896896 $f0_2($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)
897897 }
898898 result._2
899899 }
900900
901901
902902 func _calculateMicroFee (balance_,equilibrium_,weightAmplifier_,slippageRate_,feeMaxRate_) = if ((equilibrium_ > balance_))
903903 then {
904904 let threshold = fraction(equilibrium_, (MAX_WEIGHT_AMPLIFIER - weightAmplifier_), MAX_WEIGHT_AMPLIFIER)
905905 if ((threshold > balance_))
906906 then {
907907 let maxDeviation = (threshold - balance_)
908908 let feeRate = fraction(fraction(maxDeviation, slippageRate_, SLIPPAGE_RATE_FACTOR), FEE_RATE_FACTOR, equilibrium_)
909909 if ((feeRate > feeMaxRate_))
910910 then fraction(maxDeviation, feeMaxRate_, FEE_RATE_FACTOR)
911911 else fraction(maxDeviation, feeRate, FEE_RATE_FACTOR)
912912 }
913913 else 0
914914 }
915915 else {
916916 let threshold = fraction(equilibrium_, (MAX_WEIGHT_AMPLIFIER + weightAmplifier_), MAX_WEIGHT_AMPLIFIER)
917917 if ((balance_ > threshold))
918918 then {
919919 let maxDeviation = (balance_ - threshold)
920920 let feeRate = fraction(fraction(maxDeviation, slippageRate_, SLIPPAGE_RATE_FACTOR), FEE_RATE_FACTOR, equilibrium_)
921921 if ((feeRate > feeMaxRate_))
922922 then fraction(maxDeviation, feeMaxRate_, FEE_RATE_FACTOR)
923923 else fraction(maxDeviation, feeRate, FEE_RATE_FACTOR)
924924 }
925925 else 0
926926 }
927927
928928
929929 func _calculateFee (balances_,assetsTotalSupply_,weights_,sigmaWeight_,weightAmplifier_,slippageRate_,feeMaxRate_) = {
930930 func foldFunc (acc,balance) = {
931931 let index = acc._1
932932 let equilibrium = fraction(assetsTotalSupply_, weights_[index], sigmaWeight_)
933933 $Tuple2((index + 1), (acc._2 + _calculateMicroFee(balance, equilibrium, weightAmplifier_, slippageRate_, feeMaxRate_)))
934934 }
935935
936936 let result = {
937937 let $l = balances_
938938 let $s = size($l)
939939 let $acc0 = $Tuple2(0, 0)
940940 func $f0_1 ($a,$i) = if (($i >= $s))
941941 then $a
942942 else foldFunc($a, $l[$i])
943943
944944 func $f0_2 ($a,$i) = if (($i >= $s))
945945 then $a
946946 else throw("List size exceeds 10")
947947
948948 $f0_2($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)
949949 }
950950 result._2
951951 }
952952
953953
954954 func _validateLiquidityInvariant (prevAssetBalances_,prevAssetTotalSupply_,assetBalances_,assetTotalSupply_,prevLpTotalSupply_,lpTotalSupply_,assetWeights_,sigmaWeight_,weightAmplifier_,slippageRate_,feeMaxRate_) = if (if ((prevLpTotalSupply_ == 0))
955955 then true
956956 else (lpTotalSupply_ == 0))
957957 then true
958958 else {
959959 let prevAssetsRate = fraction((prevAssetTotalSupply_ - _calculateFee(prevAssetBalances_, prevAssetTotalSupply_, assetWeights_, sigmaWeight_, weightAmplifier_, slippageRate_, feeMaxRate_)), RATE_FACTOR, prevLpTotalSupply_)
960960 let newAssetsRate = fraction((assetTotalSupply_ - _calculateFee(assetBalances_, assetTotalSupply_, assetWeights_, sigmaWeight_, weightAmplifier_, slippageRate_, feeMaxRate_)), RATE_FACTOR, lpTotalSupply_)
961961 let diff = (newAssetsRate - prevAssetsRate)
962962 if (if ((0 >= diff))
963- then ((-1 * RATE_FACTOR) > diff)
963+ then ((-1 * _loadPrecision()) > diff)
964964 else false)
965965 then throw(("_validateLiquidityInvariant: revert: diff=" + toString(diff)))
966966 else true
967967 }
968968
969969
970970 func _validateSwapInvariant (prevAssetBalances_,prevAssetTotalSupply_,assetBalances_,assetTotalSupply_,assetWeights_,sigmaWeight_,weightAmplifier_,slippageRate_,feeMaxRate_) = {
971971 let prevUtil = (prevAssetTotalSupply_ - _calculateFee(prevAssetBalances_, prevAssetTotalSupply_, assetWeights_, sigmaWeight_, weightAmplifier_, slippageRate_, feeMaxRate_))
972972 let newUtil = (assetTotalSupply_ - _calculateFee(assetBalances_, assetTotalSupply_, assetWeights_, sigmaWeight_, weightAmplifier_, slippageRate_, feeMaxRate_))
973973 let diff = (newUtil - prevUtil)
974974 if (if ((0 >= diff))
975- then ((-1 * RATE_FACTOR) > diff)
975+ then ((-1 * _loadPrecision()) > diff)
976976 else false)
977977 then throw(("_validateSwapInvariant: revert: diff=" + toString(diff)))
978978 else true
979979 }
980980
981981
982982 func _validateAssetAllocation (balance_,assetTotalSupply_,prevBalance_,prevAssetTotalSupply_,weight_,sigmaWeight_,maxAllocAmp_) = {
983983 let equilibrium = fraction(assetTotalSupply_, weight_, sigmaWeight_)
984984 let maxAllocationAmp = if ((balance_ > equilibrium))
985985 then (MAX_AMPLIFIER + maxAllocAmp_)
986986 else (MAX_AMPLIFIER - maxAllocAmp_)
987987 let maxAllocation = fraction(equilibrium, maxAllocationAmp, MAX_AMPLIFIER)
988988 let prevMaxAllocation = fraction(fraction(prevAssetTotalSupply_, weight_, sigmaWeight_), maxAllocationAmp, MAX_AMPLIFIER)
989989 if ((balance_ > equilibrium))
990990 then if ((balance_ > maxAllocation))
991991 then if ((prevMaxAllocation > prevBalance_))
992992 then throw("_validateAssetAllocation: new up")
993993 else if (((balance_ - maxAllocation) > (prevBalance_ - prevMaxAllocation)))
994994 then throw("_validateAssetAllocation: still up")
995995 else true
996996 else true
997997 else if ((maxAllocation > balance_))
998998 then if ((prevBalance_ > prevMaxAllocation))
999999 then throw("_validateAssetAllocation: new down")
1000- else if (((prevMaxAllocation - prevBalance_) > (maxAllocation - balance_)))
1000+ else if (((maxAllocation - balance_) > (prevMaxAllocation - prevBalance_)))
10011001 then throw("_validateAssetAllocation: still down")
10021002 else true
10031003 else true
10041004 }
10051005
10061006
10071007 func _validateAllocation (assetBalances_,assetTotalSupply_,prevAssetBalances_,prevAssetTotalSupply_,assetWeights_,sigmaWeight_,maxAllocAmp_) = {
10081008 func foldFunc (acc,elem) = {
10091009 let index = acc._1
10101010 $Tuple2((index + 1), if (acc._2)
10111011 then _validateAssetAllocation(elem, assetTotalSupply_, prevAssetBalances_[index], prevAssetTotalSupply_, assetWeights_[index], sigmaWeight_, maxAllocAmp_)
10121012 else false)
10131013 }
10141014
10151015 let result = {
10161016 let $l = assetBalances_
10171017 let $s = size($l)
10181018 let $acc0 = $Tuple2(0, true)
10191019 func $f0_1 ($a,$i) = if (($i >= $s))
10201020 then $a
10211021 else foldFunc($a, $l[$i])
10221022
10231023 func $f0_2 ($a,$i) = if (($i >= $s))
10241024 then $a
10251025 else throw("List size exceeds 10")
10261026
10271027 $f0_2($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)
10281028 }
10291029 result._2
10301030 }
10311031
10321032
10331033 func _checkpoint (user_) = {
10341034 let userLp = _loadUserLp(user_)
10351035 let userProfits = _loadUserProfits(user_)
10361036 let sigmaFeePerLp = _loadSigmaFeePerLp()
10371037 let userSigmaFeePerLp = _loadUserSigmaFeePerLp(user_)
10381038 func foldFunc (acc,elem) = {
10391039 let index = acc._1
10401040 let profitUpdated = (userProfits[index] + toInt(fraction(toBigInt(userLp), (sigmaFeePerLp[index] - userSigmaFeePerLp[index]), PERCENT_FACTOR)))
10411041 $Tuple2((index + 1), (acc._2 :+ profitUpdated))
10421042 }
10431043
1044- let $t02458924662 = {
1044+ let $t02460524678 = {
10451045 let $l = ZERO_INT_LIST_11
10461046 let $s = size($l)
10471047 let $acc0 = $Tuple2(0, nil)
10481048 func $f0_1 ($a,$i) = if (($i >= $s))
10491049 then $a
10501050 else foldFunc($a, $l[$i])
10511051
10521052 func $f0_2 ($a,$i) = if (($i >= $s))
10531053 then $a
10541054 else throw("List size exceeds 11")
10551055
10561056 $f0_2($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)
10571057 }
1058- let idx = $t02458924662._1
1059- let profitsUpdated = $t02458924662._2
1058+ let idx = $t02460524678._1
1059+ let profitsUpdated = $t02460524678._2
10601060 $Tuple2((_saveUserProfits(user_, profitsUpdated) ++ _saveUserSigmaFeePerLp(user_, sigmaFeePerLp)), profitsUpdated)
10611061 }
10621062
10631063
10641064 func _updateSigmaFeePerLp (sigmaFeePerLp_,totalLp_,index_,lpFee_) = {
10651065 func foldFunc (acc,elem) = {
10661066 let index = acc._1
10671067 let sigmaFeePerLpUpdated = if ((index_ == index))
10681068 then (sigmaFeePerLp_[index] + fraction(toBigInt(lpFee_), PERCENT_FACTOR, toBigInt(totalLp_)))
10691069 else sigmaFeePerLp_[index]
10701070 $Tuple2((index + 1), (acc._2 :+ sigmaFeePerLpUpdated))
10711071 }
10721072
1073- let $t02531225391 = {
1073+ let $t02532825407 = {
10741074 let $l = ZERO_INT_LIST_11
10751075 let $s = size($l)
10761076 let $acc0 = $Tuple2(0, nil)
10771077 func $f0_1 ($a,$i) = if (($i >= $s))
10781078 then $a
10791079 else foldFunc($a, $l[$i])
10801080
10811081 func $f0_2 ($a,$i) = if (($i >= $s))
10821082 then $a
10831083 else throw("List size exceeds 11")
10841084
10851085 $f0_2($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)
10861086 }
1087- let idx = $t02531225391._1
1088- let sigmaFeePerLpUpdated = $t02531225391._2
1087+ let idx = $t02532825407._1
1088+ let sigmaFeePerLpUpdated = $t02532825407._2
10891089 sigmaFeePerLpUpdated
10901090 }
10911091
10921092
10931093 func _calculateLpAndProtocolFees (assetIndex_,amount_,lpFeeRate_,protocolFeeRate_) = {
10941094 let sigmaFeePerLp = _loadSigmaFeePerLp()
10951095 let totalLp = _loadTotalLp()
1096- let $t02561225887 = if ((totalLp == 0))
1096+ let $t02562825903 = if ((totalLp == 0))
10971097 then $Tuple2(0, fraction(amount_, protocolFeeRate_, MAX_FEE))
10981098 else $Tuple2(fraction(amount_, lpFeeRate_, MAX_FEE), fraction(amount_, protocolFeeRate_, MAX_FEE))
1099- let lpFee = $t02561225887._1
1100- let protocolFee = $t02561225887._2
1099+ let lpFee = $t02562825903._1
1100+ let protocolFee = $t02562825903._2
11011101 let sigmaFeePerLpUpdated = if ((lpFee == 0))
11021102 then sigmaFeePerLp
11031103 else _updateSigmaFeePerLp(sigmaFeePerLp, totalLp, assetIndex_, lpFee)
11041104 $Tuple3(lpFee, protocolFee, sigmaFeePerLpUpdated)
11051105 }
11061106
11071107
11081108 func _depositAll (amount_) = {
11091109 let storage = _loadStorage()
11101110 let lpTotalSupply = storage._3
11111111 let weightAmplifier = storage._7
11121112 let slippageRate = storage._8
11131113 let feeMaxRate = storage._9
11141114 let assets = _loadAssets()
1115- let $t02639626449 = _loadAssetWeights()
1116- let assetWeights = $t02639626449._1
1117- let sigmaWeight = $t02639626449._2
1118- let $t02645426522 = _loadAssetBalances()
1119- let prevAssetBalances = $t02645426522._1
1120- let prevAssetTotalSupply = $t02645426522._2
1121- let $t02652827758 = if ((prevAssetTotalSupply == 0))
1115+ let $t02641226465 = _loadAssetWeights()
1116+ let assetWeights = $t02641226465._1
1117+ let sigmaWeight = $t02641226465._2
1118+ let $t02647026538 = _loadAssetBalances()
1119+ let prevAssetBalances = $t02647026538._1
1120+ let prevAssetTotalSupply = $t02647026538._2
1121+ let $t02654427774 = if ((prevAssetTotalSupply == 0))
11221122 then {
11231123 func foldFunc (acc,elem) = {
11241124 let index = acc._1
11251125 let requiredAmountNormalized = fraction(assetWeights[index], amount_, sigmaWeight)
11261126 $Tuple2((index + 1), (acc._2 :+ requiredAmountNormalized))
11271127 }
11281128
1129- let $t02697027044 = {
1129+ let $t02698627060 = {
11301130 let $l = assets
11311131 let $s = size($l)
11321132 let $acc0 = $Tuple2(0, nil)
11331133 func $f0_1 ($a,$i) = if (($i >= $s))
11341134 then $a
11351135 else foldFunc($a, $l[$i])
11361136
11371137 func $f0_2 ($a,$i) = if (($i >= $s))
11381138 then $a
11391139 else throw("List size exceeds 10")
11401140
11411141 $f0_2($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)
11421142 }
1143- let idx = $t02697027044._1
1144- let requiredAmountsNormalized = $t02697027044._2
1143+ let idx = $t02698627060._1
1144+ let requiredAmountsNormalized = $t02698627060._2
11451145 $Tuple2(amount_, requiredAmountsNormalized)
11461146 }
11471147 else {
11481148 let ratio = fraction(toBigInt(amount_), PERCENT_FACTOR, toBigInt(prevAssetTotalSupply))
11491149 func foldFunc1 (acc,elem) = {
11501150 let index = acc._1
11511151 let requiredAmountNormalized = toInt(fraction(ratio, toBigInt(prevAssetBalances[index]), PERCENT_FACTOR))
11521152 $Tuple2((index + 1), (acc._2 :+ requiredAmountNormalized))
11531153 }
11541154
1155- let $t02758727662 = {
1155+ let $t02760327678 = {
11561156 let $l = assets
11571157 let $s = size($l)
11581158 let $acc0 = $Tuple2(0, nil)
11591159 func $f0_1 ($a,$i) = if (($i >= $s))
11601160 then $a
11611161 else foldFunc1($a, $l[$i])
11621162
11631163 func $f0_2 ($a,$i) = if (($i >= $s))
11641164 then $a
11651165 else throw("List size exceeds 10")
11661166
11671167 $f0_2($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)
11681168 }
1169- let idx = $t02758727662._1
1170- let requiredAmountsNormalized = $t02758727662._2
1169+ let idx = $t02760327678._1
1170+ let requiredAmountsNormalized = $t02760327678._2
11711171 $Tuple2(fraction(amount_, lpTotalSupply, prevAssetTotalSupply), requiredAmountsNormalized)
11721172 }
1173- let lpTokensToMint = $t02652827758._1
1174- let requiredAmountsNormalized = $t02652827758._2
1175- let $t02776427877 = _incrementBalancesByAmounts(prevAssetBalances, requiredAmountsNormalized)
1176- let assetBalances = $t02776427877._1
1177- let assetTotalSupply = $t02776427877._2
1173+ let lpTokensToMint = $t02654427774._1
1174+ let requiredAmountsNormalized = $t02654427774._2
1175+ let $t02778027893 = _incrementBalancesByAmounts(prevAssetBalances, requiredAmountsNormalized)
1176+ let assetBalances = $t02778027893._1
1177+ let assetTotalSupply = $t02778027893._2
11781178 let err2 = _validateLiquidityInvariant(prevAssetBalances, prevAssetTotalSupply, assetBalances, assetTotalSupply, lpTotalSupply, (lpTotalSupply + lpTokensToMint), assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate)
11791179 if ((err2 == err2))
11801180 then $Tuple3(lpTokensToMint, requiredAmountsNormalized, assetBalances)
11811181 else throw("Strict value is not equal to itself.")
11821182 }
11831183
11841184
11851185 func _deposit (assetId_,amount_) = {
11861186 let storage = _loadStorage()
11871187 let lpTotalSupply = storage._3
1188+ let lpFeeRate = storage._4
1189+ let protocolFeeRate = storage._5
11881190 let maxAllocAmplifier = storage._6
11891191 let weightAmplifier = storage._7
11901192 let slippageRate = storage._8
11911193 let feeMaxRate = storage._9
11921194 let assets = _loadAssets()
1193- let $t02857228625 = _loadAssetWeights()
1194- let assetWeights = $t02857228625._1
1195- let sigmaWeight = $t02857228625._2
1196- let $t02863028744 = _loadAssetBalances()
1197- let prevAssetBalances = $t02863028744._1
1198- let prevAssetTotalSupply = $t02863028744._2
1195+ let $t02865628709 = _loadAssetWeights()
1196+ let assetWeights = $t02865628709._1
1197+ let sigmaWeight = $t02865628709._2
1198+ let $t02871428828 = _loadAssetBalances()
1199+ let prevAssetBalances = $t02871428828._1
1200+ let prevAssetTotalSupply = $t02871428828._2
11991201 let assetBalances = _incrementBalanceByIndex(prevAssetBalances, value(indexOf(assets, assetId_)), amount_)
12001202 let assetTotalSupply = (prevAssetTotalSupply + amount_)
12011203 let err2 = _validateAllocation(assetBalances, assetTotalSupply, prevAssetBalances, prevAssetTotalSupply, assetWeights, sigmaWeight, maxAllocAmplifier)
12021204 if ((err2 == err2))
12031205 then {
12041206 let prevFee = _calculateFee(prevAssetBalances, prevAssetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate)
12051207 let fee = _calculateFee(assetBalances, assetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate)
12061208 let lpTokensToMint = if ((lpTotalSupply == 0))
1207- then (assetTotalSupply - fee)
1209+ then throw("_deposit: empty pool")
12081210 else {
12091211 let assetDiff = (assetTotalSupply - prevAssetTotalSupply)
12101212 let feeDiff = (fee - prevFee)
12111213 let utilityChangeFactor = fraction((assetDiff - feeDiff), RATE_FACTOR, (prevAssetTotalSupply - prevFee))
12121214 let lpTokensToMintInner = fraction(lpTotalSupply, utilityChangeFactor, RATE_FACTOR)
12131215 let err3 = _validateLiquidityInvariant(prevAssetBalances, prevAssetTotalSupply, assetBalances, assetTotalSupply, lpTotalSupply, (lpTotalSupply + lpTokensToMintInner), assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate)
12141216 if ((err3 == err3))
12151217 then lpTokensToMintInner
12161218 else throw("Strict value is not equal to itself.")
12171219 }
1218- $Tuple2(lpTokensToMint, assetBalances)
1220+ let $t03049030621 = _calculateLpAndProtocolFees(0, lpTokensToMint, (lpFeeRate / 2), (protocolFeeRate / 2))
1221+ let lpFee = $t03049030621._1
1222+ let protocolFee = $t03049030621._2
1223+ let sigmaFeePerLpUpdated = $t03049030621._3
1224+ $Tuple5(lpTokensToMint, assetBalances, lpFee, protocolFee, sigmaFeePerLpUpdated)
12191225 }
12201226 else throw("Strict value is not equal to itself.")
12211227 }
12221228
12231229
12241230 func _withdrawAll (amount_) = {
12251231 let storage = _loadStorage()
12261232 let lpTotalSupply = storage._3
1227- let lpFeeRate = storage._4
1228- let protocolFeeRate = storage._5
12291233 let maxAllocAmplifier = storage._6
12301234 let weightAmplifier = storage._7
12311235 let slippageRate = storage._8
12321236 let feeMaxRate = storage._9
1233- let $t03067130739 = _loadAssetBalances()
1234- let prevAssetBalances = $t03067130739._1
1235- let prevAssetTotalSupply = $t03067130739._2
1236- let $t03074430797 = _loadAssetWeights()
1237- let assetWeights = $t03074430797._1
1238- let sigmaWeight = $t03074430797._2
1239- let $t03080330919 = _calculateLpAndProtocolFees(0, amount_, lpFeeRate, protocolFeeRate)
1240- let lpFee = $t03080330919._1
1241- let protocolFee = $t03080330919._2
1242- let sigmaFeePerLpUpdated = $t03080330919._3
1243- let lpTokensToBurn = ((amount_ - lpFee) - protocolFee)
1237+ let $t03095531023 = _loadAssetBalances()
1238+ let prevAssetBalances = $t03095531023._1
1239+ let prevAssetTotalSupply = $t03095531023._2
1240+ let $t03102831081 = _loadAssetWeights()
1241+ let assetWeights = $t03102831081._1
1242+ let sigmaWeight = $t03102831081._2
1243+ let lpTokensToBurn = amount_
12441244 let err = _validateInt(lpTokensToBurn, 0, MAX_INT, "_withdrawAll: lpTokensToBurn less than 0")
12451245 if ((err == err))
12461246 then {
1247- let $t03108231215 = _decrementBalancesByLpAmount(prevAssetBalances, lpTokensToBurn, lpTotalSupply)
1248- let assetBalances = $t03108231215._1
1249- let assetTotalSupply = $t03108231215._2
1250- let balancesToPay = $t03108231215._3
1247+ let $t03122331356 = _decrementBalancesByLpAmount(prevAssetBalances, lpTokensToBurn, lpTotalSupply)
1248+ let assetBalances = $t03122331356._1
1249+ let assetTotalSupply = $t03122331356._2
1250+ let balancesToPay = $t03122331356._3
12511251 let err2 = _validateLiquidityInvariant(prevAssetBalances, prevAssetTotalSupply, assetBalances, assetTotalSupply, lpTotalSupply, (lpTotalSupply - lpTokensToBurn), assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate)
12521252 if ((err2 == err2))
1253- then $Tuple6(lpTokensToBurn, balancesToPay, assetBalances, lpFee, protocolFee, sigmaFeePerLpUpdated)
1253+ then $Tuple3(lpTokensToBurn, balancesToPay, assetBalances)
12541254 else throw("Strict value is not equal to itself.")
12551255 }
12561256 else throw("Strict value is not equal to itself.")
12571257 }
12581258
12591259
12601260 func _withdraw (assetId_,lpAmount_) = {
12611261 let storage = _loadStorage()
12621262 let lpTotalSupply = storage._3
12631263 let lpFeeRate = storage._4
12641264 let protocolFeeRate = storage._5
12651265 let maxAllocAmplifier = storage._6
12661266 let weightAmplifier = storage._7
12671267 let slippageRate = storage._8
12681268 let feeMaxRate = storage._9
12691269 let precision = _loadPrecision()
12701270 let assets = _loadAssets()
1271- let $t03204932117 = _loadAssetBalances()
1272- let prevAssetBalances = $t03204932117._1
1273- let prevAssetTotalSupply = $t03204932117._2
1274- let $t03212232175 = _loadAssetWeights()
1275- let assetWeights = $t03212232175._1
1276- let sigmaWeight = $t03212232175._2
1271+ let $t03214832216 = _loadAssetBalances()
1272+ let prevAssetBalances = $t03214832216._1
1273+ let prevAssetTotalSupply = $t03214832216._2
1274+ let $t03222132274 = _loadAssetWeights()
1275+ let assetWeights = $t03222132274._1
1276+ let sigmaWeight = $t03222132274._2
12771277 let targetAssetIndex = value(indexOf(assets, assetId_))
12781278 let prevFee = _calculateFee(prevAssetBalances, prevAssetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate)
12791279 let prevUtilValue = (prevAssetTotalSupply - prevFee)
12801280 let k = fraction(toBigInt((lpTotalSupply - lpAmount_)), PERCENT_FACTOR, toBigInt(lpTotalSupply))
12811281 let prevUtilValueWithK = toInt(fraction(toBigInt(prevUtilValue), k, PERCENT_FACTOR))
12821282 func foldFunc (acc,elem) = if (acc._1)
12831283 then acc
12841284 else {
12851285 let startInner = acc._2
12861286 let stopInner = acc._3
12871287 let currentAmount = ((stopInner + startInner) / 2)
12881288 let tempAssetBalances = _decrementBalanceByIndex(prevAssetBalances, targetAssetIndex, currentAmount)
12891289 let tempAssetTotalSupply = (prevAssetTotalSupply - currentAmount)
12901290 let utilValue = (tempAssetTotalSupply - _calculateFee(tempAssetBalances, tempAssetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate))
1291- if (if ((precision > (utilValue - prevUtilValueWithK)))
1292- then ((utilValue - prevUtilValueWithK) >= 0)
1291+ if (if (((utilValue - prevUtilValueWithK) > (-1 * precision)))
1292+ then (precision > (utilValue - prevUtilValueWithK))
12931293 else false)
12941294 then $Tuple4(true, startInner, stopInner, currentAmount)
12951295 else if ((0 > (utilValue - prevUtilValueWithK)))
1296- then $Tuple4(false, startInner, currentAmount, 0)
1297- else $Tuple4(false, currentAmount, stopInner, 0)
1296+ then $Tuple4(false, startInner, currentAmount, currentAmount)
1297+ else $Tuple4(false, currentAmount, stopInner, currentAmount)
12981298 }
12991299
13001300 let targetAmount = {
1301- let targetAmount = lpAmount_
1302- let tempAssetBalances = _decrementBalanceByIndex(prevAssetBalances, targetAssetIndex, targetAmount)
1303- let tempAssetTotalSupply = (prevAssetTotalSupply - targetAmount)
1304- let fee = _calculateFee(tempAssetBalances, tempAssetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate)
1305- let feeDiff = (fee - prevFee)
1306- if ((feeDiff == 0))
1307- then targetAmount
1308- else {
1309- let $t03414034255 = {
1310- let $l = LIST_64
1311- let $s = size($l)
1312- let $acc0 = $Tuple4(false, 0, (lpAmount_ + prevFee), 0)
1313- func $f0_1 ($a,$i) = if (($i >= $s))
1314- then $a
1315- else foldFunc($a, $l[$i])
1316-
1317- func $f0_2 ($a,$i) = if (($i >= $s))
1318- then $a
1319- else throw("List size exceeds 64")
1320-
1321- $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($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($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($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), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64)
1322- }
1323- let success = $t03414034255._1
1324- let startOut = $t03414034255._2
1325- let stopOut = $t03414034255._3
1326- let targetAmountOut = $t03414034255._4
1327- if (!(success))
1328- then throw(("_withdraw: can't calculate targetAmount=" + toString(targetAmountOut)))
1329- else targetAmountOut
1330- }
1301+ let $t03380933924 = {
1302+ let $l = LIST_64
1303+ let $s = size($l)
1304+ let $acc0 = $Tuple4(false, 0, (lpAmount_ + prevFee), 0)
1305+ func $f0_1 ($a,$i) = if (($i >= $s))
1306+ then $a
1307+ else foldFunc($a, $l[$i])
1308+
1309+ func $f0_2 ($a,$i) = if (($i >= $s))
1310+ then $a
1311+ else throw("List size exceeds 64")
1312+
1313+ $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($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($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($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), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64)
1314+ }
1315+ let success = $t03380933924._1
1316+ let startOut = $t03380933924._2
1317+ let stopOut = $t03380933924._3
1318+ let targetAmountOut = $t03380933924._4
1319+ if (!(success))
1320+ then throw(("_withdraw: can't calculate targetAmount=" + toString(targetAmountOut)))
1321+ else targetAmountOut
13311322 }
13321323 let finalAssetBalances = _decrementBalanceByIndex(prevAssetBalances, targetAssetIndex, targetAmount)
13331324 let finalAssetTotalSupply = (prevAssetTotalSupply - targetAmount)
13341325 let err1 = if (_validateAllocation(finalAssetBalances, finalAssetTotalSupply, prevAssetBalances, prevAssetTotalSupply, assetWeights, sigmaWeight, maxAllocAmplifier))
13351326 then _validateLiquidityInvariant(prevAssetBalances, prevAssetTotalSupply, finalAssetBalances, finalAssetTotalSupply, lpTotalSupply, (lpTotalSupply - lpAmount_), assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate)
13361327 else false
13371328 if ((err1 == err1))
13381329 then {
1339- let $t03514235282 = _calculateLpAndProtocolFees((targetAssetIndex + 1), targetAmount, lpFeeRate, protocolFeeRate)
1340- let lpFee = $t03514235282._1
1341- let protocolFee = $t03514235282._2
1342- let sigmaFeePerLpUpdated = $t03514235282._3
1330+ let $t03488235030 = _calculateLpAndProtocolFees((targetAssetIndex + 1), targetAmount, (lpFeeRate / 2), (protocolFeeRate / 2))
1331+ let lpFee = $t03488235030._1
1332+ let protocolFee = $t03488235030._2
1333+ let sigmaFeePerLpUpdated = $t03488235030._3
13431334 $Tuple5(targetAmount, finalAssetBalances, lpFee, protocolFee, sigmaFeePerLpUpdated)
13441335 }
13451336 else throw("Strict value is not equal to itself.")
13461337 }
13471338
13481339
13491340 func _swap (sourceAssetIndex_,targetAssetIndex_,sourceAmount_) = {
13501341 let storage = _loadStorage()
13511342 let lpAssetId = storage._1
13521343 let lpDecimals = _getDecimals(toBase58String(lpAssetId))
13531344 let lpTotalSupply = storage._3
13541345 let lpFeeRate = storage._4
13551346 let protocolFeeRate = storage._5
13561347 let maxAllocAmplifier = storage._6
13571348 let weightAmplifier = storage._7
13581349 let slippageRate = storage._8
13591350 let feeMaxRate = storage._9
13601351 let precision = _loadPrecision()
1361- let $t03586435932 = _loadAssetBalances()
1362- let prevAssetBalances = $t03586435932._1
1363- let prevAssetTotalSupply = $t03586435932._2
1364- let $t03593735990 = _loadAssetWeights()
1365- let assetWeights = $t03593735990._1
1366- let sigmaWeight = $t03593735990._2
1352+ let $t03561235680 = _loadAssetBalances()
1353+ let prevAssetBalances = $t03561235680._1
1354+ let prevAssetTotalSupply = $t03561235680._2
1355+ let $t03568535738 = _loadAssetWeights()
1356+ let assetWeights = $t03568535738._1
1357+ let sigmaWeight = $t03568535738._2
13671358 let assetBalances = _incrementBalanceByIndex(prevAssetBalances, sourceAssetIndex_, sourceAmount_)
13681359 let assetTotalSupply = (prevAssetTotalSupply + sourceAmount_)
13691360 let prevFee = _calculateFee(prevAssetBalances, prevAssetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate)
13701361 let prevUtilValue = (prevAssetTotalSupply - prevFee)
13711362 func foldFunc (acc,elem) = if (acc._1)
13721363 then acc
13731364 else {
13741365 let startInner = acc._2
13751366 let stopInner = acc._3
13761367 let currentAmount = ((stopInner + startInner) / 2)
13771368 let tempAssetBalances = _decrementBalanceByIndex(assetBalances, targetAssetIndex_, currentAmount)
13781369 let tempAssetTotalSupply = (assetTotalSupply - currentAmount)
13791370 let utilValue = (tempAssetTotalSupply - _calculateFee(tempAssetBalances, tempAssetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate))
1380- if (if ((precision > (utilValue - prevUtilValue)))
1381- then ((utilValue - prevUtilValue) >= 0)
1371+ if (if (((utilValue - prevUtilValue) > (-1 * precision)))
1372+ then (precision > (utilValue - prevUtilValue))
13821373 else false)
13831374 then $Tuple4(true, startInner, stopInner, currentAmount)
13841375 else if ((0 > (utilValue - prevUtilValue)))
1385- then $Tuple4(false, startInner, currentAmount, 0)
1386- else $Tuple4(false, currentAmount, stopInner, 0)
1376+ then $Tuple4(false, startInner, currentAmount, currentAmount)
1377+ else $Tuple4(false, currentAmount, stopInner, currentAmount)
13871378 }
13881379
13891380 let targetAmount = {
13901381 let targetAmount = sourceAmount_
13911382 let tempAssetBalances = _decrementBalanceByIndex(assetBalances, targetAssetIndex_, targetAmount)
13921383 let tempAssetTotalSupply = (assetTotalSupply - targetAmount)
13931384 let fee = _calculateFee(tempAssetBalances, tempAssetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate)
13941385 let feeDiff = (fee - prevFee)
13951386 if ((feeDiff == 0))
13961387 then targetAmount
13971388 else {
1398- let $t03784137960 = {
1389+ let $t03762537744 = {
13991390 let $l = LIST_64
14001391 let $s = size($l)
14011392 let $acc0 = $Tuple4(false, 0, (sourceAmount_ + prevFee), 0)
14021393 func $f0_1 ($a,$i) = if (($i >= $s))
14031394 then $a
14041395 else foldFunc($a, $l[$i])
14051396
14061397 func $f0_2 ($a,$i) = if (($i >= $s))
14071398 then $a
14081399 else throw("List size exceeds 64")
14091400
14101401 $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($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($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($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), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64)
14111402 }
1412- let success = $t03784137960._1
1413- let startOut = $t03784137960._2
1414- let stopOut = $t03784137960._3
1415- let targetAmountOut = $t03784137960._4
1403+ let success = $t03762537744._1
1404+ let startOut = $t03762537744._2
1405+ let stopOut = $t03762537744._3
1406+ let targetAmountOut = $t03762537744._4
14161407 if (!(success))
14171408 then throw(("_swap: can't calculate targetAmount=" + toString(targetAmountOut)))
14181409 else targetAmountOut
14191410 }
14201411 }
14211412 let finalAssetBalances = _decrementBalanceByIndex(assetBalances, targetAssetIndex_, targetAmount)
14221413 let finalAssetTotalSupply = (assetTotalSupply - targetAmount)
14231414 let err1 = if (_validateAllocation(finalAssetBalances, finalAssetTotalSupply, prevAssetBalances, prevAssetTotalSupply, assetWeights, sigmaWeight, maxAllocAmplifier))
14241415 then _validateSwapInvariant(prevAssetBalances, prevAssetTotalSupply, finalAssetBalances, finalAssetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate)
14251416 else false
14261417 if ((err1 == err1))
14271418 then {
1428- let $t03877338914 = _calculateLpAndProtocolFees((targetAssetIndex_ + 1), targetAmount, lpFeeRate, protocolFeeRate)
1429- let lpFee = $t03877338914._1
1430- let protocolFee = $t03877338914._2
1431- let sigmaFeePerLpUpdated = $t03877338914._3
1419+ let $t03855738698 = _calculateLpAndProtocolFees((targetAssetIndex_ + 1), targetAmount, lpFeeRate, protocolFeeRate)
1420+ let lpFee = $t03855738698._1
1421+ let protocolFee = $t03855738698._2
1422+ let sigmaFeePerLpUpdated = $t03855738698._3
14321423 $Tuple5(targetAmount, finalAssetBalances, lpFee, protocolFee, sigmaFeePerLpUpdated)
14331424 }
14341425 else throw("Strict value is not equal to itself.")
14351426 }
14361427
14371428
14381429 @Callable(i)
1439-func init (assets_,assetWeights_,lpFeeRate_,protocolFeeRate_,lpTokenName_,lpTokenDescr_,lpTokenDecimals_,maxAllocationAmplifier_,weightAmplifier_,slippageRate_,feeMaxRate_,protocolFeeContract_,precision_) = {
1440- let err = if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (_onlyThisContract(i.caller))
1430+func init (assets_,assetWeights_,lpFeeRate_,protocolFeeRate_,lpTokenName_,lpTokenDescr_,lpTokenDecimals_,maxAllocationAmplifier_,weightAmplifier_,slippageRate_,feeMaxRate_,protocolFeeContract_,precision_,pauser_) = {
1431+ let err = if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (_onlyThisContract(i.caller))
14411432 then _whenNotInitialized()
14421433 else false)
14431434 then _whenMultisigSet()
14441435 else false)
14451436 then _validateAssets(assets_, "init: invalid assets")
14461437 else false)
1447- then _validateIntList(assetWeights_, 0, MAX_WEIGHT, "init: invalid assetWeights")
1438+ then _validateIntList(assetWeights_, 1, MAX_WEIGHT, "init: invalid assetWeights")
14481439 else false)
14491440 then _validateIntEquals(size(assets_), size(assetWeights_), "init: invalid assetWeights size")
14501441 else false)
14511442 then _validateInt(lpFeeRate_, 0, MAX_FEE, "init: invalid lp fee")
14521443 else false)
14531444 then _validateInt(protocolFeeRate_, 0, MAX_FEE, "init: invalid protocol fee")
14541445 else false)
14551446 then _validateTokenName(lpTokenName_, "init: invalid name")
14561447 else false)
14571448 then _validateTokenDescr(lpTokenDescr_, "init: invalid descr")
14581449 else false)
14591450 then _validateDecimals(lpTokenDecimals_, "init: invalid decimals")
14601451 else false)
14611452 then _validateInt(maxAllocationAmplifier_, 0, MAX_AMPLIFIER, "init: invalid maxAllocationAmplifier")
14621453 else false)
14631454 then _validateInt(weightAmplifier_, 0, maxAllocationAmplifier_, "init: invalid weightAmplifier")
14641455 else false)
14651456 then _validateInt(slippageRate_, 0, MAX_INT, "init: invalid slippageRate")
14661457 else false)
14671458 then _validateInt(feeMaxRate_, 0, MAX_INT, "init: invalid feeMaxRate")
14681459 else false)
14691460 then _validateAddress(protocolFeeContract_, "init: invalid protocolFeeContract")
14701461 else false)
1471- then _validateInt(precision_, 0, MAX_INT, "init: invalid precision")
1462+ then _validateInt(precision_, 1, MAX_INT, "init: invalid precision")
1463+ else false)
1464+ then _validateAddress(pauser_, "init: invalid pauser")
14721465 else false
14731466 if ((err == err))
14741467 then {
1475- let $t04069540764 = _prepareAssetWeights(assetWeights_)
1476- let assetWeights = $t04069540764._1
1477- let sigmaWeight = $t04069540764._2
1468+ let $t04056140630 = _prepareAssetWeights(assetWeights_)
1469+ let assetWeights = $t04056140630._1
1470+ let sigmaWeight = $t04056140630._2
14781471 let assetBalances = _prepareAssetBalances(assets_)
14791472 let issue = Issue(lpTokenName_, lpTokenDescr_, 0, lpTokenDecimals_, true)
14801473 let lpAssetId = calculateAssetId(issue)
14811474 let storageUpdated = $Tuple10(lpAssetId, true, 0, lpFeeRate_, protocolFeeRate_, maxAllocationAmplifier_, weightAmplifier_, slippageRate_, feeMaxRate_, addressFromStringValue(protocolFeeContract_))
1482- $Tuple2((((((([issue] ++ _saveStorage(storageUpdated)) ++ _saveAssets(assets_)) ++ _saveAssetBalances(assetBalances)) ++ _saveAssetWeights(assetWeights)) ++ _savePrecision(precision_)) ++ _saveSigmaFeePerLp(_loadSigmaFeePerLp())), unit)
1475+ $Tuple2(((((((([issue] ++ _saveStorage(storageUpdated)) ++ _saveAssets(assets_)) ++ _saveAssetBalances(assetBalances)) ++ _saveAssetWeights(assetWeights)) ++ _savePrecision(precision_)) ++ _saveSigmaFeePerLp(_loadSigmaFeePerLp())) ++ _savePauser(addressFromStringValue(pauser_))), unit)
14831476 }
14841477 else throw("Strict value is not equal to itself.")
14851478 }
14861479
14871480
14881481
14891482 @Callable(i)
14901483 func depositAll (amount_) = {
14911484 let err = if (if (_whenInitialized())
14921485 then _whenNotPaused()
14931486 else false)
14941487 then _validateInt(amount_, 0, MAX_INT, "depositAll: invalid amount")
14951488 else false
14961489 if ((err == err))
14971490 then {
14981491 let storage = _loadStorage()
14991492 let lpAssetId = storage._1
15001493 let lpDecimals = _getDecimals(toBase58String(lpAssetId))
15011494 let assets = _loadAssets()
1502- let $t04245742542 = _depositAll(amount_)
1503- let lpTokensToMint = $t04245742542._1
1504- let requiredAmountsNormalized = $t04245742542._2
1505- let assetBalances = $t04245742542._3
1495+ let $t04238042465 = _depositAll(amount_)
1496+ let lpTokensToMint = $t04238042465._1
1497+ let requiredAmountsNormalized = $t04238042465._2
1498+ let assetBalances = $t04238042465._3
15061499 func foldFunc (acc,elem) = {
15071500 let index = acc._1
15081501 let paymentAssetStr = _assetToStr(i.payments[index].assetId)
15091502 let paymentAssetDecimals = _getDecimals(paymentAssetStr)
15101503 let requiredAmountNormalized = requiredAmountsNormalized[index]
15111504 let requiredAmount = _normalizeDecimals(requiredAmountNormalized, lpDecimals, paymentAssetDecimals, CEILING)
15121505 let err1 = if ((paymentAssetStr != elem))
15131506 then throw(("depositAll: invalid payment: index=" + toString(index)))
15141507 else if ((0 >= requiredAmount))
15151508 then throw("depositAll: too little amount required")
15161509 else unit
15171510 if ((err1 == err1))
15181511 then {
15191512 let change = if ((i.payments[index].amount > requiredAmount))
15201513 then [ScriptTransfer(i.caller, (i.payments[index].amount - requiredAmount), i.payments[index].assetId)]
15211514 else if ((requiredAmount > i.payments[index].amount))
15221515 then throw(((("depositAll: insufficient payment, index=" + toString(index)) + ", required=") + toString(requiredAmount)))
15231516 else nil
15241517 $Tuple2((index + 1), (acc._2 ++ change))
15251518 }
15261519 else throw("Strict value is not equal to itself.")
15271520 }
15281521
1529- let $t04368543747 = {
1522+ let $t04360843670 = {
15301523 let $l = assets
15311524 let $s = size($l)
15321525 let $acc0 = $Tuple2(0, nil)
15331526 func $f0_1 ($a,$i) = if (($i >= $s))
15341527 then $a
15351528 else foldFunc($a, $l[$i])
15361529
15371530 func $f0_2 ($a,$i) = if (($i >= $s))
15381531 then $a
15391532 else throw("List size exceeds 10")
15401533
15411534 $f0_2($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)
15421535 }
1543- let idx = $t04368543747._1
1544- let changeActions = $t04368543747._2
1536+ let idx = $t04360843670._1
1537+ let changeActions = $t04360843670._2
15451538 let storageUpdated = $Tuple10(storage._1, storage._2, (storage._3 + lpTokensToMint), storage._4, storage._5, storage._6, storage._7, storage._8, storage._9, storage._10)
15461539 $Tuple2(((([Reissue(lpAssetId, lpTokensToMint, true), ScriptTransfer(i.caller, lpTokensToMint, lpAssetId)] ++ _saveStorage(storageUpdated)) ++ _saveAssetBalances(assetBalances)) ++ changeActions), unit)
15471540 }
15481541 else throw("Strict value is not equal to itself.")
15491542 }
15501543
15511544
15521545
15531546 @Callable(i)
15541547 func deposit (minLpAmount_) = {
15551548 let err = _validateInt(minLpAmount_, 0, MAX_INT, "deposit: invalid min lp amount")
15561549 if ((err == err))
15571550 then {
15581551 let storage = _loadStorage()
15591552 let lpAssetId = storage._1
1560- let lpDecimals = _getDecimals(toBase58String(lpAssetId))
1553+ let lpAssetIdStr = _assetToStr(lpAssetId)
1554+ let lpDecimals = _getDecimals(lpAssetIdStr)
15611555 let err1 = if (if (if (if (_whenInitialized())
15621556 then _whenNotPaused()
15631557 else false)
15641558 then _validateIntEquals(size(i.payments), 1, "deposit: invalid payments size")
15651559 else false)
15661560 then _validateListContains(_loadAssets(), _assetToStr(i.payments[0].assetId), "deposit: invalid payment asset")
15671561 else false)
1568- then _validateInt(i.payments[0].amount, 0, MAX_INT, "deposit: invalid payment amount")
1562+ then _validateInt(i.payments[0].amount, 1, MAX_INT, "deposit: invalid payment amount")
15691563 else false
15701564 if ((err1 == err1))
15711565 then {
15721566 let assetStr = _assetToStr(i.payments[0].assetId)
15731567 let assetDecimals = _getDecimals(assetStr)
15741568 let amountNormalized = _normalizeDecimals(i.payments[0].amount, assetDecimals, lpDecimals, DOWN)
1575- let $t04512645200 = _deposit(assetStr, amountNormalized)
1576- let lpTokensToMint = $t04512645200._1
1577- let assetBalances = $t04512645200._2
1578- let err2 = _validateInt(lpTokensToMint, minLpAmount_, MAX_INT, "deposit: less than min lp")
1569+ let $t04508245198 = _deposit(assetStr, amountNormalized)
1570+ let lpTokensToMint = $t04508245198._1
1571+ let assetBalances = $t04508245198._2
1572+ let lpFee = $t04508245198._3
1573+ let protocolFee = $t04508245198._4
1574+ let sigmaFeePerLpUpdated = $t04508245198._5
1575+ let lpTokensToSend = ((lpTokensToMint - lpFee) - protocolFee)
1576+ let err2 = _validateInt(lpTokensToSend, minLpAmount_, MAX_INT, "deposit: less than min")
15791577 if ((err2 == err2))
15801578 then {
15811579 let storageUpdated = $Tuple10(storage._1, storage._2, (storage._3 + lpTokensToMint), storage._4, storage._5, storage._6, storage._7, storage._8, storage._9, storage._10)
1582- $Tuple2((([Reissue(lpAssetId, lpTokensToMint, true), ScriptTransfer(i.caller, lpTokensToMint, lpAssetId)] ++ _saveStorage(storageUpdated)) ++ _saveAssetBalances(assetBalances)), unit)
1580+ $Tuple2(((((([Reissue(lpAssetId, lpTokensToMint, true), ScriptTransfer(i.caller, lpTokensToSend, lpAssetId)] ++ _saveStorage(storageUpdated)) ++ _saveAssetBalances(assetBalances)) ++ _saveLpFee(lpAssetIdStr, (lpFee + _loadLpFee(lpAssetIdStr)))) ++ _saveProtocolFee(lpAssetIdStr, (protocolFee + _loadProtocolFee(lpAssetIdStr)))) ++ _saveSigmaFeePerLp(sigmaFeePerLpUpdated)), unit)
15831581 }
15841582 else throw("Strict value is not equal to itself.")
15851583 }
15861584 else throw("Strict value is not equal to itself.")
15871585 }
15881586 else throw("Strict value is not equal to itself.")
15891587 }
15901588
15911589
15921590
15931591 @Callable(i)
15941592 func withdrawAll () = {
15951593 let storage = _loadStorage()
15961594 let lpAssetId = storage._1
15971595 let lpAssetIdStr = toBase58String(lpAssetId)
15981596 let lpDecimals = _getDecimals(lpAssetIdStr)
15991597 let assets = _loadAssets()
16001598 let err = if (if (if (if (_whenInitialized())
16011599 then _whenNotPaused()
16021600 else false)
16031601 then _validateIntEquals(size(i.payments), 1, "withdrawAll: invalid payments size")
16041602 else false)
16051603 then _validateStringEqual(lpAssetIdStr, _assetToStr(i.payments[0].assetId), "withdrawAll: invalid payment asset")
16061604 else false)
1607- then _validateInt(i.payments[0].amount, 0, MAX_INT, "withdrawAll: invalid payment amount")
1605+ then _validateInt(i.payments[0].amount, 1, MAX_INT, "withdrawAll: invalid payment amount")
16081606 else false
16091607 if ((err == err))
16101608 then {
1611- let $t04642146550 = _withdrawAll(i.payments[0].amount)
1612- let lpTokensToBurn = $t04642146550._1
1613- let balancesToPay = $t04642146550._2
1614- let assetBalances = $t04642146550._3
1615- let lpFee = $t04642146550._4
1616- let protocolFee = $t04642146550._5
1617- let sigmaFeePerLpUpdated = $t04642146550._6
1609+ let $t04668746774 = _withdrawAll(i.payments[0].amount)
1610+ let lpTokensToBurn = $t04668746774._1
1611+ let balancesToPay = $t04668746774._2
1612+ let assetBalances = $t04668746774._3
16181613 let paymentActions = _getPaymentsFromBalances(assets, balancesToPay, i.caller, lpDecimals)
16191614 let storageUpdated = $Tuple10(storage._1, storage._2, (storage._3 - lpTokensToBurn), storage._4, storage._5, storage._6, storage._7, storage._8, storage._9, storage._10)
1620- $Tuple2((((((([Burn(lpAssetId, lpTokensToBurn)] ++ paymentActions) ++ _saveStorage(storageUpdated)) ++ _saveAssetBalances(assetBalances)) ++ _saveLpFee(lpAssetIdStr, (lpFee + _loadLpFee(lpAssetIdStr)))) ++ _saveProtocolFee(lpAssetIdStr, (protocolFee + _loadProtocolFee(lpAssetIdStr)))) ++ _saveSigmaFeePerLp(sigmaFeePerLpUpdated)), unit)
1615+ $Tuple2(((([Burn(lpAssetId, lpTokensToBurn)] ++ paymentActions) ++ _saveStorage(storageUpdated)) ++ _saveAssetBalances(assetBalances)), unit)
16211616 }
16221617 else throw("Strict value is not equal to itself.")
16231618 }
16241619
16251620
16261621
16271622 @Callable(i)
16281623 func withdraw (assetId_,minAmount_) = {
16291624 let storage = _loadStorage()
16301625 let lpAssetId = storage._1
16311626 let lpAssetIdStr = toBase58String(lpAssetId)
16321627 let lpDecimals = _getDecimals(lpAssetIdStr)
16331628 let assets = _loadAssets()
16341629 let err = if (if (if (if (if (if (_whenInitialized())
16351630 then _whenNotPaused()
16361631 else false)
16371632 then _validateIntEquals(size(i.payments), 1, "withdraw: invalid payments size")
16381633 else false)
16391634 then _validateStringEqual(lpAssetIdStr, _assetToStr(i.payments[0].assetId), "withdraw: invalid payment asset")
16401635 else false)
1641- then _validateInt(i.payments[0].amount, 0, MAX_INT, "withdraw: invalid payment amount")
1636+ then _validateInt(i.payments[0].amount, 1, MAX_INT, "withdraw: invalid payment amount")
16421637 else false)
16431638 then _validateListContains(assets, assetId_, "withdraw: invalid assetId")
16441639 else false)
16451640 then _validateInt(minAmount_, 0, MAX_INT, "withdraw: invalid minAmount")
16461641 else false
16471642 if ((err == err))
16481643 then {
1649- let $t04808648220 = _withdraw(assetId_, i.payments[0].amount)
1650- let targetAmountNormalized = $t04808648220._1
1651- let finalAssetBalances = $t04808648220._2
1652- let lpFee = $t04808648220._3
1653- let protocolFee = $t04808648220._4
1654- let sigmaFeePerLpUpdated = $t04808648220._5
1644+ let $t04810048234 = _withdraw(assetId_, i.payments[0].amount)
1645+ let targetAmountNormalized = $t04810048234._1
1646+ let finalAssetBalances = $t04810048234._2
1647+ let lpFee = $t04810048234._3
1648+ let protocolFee = $t04810048234._4
1649+ let sigmaFeePerLpUpdated = $t04810048234._5
16551650 let finalAmountNormalized = ((targetAmountNormalized - lpFee) - protocolFee)
16561651 let targetDecimals = _getDecimals(assetId_)
16571652 let finalAmount = _normalizeDecimals(finalAmountNormalized, lpDecimals, targetDecimals, DOWN)
1658- let err1 = _validateInt(finalAmount, minAmount_, MAX_INT, "withdraw: insufficient final amount")
1653+ let err1 = _validateInt(finalAmount, minAmount_, MAX_INT, "withdraw: less than min")
16591654 if ((err1 == err1))
16601655 then {
16611656 let storageUpdated = $Tuple10(storage._1, storage._2, (storage._3 - i.payments[0].amount), storage._4, storage._5, storage._6, storage._7, storage._8, storage._9, storage._10)
16621657 $Tuple2(((((([Burn(lpAssetId, i.payments[0].amount), ScriptTransfer(i.caller, finalAmount, _strToAsset(assetId_))] ++ _saveStorage(storageUpdated)) ++ _saveAssetBalances(finalAssetBalances)) ++ _saveLpFee(assetId_, (lpFee + _loadLpFee(assetId_)))) ++ _saveProtocolFee(assetId_, (protocolFee + _loadProtocolFee(assetId_)))) ++ _saveSigmaFeePerLp(sigmaFeePerLpUpdated)), unit)
16631658 }
16641659 else throw("Strict value is not equal to itself.")
16651660 }
16661661 else throw("Strict value is not equal to itself.")
16671662 }
16681663
16691664
16701665
16711666 @Callable(i)
16721667 func swap (targetAssetId_,minAmount_) = {
16731668 let storage = _loadStorage()
16741669 let lpAssetId = storage._1
16751670 let lpDecimals = _getDecimals(toBase58String(lpAssetId))
16761671 let assets = _loadAssets()
16771672 let sourceAssetStr = _assetToStr(i.payments[0].assetId)
16781673 let sourceAmountNormalized = _normalizeDecimals(i.payments[0].amount, _getDecimals(sourceAssetStr), lpDecimals, DOWN)
16791674 let sourceAssetIndex = valueOrErrorMessage(indexOf(assets, sourceAssetStr), "swap: invalid source asset")
16801675 if ((sourceAssetIndex == sourceAssetIndex))
16811676 then {
16821677 let targetAssetIndex = valueOrErrorMessage(indexOf(assets, targetAssetId_), "swap: invalid target asset")
16831678 if ((targetAssetIndex == targetAssetIndex))
16841679 then {
16851680 let err = if (if (if (if (if (_whenInitialized())
16861681 then _whenNotPaused()
16871682 else false)
16881683 then _validateInt(minAmount_, 0, MAX_INT, "swap: invalid min target amount")
16891684 else false)
1690- then _validateInt(sourceAmountNormalized, 0, MAX_INT, "swap: invalid source amount")
1685+ then _validateInt(sourceAmountNormalized, 1, MAX_INT, "swap: invalid source amount")
16911686 else false)
16921687 then _validateStringNotEq(sourceAssetStr, targetAssetId_, "swap: same assets")
16931688 else false)
16941689 then _validateIntEquals(size(i.payments), 1, "swap: invalid payments size")
16951690 else false
16961691 if ((err == err))
16971692 then {
1698- let $t05031750475 = _swap(sourceAssetIndex, targetAssetIndex, sourceAmountNormalized)
1699- let targetAmountNormalized = $t05031750475._1
1700- let finalAssetBalances = $t05031750475._2
1701- let lpFee = $t05031750475._3
1702- let protocolFee = $t05031750475._4
1703- let sigmaFeePerLpUpdated = $t05031750475._5
1693+ let $t05031950477 = _swap(sourceAssetIndex, targetAssetIndex, sourceAmountNormalized)
1694+ let targetAmountNormalized = $t05031950477._1
1695+ let finalAssetBalances = $t05031950477._2
1696+ let lpFee = $t05031950477._3
1697+ let protocolFee = $t05031950477._4
1698+ let sigmaFeePerLpUpdated = $t05031950477._5
17041699 let finalAmountNormalized = ((targetAmountNormalized - lpFee) - protocolFee)
17051700 let targetDecimals = _getDecimals(targetAssetId_)
17061701 let finalAmount = _normalizeDecimals(finalAmountNormalized, lpDecimals, targetDecimals, DOWN)
1707- let err1 = _validateInt(finalAmount, minAmount_, MAX_INT, "swap: insufficient final amount")
1702+ let err1 = _validateInt(finalAmount, minAmount_, MAX_INT, "swap: less than min")
17081703 if ((err1 == err1))
17091704 then $Tuple2((((([ScriptTransfer(i.caller, finalAmount, _strToAsset(targetAssetId_))] ++ _saveAssetBalances(finalAssetBalances)) ++ _saveLpFee(targetAssetId_, (lpFee + _loadLpFee(targetAssetId_)))) ++ _saveProtocolFee(targetAssetId_, (protocolFee + _loadProtocolFee(targetAssetId_)))) ++ _saveSigmaFeePerLp(sigmaFeePerLpUpdated)), unit)
17101705 else throw("Strict value is not equal to itself.")
17111706 }
17121707 else throw("Strict value is not equal to itself.")
17131708 }
17141709 else throw("Strict value is not equal to itself.")
17151710 }
17161711 else throw("Strict value is not equal to itself.")
17171712 }
17181713
17191714
17201715
17211716 @Callable(i)
17221717 func getDepositAll (lpAmount_) = {
1723- let err = _validateInt(lpAmount_, 0, MAX_INT, "getDepositAll: invalid amount")
1718+ let err = _validateInt(lpAmount_, 1, MAX_INT, "getDepositAll: invalid amount")
17241719 if ((err == err))
17251720 then {
1726- let $t05160751694 = _depositAll(lpAmount_)
1727- let lpTokensToMint = $t05160751694._1
1728- let requiredAmountsNormalized = $t05160751694._2
1729- let assetBalances = $t05160751694._3
1721+ let $t05159751684 = _depositAll(lpAmount_)
1722+ let lpTokensToMint = $t05159751684._1
1723+ let requiredAmountsNormalized = $t05159751684._2
1724+ let assetBalances = $t05159751684._3
17301725 $Tuple2(nil, $Tuple2(lpTokensToMint, requiredAmountsNormalized))
17311726 }
17321727 else throw("Strict value is not equal to itself.")
17331728 }
17341729
17351730
17361731
17371732 @Callable(i)
17381733 func getDeposit (assetId_,amount_) = {
17391734 let err = if (_validateListContains(_loadAssets(), assetId_, "getDeposit: invalid asset"))
1740- then _validateInt(amount_, 0, MAX_INT, "getDeposit: invalid amount")
1735+ then _validateInt(amount_, 1, MAX_INT, "getDeposit: invalid amount")
17411736 else false
17421737 if ((err == err))
17431738 then {
17441739 let storage = _loadStorage()
17451740 let lpAssetId = storage._1
17461741 let lpDecimals = _getDecimals(toBase58String(lpAssetId))
17471742 let assetDecimals = _getDecimals(assetId_)
17481743 let amountNormalized = _normalizeDecimals(amount_, assetDecimals, lpDecimals, DOWN)
1749- let $t05245352527 = _deposit(assetId_, amountNormalized)
1750- let lpTokensToMint = $t05245352527._1
1751- let assetBalances = $t05245352527._2
1752- $Tuple2(nil, lpTokensToMint)
1744+ let $t05244352559 = _deposit(assetId_, amountNormalized)
1745+ let lpTokensToMint = $t05244352559._1
1746+ let assetBalances = $t05244352559._2
1747+ let lpFee = $t05244352559._3
1748+ let protocolFee = $t05244352559._4
1749+ let sigmaFeePerLpUpdated = $t05244352559._5
1750+ let lpTokensToSend = ((lpTokensToMint - lpFee) - protocolFee)
1751+ $Tuple2(nil, lpTokensToSend)
17531752 }
17541753 else throw("Strict value is not equal to itself.")
17551754 }
17561755
17571756
17581757
17591758 @Callable(i)
17601759 func getWithdrawAll (lpAmount_) = {
17611760 let err = _validateInt(lpAmount_, 0, MAX_INT, "getWithdrawAll: invalid amount")
17621761 if ((err == err))
17631762 then {
1764- let $t05290453022 = _withdrawAll(lpAmount_)
1765- let lpTokensToBurn = $t05290453022._1
1766- let balancesToGet = $t05290453022._2
1767- let assetBalances = $t05290453022._3
1768- let lpFee = $t05290453022._4
1769- let protocolFee = $t05290453022._5
1770- let sigmaFeePerLpUpdated = $t05290453022._6
1763+ let $t05299853074 = _withdrawAll(lpAmount_)
1764+ let lpTokensToBurn = $t05299853074._1
1765+ let balancesToGet = $t05299853074._2
1766+ let assetBalances = $t05299853074._3
17711767 $Tuple2(nil, balancesToGet)
17721768 }
17731769 else throw("Strict value is not equal to itself.")
17741770 }
17751771
17761772
17771773
17781774 @Callable(i)
17791775 func getWithdraw (assetId_,amount_) = {
17801776 let err = if (_validateListContains(_loadAssets(), assetId_, "getWithdraw: invalid asset"))
1781- then _validateInt(amount_, 0, MAX_INT, "getWithdraw: invalid amount")
1777+ then _validateInt(amount_, 1, MAX_INT, "getWithdraw: invalid amount")
17821778 else false
17831779 if ((err == err))
17841780 then {
17851781 let storage = _loadStorage()
17861782 let lpAssetId = storage._1
17871783 let lpDecimals = _getDecimals(toBase58String(lpAssetId))
1788- let $t05367353789 = _withdraw(assetId_, amount_)
1789- let targetAmountNormalized = $t05367353789._1
1790- let assetBalances = $t05367353789._2
1791- let lpFee = $t05367353789._3
1792- let protocolFee = $t05367353789._4
1793- let sigmaFeePerLpUpdated = $t05367353789._5
1784+ let $t05372553841 = _withdraw(assetId_, amount_)
1785+ let targetAmountNormalized = $t05372553841._1
1786+ let assetBalances = $t05372553841._2
1787+ let lpFee = $t05372553841._3
1788+ let protocolFee = $t05372553841._4
1789+ let sigmaFeePerLpUpdated = $t05372553841._5
17941790 let finalAmountNormalized = ((targetAmountNormalized - lpFee) - protocolFee)
17951791 let targetDecimals = _getDecimals(assetId_)
17961792 let finalAmount = _normalizeDecimals(finalAmountNormalized, lpDecimals, targetDecimals, DOWN)
17971793 $Tuple2(nil, finalAmount)
17981794 }
17991795 else throw("Strict value is not equal to itself.")
18001796 }
18011797
18021798
18031799
18041800 @Callable(i)
18051801 func getSwap (sourceAssetId_,targetAssetId_,sourceAmount_) = {
18061802 let storage = _loadStorage()
18071803 let lpAssetId = storage._1
18081804 let lpDecimals = _getDecimals(toBase58String(lpAssetId))
18091805 let assets = _loadAssets()
18101806 let sourceAssetIndex = valueOrErrorMessage(indexOf(assets, sourceAssetId_), "swap: invalid source asset")
18111807 if ((sourceAssetIndex == sourceAssetIndex))
18121808 then {
18131809 let targetAssetIndex = valueOrErrorMessage(indexOf(assets, targetAssetId_), "swap: invalid target asset")
18141810 if ((targetAssetIndex == targetAssetIndex))
18151811 then {
18161812 let sourceAmountNormalized = _normalizeDecimals(sourceAmount_, _getDecimals(sourceAssetId_), lpDecimals, DOWN)
1817- let err = if (_validateInt(sourceAmountNormalized, 0, MAX_INT, "swap: invalid source amount"))
1813+ let err = if (_validateInt(sourceAmountNormalized, 1, MAX_INT, "swap: invalid source amount"))
18181814 then _validateStringNotEq(sourceAssetId_, targetAssetId_, "swap: same assets")
18191815 else false
18201816 if ((err == err))
18211817 then {
1822- let $t05520355361 = _swap(sourceAssetIndex, targetAssetIndex, sourceAmountNormalized)
1823- let targetAmountNormalized = $t05520355361._1
1824- let finalAssetBalances = $t05520355361._2
1825- let lpFee = $t05520355361._3
1826- let protocolFee = $t05520355361._4
1827- let sigmaFeePerLpUpdated = $t05520355361._5
1818+ let $t05525555413 = _swap(sourceAssetIndex, targetAssetIndex, sourceAmountNormalized)
1819+ let targetAmountNormalized = $t05525555413._1
1820+ let finalAssetBalances = $t05525555413._2
1821+ let lpFee = $t05525555413._3
1822+ let protocolFee = $t05525555413._4
1823+ let sigmaFeePerLpUpdated = $t05525555413._5
18281824 let finalAmountNormalized = ((targetAmountNormalized - lpFee) - protocolFee)
18291825 let targetDecimals = _getDecimals(targetAssetId_)
18301826 let finalAmount = _normalizeDecimals(finalAmountNormalized, lpDecimals, targetDecimals, DOWN)
18311827 $Tuple2(nil, finalAmount)
18321828 }
18331829 else throw("Strict value is not equal to itself.")
18341830 }
18351831 else throw("Strict value is not equal to itself.")
18361832 }
18371833 else throw("Strict value is not equal to itself.")
18381834 }
18391835
18401836
18411837
18421838 @Callable(i)
18431839 func getClaim (user_) = {
18441840 let user = if ((size(user_) > 0))
18451841 then valueOrErrorMessage(addressFromString(user_), "getClaim: invalid user")
18461842 else i.caller
1847- let $t05600356059 = _checkpoint(user)
1848- let checkpointActions = $t05600356059._1
1849- let userProfits = $t05600356059._2
1843+ let $t05605556111 = _checkpoint(user)
1844+ let checkpointActions = $t05605556111._1
1845+ let userProfits = $t05605556111._2
18501846 $Tuple2(nil, userProfits)
18511847 }
18521848
18531849
18541850
18551851 @Callable(i)
18561852 func getUtilFunc () = {
18571853 let storage = _loadStorage()
18581854 let lpTotalSupply = storage._3
18591855 let weightAmplifier = storage._7
18601856 let slippageRate = storage._8
18611857 let feeMaxRate = storage._9
1862- let $t05639256452 = _loadAssetBalances()
1863- let assetBalances = $t05639256452._1
1864- let assetTotalSupply = $t05639256452._2
1865- let $t05645756510 = _loadAssetWeights()
1866- let assetWeights = $t05645756510._1
1867- let sigmaWeight = $t05645756510._2
1858+ let $t05644456504 = _loadAssetBalances()
1859+ let assetBalances = $t05644456504._1
1860+ let assetTotalSupply = $t05644456504._2
1861+ let $t05650956562 = _loadAssetWeights()
1862+ let assetWeights = $t05650956562._1
1863+ let sigmaWeight = $t05650956562._2
18681864 let fee = _calculateFee(assetBalances, assetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate)
18691865 let utilValue = (assetTotalSupply - fee)
18701866 $Tuple2(nil, $Tuple2(utilValue, lpTotalSupply))
1867+ }
1868+
1869+
1870+
1871+@Callable(i)
1872+func getFeeFunc () = {
1873+ let storage = _loadStorage()
1874+ let weightAmplifier = storage._7
1875+ let slippageRate = storage._8
1876+ let feeMaxRate = storage._9
1877+ let $t05699457054 = _loadAssetBalances()
1878+ let assetBalances = $t05699457054._1
1879+ let assetTotalSupply = $t05699457054._2
1880+ let $t05705957112 = _loadAssetWeights()
1881+ let assetWeights = $t05705957112._1
1882+ let sigmaWeight = $t05705957112._2
1883+ let fee = _calculateFee(assetBalances, assetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate)
1884+ $Tuple2(nil, fee)
18711885 }
18721886
18731887
18741888
18751889 @Callable(i)
18761890 func checkpoint (user_) = {
18771891 let err = if (_whenInitialized())
18781892 then _whenNotPaused()
18791893 else false
18801894 if ((err == err))
18811895 then {
18821896 let user = if ((size(user_) > 0))
18831897 then valueOrErrorMessage(addressFromString(user_), "checkpoint: invalid user")
18841898 else i.caller
18851899 _checkpoint(user)
18861900 }
18871901 else throw("Strict value is not equal to itself.")
18881902 }
18891903
18901904
18911905
18921906 @Callable(i)
18931907 func stake () = {
18941908 let err = if (_whenInitialized())
18951909 then _whenNotPaused()
18961910 else false
18971911 if ((err == err))
18981912 then {
18991913 let storage = _loadStorage()
19001914 let lpAssetIdStr = _assetToStr(storage._1)
19011915 let err1 = if (if (_validateIntEquals(size(i.payments), 1, "stake: invalid payments size"))
19021916 then _validateStringEqual(lpAssetIdStr, _assetToStr(i.payments[0].assetId), "stake: invalid payment asset")
19031917 else false)
19041918 then _validateInt(i.payments[0].amount, 0, MAX_INT, "stake: invalid payment amount")
19051919 else false
19061920 if ((err1 == err1))
19071921 then {
1908- let $t05758357643 = _checkpoint(i.caller)
1909- let checkpointActions = $t05758357643._1
1910- let userProfits = $t05758357643._2
1922+ let $t05812058180 = _checkpoint(i.caller)
1923+ let checkpointActions = $t05812058180._1
1924+ let userProfits = $t05812058180._2
19111925 $Tuple2(((checkpointActions ++ _saveUserLp(i.caller, (_loadUserLp(i.caller) + i.payments[0].amount))) ++ _saveTotalLp((_loadTotalLp() + i.payments[0].amount))), unit)
19121926 }
19131927 else throw("Strict value is not equal to itself.")
19141928 }
19151929 else throw("Strict value is not equal to itself.")
19161930 }
19171931
19181932
19191933
19201934 @Callable(i)
19211935 func unstake (amount_) = {
19221936 let err = if (_whenInitialized())
19231937 then _whenNotPaused()
19241938 else false
19251939 if ((err == err))
19261940 then {
19271941 let storage = _loadStorage()
19281942 let lpAssetId = storage._1
19291943 let userLp = _loadUserLp(i.caller)
19301944 let err1 = _validateInt(amount_, 0, userLp, "unstake: invalid amount")
19311945 if ((err1 == err1))
19321946 then {
1933- let $t05815458214 = _checkpoint(i.caller)
1934- let checkpointActions = $t05815458214._1
1935- let userProfits = $t05815458214._2
1947+ let $t05869158751 = _checkpoint(i.caller)
1948+ let checkpointActions = $t05869158751._1
1949+ let userProfits = $t05869158751._2
19361950 $Tuple2(((([ScriptTransfer(i.caller, amount_, lpAssetId)] ++ checkpointActions) ++ _saveUserLp(i.caller, (userLp - amount_))) ++ _saveTotalLp((_loadTotalLp() - amount_))), unit)
19371951 }
19381952 else throw("Strict value is not equal to itself.")
19391953 }
19401954 else throw("Strict value is not equal to itself.")
19411955 }
19421956
19431957
19441958
19451959 @Callable(i)
1946-func claim (user_,assets_) = {
1947- let err = if (if (_whenInitialized())
1960+func claim (user_) = {
1961+ let err = if (_whenInitialized())
19481962 then _whenNotPaused()
1949- else false)
1950- then _validateInt(size(assets_), 1, 10, "claim: invalid assets size")
19511963 else false
19521964 if ((err == err))
19531965 then {
19541966 let user = if ((size(user_) > 0))
19551967 then valueOrErrorMessage(addressFromString(user_), "claim: invalid user")
19561968 else i.caller
19571969 let storage = _loadStorage()
19581970 let lpAssetId = storage._1
19591971 let lpAssetIdStr = _assetToStr(lpAssetId)
19601972 let assets = [lpAssetIdStr, _loadAssets()]
19611973 let maxIndex = (size(assets) - 1)
19621974 let userLp = _loadUserLp(user)
1963- let $t05903759093 = _checkpoint(user)
1964- let checkpointActions = $t05903759093._1
1965- let userProfits = $t05903759093._2
1975+ let $t05947459530 = _checkpoint(user)
1976+ let checkpointActions = $t05947459530._1
1977+ let userProfits = $t05947459530._2
19661978 func foldFunc (acc,profit) = {
19671979 let index = acc._1
1968- if ((index > maxIndex))
1969- then $Tuple3((index + 1), (acc._2 :+ profit), acc._3)
1970- else {
1980+ if (if ((maxIndex >= index))
1981+ then (profit > 0)
1982+ else false)
1983+ then {
19711984 let asset = assets[index]
1972- if (containsElement(assets_, asset))
1973- then $Tuple3((index + 1), (acc._2 :+ 0), (acc._3 :+ ScriptTransfer(user, profit, _strToAsset(asset))))
1974- else $Tuple3((index + 1), (acc._2 :+ profit), acc._3)
1985+ $Tuple3((index + 1), (acc._2 :+ 0), (acc._3 :+ ScriptTransfer(user, profit, _strToAsset(asset))))
19751986 }
1987+ else $Tuple3((index + 1), (acc._2 :+ profit), acc._3)
19761988 }
19771989
1978- let $t05958259673 = {
1990+ let $t05990859999 = {
19791991 let $l = userProfits
19801992 let $s = size($l)
19811993 let $acc0 = $Tuple3(0, nil, nil)
19821994 func $f0_1 ($a,$i) = if (($i >= $s))
19831995 then $a
19841996 else foldFunc($a, $l[$i])
19851997
19861998 func $f0_2 ($a,$i) = if (($i >= $s))
19871999 then $a
19882000 else throw("List size exceeds 11")
19892001
19902002 $f0_2($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)
19912003 }
1992- let idx = $t05958259673._1
1993- let userProfitsUpdated = $t05958259673._2
1994- let profitActions = $t05958259673._3
2004+ let idx = $t05990859999._1
2005+ let userProfitsUpdated = $t05990859999._2
2006+ let profitActions = $t05990859999._3
19952007 $Tuple2(((profitActions ++ removeByIndex(checkpointActions, 0)) ++ _saveUserProfits(user, userProfitsUpdated)), unit)
19962008 }
19972009 else throw("Strict value is not equal to itself.")
19982010 }
19992011
20002012
20012013
20022014 @Callable(i)
20032015 func pause () = {
20042016 let err = if (if (_onlyPauser(i.caller))
20052017 then _whenInitialized()
20062018 else false)
20072019 then _whenNotPaused()
20082020 else false
20092021 if ((err == err))
20102022 then $Tuple2(_savePause(true), unit)
20112023 else throw("Strict value is not equal to itself.")
20122024 }
20132025
20142026
20152027
20162028 @Callable(i)
20172029 func unpause () = {
20182030 let err = if (if (_onlyPauser(i.caller))
20192031 then _whenInitialized()
20202032 else false)
20212033 then _whenPaused()
20222034 else false
20232035 if ((err == err))
20242036 then $Tuple2(_savePause(false), unit)
20252037 else throw("Strict value is not equal to itself.")
20262038 }
20272039
20282040
20292041
20302042 @Callable(i)
20312043 func updatePauser (pauser_) = {
20322044 let err = if (if (_onlyThisContract(i.caller))
20332045 then _whenInitialized()
20342046 else false)
20352047 then _validateAddress(pauser_, "updatePauser: invalid pauser")
20362048 else false
20372049 if ((err == err))
20382050 then $Tuple2(_savePauser(addressFromStringValue(pauser_)), unit)
20392051 else throw("Strict value is not equal to itself.")
20402052 }
20412053
20422054
20432055
20442056 @Callable(i)
20452057 func setMultisig (multisig_) = {
20462058 let err = if (_onlyThisContract(i.caller))
20472059 then _validateAddress(multisig_, "setMultisig: invalid multisig")
20482060 else false
20492061 if ((err == err))
20502062 then $Tuple2(_saveMultisig(addressFromStringValue(multisig_)), unit)
20512063 else throw("Strict value is not equal to itself.")
20522064 }
20532065
20542066
20552067 @Verifier(tx)
20562068 func verify () = match getString(KEY_MULTISIG) {
20572069 case multisig: String =>
20582070 valueOrElse(getBoolean(addressFromStringValue(multisig), makeString([KEY_STATUS, toString(this), toBase58String(tx.id)], SEP)), false)
20592071 case _ =>
20602072 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
20612073 }
20622074

github/deemru/w8io/169f3d6 
266.51 ms