tx · Hf3fvNhNvCyWnakTSnRyHEJT4VV933TgkD6LXrUQcEW2 3Mw8ZcMK47vENHqhYYhCZTCPDXhff6ZQVwt: -0.06200000 Waves 2023.11.02 18:13 [2825884] smart account 3Mw8ZcMK47vENHqhYYhCZTCPDXhff6ZQVwt > SELF 0.00000000 Waves
{ "type": 13, "id": "Hf3fvNhNvCyWnakTSnRyHEJT4VV933TgkD6LXrUQcEW2", "fee": 6200000, "feeAssetId": null, "timestamp": 1698937784430, "version": 2, "chainId": 84, "sender": "3Mw8ZcMK47vENHqhYYhCZTCPDXhff6ZQVwt", "senderPublicKey": "3fNYAZ872D7hsaic3sPDZd5uAk59U5CiWiA153FUZ6Qv", "proofs": [ "5MHyeZpXjq8X3ZqqgaSGwwgn5L8aZMBcqALgdDQuPBV1sAdfbg8T3EDQtpXJx1m1tQ1Ja2hgpEuqoyW7HC84Kc9p" ], "script": "base64:BgJ3CAISEAoOGBgBAQgIAQEBAQEIAQgSAwoBARIDCgEBEgASBAoCCAESBAoCCAESAwoBARIECgIIARIDCgEBEgQKAggBEgUKAwgIARIDCgEIEgASABIDCgEIEgASAwoBARIDCgEIEgASABIDCgEIEgQKAggBEgMKAQh7AANTRVACAl9fAAVXQVZFUwIFd2F2ZXMAB01BWF9JTlQA//////////9/AAdNQVhfRkVFAMCEPQANTUFYX0FNUExJRklFUgDAhD0AFE1BWF9XRUlHSFRfQU1QTElGSUVSAMCEPQAKTUFYX1dFSUdIVADAhD0AFFNMSVBQQUdFX1JBVEVfRkFDVE9SAMCEPQAPRkVFX1JBVEVfRkFDVE9SAMCEPQALUkFURV9GQUNUT1IAwIQ9AA5QRVJDRU5UX0ZBQ1RPUgkAtgIBAICAkLu61q3wDQAQWkVST19JTlRfTElTVF8xMAkAzAgCAAAJAMwIAgAACQDMCAIAAAkAzAgCAAAJAMwIAgAACQDMCAIAAAkAzAgCAAAJAMwIAgAACQDMCAIAAAkAzAgCAAAFA25pbAAQWkVST19JTlRfTElTVF8xMQkAzQgC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GVJbnQEBQdvZmZzZXRfAAAFB01BWF9JTlQCHnVwZGF0ZVdhdGNoZG9nOiBpbnZhbGlkIG9mZnNldAcDCQAAAgUDZXJyBQNlcnIJAJQKAgkAzggCCQENX3NhdmVXYXRjaGRvZwEJARFAZXh0ck5hdGl2ZSgxMDYyKQEFCXdhdGNoZG9nXwkBE19zYXZlV2F0Y2hkb2dPZmZzZXQBBQdvZmZzZXRfBQR1bml0CQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAWkBC3NldE11bHRpc2lnAQltdWx0aXNpZ18EA2VycgMJARFfb25seVRoaXNDb250cmFjdAEIBQFpBmNhbGxlcgkBEF92YWxpZGF0ZUFkZHJlc3MCBQltdWx0aXNpZ18CHXNldE11bHRpc2lnOiBpbnZhbGlkIG11bHRpc2lnBwMJAAACBQNlcnIFA2VycgkAlAoCCQENX3NhdmVNdWx0aXNpZwEJARFAZXh0ck5hdGl2ZSgxMDYyKQEFCW11bHRpc2lnXwUEdW5pdAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECdHgBBnZlcmlmeQAEByRtYXRjaDAJAKIIAQUMS0VZX01VTFRJU0lHAwkAAQIFByRtYXRjaDACBlN0cmluZwQIbXVsdGlzaWcFByRtYXRjaDAJAQt2YWx1ZU9yRWxzZQIJAJsIAgkBEUBleHRyTmF0aXZlKDEwNjIpAQUIbXVsdGlzaWcJALkJAgkAzAgCBQpLRVlfU1RBVFVTCQDMCAIJAKUIAQUEdGhpcwkAzAgCCQDYBAEIBQJ0eAJpZAUDbmlsBQNTRVAHCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5ycwuuQ==", "height": 2825884, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7EYmVN4bsGkpXRNwu8omCtmm7inQu7pZqWhPjn9m9t5S Next: Er7uFsXJfxS9Ea4GyEdiSrNABexJ31bC8VV9EsQ2rJqq Diff:
Old | New | Differences | |
---|---|---|---|
1023 | 1023 | } | |
1024 | 1024 | ||
1025 | 1025 | ||
1026 | - | func _validateAllocation (assetBalances_,assetTotalSupply_,prevAssetBalances_,prevAssetTotalSupply_,assetWeights_,sigmaWeight_,maxAllocAmp_) = { | |
1027 | - | func foldFunc (acc,elem) = { | |
1028 | - | let index = acc._1 | |
1029 | - | $Tuple2((index + 1), if (acc._2) | |
1030 | - | then _validateAssetAllocation(elem, assetTotalSupply_, prevAssetBalances_[index], prevAssetTotalSupply_, assetWeights_[index], sigmaWeight_, maxAllocAmp_) | |
1031 | - | else false) | |
1032 | - | } | |
1033 | - | ||
1034 | - | let result = { | |
1035 | - | let $l = assetBalances_ | |
1036 | - | let $s = size($l) | |
1037 | - | let $acc0 = $Tuple2(0, true) | |
1038 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1039 | - | then $a | |
1040 | - | else foldFunc($a, $l[$i]) | |
1041 | - | ||
1042 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1043 | - | then $a | |
1044 | - | else throw("List size exceeds 10") | |
1045 | - | ||
1046 | - | $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) | |
1047 | - | } | |
1048 | - | result._2 | |
1049 | - | } | |
1026 | + | func _validateAllocation (assetBalances_,assetTotalSupply_,prevAssetBalances_,prevAssetTotalSupply_,assetWeights_,sigmaWeight_,maxAllocAmp_) = true | |
1050 | 1027 | ||
1051 | 1028 | ||
1052 | 1029 | func _checkpoint (user_) = { | |
1060 | 1037 | $Tuple2((index + 1), (acc._2 :+ profitUpdated)) | |
1061 | 1038 | } | |
1062 | 1039 | ||
1063 | - | let $ | |
1040 | + | let $t02555825631 = { | |
1064 | 1041 | let $l = ZERO_INT_LIST_11 | |
1065 | 1042 | let $s = size($l) | |
1066 | 1043 | let $acc0 = $Tuple2(0, nil) | |
1074 | 1051 | ||
1075 | 1052 | $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) | |
1076 | 1053 | } | |
1077 | - | let idx = $ | |
1078 | - | let profitsUpdated = $ | |
1054 | + | let idx = $t02555825631._1 | |
1055 | + | let profitsUpdated = $t02555825631._2 | |
1079 | 1056 | $Tuple2((_saveUserProfits(user_, profitsUpdated) ++ _saveUserSigmaFeePerLp(user_, sigmaFeePerLp)), profitsUpdated) | |
1080 | 1057 | } | |
1081 | 1058 | ||
1089 | 1066 | $Tuple2((index + 1), (acc._2 :+ sigmaFeePerLpUpdated)) | |
1090 | 1067 | } | |
1091 | 1068 | ||
1092 | - | let $ | |
1069 | + | let $t02628126360 = { | |
1093 | 1070 | let $l = ZERO_INT_LIST_11 | |
1094 | 1071 | let $s = size($l) | |
1095 | 1072 | let $acc0 = $Tuple2(0, nil) | |
1103 | 1080 | ||
1104 | 1081 | $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) | |
1105 | 1082 | } | |
1106 | - | let idx = $ | |
1107 | - | let sigmaFeePerLpUpdated = $ | |
1083 | + | let idx = $t02628126360._1 | |
1084 | + | let sigmaFeePerLpUpdated = $t02628126360._2 | |
1108 | 1085 | sigmaFeePerLpUpdated | |
1109 | 1086 | } | |
1110 | 1087 | ||
1112 | 1089 | func _calculateLpAndProtocolFees (assetIndex_,amount_,lpFeeRate_,protocolFeeRate_) = { | |
1113 | 1090 | let sigmaFeePerLp = _loadSigmaFeePerLp() | |
1114 | 1091 | let totalLp = _loadTotalLp() | |
1115 | - | let $ | |
1092 | + | let $t02658126856 = if ((totalLp == 0)) | |
1116 | 1093 | then $Tuple2(0, fraction(amount_, protocolFeeRate_, MAX_FEE)) | |
1117 | 1094 | else $Tuple2(fraction(amount_, lpFeeRate_, MAX_FEE), fraction(amount_, protocolFeeRate_, MAX_FEE)) | |
1118 | - | let lpFee = $ | |
1119 | - | let protocolFee = $ | |
1095 | + | let lpFee = $t02658126856._1 | |
1096 | + | let protocolFee = $t02658126856._2 | |
1120 | 1097 | let sigmaFeePerLpUpdated = if ((lpFee == 0)) | |
1121 | 1098 | then sigmaFeePerLp | |
1122 | 1099 | else _updateSigmaFeePerLp(sigmaFeePerLp, totalLp, assetIndex_, lpFee) | |
1131 | 1108 | let slippageRate = storage._8 | |
1132 | 1109 | let feeMaxRate = storage._9 | |
1133 | 1110 | let assets = _loadAssets() | |
1134 | - | let $ | |
1135 | - | let assetWeights = $ | |
1136 | - | let sigmaWeight = $ | |
1137 | - | let $ | |
1138 | - | let prevAssetBalances = $ | |
1139 | - | let prevAssetTotalSupply = $ | |
1140 | - | let $ | |
1111 | + | let $t02736527418 = _loadAssetWeights() | |
1112 | + | let assetWeights = $t02736527418._1 | |
1113 | + | let sigmaWeight = $t02736527418._2 | |
1114 | + | let $t02742327491 = _loadAssetBalances() | |
1115 | + | let prevAssetBalances = $t02742327491._1 | |
1116 | + | let prevAssetTotalSupply = $t02742327491._2 | |
1117 | + | let $t02749728727 = if ((prevAssetTotalSupply == 0)) | |
1141 | 1118 | then { | |
1142 | 1119 | func foldFunc (acc,elem) = { | |
1143 | 1120 | let index = acc._1 | |
1145 | 1122 | $Tuple2((index + 1), (acc._2 :+ requiredAmountNormalized)) | |
1146 | 1123 | } | |
1147 | 1124 | ||
1148 | - | let $ | |
1125 | + | let $t02793928013 = { | |
1149 | 1126 | let $l = assets | |
1150 | 1127 | let $s = size($l) | |
1151 | 1128 | let $acc0 = $Tuple2(0, nil) | |
1159 | 1136 | ||
1160 | 1137 | $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) | |
1161 | 1138 | } | |
1162 | - | let idx = $ | |
1163 | - | let requiredAmountsNormalized = $ | |
1139 | + | let idx = $t02793928013._1 | |
1140 | + | let requiredAmountsNormalized = $t02793928013._2 | |
1164 | 1141 | $Tuple2(amount_, requiredAmountsNormalized) | |
1165 | 1142 | } | |
1166 | 1143 | else { | |
1171 | 1148 | $Tuple2((index + 1), (acc._2 :+ requiredAmountNormalized)) | |
1172 | 1149 | } | |
1173 | 1150 | ||
1174 | - | let $ | |
1151 | + | let $t02855628631 = { | |
1175 | 1152 | let $l = assets | |
1176 | 1153 | let $s = size($l) | |
1177 | 1154 | let $acc0 = $Tuple2(0, nil) | |
1185 | 1162 | ||
1186 | 1163 | $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) | |
1187 | 1164 | } | |
1188 | - | let idx = $ | |
1189 | - | let requiredAmountsNormalized = $ | |
1165 | + | let idx = $t02855628631._1 | |
1166 | + | let requiredAmountsNormalized = $t02855628631._2 | |
1190 | 1167 | $Tuple2(fraction(amount_, lpTotalSupply, prevAssetTotalSupply), requiredAmountsNormalized) | |
1191 | 1168 | } | |
1192 | - | let lpTokensToMint = $ | |
1193 | - | let requiredAmountsNormalized = $ | |
1194 | - | let $ | |
1195 | - | let assetBalances = $ | |
1196 | - | let assetTotalSupply = $ | |
1169 | + | let lpTokensToMint = $t02749728727._1 | |
1170 | + | let requiredAmountsNormalized = $t02749728727._2 | |
1171 | + | let $t02873328846 = _incrementBalancesByAmounts(prevAssetBalances, requiredAmountsNormalized) | |
1172 | + | let assetBalances = $t02873328846._1 | |
1173 | + | let assetTotalSupply = $t02873328846._2 | |
1197 | 1174 | let err2 = _validateLiquidityInvariant(prevAssetBalances, prevAssetTotalSupply, assetBalances, assetTotalSupply, lpTotalSupply, (lpTotalSupply + lpTokensToMint), assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate) | |
1198 | 1175 | if ((err2 == err2)) | |
1199 | 1176 | then $Tuple3(lpTokensToMint, requiredAmountsNormalized, assetBalances) | |
1211 | 1188 | let slippageRate = storage._8 | |
1212 | 1189 | let feeMaxRate = storage._9 | |
1213 | 1190 | let assets = _loadAssets() | |
1214 | - | let $ | |
1215 | - | let assetWeights = $ | |
1216 | - | let sigmaWeight = $ | |
1217 | - | let $ | |
1218 | - | let prevAssetBalances = $ | |
1219 | - | let prevAssetTotalSupply = $ | |
1191 | + | let $t02960929662 = _loadAssetWeights() | |
1192 | + | let assetWeights = $t02960929662._1 | |
1193 | + | let sigmaWeight = $t02960929662._2 | |
1194 | + | let $t02966729781 = _loadAssetBalances() | |
1195 | + | let prevAssetBalances = $t02966729781._1 | |
1196 | + | let prevAssetTotalSupply = $t02966729781._2 | |
1220 | 1197 | let assetBalances = _incrementBalanceByIndex(prevAssetBalances, value(indexOf(assets, assetId_)), amount_) | |
1221 | 1198 | let assetTotalSupply = (prevAssetTotalSupply + amount_) | |
1222 | 1199 | let err2 = _validateAllocation(assetBalances, assetTotalSupply, prevAssetBalances, prevAssetTotalSupply, assetWeights, sigmaWeight, maxAllocAmplifier) | |
1236 | 1213 | then lpTokensToMintInner | |
1237 | 1214 | else throw("Strict value is not equal to itself.") | |
1238 | 1215 | } | |
1239 | - | let $ | |
1240 | - | let lpFee = $ | |
1241 | - | let protocolFee = $ | |
1242 | - | let sigmaFeePerLpUpdated = $ | |
1216 | + | let $t03144331574 = _calculateLpAndProtocolFees(0, lpTokensToMint, (lpFeeRate / 2), (protocolFeeRate / 2)) | |
1217 | + | let lpFee = $t03144331574._1 | |
1218 | + | let protocolFee = $t03144331574._2 | |
1219 | + | let sigmaFeePerLpUpdated = $t03144331574._3 | |
1243 | 1220 | $Tuple5(lpTokensToMint, assetBalances, lpFee, protocolFee, sigmaFeePerLpUpdated) | |
1244 | 1221 | } | |
1245 | 1222 | else throw("Strict value is not equal to itself.") | |
1253 | 1230 | let weightAmplifier = storage._7 | |
1254 | 1231 | let slippageRate = storage._8 | |
1255 | 1232 | let feeMaxRate = storage._9 | |
1256 | - | let $ | |
1257 | - | let prevAssetBalances = $ | |
1258 | - | let prevAssetTotalSupply = $ | |
1259 | - | let $ | |
1260 | - | let assetWeights = $ | |
1261 | - | let sigmaWeight = $ | |
1233 | + | let $t03190831976 = _loadAssetBalances() | |
1234 | + | let prevAssetBalances = $t03190831976._1 | |
1235 | + | let prevAssetTotalSupply = $t03190831976._2 | |
1236 | + | let $t03198132034 = _loadAssetWeights() | |
1237 | + | let assetWeights = $t03198132034._1 | |
1238 | + | let sigmaWeight = $t03198132034._2 | |
1262 | 1239 | let lpTokensToBurn = amount_ | |
1263 | 1240 | let err = _validateInt(lpTokensToBurn, 0, MAX_INT, "_withdrawAll: lpTokensToBurn less than 0") | |
1264 | 1241 | if ((err == err)) | |
1265 | 1242 | then { | |
1266 | - | let $ | |
1267 | - | let assetBalances = $ | |
1268 | - | let assetTotalSupply = $ | |
1269 | - | let balancesToPay = $ | |
1243 | + | let $t03217632309 = _decrementBalancesByLpAmount(prevAssetBalances, lpTokensToBurn, lpTotalSupply) | |
1244 | + | let assetBalances = $t03217632309._1 | |
1245 | + | let assetTotalSupply = $t03217632309._2 | |
1246 | + | let balancesToPay = $t03217632309._3 | |
1270 | 1247 | let err2 = _validateLiquidityInvariant(prevAssetBalances, prevAssetTotalSupply, assetBalances, assetTotalSupply, lpTotalSupply, (lpTotalSupply - lpTokensToBurn), assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate) | |
1271 | 1248 | if ((err2 == err2)) | |
1272 | 1249 | then $Tuple3(lpTokensToBurn, balancesToPay, assetBalances) | |
1287 | 1264 | let feeMaxRate = storage._9 | |
1288 | 1265 | let precision = _loadPrecision() | |
1289 | 1266 | let assets = _loadAssets() | |
1290 | - | let $ | |
1291 | - | let prevAssetBalances = $ | |
1292 | - | let prevAssetTotalSupply = $ | |
1293 | - | let $ | |
1294 | - | let assetWeights = $ | |
1295 | - | let sigmaWeight = $ | |
1267 | + | let $t03310133169 = _loadAssetBalances() | |
1268 | + | let prevAssetBalances = $t03310133169._1 | |
1269 | + | let prevAssetTotalSupply = $t03310133169._2 | |
1270 | + | let $t03317433227 = _loadAssetWeights() | |
1271 | + | let assetWeights = $t03317433227._1 | |
1272 | + | let sigmaWeight = $t03317433227._2 | |
1296 | 1273 | let targetAssetIndex = value(indexOf(assets, assetId_)) | |
1297 | 1274 | let prevFee = _calculateFee(prevAssetBalances, prevAssetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate) | |
1298 | 1275 | let prevUtilValue = (prevAssetTotalSupply - prevFee) | |
1319 | 1296 | ||
1320 | 1297 | let targetAmount = { | |
1321 | 1298 | let stop = toInt(fraction(toBigInt((lpAmount_ + prevFee)), prevUtilValueDivLp, PERCENT_FACTOR, CEILING)) | |
1322 | - | let $ | |
1299 | + | let $t03509335205 = { | |
1323 | 1300 | let $l = LIST_64 | |
1324 | 1301 | let $s = size($l) | |
1325 | 1302 | let $acc0 = $Tuple5(false, 0, stop, 0, 0) | |
1333 | 1310 | ||
1334 | 1311 | $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) | |
1335 | 1312 | } | |
1336 | - | let success = $ | |
1337 | - | let startOut = $ | |
1338 | - | let stopOut = $ | |
1339 | - | let targetAmountOut = $ | |
1340 | - | let diffOut = $ | |
1313 | + | let success = $t03509335205._1 | |
1314 | + | let startOut = $t03509335205._2 | |
1315 | + | let stopOut = $t03509335205._3 | |
1316 | + | let targetAmountOut = $t03509335205._4 | |
1317 | + | let diffOut = $t03509335205._5 | |
1341 | 1318 | if (!(success)) | |
1342 | 1319 | then throw(((("_withdraw: can't calculate targetAmount=" + toString(targetAmountOut)) + ",diff=") + toString(diffOut))) | |
1343 | 1320 | else targetAmountOut | |
1349 | 1326 | else false | |
1350 | 1327 | if ((err1 == err1)) | |
1351 | 1328 | then { | |
1352 | - | let $ | |
1353 | - | let lpFee = $ | |
1354 | - | let protocolFee = $ | |
1355 | - | let sigmaFeePerLpUpdated = $ | |
1329 | + | let $t03619736345 = _calculateLpAndProtocolFees((targetAssetIndex + 1), targetAmount, (lpFeeRate / 2), (protocolFeeRate / 2)) | |
1330 | + | let lpFee = $t03619736345._1 | |
1331 | + | let protocolFee = $t03619736345._2 | |
1332 | + | let sigmaFeePerLpUpdated = $t03619736345._3 | |
1356 | 1333 | $Tuple5(targetAmount, finalAssetBalances, lpFee, protocolFee, sigmaFeePerLpUpdated) | |
1357 | 1334 | } | |
1358 | 1335 | else throw("Strict value is not equal to itself.") | |
1371 | 1348 | let slippageRate = storage._8 | |
1372 | 1349 | let feeMaxRate = storage._9 | |
1373 | 1350 | let precision = _loadPrecision() | |
1374 | - | let $ | |
1375 | - | let prevAssetBalances = $ | |
1376 | - | let prevAssetTotalSupply = $ | |
1377 | - | let $ | |
1378 | - | let assetWeights = $ | |
1379 | - | let sigmaWeight = $ | |
1351 | + | let $t03692736995 = _loadAssetBalances() | |
1352 | + | let prevAssetBalances = $t03692736995._1 | |
1353 | + | let prevAssetTotalSupply = $t03692736995._2 | |
1354 | + | let $t03700037053 = _loadAssetWeights() | |
1355 | + | let assetWeights = $t03700037053._1 | |
1356 | + | let sigmaWeight = $t03700037053._2 | |
1380 | 1357 | let assetBalances = _incrementBalanceByIndex(prevAssetBalances, sourceAssetIndex_, sourceAmount_) | |
1381 | 1358 | let assetTotalSupply = (prevAssetTotalSupply + sourceAmount_) | |
1382 | 1359 | let prevFee = _calculateFee(prevAssetBalances, prevAssetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate) | |
1408 | 1385 | if ((feeDiff == 0)) | |
1409 | 1386 | then targetAmount | |
1410 | 1387 | else { | |
1411 | - | let $ | |
1388 | + | let $t03902639157 = { | |
1412 | 1389 | let $l = LIST_64 | |
1413 | 1390 | let $s = size($l) | |
1414 | 1391 | let $acc0 = $Tuple5(false, 0, (sourceAmount_ + prevFee), 0, 0) | |
1422 | 1399 | ||
1423 | 1400 | $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) | |
1424 | 1401 | } | |
1425 | - | let success = $ | |
1426 | - | let startOut = $ | |
1427 | - | let stopOut = $ | |
1428 | - | let targetAmountOut = $ | |
1429 | - | let diffOut = $ | |
1402 | + | let success = $t03902639157._1 | |
1403 | + | let startOut = $t03902639157._2 | |
1404 | + | let stopOut = $t03902639157._3 | |
1405 | + | let targetAmountOut = $t03902639157._4 | |
1406 | + | let diffOut = $t03902639157._5 | |
1430 | 1407 | if (!(success)) | |
1431 | 1408 | then throw(((("_swap: can't calculate targetAmount=" + toString(targetAmountOut)) + ",diff=") + toString(diffOut))) | |
1432 | 1409 | else targetAmountOut | |
1439 | 1416 | else false | |
1440 | 1417 | if ((err1 == err1)) | |
1441 | 1418 | then { | |
1442 | - | let $ | |
1443 | - | let lpFee = $ | |
1444 | - | let protocolFee = $ | |
1445 | - | let sigmaFeePerLpUpdated = $ | |
1419 | + | let $t04000440145 = _calculateLpAndProtocolFees((targetAssetIndex_ + 1), targetAmount, lpFeeRate, protocolFeeRate) | |
1420 | + | let lpFee = $t04000440145._1 | |
1421 | + | let protocolFee = $t04000440145._2 | |
1422 | + | let sigmaFeePerLpUpdated = $t04000440145._3 | |
1446 | 1423 | $Tuple5(targetAmount, finalAssetBalances, lpFee, protocolFee, sigmaFeePerLpUpdated) | |
1447 | 1424 | } | |
1448 | 1425 | else throw("Strict value is not equal to itself.") | |
1488 | 1465 | else false | |
1489 | 1466 | if ((err == err)) | |
1490 | 1467 | then { | |
1491 | - | let $ | |
1492 | - | let assetWeights = $ | |
1493 | - | let sigmaWeight = $ | |
1468 | + | let $t04200842077 = _prepareAssetWeights(assetWeights_) | |
1469 | + | let assetWeights = $t04200842077._1 | |
1470 | + | let sigmaWeight = $t04200842077._2 | |
1494 | 1471 | let assetBalances = _prepareAssetBalances(assets_) | |
1495 | 1472 | let issue = Issue(lpTokenName_, lpTokenDescr_, 0, lpTokenDecimals_, true) | |
1496 | 1473 | let lpAssetId = calculateAssetId(issue) | |
1515 | 1492 | let lpAssetId = storage._1 | |
1516 | 1493 | let lpDecimals = _getDecimals(toBase58String(lpAssetId)) | |
1517 | 1494 | let assets = _loadAssets() | |
1518 | - | let $ | |
1519 | - | let lpTokensToMint = $ | |
1520 | - | let requiredAmountsNormalized = $ | |
1521 | - | let assetBalances = $ | |
1495 | + | let $t04382743912 = _depositAll(amount_) | |
1496 | + | let lpTokensToMint = $t04382743912._1 | |
1497 | + | let requiredAmountsNormalized = $t04382743912._2 | |
1498 | + | let assetBalances = $t04382743912._3 | |
1522 | 1499 | func foldFunc (acc,elem) = { | |
1523 | 1500 | let index = acc._1 | |
1524 | 1501 | let paymentAssetStr = _assetToStr(i.payments[index].assetId) | |
1542 | 1519 | else throw("Strict value is not equal to itself.") | |
1543 | 1520 | } | |
1544 | 1521 | ||
1545 | - | let $ | |
1522 | + | let $t04505545117 = { | |
1546 | 1523 | let $l = assets | |
1547 | 1524 | let $s = size($l) | |
1548 | 1525 | let $acc0 = $Tuple2(0, nil) | |
1556 | 1533 | ||
1557 | 1534 | $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) | |
1558 | 1535 | } | |
1559 | - | let idx = $ | |
1560 | - | let changeActions = $ | |
1536 | + | let idx = $t04505545117._1 | |
1537 | + | let changeActions = $t04505545117._2 | |
1561 | 1538 | let storageUpdated = $Tuple10(storage._1, storage._2, (storage._3 + lpTokensToMint), storage._4, storage._5, storage._6, storage._7, storage._8, storage._9, storage._10) | |
1562 | 1539 | $Tuple2(((([Reissue(lpAssetId, lpTokensToMint, true), ScriptTransfer(i.caller, lpTokensToMint, lpAssetId)] ++ _saveStorage(storageUpdated)) ++ _saveAssetBalances(assetBalances)) ++ changeActions), unit) | |
1563 | 1540 | } | |
1591 | 1568 | let assetStr = _assetToStr(i.payments[0].assetId) | |
1592 | 1569 | let assetDecimals = _getDecimals(assetStr) | |
1593 | 1570 | let amountNormalized = _normalizeDecimals(i.payments[0].amount, assetDecimals, lpDecimals, DOWN) | |
1594 | - | let $ | |
1595 | - | let lpTokensToMint = $ | |
1596 | - | let assetBalances = $ | |
1597 | - | let lpFee = $ | |
1598 | - | let protocolFee = $ | |
1599 | - | let sigmaFeePerLpUpdated = $ | |
1571 | + | let $t04655746673 = _deposit(assetStr, amountNormalized) | |
1572 | + | let lpTokensToMint = $t04655746673._1 | |
1573 | + | let assetBalances = $t04655746673._2 | |
1574 | + | let lpFee = $t04655746673._3 | |
1575 | + | let protocolFee = $t04655746673._4 | |
1576 | + | let sigmaFeePerLpUpdated = $t04655746673._5 | |
1600 | 1577 | let lpTokensToSend = ((lpTokensToMint - lpFee) - protocolFee) | |
1601 | 1578 | let err2 = _validateInt(lpTokensToSend, minLpAmount_, MAX_INT, "deposit: less than min") | |
1602 | 1579 | if ((err2 == err2)) | |
1629 | 1606 | else false | |
1630 | 1607 | if ((err == err)) | |
1631 | 1608 | then { | |
1632 | - | let $ | |
1633 | - | let lpTokensToBurn = $ | |
1634 | - | let balancesToPay = $ | |
1635 | - | let assetBalances = $ | |
1609 | + | let $t04813448221 = _withdrawAll(i.payments[0].amount) | |
1610 | + | let lpTokensToBurn = $t04813448221._1 | |
1611 | + | let balancesToPay = $t04813448221._2 | |
1612 | + | let assetBalances = $t04813448221._3 | |
1636 | 1613 | let paymentActions = _getPaymentsFromBalances(assets, balancesToPay, i.caller, lpDecimals) | |
1637 | 1614 | let storageUpdated = $Tuple10(storage._1, storage._2, (storage._3 - lpTokensToBurn), storage._4, storage._5, storage._6, storage._7, storage._8, storage._9, storage._10) | |
1638 | 1615 | $Tuple2(((([Burn(lpAssetId, lpTokensToBurn)] ++ paymentActions) ++ _saveStorage(storageUpdated)) ++ _saveAssetBalances(assetBalances)), unit) | |
1666 | 1643 | else false | |
1667 | 1644 | if ((err == err)) | |
1668 | 1645 | then { | |
1669 | - | let $ | |
1670 | - | let targetAmountNormalized = $ | |
1671 | - | let finalAssetBalances = $ | |
1672 | - | let lpFee = $ | |
1673 | - | let protocolFee = $ | |
1674 | - | let sigmaFeePerLpUpdated = $ | |
1646 | + | let $t04957549709 = _withdraw(assetId_, i.payments[0].amount) | |
1647 | + | let targetAmountNormalized = $t04957549709._1 | |
1648 | + | let finalAssetBalances = $t04957549709._2 | |
1649 | + | let lpFee = $t04957549709._3 | |
1650 | + | let protocolFee = $t04957549709._4 | |
1651 | + | let sigmaFeePerLpUpdated = $t04957549709._5 | |
1675 | 1652 | let finalAmountNormalized = ((targetAmountNormalized - lpFee) - protocolFee) | |
1676 | 1653 | let targetDecimals = _getDecimals(assetId_) | |
1677 | 1654 | let finalAmount = _normalizeDecimals(finalAmountNormalized, lpDecimals, targetDecimals, DOWN) | |
1717 | 1694 | else false | |
1718 | 1695 | if ((err == err)) | |
1719 | 1696 | then { | |
1720 | - | let $ | |
1721 | - | let targetAmountNormalized = $ | |
1722 | - | let finalAssetBalances = $ | |
1723 | - | let lpFee = $ | |
1724 | - | let protocolFee = $ | |
1725 | - | let sigmaFeePerLpUpdated = $ | |
1697 | + | let $t05182251980 = _swap(sourceAssetIndex, targetAssetIndex, sourceAmountNormalized) | |
1698 | + | let targetAmountNormalized = $t05182251980._1 | |
1699 | + | let finalAssetBalances = $t05182251980._2 | |
1700 | + | let lpFee = $t05182251980._3 | |
1701 | + | let protocolFee = $t05182251980._4 | |
1702 | + | let sigmaFeePerLpUpdated = $t05182251980._5 | |
1726 | 1703 | let finalAmountNormalized = ((targetAmountNormalized - lpFee) - protocolFee) | |
1727 | 1704 | let targetDecimals = _getDecimals(targetAssetId_) | |
1728 | 1705 | let finalAmount = _normalizeDecimals(finalAmountNormalized, lpDecimals, targetDecimals, DOWN) | |
1745 | 1722 | let err = _validateInt(lpAmount_, 1, MAX_INT, "getDepositAll: invalid amount") | |
1746 | 1723 | if ((err == err)) | |
1747 | 1724 | then { | |
1748 | - | let $ | |
1749 | - | let lpTokensToMint = $ | |
1750 | - | let requiredAmountsNormalized = $ | |
1751 | - | let assetBalances = $ | |
1725 | + | let $t05310053187 = _depositAll(lpAmount_) | |
1726 | + | let lpTokensToMint = $t05310053187._1 | |
1727 | + | let requiredAmountsNormalized = $t05310053187._2 | |
1728 | + | let assetBalances = $t05310053187._3 | |
1752 | 1729 | $Tuple2(nil, $Tuple2(lpTokensToMint, requiredAmountsNormalized)) | |
1753 | 1730 | } | |
1754 | 1731 | else throw("Strict value is not equal to itself.") | |
1768 | 1745 | let lpDecimals = _getDecimals(toBase58String(lpAssetId)) | |
1769 | 1746 | let assetDecimals = _getDecimals(assetId_) | |
1770 | 1747 | let amountNormalized = _normalizeDecimals(amount_, assetDecimals, lpDecimals, DOWN) | |
1771 | - | let $ | |
1772 | - | let lpTokensToMint = $ | |
1773 | - | let assetBalances = $ | |
1774 | - | let lpFee = $ | |
1775 | - | let protocolFee = $ | |
1776 | - | let sigmaFeePerLpUpdated = $ | |
1748 | + | let $t05394654062 = _deposit(assetId_, amountNormalized) | |
1749 | + | let lpTokensToMint = $t05394654062._1 | |
1750 | + | let assetBalances = $t05394654062._2 | |
1751 | + | let lpFee = $t05394654062._3 | |
1752 | + | let protocolFee = $t05394654062._4 | |
1753 | + | let sigmaFeePerLpUpdated = $t05394654062._5 | |
1777 | 1754 | let lpTokensToSend = ((lpTokensToMint - lpFee) - protocolFee) | |
1778 | 1755 | $Tuple2(nil, lpTokensToSend) | |
1779 | 1756 | } | |
1787 | 1764 | let err = _validateInt(lpAmount_, 0, MAX_INT, "getWithdrawAll: invalid amount") | |
1788 | 1765 | if ((err == err)) | |
1789 | 1766 | then { | |
1790 | - | let $ | |
1791 | - | let lpTokensToBurn = $ | |
1792 | - | let balancesToGet = $ | |
1793 | - | let assetBalances = $ | |
1767 | + | let $t05450154577 = _withdrawAll(lpAmount_) | |
1768 | + | let lpTokensToBurn = $t05450154577._1 | |
1769 | + | let balancesToGet = $t05450154577._2 | |
1770 | + | let assetBalances = $t05450154577._3 | |
1794 | 1771 | $Tuple2(nil, balancesToGet) | |
1795 | 1772 | } | |
1796 | 1773 | else throw("Strict value is not equal to itself.") | |
1808 | 1785 | let storage = _loadStorage() | |
1809 | 1786 | let lpAssetId = storage._1 | |
1810 | 1787 | let lpDecimals = _getDecimals(toBase58String(lpAssetId)) | |
1811 | - | let $ | |
1812 | - | let targetAmountNormalized = $ | |
1813 | - | let assetBalances = $ | |
1814 | - | let lpFee = $ | |
1815 | - | let protocolFee = $ | |
1816 | - | let sigmaFeePerLpUpdated = $ | |
1788 | + | let $t05522855344 = _withdraw(assetId_, amount_) | |
1789 | + | let targetAmountNormalized = $t05522855344._1 | |
1790 | + | let assetBalances = $t05522855344._2 | |
1791 | + | let lpFee = $t05522855344._3 | |
1792 | + | let protocolFee = $t05522855344._4 | |
1793 | + | let sigmaFeePerLpUpdated = $t05522855344._5 | |
1817 | 1794 | let finalAmountNormalized = ((targetAmountNormalized - lpFee) - protocolFee) | |
1818 | 1795 | let targetDecimals = _getDecimals(assetId_) | |
1819 | 1796 | let finalAmount = _normalizeDecimals(finalAmountNormalized, lpDecimals, targetDecimals, DOWN) | |
1842 | 1819 | else false | |
1843 | 1820 | if ((err == err)) | |
1844 | 1821 | then { | |
1845 | - | let $ | |
1846 | - | let targetAmountNormalized = $ | |
1847 | - | let finalAssetBalances = $ | |
1848 | - | let lpFee = $ | |
1849 | - | let protocolFee = $ | |
1850 | - | let sigmaFeePerLpUpdated = $ | |
1822 | + | let $t05675456912 = _swap(sourceAssetIndex, targetAssetIndex, sourceAmountNormalized) | |
1823 | + | let targetAmountNormalized = $t05675456912._1 | |
1824 | + | let finalAssetBalances = $t05675456912._2 | |
1825 | + | let lpFee = $t05675456912._3 | |
1826 | + | let protocolFee = $t05675456912._4 | |
1827 | + | let sigmaFeePerLpUpdated = $t05675456912._5 | |
1851 | 1828 | let finalAmountNormalized = ((targetAmountNormalized - lpFee) - protocolFee) | |
1852 | 1829 | let targetDecimals = _getDecimals(targetAssetId_) | |
1853 | 1830 | let finalAmount = _normalizeDecimals(finalAmountNormalized, lpDecimals, targetDecimals, DOWN) | |
1867 | 1844 | let user = if ((size(user_) > 0)) | |
1868 | 1845 | then valueOrErrorMessage(addressFromString(user_), "getClaim: invalid user") | |
1869 | 1846 | else i.caller | |
1870 | - | let $ | |
1871 | - | let checkpointActions = $ | |
1872 | - | let userProfits = $ | |
1847 | + | let $t05755457610 = _checkpoint(user) | |
1848 | + | let checkpointActions = $t05755457610._1 | |
1849 | + | let userProfits = $t05755457610._2 | |
1873 | 1850 | $Tuple2(nil, userProfits) | |
1874 | 1851 | } | |
1875 | 1852 | ||
1882 | 1859 | let weightAmplifier = storage._7 | |
1883 | 1860 | let slippageRate = storage._8 | |
1884 | 1861 | let feeMaxRate = storage._9 | |
1885 | - | let $ | |
1886 | - | let assetBalances = $ | |
1887 | - | let assetTotalSupply = $ | |
1888 | - | let $ | |
1889 | - | let assetWeights = $ | |
1890 | - | let sigmaWeight = $ | |
1862 | + | let $t05794358003 = _loadAssetBalances() | |
1863 | + | let assetBalances = $t05794358003._1 | |
1864 | + | let assetTotalSupply = $t05794358003._2 | |
1865 | + | let $t05800858061 = _loadAssetWeights() | |
1866 | + | let assetWeights = $t05800858061._1 | |
1867 | + | let sigmaWeight = $t05800858061._2 | |
1891 | 1868 | let fee = _calculateFee(assetBalances, assetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate) | |
1892 | 1869 | let utilValue = (assetTotalSupply - fee) | |
1893 | 1870 | $Tuple2(nil, $Tuple2(utilValue, lpTotalSupply)) | |
1901 | 1878 | let weightAmplifier = storage._7 | |
1902 | 1879 | let slippageRate = storage._8 | |
1903 | 1880 | let feeMaxRate = storage._9 | |
1904 | - | let $ | |
1905 | - | let assetBalances = $ | |
1906 | - | let assetTotalSupply = $ | |
1907 | - | let $ | |
1908 | - | let assetWeights = $ | |
1909 | - | let sigmaWeight = $ | |
1881 | + | let $t05849358553 = _loadAssetBalances() | |
1882 | + | let assetBalances = $t05849358553._1 | |
1883 | + | let assetTotalSupply = $t05849358553._2 | |
1884 | + | let $t05855858611 = _loadAssetWeights() | |
1885 | + | let assetWeights = $t05855858611._1 | |
1886 | + | let sigmaWeight = $t05855858611._2 | |
1910 | 1887 | let fee = _calculateFee(assetBalances, assetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate) | |
1911 | 1888 | $Tuple2(nil, fee) | |
1912 | 1889 | } | |
1946 | 1923 | else false | |
1947 | 1924 | if ((err1 == err1)) | |
1948 | 1925 | then { | |
1949 | - | let $ | |
1950 | - | let checkpointActions = $ | |
1951 | - | let userProfits = $ | |
1926 | + | let $t05961959679 = _checkpoint(i.caller) | |
1927 | + | let checkpointActions = $t05961959679._1 | |
1928 | + | let userProfits = $t05961959679._2 | |
1952 | 1929 | $Tuple2(((checkpointActions ++ _saveUserLp(i.caller, (_loadUserLp(i.caller) + i.payments[0].amount))) ++ _saveTotalLp((_loadTotalLp() + i.payments[0].amount))), unit) | |
1953 | 1930 | } | |
1954 | 1931 | else throw("Strict value is not equal to itself.") | |
1971 | 1948 | let err1 = _validateInt(amount_, 0, userLp, "unstake: invalid amount") | |
1972 | 1949 | if ((err1 == err1)) | |
1973 | 1950 | then { | |
1974 | - | let $ | |
1975 | - | let checkpointActions = $ | |
1976 | - | let userProfits = $ | |
1951 | + | let $t06019060250 = _checkpoint(i.caller) | |
1952 | + | let checkpointActions = $t06019060250._1 | |
1953 | + | let userProfits = $t06019060250._2 | |
1977 | 1954 | $Tuple2(((([ScriptTransfer(i.caller, amount_, lpAssetId)] ++ checkpointActions) ++ _saveUserLp(i.caller, (userLp - amount_))) ++ _saveTotalLp((_loadTotalLp() - amount_))), unit) | |
1978 | 1955 | } | |
1979 | 1956 | else throw("Strict value is not equal to itself.") | |
1999 | 1976 | let assets = [lpAssetIdStr, _loadAssets()] | |
2000 | 1977 | let maxIndex = (size(assets) - 1) | |
2001 | 1978 | let userLp = _loadUserLp(user) | |
2002 | - | let $ | |
2003 | - | let checkpointActions = $ | |
2004 | - | let userProfits = $ | |
1979 | + | let $t06097361029 = _checkpoint(user) | |
1980 | + | let checkpointActions = $t06097361029._1 | |
1981 | + | let userProfits = $t06097361029._2 | |
2005 | 1982 | func foldFunc (acc,profit) = { | |
2006 | 1983 | let index = acc._1 | |
2007 | 1984 | if (if ((maxIndex >= index)) | |
2014 | 1991 | else $Tuple3((index + 1), (acc._2 :+ profit), acc._3) | |
2015 | 1992 | } | |
2016 | 1993 | ||
2017 | - | let $ | |
1994 | + | let $t06140761498 = { | |
2018 | 1995 | let $l = userProfits | |
2019 | 1996 | let $s = size($l) | |
2020 | 1997 | let $acc0 = $Tuple3(0, nil, nil) | |
2028 | 2005 | ||
2029 | 2006 | $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) | |
2030 | 2007 | } | |
2031 | - | let idx = $ | |
2032 | - | let userProfitsUpdated = $ | |
2033 | - | let profitActions = $ | |
2008 | + | let idx = $t06140761498._1 | |
2009 | + | let userProfitsUpdated = $t06140761498._2 | |
2010 | + | let profitActions = $t06140761498._3 | |
2034 | 2011 | $Tuple2(((profitActions ++ removeByIndex(checkpointActions, 0)) ++ _saveUserProfits(user, userProfitsUpdated)), unit) | |
2035 | 2012 | } | |
2036 | 2013 | else throw("Strict value is not equal to itself.") |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | let WAVES = "waves" | |
7 | 7 | ||
8 | 8 | let MAX_INT = 9223372036854775807 | |
9 | 9 | ||
10 | 10 | let MAX_FEE = 1000000 | |
11 | 11 | ||
12 | 12 | let MAX_AMPLIFIER = 1000000 | |
13 | 13 | ||
14 | 14 | let MAX_WEIGHT_AMPLIFIER = 1000000 | |
15 | 15 | ||
16 | 16 | let MAX_WEIGHT = 1000000 | |
17 | 17 | ||
18 | 18 | let SLIPPAGE_RATE_FACTOR = 1000000 | |
19 | 19 | ||
20 | 20 | let FEE_RATE_FACTOR = 1000000 | |
21 | 21 | ||
22 | 22 | let RATE_FACTOR = 1000000 | |
23 | 23 | ||
24 | 24 | let PERCENT_FACTOR = toBigInt(1000000000000000000) | |
25 | 25 | ||
26 | 26 | let ZERO_INT_LIST_10 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] | |
27 | 27 | ||
28 | 28 | let ZERO_INT_LIST_11 = (ZERO_INT_LIST_10 :+ 0) | |
29 | 29 | ||
30 | 30 | let ZERO_BIGINT = toBigInt(0) | |
31 | 31 | ||
32 | 32 | 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] | |
33 | 33 | ||
34 | 34 | let INT_DECIMALS = 8 | |
35 | 35 | ||
36 | 36 | let BIGINT_DECIMALS = 18 | |
37 | 37 | ||
38 | 38 | 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", "_") | |
39 | 39 | ||
40 | 40 | let KEY_MULTISIG = "MULTISIG" | |
41 | 41 | ||
42 | 42 | let KEY_STATUS = "STATUS" | |
43 | 43 | ||
44 | 44 | let KEY_PAUSED = "PAUSED" | |
45 | 45 | ||
46 | 46 | let KEY_PAUSER = "PAUSER" | |
47 | 47 | ||
48 | 48 | let KEY_STORAGE = "STORAGE" | |
49 | 49 | ||
50 | 50 | let KEY_ASSETS = "ASSETS" | |
51 | 51 | ||
52 | 52 | let KEY_ASSET_BALANCES = "ASSET_BALANCES" | |
53 | 53 | ||
54 | 54 | let KEY_ASSET_WEIGHTS = "ASSET_WEIGHTS" | |
55 | 55 | ||
56 | 56 | let KEY_LP_FEE = "LP_FEE" | |
57 | 57 | ||
58 | 58 | let KEY_PROTOCOL_FEE = "PROTOCOL_FEE" | |
59 | 59 | ||
60 | 60 | let KEY_PRECISION = "PRECISION" | |
61 | 61 | ||
62 | 62 | let KEY_SIGMA_FEE_PER_LP = "SIGMA_FEE_PER_LP" | |
63 | 63 | ||
64 | 64 | let KEY_USER_SIGMA_FEE_PER_LP = "USER_SIGMA_FEE_PER_LP" | |
65 | 65 | ||
66 | 66 | let KEY_USER_LP = "USER_LP" | |
67 | 67 | ||
68 | 68 | let KEY_TOTAL_LP = "TOTAL_LP" | |
69 | 69 | ||
70 | 70 | let KEY_USER_PROFITS = "USER_PROFITS" | |
71 | 71 | ||
72 | 72 | let KEY_WATCHDOG = "WATCHDOG" | |
73 | 73 | ||
74 | 74 | let KEY_WATCHDOG_OFFSET = "WATCHDOG_OFFSET" | |
75 | 75 | ||
76 | 76 | let KEY_WATCHDOG_HEIGHT = "WATCHDOG_HEIGHT" | |
77 | 77 | ||
78 | 78 | func _validateAddress (address_,err_) = match addressFromString(address_) { | |
79 | 79 | case a: Address => | |
80 | 80 | true | |
81 | 81 | case _ => | |
82 | 82 | throw(err_) | |
83 | 83 | } | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func _validateAsset (assetId_,err_) = if ((assetId_ == WAVES)) | |
87 | 87 | then true | |
88 | 88 | else match assetInfo(fromBase58String(assetId_)) { | |
89 | 89 | case a: Asset => | |
90 | 90 | true | |
91 | 91 | case _ => | |
92 | 92 | throw(err_) | |
93 | 93 | } | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func _validateInt (val_,lowerBoundary_,upperBoundary_,err_) = if (if ((lowerBoundary_ > val_)) | |
97 | 97 | then true | |
98 | 98 | else (val_ > upperBoundary_)) | |
99 | 99 | then throw(err_) | |
100 | 100 | else true | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func _validateBool (val_,target_,err_) = if ((val_ != target_)) | |
104 | 104 | then throw(err_) | |
105 | 105 | else true | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func _validateStringEqual (val1_,val2_,err_) = if ((val1_ != val2_)) | |
109 | 109 | then throw(err_) | |
110 | 110 | else true | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func _validateStringNotEq (val1_,val2_,err_) = if ((val1_ == val2_)) | |
114 | 114 | then throw(err_) | |
115 | 115 | else true | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | func _validateIntList (val_,lowerBoundary_,upperBoundary_,err_) = { | |
119 | 119 | func foldFunc (acc,elem) = match parseInt(elem) { | |
120 | 120 | case a: Int => | |
121 | 121 | if (acc) | |
122 | 122 | then _validateInt(a, lowerBoundary_, upperBoundary_, err_) | |
123 | 123 | else false | |
124 | 124 | case _ => | |
125 | 125 | throw(err_) | |
126 | 126 | } | |
127 | 127 | ||
128 | 128 | let $l = val_ | |
129 | 129 | let $s = size($l) | |
130 | 130 | let $acc0 = true | |
131 | 131 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
132 | 132 | then $a | |
133 | 133 | else foldFunc($a, $l[$i]) | |
134 | 134 | ||
135 | 135 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
136 | 136 | then $a | |
137 | 137 | else throw("List size exceeds 10") | |
138 | 138 | ||
139 | 139 | $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) | |
140 | 140 | } | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | func _validateAssets (assets_,err_) = { | |
144 | 144 | func foldFunc (acc,elem) = if (acc) | |
145 | 145 | then _validateAsset(elem, err_) | |
146 | 146 | else false | |
147 | 147 | ||
148 | 148 | let $l = assets_ | |
149 | 149 | let $s = size($l) | |
150 | 150 | let $acc0 = true | |
151 | 151 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
152 | 152 | then $a | |
153 | 153 | else foldFunc($a, $l[$i]) | |
154 | 154 | ||
155 | 155 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
156 | 156 | then $a | |
157 | 157 | else throw("List size exceeds 10") | |
158 | 158 | ||
159 | 159 | $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) | |
160 | 160 | } | |
161 | 161 | ||
162 | 162 | ||
163 | 163 | func _validateIntEquals (val1_,val2_,err_) = if ((val1_ != val2_)) | |
164 | 164 | then throw(err_) | |
165 | 165 | else true | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | func _validateTokenName (val_,err_) = if (if ((4 > size(val_))) | |
169 | 169 | then true | |
170 | 170 | else (size(val_) > 16)) | |
171 | 171 | then throw(err_) | |
172 | 172 | else true | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | func _validateTokenDescr (val_,err_) = if ((size(val_) > 1000)) | |
176 | 176 | then throw(err_) | |
177 | 177 | else true | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | func _validateDecimals (val_,err_) = if (if ((0 > val_)) | |
181 | 181 | then true | |
182 | 182 | else (val_ > 8)) | |
183 | 183 | then throw(err_) | |
184 | 184 | else true | |
185 | 185 | ||
186 | 186 | ||
187 | 187 | func _validatePayment (payment_,assetId_,requiredAmount_,err_) = match payment_.assetId { | |
188 | 188 | case a: ByteVector => | |
189 | 189 | if ((assetId_ != toBase58String(a))) | |
190 | 190 | then throw((err_ + ": asset")) | |
191 | 191 | else if ((requiredAmount_ > payment_.amount)) | |
192 | 192 | then throw((err_ + ": amount")) | |
193 | 193 | else true | |
194 | 194 | case _ => | |
195 | 195 | throw((err_ + ": asset")) | |
196 | 196 | } | |
197 | 197 | ||
198 | 198 | ||
199 | 199 | func _validateListContains (list_,val_,err_) = if (!(containsElement(list_, val_))) | |
200 | 200 | then throw(err_) | |
201 | 201 | else true | |
202 | 202 | ||
203 | 203 | ||
204 | 204 | func _assetToStr (asset_) = match asset_ { | |
205 | 205 | case a: ByteVector => | |
206 | 206 | toBase58String(a) | |
207 | 207 | case _ => | |
208 | 208 | WAVES | |
209 | 209 | } | |
210 | 210 | ||
211 | 211 | ||
212 | 212 | func _strToAsset (asset_) = if (if ((asset_ == WAVES)) | |
213 | 213 | then true | |
214 | 214 | else (asset_ == "")) | |
215 | 215 | then unit | |
216 | 216 | else fromBase58String(asset_) | |
217 | 217 | ||
218 | 218 | ||
219 | 219 | func _loadPause () = match getBoolean(KEY_PAUSED) { | |
220 | 220 | case a: Boolean => | |
221 | 221 | a | |
222 | 222 | case _ => | |
223 | 223 | false | |
224 | 224 | } | |
225 | 225 | ||
226 | 226 | ||
227 | 227 | func _savePause (isPaused_) = [BooleanEntry(KEY_PAUSED, isPaused_)] | |
228 | 228 | ||
229 | 229 | ||
230 | 230 | func _loadPauser () = match getString(KEY_PAUSER) { | |
231 | 231 | case a: String => | |
232 | 232 | addressFromStringValue(a) | |
233 | 233 | case _ => | |
234 | 234 | Address(base58'') | |
235 | 235 | } | |
236 | 236 | ||
237 | 237 | ||
238 | 238 | func _savePauser (pauser_) = [StringEntry(KEY_PAUSER, toString(pauser_))] | |
239 | 239 | ||
240 | 240 | ||
241 | 241 | func _loadMultisig () = match getString(KEY_MULTISIG) { | |
242 | 242 | case a: String => | |
243 | 243 | addressFromStringValue(a) | |
244 | 244 | case _ => | |
245 | 245 | Address(base58'') | |
246 | 246 | } | |
247 | 247 | ||
248 | 248 | ||
249 | 249 | func _saveMultisig (multisig_) = [StringEntry(KEY_MULTISIG, toString(multisig_))] | |
250 | 250 | ||
251 | 251 | ||
252 | 252 | func _loadStorage () = match getString(KEY_STORAGE) { | |
253 | 253 | case a: String => | |
254 | 254 | let struct = split(a, SEP) | |
255 | 255 | $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])) | |
256 | 256 | case _ => | |
257 | 257 | $Tuple10(base58'', false, 0, 0, 0, 0, 0, 0, 0, Address(base58'')) | |
258 | 258 | } | |
259 | 259 | ||
260 | 260 | ||
261 | 261 | func _saveStorage (storage_) = [StringEntry(KEY_STORAGE, makeString([toBase58String(storage_._1), if (storage_._2) | |
262 | 262 | then "1" | |
263 | 263 | 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))] | |
264 | 264 | ||
265 | 265 | ||
266 | 266 | func _loadAssets () = match getString(KEY_ASSETS) { | |
267 | 267 | case a: String => | |
268 | 268 | if ((size(a) > 0)) | |
269 | 269 | then split_51C(a, SEP) | |
270 | 270 | else nil | |
271 | 271 | case _ => | |
272 | 272 | nil | |
273 | 273 | } | |
274 | 274 | ||
275 | 275 | ||
276 | 276 | func _saveAssets (assets_) = [StringEntry(KEY_ASSETS, makeString_11C(assets_, SEP))] | |
277 | 277 | ||
278 | 278 | ||
279 | 279 | func _loadAssetBalances () = { | |
280 | 280 | func foldFunc (acc,elem) = { | |
281 | 281 | let balance = parseIntValue(elem) | |
282 | 282 | $Tuple2((acc._1 :+ balance), (acc._2 + balance)) | |
283 | 283 | } | |
284 | 284 | ||
285 | 285 | match getString(KEY_ASSET_BALANCES) { | |
286 | 286 | case a: String => | |
287 | 287 | if ((size(a) > 0)) | |
288 | 288 | then { | |
289 | 289 | let $l = split_51C(a, SEP) | |
290 | 290 | let $s = size($l) | |
291 | 291 | let $acc0 = $Tuple2(nil, 0) | |
292 | 292 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
293 | 293 | then $a | |
294 | 294 | else foldFunc($a, $l[$i]) | |
295 | 295 | ||
296 | 296 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
297 | 297 | then $a | |
298 | 298 | else throw("List size exceeds 10") | |
299 | 299 | ||
300 | 300 | $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) | |
301 | 301 | } | |
302 | 302 | else $Tuple2(ZERO_INT_LIST_10, 0) | |
303 | 303 | case _ => | |
304 | 304 | $Tuple2(ZERO_INT_LIST_10, 0) | |
305 | 305 | } | |
306 | 306 | } | |
307 | 307 | ||
308 | 308 | ||
309 | 309 | func _saveAssetBalances (balances_) = { | |
310 | 310 | func foldFunc (acc,elem) = (acc :+ toString(elem)) | |
311 | 311 | ||
312 | 312 | [StringEntry(KEY_ASSET_BALANCES, makeString_11C({ | |
313 | 313 | let $l = balances_ | |
314 | 314 | let $s = size($l) | |
315 | 315 | let $acc0 = nil | |
316 | 316 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
317 | 317 | then $a | |
318 | 318 | else foldFunc($a, $l[$i]) | |
319 | 319 | ||
320 | 320 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
321 | 321 | then $a | |
322 | 322 | else throw("List size exceeds 10") | |
323 | 323 | ||
324 | 324 | $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) | |
325 | 325 | }, SEP))] | |
326 | 326 | } | |
327 | 327 | ||
328 | 328 | ||
329 | 329 | func _loadAssetWeights () = { | |
330 | 330 | func foldFunc (acc,elem) = { | |
331 | 331 | let weight = parseIntValue(elem) | |
332 | 332 | $Tuple2((acc._1 :+ weight), (acc._2 + weight)) | |
333 | 333 | } | |
334 | 334 | ||
335 | 335 | match getString(KEY_ASSET_WEIGHTS) { | |
336 | 336 | case a: String => | |
337 | 337 | if ((size(a) > 0)) | |
338 | 338 | then { | |
339 | 339 | let $l = split_51C(a, SEP) | |
340 | 340 | let $s = size($l) | |
341 | 341 | let $acc0 = $Tuple2(nil, 0) | |
342 | 342 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
343 | 343 | then $a | |
344 | 344 | else foldFunc($a, $l[$i]) | |
345 | 345 | ||
346 | 346 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
347 | 347 | then $a | |
348 | 348 | else throw("List size exceeds 10") | |
349 | 349 | ||
350 | 350 | $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) | |
351 | 351 | } | |
352 | 352 | else $Tuple2(ZERO_INT_LIST_10, 0) | |
353 | 353 | case _ => | |
354 | 354 | $Tuple2(ZERO_INT_LIST_10, 0) | |
355 | 355 | } | |
356 | 356 | } | |
357 | 357 | ||
358 | 358 | ||
359 | 359 | func _saveAssetWeights (weights_) = { | |
360 | 360 | func foldFunc (acc,elem) = (acc :+ toString(elem)) | |
361 | 361 | ||
362 | 362 | [StringEntry(KEY_ASSET_WEIGHTS, makeString_11C({ | |
363 | 363 | let $l = weights_ | |
364 | 364 | let $s = size($l) | |
365 | 365 | let $acc0 = nil | |
366 | 366 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
367 | 367 | then $a | |
368 | 368 | else foldFunc($a, $l[$i]) | |
369 | 369 | ||
370 | 370 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
371 | 371 | then $a | |
372 | 372 | else throw("List size exceeds 10") | |
373 | 373 | ||
374 | 374 | $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) | |
375 | 375 | }, SEP))] | |
376 | 376 | } | |
377 | 377 | ||
378 | 378 | ||
379 | 379 | func _loadLpFee (assetId_) = match getInteger(makeString([KEY_LP_FEE, assetId_], SEP)) { | |
380 | 380 | case a: Int => | |
381 | 381 | a | |
382 | 382 | case _ => | |
383 | 383 | 0 | |
384 | 384 | } | |
385 | 385 | ||
386 | 386 | ||
387 | 387 | func _saveLpFee (assetId_,val_) = [IntegerEntry(makeString([KEY_LP_FEE, assetId_], SEP), val_)] | |
388 | 388 | ||
389 | 389 | ||
390 | 390 | func _loadProtocolFee (assetId_) = match getInteger(makeString([KEY_PROTOCOL_FEE, assetId_], SEP)) { | |
391 | 391 | case a: Int => | |
392 | 392 | a | |
393 | 393 | case _ => | |
394 | 394 | 0 | |
395 | 395 | } | |
396 | 396 | ||
397 | 397 | ||
398 | 398 | func _saveProtocolFee (assetId_,val_) = [IntegerEntry(makeString([KEY_PROTOCOL_FEE, assetId_], SEP), val_)] | |
399 | 399 | ||
400 | 400 | ||
401 | 401 | func _loadPrecision () = match getInteger(KEY_PRECISION) { | |
402 | 402 | case a: Int => | |
403 | 403 | a | |
404 | 404 | case _ => | |
405 | 405 | 0 | |
406 | 406 | } | |
407 | 407 | ||
408 | 408 | ||
409 | 409 | func _savePrecision (val_) = [IntegerEntry(KEY_PRECISION, val_)] | |
410 | 410 | ||
411 | 411 | ||
412 | 412 | func _loadSigmaFeePerLp () = { | |
413 | 413 | func foldFunc (acc,elem) = (acc :+ parseBigIntValue(elem)) | |
414 | 414 | ||
415 | 415 | match getString(KEY_SIGMA_FEE_PER_LP) { | |
416 | 416 | case a: String => | |
417 | 417 | if ((size(a) > 0)) | |
418 | 418 | then { | |
419 | 419 | let $l = split_51C(a, SEP) | |
420 | 420 | let $s = size($l) | |
421 | 421 | let $acc0 = nil | |
422 | 422 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
423 | 423 | then $a | |
424 | 424 | else foldFunc($a, $l[$i]) | |
425 | 425 | ||
426 | 426 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
427 | 427 | then $a | |
428 | 428 | else throw("List size exceeds 11") | |
429 | 429 | ||
430 | 430 | $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) | |
431 | 431 | } | |
432 | 432 | else ZERO_BIGINT_LIST_11 | |
433 | 433 | case _ => | |
434 | 434 | ZERO_BIGINT_LIST_11 | |
435 | 435 | } | |
436 | 436 | } | |
437 | 437 | ||
438 | 438 | ||
439 | 439 | func _saveSigmaFeePerLp (val_) = { | |
440 | 440 | func foldFunc (acc,elem) = (acc :+ toString(elem)) | |
441 | 441 | ||
442 | 442 | [StringEntry(KEY_SIGMA_FEE_PER_LP, makeString_11C({ | |
443 | 443 | let $l = val_ | |
444 | 444 | let $s = size($l) | |
445 | 445 | let $acc0 = nil | |
446 | 446 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
447 | 447 | then $a | |
448 | 448 | else foldFunc($a, $l[$i]) | |
449 | 449 | ||
450 | 450 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
451 | 451 | then $a | |
452 | 452 | else throw("List size exceeds 11") | |
453 | 453 | ||
454 | 454 | $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) | |
455 | 455 | }, SEP))] | |
456 | 456 | } | |
457 | 457 | ||
458 | 458 | ||
459 | 459 | func _loadUserSigmaFeePerLp (user_) = { | |
460 | 460 | func foldFunc (acc,elem) = (acc :+ parseBigIntValue(elem)) | |
461 | 461 | ||
462 | 462 | match getString(makeString([KEY_USER_SIGMA_FEE_PER_LP, toString(user_)], SEP)) { | |
463 | 463 | case a: String => | |
464 | 464 | if ((size(a) > 0)) | |
465 | 465 | then { | |
466 | 466 | let $l = split_51C(a, SEP) | |
467 | 467 | let $s = size($l) | |
468 | 468 | let $acc0 = nil | |
469 | 469 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
470 | 470 | then $a | |
471 | 471 | else foldFunc($a, $l[$i]) | |
472 | 472 | ||
473 | 473 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
474 | 474 | then $a | |
475 | 475 | else throw("List size exceeds 11") | |
476 | 476 | ||
477 | 477 | $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) | |
478 | 478 | } | |
479 | 479 | else ZERO_BIGINT_LIST_11 | |
480 | 480 | case _ => | |
481 | 481 | ZERO_BIGINT_LIST_11 | |
482 | 482 | } | |
483 | 483 | } | |
484 | 484 | ||
485 | 485 | ||
486 | 486 | func _saveUserSigmaFeePerLp (user_,val_) = { | |
487 | 487 | func foldFunc (acc,elem) = (acc :+ toString(elem)) | |
488 | 488 | ||
489 | 489 | [StringEntry(makeString([KEY_USER_SIGMA_FEE_PER_LP, toString(user_)], SEP), makeString_11C({ | |
490 | 490 | let $l = val_ | |
491 | 491 | let $s = size($l) | |
492 | 492 | let $acc0 = nil | |
493 | 493 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
494 | 494 | then $a | |
495 | 495 | else foldFunc($a, $l[$i]) | |
496 | 496 | ||
497 | 497 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
498 | 498 | then $a | |
499 | 499 | else throw("List size exceeds 11") | |
500 | 500 | ||
501 | 501 | $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) | |
502 | 502 | }, SEP))] | |
503 | 503 | } | |
504 | 504 | ||
505 | 505 | ||
506 | 506 | func _loadUserLp (address_) = match getInteger(makeString([KEY_USER_LP, toString(address_)], SEP)) { | |
507 | 507 | case a: Int => | |
508 | 508 | a | |
509 | 509 | case _ => | |
510 | 510 | 0 | |
511 | 511 | } | |
512 | 512 | ||
513 | 513 | ||
514 | 514 | func _saveUserLp (address_,val_) = [IntegerEntry(makeString([KEY_USER_LP, toString(address_)], SEP), val_)] | |
515 | 515 | ||
516 | 516 | ||
517 | 517 | func _loadTotalLp () = match getInteger(KEY_TOTAL_LP) { | |
518 | 518 | case a: Int => | |
519 | 519 | a | |
520 | 520 | case _ => | |
521 | 521 | 0 | |
522 | 522 | } | |
523 | 523 | ||
524 | 524 | ||
525 | 525 | func _saveTotalLp (val_) = [IntegerEntry(KEY_TOTAL_LP, val_)] | |
526 | 526 | ||
527 | 527 | ||
528 | 528 | func _loadUserProfits (user_) = { | |
529 | 529 | func foldFunc (acc,elem) = (acc :+ parseIntValue(elem)) | |
530 | 530 | ||
531 | 531 | match getString(makeString([KEY_USER_PROFITS, toString(user_)], SEP)) { | |
532 | 532 | case a: String => | |
533 | 533 | if ((size(a) > 0)) | |
534 | 534 | then { | |
535 | 535 | let $l = split_51C(a, SEP) | |
536 | 536 | let $s = size($l) | |
537 | 537 | let $acc0 = nil | |
538 | 538 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
539 | 539 | then $a | |
540 | 540 | else foldFunc($a, $l[$i]) | |
541 | 541 | ||
542 | 542 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
543 | 543 | then $a | |
544 | 544 | else throw("List size exceeds 11") | |
545 | 545 | ||
546 | 546 | $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) | |
547 | 547 | } | |
548 | 548 | else ZERO_INT_LIST_11 | |
549 | 549 | case _ => | |
550 | 550 | ZERO_INT_LIST_11 | |
551 | 551 | } | |
552 | 552 | } | |
553 | 553 | ||
554 | 554 | ||
555 | 555 | func _saveUserProfits (user_,val_) = { | |
556 | 556 | func foldFunc (acc,elem) = (acc :+ toString(elem)) | |
557 | 557 | ||
558 | 558 | [StringEntry(makeString([KEY_USER_PROFITS, toString(user_)], SEP), makeString_11C({ | |
559 | 559 | let $l = val_ | |
560 | 560 | let $s = size($l) | |
561 | 561 | let $acc0 = nil | |
562 | 562 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
563 | 563 | then $a | |
564 | 564 | else foldFunc($a, $l[$i]) | |
565 | 565 | ||
566 | 566 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
567 | 567 | then $a | |
568 | 568 | else throw("List size exceeds 11") | |
569 | 569 | ||
570 | 570 | $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) | |
571 | 571 | }, SEP))] | |
572 | 572 | } | |
573 | 573 | ||
574 | 574 | ||
575 | 575 | func _loadWatchdog () = match getString(KEY_WATCHDOG) { | |
576 | 576 | case a: String => | |
577 | 577 | addressFromStringValue(a) | |
578 | 578 | case _ => | |
579 | 579 | Address(base58'') | |
580 | 580 | } | |
581 | 581 | ||
582 | 582 | ||
583 | 583 | func _saveWatchdog (watchdog_) = [StringEntry(KEY_WATCHDOG, toString(watchdog_))] | |
584 | 584 | ||
585 | 585 | ||
586 | 586 | func _loadWatchdogOffset () = match getInteger(KEY_WATCHDOG_OFFSET) { | |
587 | 587 | case a: Int => | |
588 | 588 | a | |
589 | 589 | case _ => | |
590 | 590 | 0 | |
591 | 591 | } | |
592 | 592 | ||
593 | 593 | ||
594 | 594 | func _saveWatchdogOffset (offset_) = [IntegerEntry(KEY_WATCHDOG_OFFSET, offset_)] | |
595 | 595 | ||
596 | 596 | ||
597 | 597 | func _onlyThisContract (caller_) = if ((caller_ != this)) | |
598 | 598 | then throw("_onlyThisContract: revert") | |
599 | 599 | else true | |
600 | 600 | ||
601 | 601 | ||
602 | 602 | func _whenMultisigSet () = if ((_loadMultisig() == Address(base58''))) | |
603 | 603 | then throw("_whenMultisigSet: revert") | |
604 | 604 | else true | |
605 | 605 | ||
606 | 606 | ||
607 | 607 | func _whenNotInitialized () = { | |
608 | 608 | let storage = _loadStorage() | |
609 | 609 | if ((storage._1 != base58'')) | |
610 | 610 | then throw("_whenNotInitialized: revert") | |
611 | 611 | else true | |
612 | 612 | } | |
613 | 613 | ||
614 | 614 | ||
615 | 615 | func _whenInitialized () = { | |
616 | 616 | let storage = _loadStorage() | |
617 | 617 | if ((storage._1 == base58'')) | |
618 | 618 | then throw("_whenInitialized: revert") | |
619 | 619 | else true | |
620 | 620 | } | |
621 | 621 | ||
622 | 622 | ||
623 | 623 | func _whenNotPaused () = if (_loadPause()) | |
624 | 624 | then throw("_whenNotPaused: revert") | |
625 | 625 | else true | |
626 | 626 | ||
627 | 627 | ||
628 | 628 | func _whenPaused () = if (!(_loadPause())) | |
629 | 629 | then throw("_whenPaused: revert") | |
630 | 630 | else true | |
631 | 631 | ||
632 | 632 | ||
633 | 633 | func _onlyPauser (caller_) = if ((caller_ != _loadPauser())) | |
634 | 634 | then throw("_onlyPauser: revert") | |
635 | 635 | else true | |
636 | 636 | ||
637 | 637 | ||
638 | 638 | func _checkWatchdog () = { | |
639 | 639 | let wd = match getInteger(_loadWatchdog(), KEY_WATCHDOG_HEIGHT) { | |
640 | 640 | case a: Int => | |
641 | 641 | (a + _loadWatchdogOffset()) | |
642 | 642 | case _ => | |
643 | 643 | 0 | |
644 | 644 | } | |
645 | 645 | if ((height > wd)) | |
646 | 646 | then throw("_checkWatchdog: revert") | |
647 | 647 | else true | |
648 | 648 | } | |
649 | 649 | ||
650 | 650 | ||
651 | 651 | func _getDecimals (assetId_) = match assetInfo(fromBase58String(assetId_)) { | |
652 | 652 | case a: Asset => | |
653 | 653 | a.decimals | |
654 | 654 | case _ => | |
655 | 655 | throw(("_getDecimals: no asset=" + assetId_)) | |
656 | 656 | } | |
657 | 657 | ||
658 | 658 | ||
659 | 659 | func _normalizeDecimals (amount_,sourceDecimals_,targetDecimals_,round_) = if ((sourceDecimals_ >= targetDecimals_)) | |
660 | 660 | then fraction(amount_, 1, pow(10, 0, (sourceDecimals_ - targetDecimals_), 0, 0, DOWN), round_) | |
661 | 661 | else (amount_ * pow(10, 0, (targetDecimals_ - sourceDecimals_), 0, 0, DOWN)) | |
662 | 662 | ||
663 | 663 | ||
664 | 664 | func _prepareAssetBalances (assets_) = { | |
665 | 665 | func foldFunc (acc,elem) = (acc :+ 0) | |
666 | 666 | ||
667 | 667 | let $l = assets_ | |
668 | 668 | let $s = size($l) | |
669 | 669 | let $acc0 = nil | |
670 | 670 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
671 | 671 | then $a | |
672 | 672 | else foldFunc($a, $l[$i]) | |
673 | 673 | ||
674 | 674 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
675 | 675 | then $a | |
676 | 676 | else throw("List size exceeds 10") | |
677 | 677 | ||
678 | 678 | $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) | |
679 | 679 | } | |
680 | 680 | ||
681 | 681 | ||
682 | 682 | func _prepareAssetWeights (assetWeights_) = { | |
683 | 683 | func foldFunc (acc,elem) = { | |
684 | 684 | let weight = parseIntValue(elem) | |
685 | 685 | $Tuple2((acc._1 :+ weight), (acc._2 + weight)) | |
686 | 686 | } | |
687 | 687 | ||
688 | 688 | let $l = assetWeights_ | |
689 | 689 | let $s = size($l) | |
690 | 690 | let $acc0 = $Tuple2(nil, 0) | |
691 | 691 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
692 | 692 | then $a | |
693 | 693 | else foldFunc($a, $l[$i]) | |
694 | 694 | ||
695 | 695 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
696 | 696 | then $a | |
697 | 697 | else throw("List size exceeds 10") | |
698 | 698 | ||
699 | 699 | $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) | |
700 | 700 | } | |
701 | 701 | ||
702 | 702 | ||
703 | 703 | func _getAssetBalances (assets_,decimals_) = { | |
704 | 704 | func foldFunc (acc,elem) = { | |
705 | 705 | let assetDecimals = _getDecimals(elem) | |
706 | 706 | let balance = _normalizeDecimals(assetBalance(this, fromBase58String(elem)), assetDecimals, decimals_, DOWN) | |
707 | 707 | $Tuple2((acc._1 :+ balance), (acc._2 + balance)) | |
708 | 708 | } | |
709 | 709 | ||
710 | 710 | let $l = assets_ | |
711 | 711 | let $s = size($l) | |
712 | 712 | let $acc0 = $Tuple2(nil, 0) | |
713 | 713 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
714 | 714 | then $a | |
715 | 715 | else foldFunc($a, $l[$i]) | |
716 | 716 | ||
717 | 717 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
718 | 718 | then $a | |
719 | 719 | else throw("List size exceeds 10") | |
720 | 720 | ||
721 | 721 | $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) | |
722 | 722 | } | |
723 | 723 | ||
724 | 724 | ||
725 | 725 | func _listIntToString (assets_) = { | |
726 | 726 | func foldFunc (acc,elem) = (acc :+ toString(elem)) | |
727 | 727 | ||
728 | 728 | makeString({ | |
729 | 729 | let $l = assets_ | |
730 | 730 | let $s = size($l) | |
731 | 731 | let $acc0 = nil | |
732 | 732 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
733 | 733 | then $a | |
734 | 734 | else foldFunc($a, $l[$i]) | |
735 | 735 | ||
736 | 736 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
737 | 737 | then $a | |
738 | 738 | else throw("List size exceeds 11") | |
739 | 739 | ||
740 | 740 | $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) | |
741 | 741 | }, SEP) | |
742 | 742 | } | |
743 | 743 | ||
744 | 744 | ||
745 | 745 | func _listBigIntToString (assets_) = { | |
746 | 746 | func foldFunc (acc,elem) = (acc :+ toString(elem)) | |
747 | 747 | ||
748 | 748 | makeString({ | |
749 | 749 | let $l = assets_ | |
750 | 750 | let $s = size($l) | |
751 | 751 | let $acc0 = nil | |
752 | 752 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
753 | 753 | then $a | |
754 | 754 | else foldFunc($a, $l[$i]) | |
755 | 755 | ||
756 | 756 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
757 | 757 | then $a | |
758 | 758 | else throw("List size exceeds 11") | |
759 | 759 | ||
760 | 760 | $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) | |
761 | 761 | }, SEP) | |
762 | 762 | } | |
763 | 763 | ||
764 | 764 | ||
765 | 765 | func _getEquilibriums (sigmaBalances_,weights_,sigmaWeight_) = { | |
766 | 766 | func foldFunc (acc,elem) = (acc :+ fraction(sigmaBalances_, elem, sigmaWeight_)) | |
767 | 767 | ||
768 | 768 | let $l = weights_ | |
769 | 769 | let $s = size($l) | |
770 | 770 | let $acc0 = nil | |
771 | 771 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
772 | 772 | then $a | |
773 | 773 | else foldFunc($a, $l[$i]) | |
774 | 774 | ||
775 | 775 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
776 | 776 | then $a | |
777 | 777 | else throw("List size exceeds 10") | |
778 | 778 | ||
779 | 779 | $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) | |
780 | 780 | } | |
781 | 781 | ||
782 | 782 | ||
783 | 783 | func _incrementBalancesByAmounts (balances_,amounts_) = { | |
784 | 784 | func foldFunc (acc,elem) = { | |
785 | 785 | let index = acc._1 | |
786 | 786 | let amount = amounts_[index] | |
787 | 787 | let newBalance = (elem + amount) | |
788 | 788 | $Tuple3((index + 1), (acc._2 :+ newBalance), (acc._3 + newBalance)) | |
789 | 789 | } | |
790 | 790 | ||
791 | 791 | let result = { | |
792 | 792 | let $l = balances_ | |
793 | 793 | let $s = size($l) | |
794 | 794 | let $acc0 = $Tuple3(0, nil, 0) | |
795 | 795 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
796 | 796 | then $a | |
797 | 797 | else foldFunc($a, $l[$i]) | |
798 | 798 | ||
799 | 799 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
800 | 800 | then $a | |
801 | 801 | else throw("List size exceeds 10") | |
802 | 802 | ||
803 | 803 | $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) | |
804 | 804 | } | |
805 | 805 | $Tuple2(result._2, result._3) | |
806 | 806 | } | |
807 | 807 | ||
808 | 808 | ||
809 | 809 | func _incrementBalancesByPayments (balances_,payments_,assets_,decimals_,err_) = { | |
810 | 810 | func foldFunc (acc,elem) = { | |
811 | 811 | let index = acc._1 | |
812 | 812 | let payment = payments_[index] | |
813 | 813 | let paymentAssetStr = _assetToStr(payment.assetId) | |
814 | 814 | let err = if ((paymentAssetStr != assets_[index])) | |
815 | 815 | then throw(((err_ + ": index=") + toString(index))) | |
816 | 816 | else unit | |
817 | 817 | if ((err == err)) | |
818 | 818 | then { | |
819 | 819 | let assetDecimals = _getDecimals(paymentAssetStr) | |
820 | 820 | let newBalance = (elem + _normalizeDecimals(payments_[index].amount, assetDecimals, decimals_, DOWN)) | |
821 | 821 | $Tuple3((index + 1), (acc._2 :+ newBalance), (acc._3 + newBalance)) | |
822 | 822 | } | |
823 | 823 | else throw("Strict value is not equal to itself.") | |
824 | 824 | } | |
825 | 825 | ||
826 | 826 | let result = { | |
827 | 827 | let $l = balances_ | |
828 | 828 | let $s = size($l) | |
829 | 829 | let $acc0 = $Tuple3(0, nil, 0) | |
830 | 830 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
831 | 831 | then $a | |
832 | 832 | else foldFunc($a, $l[$i]) | |
833 | 833 | ||
834 | 834 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
835 | 835 | then $a | |
836 | 836 | else throw("List size exceeds 10") | |
837 | 837 | ||
838 | 838 | $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) | |
839 | 839 | } | |
840 | 840 | $Tuple2(result._2, result._3) | |
841 | 841 | } | |
842 | 842 | ||
843 | 843 | ||
844 | 844 | func _incrementBalanceByIndex (balances_,index_,amount_) = { | |
845 | 845 | func foldFunc (acc,elem) = { | |
846 | 846 | let index = acc._1 | |
847 | 847 | if ((index == index_)) | |
848 | 848 | then $Tuple2((index + 1), (acc._2 :+ (elem + amount_))) | |
849 | 849 | else $Tuple2((index + 1), (acc._2 :+ elem)) | |
850 | 850 | } | |
851 | 851 | ||
852 | 852 | let result = { | |
853 | 853 | let $l = balances_ | |
854 | 854 | let $s = size($l) | |
855 | 855 | let $acc0 = $Tuple2(0, nil) | |
856 | 856 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
857 | 857 | then $a | |
858 | 858 | else foldFunc($a, $l[$i]) | |
859 | 859 | ||
860 | 860 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
861 | 861 | then $a | |
862 | 862 | else throw("List size exceeds 10") | |
863 | 863 | ||
864 | 864 | $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) | |
865 | 865 | } | |
866 | 866 | result._2 | |
867 | 867 | } | |
868 | 868 | ||
869 | 869 | ||
870 | 870 | func _decrementBalanceByIndex (balances_,index_,amount_) = { | |
871 | 871 | func foldFunc (acc,elem) = { | |
872 | 872 | let index = acc._1 | |
873 | 873 | if ((index == index_)) | |
874 | 874 | then $Tuple2((index + 1), (acc._2 :+ (elem - amount_))) | |
875 | 875 | else $Tuple2((index + 1), (acc._2 :+ elem)) | |
876 | 876 | } | |
877 | 877 | ||
878 | 878 | let result = { | |
879 | 879 | let $l = balances_ | |
880 | 880 | let $s = size($l) | |
881 | 881 | let $acc0 = $Tuple2(0, nil) | |
882 | 882 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
883 | 883 | then $a | |
884 | 884 | else foldFunc($a, $l[$i]) | |
885 | 885 | ||
886 | 886 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
887 | 887 | then $a | |
888 | 888 | else throw("List size exceeds 10") | |
889 | 889 | ||
890 | 890 | $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) | |
891 | 891 | } | |
892 | 892 | result._2 | |
893 | 893 | } | |
894 | 894 | ||
895 | 895 | ||
896 | 896 | func _decrementBalancesByLpAmount (balances_,amount_,lpTotalSupply_) = { | |
897 | 897 | let rate = fraction((lpTotalSupply_ - amount_), RATE_FACTOR, lpTotalSupply_, CEILING) | |
898 | 898 | func foldFunc (acc,elem) = { | |
899 | 899 | let newBalance = fraction(elem, rate, RATE_FACTOR, CEILING) | |
900 | 900 | let deltaBalance = (elem - newBalance) | |
901 | 901 | $Tuple3((acc._1 :+ newBalance), (acc._2 + newBalance), (acc._3 :+ deltaBalance)) | |
902 | 902 | } | |
903 | 903 | ||
904 | 904 | let $l = balances_ | |
905 | 905 | let $s = size($l) | |
906 | 906 | let $acc0 = $Tuple3(nil, 0, nil) | |
907 | 907 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
908 | 908 | then $a | |
909 | 909 | else foldFunc($a, $l[$i]) | |
910 | 910 | ||
911 | 911 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
912 | 912 | then $a | |
913 | 913 | else throw("List size exceeds 10") | |
914 | 914 | ||
915 | 915 | $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) | |
916 | 916 | } | |
917 | 917 | ||
918 | 918 | ||
919 | 919 | func _getPaymentsFromBalances (assets_,balances_,recipient_,sourceDecimals_) = { | |
920 | 920 | func foldFunc (acc,elem) = { | |
921 | 921 | let index = acc._1 | |
922 | 922 | $Tuple2((index + 1), (acc._2 :+ ScriptTransfer(recipient_, _normalizeDecimals(balances_[index], sourceDecimals_, _getDecimals(elem), DOWN), _strToAsset(elem)))) | |
923 | 923 | } | |
924 | 924 | ||
925 | 925 | let result = { | |
926 | 926 | let $l = assets_ | |
927 | 927 | let $s = size($l) | |
928 | 928 | let $acc0 = $Tuple2(0, nil) | |
929 | 929 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
930 | 930 | then $a | |
931 | 931 | else foldFunc($a, $l[$i]) | |
932 | 932 | ||
933 | 933 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
934 | 934 | then $a | |
935 | 935 | else throw("List size exceeds 10") | |
936 | 936 | ||
937 | 937 | $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) | |
938 | 938 | } | |
939 | 939 | result._2 | |
940 | 940 | } | |
941 | 941 | ||
942 | 942 | ||
943 | 943 | func _calculateMicroFee (balance_,equilibrium_,weightAmplifier_,slippageRate_,feeMaxRate_) = if ((equilibrium_ > balance_)) | |
944 | 944 | then { | |
945 | 945 | let threshold = fraction(equilibrium_, (MAX_WEIGHT_AMPLIFIER - weightAmplifier_), MAX_WEIGHT_AMPLIFIER) | |
946 | 946 | if ((threshold > balance_)) | |
947 | 947 | then { | |
948 | 948 | let maxDeviation = (threshold - balance_) | |
949 | 949 | let feeRate = fraction(fraction(maxDeviation, slippageRate_, SLIPPAGE_RATE_FACTOR), FEE_RATE_FACTOR, equilibrium_) | |
950 | 950 | if ((feeRate > feeMaxRate_)) | |
951 | 951 | then fraction(maxDeviation, feeMaxRate_, FEE_RATE_FACTOR) | |
952 | 952 | else fraction(maxDeviation, feeRate, FEE_RATE_FACTOR) | |
953 | 953 | } | |
954 | 954 | else 0 | |
955 | 955 | } | |
956 | 956 | else { | |
957 | 957 | let threshold = fraction(equilibrium_, (MAX_WEIGHT_AMPLIFIER + weightAmplifier_), MAX_WEIGHT_AMPLIFIER) | |
958 | 958 | if ((balance_ > threshold)) | |
959 | 959 | then { | |
960 | 960 | let maxDeviation = (balance_ - threshold) | |
961 | 961 | let feeRate = fraction(fraction(maxDeviation, slippageRate_, SLIPPAGE_RATE_FACTOR), FEE_RATE_FACTOR, equilibrium_) | |
962 | 962 | if ((feeRate > feeMaxRate_)) | |
963 | 963 | then fraction(maxDeviation, feeMaxRate_, FEE_RATE_FACTOR) | |
964 | 964 | else fraction(maxDeviation, feeRate, FEE_RATE_FACTOR) | |
965 | 965 | } | |
966 | 966 | else 0 | |
967 | 967 | } | |
968 | 968 | ||
969 | 969 | ||
970 | 970 | func _calculateFee (balances_,assetsTotalSupply_,weights_,sigmaWeight_,weightAmplifier_,slippageRate_,feeMaxRate_) = 0 | |
971 | 971 | ||
972 | 972 | ||
973 | 973 | func _validateLiquidityInvariant (prevAssetBalances_,prevAssetTotalSupply_,assetBalances_,assetTotalSupply_,prevLpTotalSupply_,lpTotalSupply_,assetWeights_,sigmaWeight_,weightAmplifier_,slippageRate_,feeMaxRate_) = if (if ((prevLpTotalSupply_ == 0)) | |
974 | 974 | then true | |
975 | 975 | else (lpTotalSupply_ == 0)) | |
976 | 976 | then true | |
977 | 977 | else { | |
978 | 978 | let prevAssetsRate = fraction((prevAssetTotalSupply_ - _calculateFee(prevAssetBalances_, prevAssetTotalSupply_, assetWeights_, sigmaWeight_, weightAmplifier_, slippageRate_, feeMaxRate_)), RATE_FACTOR, prevLpTotalSupply_) | |
979 | 979 | let newAssetsRate = fraction((assetTotalSupply_ - _calculateFee(assetBalances_, assetTotalSupply_, assetWeights_, sigmaWeight_, weightAmplifier_, slippageRate_, feeMaxRate_)), RATE_FACTOR, lpTotalSupply_) | |
980 | 980 | let diff = (newAssetsRate - prevAssetsRate) | |
981 | 981 | if (if ((0 >= diff)) | |
982 | 982 | then ((-1 * _loadPrecision()) > diff) | |
983 | 983 | else false) | |
984 | 984 | then throw(("_validateLiquidityInvariant: revert: diff=" + toString(diff))) | |
985 | 985 | else true | |
986 | 986 | } | |
987 | 987 | ||
988 | 988 | ||
989 | 989 | func _validateSwapInvariant (prevAssetBalances_,prevAssetTotalSupply_,assetBalances_,assetTotalSupply_,assetWeights_,sigmaWeight_,weightAmplifier_,slippageRate_,feeMaxRate_) = { | |
990 | 990 | let prevUtil = (prevAssetTotalSupply_ - _calculateFee(prevAssetBalances_, prevAssetTotalSupply_, assetWeights_, sigmaWeight_, weightAmplifier_, slippageRate_, feeMaxRate_)) | |
991 | 991 | let newUtil = (assetTotalSupply_ - _calculateFee(assetBalances_, assetTotalSupply_, assetWeights_, sigmaWeight_, weightAmplifier_, slippageRate_, feeMaxRate_)) | |
992 | 992 | let diff = (newUtil - prevUtil) | |
993 | 993 | if (if ((0 >= diff)) | |
994 | 994 | then ((-1 * _loadPrecision()) > diff) | |
995 | 995 | else false) | |
996 | 996 | then throw(("_validateSwapInvariant: revert: diff=" + toString(diff))) | |
997 | 997 | else true | |
998 | 998 | } | |
999 | 999 | ||
1000 | 1000 | ||
1001 | 1001 | func _validateAssetAllocation (balance_,assetTotalSupply_,prevBalance_,prevAssetTotalSupply_,weight_,sigmaWeight_,maxAllocAmp_) = { | |
1002 | 1002 | let equilibrium = fraction(assetTotalSupply_, weight_, sigmaWeight_) | |
1003 | 1003 | let maxAllocationAmp = if ((balance_ > equilibrium)) | |
1004 | 1004 | then (MAX_AMPLIFIER + maxAllocAmp_) | |
1005 | 1005 | else (MAX_AMPLIFIER - maxAllocAmp_) | |
1006 | 1006 | let maxAllocation = fraction(equilibrium, maxAllocationAmp, MAX_AMPLIFIER) | |
1007 | 1007 | let prevMaxAllocation = fraction(fraction(prevAssetTotalSupply_, weight_, sigmaWeight_), maxAllocationAmp, MAX_AMPLIFIER) | |
1008 | 1008 | if ((balance_ > equilibrium)) | |
1009 | 1009 | then if ((balance_ > maxAllocation)) | |
1010 | 1010 | then if ((prevMaxAllocation > prevBalance_)) | |
1011 | 1011 | then throw("_validateAssetAllocation: new up") | |
1012 | 1012 | else if (((balance_ - maxAllocation) > (prevBalance_ - prevMaxAllocation))) | |
1013 | 1013 | then throw("_validateAssetAllocation: still up") | |
1014 | 1014 | else true | |
1015 | 1015 | else true | |
1016 | 1016 | else if ((maxAllocation > balance_)) | |
1017 | 1017 | then if ((prevBalance_ > prevMaxAllocation)) | |
1018 | 1018 | then throw("_validateAssetAllocation: new down") | |
1019 | 1019 | else if (((maxAllocation - balance_) > (prevMaxAllocation - prevBalance_))) | |
1020 | 1020 | then throw("_validateAssetAllocation: still down") | |
1021 | 1021 | else true | |
1022 | 1022 | else true | |
1023 | 1023 | } | |
1024 | 1024 | ||
1025 | 1025 | ||
1026 | - | func _validateAllocation (assetBalances_,assetTotalSupply_,prevAssetBalances_,prevAssetTotalSupply_,assetWeights_,sigmaWeight_,maxAllocAmp_) = { | |
1027 | - | func foldFunc (acc,elem) = { | |
1028 | - | let index = acc._1 | |
1029 | - | $Tuple2((index + 1), if (acc._2) | |
1030 | - | then _validateAssetAllocation(elem, assetTotalSupply_, prevAssetBalances_[index], prevAssetTotalSupply_, assetWeights_[index], sigmaWeight_, maxAllocAmp_) | |
1031 | - | else false) | |
1032 | - | } | |
1033 | - | ||
1034 | - | let result = { | |
1035 | - | let $l = assetBalances_ | |
1036 | - | let $s = size($l) | |
1037 | - | let $acc0 = $Tuple2(0, true) | |
1038 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1039 | - | then $a | |
1040 | - | else foldFunc($a, $l[$i]) | |
1041 | - | ||
1042 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1043 | - | then $a | |
1044 | - | else throw("List size exceeds 10") | |
1045 | - | ||
1046 | - | $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) | |
1047 | - | } | |
1048 | - | result._2 | |
1049 | - | } | |
1026 | + | func _validateAllocation (assetBalances_,assetTotalSupply_,prevAssetBalances_,prevAssetTotalSupply_,assetWeights_,sigmaWeight_,maxAllocAmp_) = true | |
1050 | 1027 | ||
1051 | 1028 | ||
1052 | 1029 | func _checkpoint (user_) = { | |
1053 | 1030 | let userLp = _loadUserLp(user_) | |
1054 | 1031 | let userProfits = _loadUserProfits(user_) | |
1055 | 1032 | let sigmaFeePerLp = _loadSigmaFeePerLp() | |
1056 | 1033 | let userSigmaFeePerLp = _loadUserSigmaFeePerLp(user_) | |
1057 | 1034 | func foldFunc (acc,elem) = { | |
1058 | 1035 | let index = acc._1 | |
1059 | 1036 | let profitUpdated = (userProfits[index] + toInt(fraction(toBigInt(userLp), (sigmaFeePerLp[index] - userSigmaFeePerLp[index]), PERCENT_FACTOR))) | |
1060 | 1037 | $Tuple2((index + 1), (acc._2 :+ profitUpdated)) | |
1061 | 1038 | } | |
1062 | 1039 | ||
1063 | - | let $ | |
1040 | + | let $t02555825631 = { | |
1064 | 1041 | let $l = ZERO_INT_LIST_11 | |
1065 | 1042 | let $s = size($l) | |
1066 | 1043 | let $acc0 = $Tuple2(0, nil) | |
1067 | 1044 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1068 | 1045 | then $a | |
1069 | 1046 | else foldFunc($a, $l[$i]) | |
1070 | 1047 | ||
1071 | 1048 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1072 | 1049 | then $a | |
1073 | 1050 | else throw("List size exceeds 11") | |
1074 | 1051 | ||
1075 | 1052 | $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) | |
1076 | 1053 | } | |
1077 | - | let idx = $ | |
1078 | - | let profitsUpdated = $ | |
1054 | + | let idx = $t02555825631._1 | |
1055 | + | let profitsUpdated = $t02555825631._2 | |
1079 | 1056 | $Tuple2((_saveUserProfits(user_, profitsUpdated) ++ _saveUserSigmaFeePerLp(user_, sigmaFeePerLp)), profitsUpdated) | |
1080 | 1057 | } | |
1081 | 1058 | ||
1082 | 1059 | ||
1083 | 1060 | func _updateSigmaFeePerLp (sigmaFeePerLp_,totalLp_,index_,lpFee_) = { | |
1084 | 1061 | func foldFunc (acc,elem) = { | |
1085 | 1062 | let index = acc._1 | |
1086 | 1063 | let sigmaFeePerLpUpdated = if ((index_ == index)) | |
1087 | 1064 | then (sigmaFeePerLp_[index] + fraction(toBigInt(lpFee_), PERCENT_FACTOR, toBigInt(totalLp_))) | |
1088 | 1065 | else sigmaFeePerLp_[index] | |
1089 | 1066 | $Tuple2((index + 1), (acc._2 :+ sigmaFeePerLpUpdated)) | |
1090 | 1067 | } | |
1091 | 1068 | ||
1092 | - | let $ | |
1069 | + | let $t02628126360 = { | |
1093 | 1070 | let $l = ZERO_INT_LIST_11 | |
1094 | 1071 | let $s = size($l) | |
1095 | 1072 | let $acc0 = $Tuple2(0, nil) | |
1096 | 1073 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1097 | 1074 | then $a | |
1098 | 1075 | else foldFunc($a, $l[$i]) | |
1099 | 1076 | ||
1100 | 1077 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1101 | 1078 | then $a | |
1102 | 1079 | else throw("List size exceeds 11") | |
1103 | 1080 | ||
1104 | 1081 | $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) | |
1105 | 1082 | } | |
1106 | - | let idx = $ | |
1107 | - | let sigmaFeePerLpUpdated = $ | |
1083 | + | let idx = $t02628126360._1 | |
1084 | + | let sigmaFeePerLpUpdated = $t02628126360._2 | |
1108 | 1085 | sigmaFeePerLpUpdated | |
1109 | 1086 | } | |
1110 | 1087 | ||
1111 | 1088 | ||
1112 | 1089 | func _calculateLpAndProtocolFees (assetIndex_,amount_,lpFeeRate_,protocolFeeRate_) = { | |
1113 | 1090 | let sigmaFeePerLp = _loadSigmaFeePerLp() | |
1114 | 1091 | let totalLp = _loadTotalLp() | |
1115 | - | let $ | |
1092 | + | let $t02658126856 = if ((totalLp == 0)) | |
1116 | 1093 | then $Tuple2(0, fraction(amount_, protocolFeeRate_, MAX_FEE)) | |
1117 | 1094 | else $Tuple2(fraction(amount_, lpFeeRate_, MAX_FEE), fraction(amount_, protocolFeeRate_, MAX_FEE)) | |
1118 | - | let lpFee = $ | |
1119 | - | let protocolFee = $ | |
1095 | + | let lpFee = $t02658126856._1 | |
1096 | + | let protocolFee = $t02658126856._2 | |
1120 | 1097 | let sigmaFeePerLpUpdated = if ((lpFee == 0)) | |
1121 | 1098 | then sigmaFeePerLp | |
1122 | 1099 | else _updateSigmaFeePerLp(sigmaFeePerLp, totalLp, assetIndex_, lpFee) | |
1123 | 1100 | $Tuple3(lpFee, protocolFee, sigmaFeePerLpUpdated) | |
1124 | 1101 | } | |
1125 | 1102 | ||
1126 | 1103 | ||
1127 | 1104 | func _depositAll (amount_) = { | |
1128 | 1105 | let storage = _loadStorage() | |
1129 | 1106 | let lpTotalSupply = storage._3 | |
1130 | 1107 | let weightAmplifier = storage._7 | |
1131 | 1108 | let slippageRate = storage._8 | |
1132 | 1109 | let feeMaxRate = storage._9 | |
1133 | 1110 | let assets = _loadAssets() | |
1134 | - | let $ | |
1135 | - | let assetWeights = $ | |
1136 | - | let sigmaWeight = $ | |
1137 | - | let $ | |
1138 | - | let prevAssetBalances = $ | |
1139 | - | let prevAssetTotalSupply = $ | |
1140 | - | let $ | |
1111 | + | let $t02736527418 = _loadAssetWeights() | |
1112 | + | let assetWeights = $t02736527418._1 | |
1113 | + | let sigmaWeight = $t02736527418._2 | |
1114 | + | let $t02742327491 = _loadAssetBalances() | |
1115 | + | let prevAssetBalances = $t02742327491._1 | |
1116 | + | let prevAssetTotalSupply = $t02742327491._2 | |
1117 | + | let $t02749728727 = if ((prevAssetTotalSupply == 0)) | |
1141 | 1118 | then { | |
1142 | 1119 | func foldFunc (acc,elem) = { | |
1143 | 1120 | let index = acc._1 | |
1144 | 1121 | let requiredAmountNormalized = fraction(assetWeights[index], amount_, sigmaWeight) | |
1145 | 1122 | $Tuple2((index + 1), (acc._2 :+ requiredAmountNormalized)) | |
1146 | 1123 | } | |
1147 | 1124 | ||
1148 | - | let $ | |
1125 | + | let $t02793928013 = { | |
1149 | 1126 | let $l = assets | |
1150 | 1127 | let $s = size($l) | |
1151 | 1128 | let $acc0 = $Tuple2(0, nil) | |
1152 | 1129 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1153 | 1130 | then $a | |
1154 | 1131 | else foldFunc($a, $l[$i]) | |
1155 | 1132 | ||
1156 | 1133 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1157 | 1134 | then $a | |
1158 | 1135 | else throw("List size exceeds 10") | |
1159 | 1136 | ||
1160 | 1137 | $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) | |
1161 | 1138 | } | |
1162 | - | let idx = $ | |
1163 | - | let requiredAmountsNormalized = $ | |
1139 | + | let idx = $t02793928013._1 | |
1140 | + | let requiredAmountsNormalized = $t02793928013._2 | |
1164 | 1141 | $Tuple2(amount_, requiredAmountsNormalized) | |
1165 | 1142 | } | |
1166 | 1143 | else { | |
1167 | 1144 | let ratio = fraction(toBigInt(amount_), PERCENT_FACTOR, toBigInt(prevAssetTotalSupply)) | |
1168 | 1145 | func foldFunc1 (acc,elem) = { | |
1169 | 1146 | let index = acc._1 | |
1170 | 1147 | let requiredAmountNormalized = toInt(fraction(ratio, toBigInt(prevAssetBalances[index]), PERCENT_FACTOR)) | |
1171 | 1148 | $Tuple2((index + 1), (acc._2 :+ requiredAmountNormalized)) | |
1172 | 1149 | } | |
1173 | 1150 | ||
1174 | - | let $ | |
1151 | + | let $t02855628631 = { | |
1175 | 1152 | let $l = assets | |
1176 | 1153 | let $s = size($l) | |
1177 | 1154 | let $acc0 = $Tuple2(0, nil) | |
1178 | 1155 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1179 | 1156 | then $a | |
1180 | 1157 | else foldFunc1($a, $l[$i]) | |
1181 | 1158 | ||
1182 | 1159 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1183 | 1160 | then $a | |
1184 | 1161 | else throw("List size exceeds 10") | |
1185 | 1162 | ||
1186 | 1163 | $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) | |
1187 | 1164 | } | |
1188 | - | let idx = $ | |
1189 | - | let requiredAmountsNormalized = $ | |
1165 | + | let idx = $t02855628631._1 | |
1166 | + | let requiredAmountsNormalized = $t02855628631._2 | |
1190 | 1167 | $Tuple2(fraction(amount_, lpTotalSupply, prevAssetTotalSupply), requiredAmountsNormalized) | |
1191 | 1168 | } | |
1192 | - | let lpTokensToMint = $ | |
1193 | - | let requiredAmountsNormalized = $ | |
1194 | - | let $ | |
1195 | - | let assetBalances = $ | |
1196 | - | let assetTotalSupply = $ | |
1169 | + | let lpTokensToMint = $t02749728727._1 | |
1170 | + | let requiredAmountsNormalized = $t02749728727._2 | |
1171 | + | let $t02873328846 = _incrementBalancesByAmounts(prevAssetBalances, requiredAmountsNormalized) | |
1172 | + | let assetBalances = $t02873328846._1 | |
1173 | + | let assetTotalSupply = $t02873328846._2 | |
1197 | 1174 | let err2 = _validateLiquidityInvariant(prevAssetBalances, prevAssetTotalSupply, assetBalances, assetTotalSupply, lpTotalSupply, (lpTotalSupply + lpTokensToMint), assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate) | |
1198 | 1175 | if ((err2 == err2)) | |
1199 | 1176 | then $Tuple3(lpTokensToMint, requiredAmountsNormalized, assetBalances) | |
1200 | 1177 | else throw("Strict value is not equal to itself.") | |
1201 | 1178 | } | |
1202 | 1179 | ||
1203 | 1180 | ||
1204 | 1181 | func _deposit (assetId_,amount_) = { | |
1205 | 1182 | let storage = _loadStorage() | |
1206 | 1183 | let lpTotalSupply = storage._3 | |
1207 | 1184 | let lpFeeRate = storage._4 | |
1208 | 1185 | let protocolFeeRate = storage._5 | |
1209 | 1186 | let maxAllocAmplifier = storage._6 | |
1210 | 1187 | let weightAmplifier = storage._7 | |
1211 | 1188 | let slippageRate = storage._8 | |
1212 | 1189 | let feeMaxRate = storage._9 | |
1213 | 1190 | let assets = _loadAssets() | |
1214 | - | let $ | |
1215 | - | let assetWeights = $ | |
1216 | - | let sigmaWeight = $ | |
1217 | - | let $ | |
1218 | - | let prevAssetBalances = $ | |
1219 | - | let prevAssetTotalSupply = $ | |
1191 | + | let $t02960929662 = _loadAssetWeights() | |
1192 | + | let assetWeights = $t02960929662._1 | |
1193 | + | let sigmaWeight = $t02960929662._2 | |
1194 | + | let $t02966729781 = _loadAssetBalances() | |
1195 | + | let prevAssetBalances = $t02966729781._1 | |
1196 | + | let prevAssetTotalSupply = $t02966729781._2 | |
1220 | 1197 | let assetBalances = _incrementBalanceByIndex(prevAssetBalances, value(indexOf(assets, assetId_)), amount_) | |
1221 | 1198 | let assetTotalSupply = (prevAssetTotalSupply + amount_) | |
1222 | 1199 | let err2 = _validateAllocation(assetBalances, assetTotalSupply, prevAssetBalances, prevAssetTotalSupply, assetWeights, sigmaWeight, maxAllocAmplifier) | |
1223 | 1200 | if ((err2 == err2)) | |
1224 | 1201 | then { | |
1225 | 1202 | let prevFee = _calculateFee(prevAssetBalances, prevAssetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate) | |
1226 | 1203 | let fee = _calculateFee(assetBalances, assetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate) | |
1227 | 1204 | let lpTokensToMint = if ((lpTotalSupply == 0)) | |
1228 | 1205 | then throw("_deposit: empty pool") | |
1229 | 1206 | else { | |
1230 | 1207 | let assetDiff = (assetTotalSupply - prevAssetTotalSupply) | |
1231 | 1208 | let feeDiff = (fee - prevFee) | |
1232 | 1209 | let utilityChangeFactor = fraction((assetDiff - feeDiff), RATE_FACTOR, (prevAssetTotalSupply - prevFee)) | |
1233 | 1210 | let lpTokensToMintInner = fraction(lpTotalSupply, utilityChangeFactor, RATE_FACTOR) | |
1234 | 1211 | let err3 = _validateLiquidityInvariant(prevAssetBalances, prevAssetTotalSupply, assetBalances, assetTotalSupply, lpTotalSupply, (lpTotalSupply + lpTokensToMintInner), assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate) | |
1235 | 1212 | if ((err3 == err3)) | |
1236 | 1213 | then lpTokensToMintInner | |
1237 | 1214 | else throw("Strict value is not equal to itself.") | |
1238 | 1215 | } | |
1239 | - | let $ | |
1240 | - | let lpFee = $ | |
1241 | - | let protocolFee = $ | |
1242 | - | let sigmaFeePerLpUpdated = $ | |
1216 | + | let $t03144331574 = _calculateLpAndProtocolFees(0, lpTokensToMint, (lpFeeRate / 2), (protocolFeeRate / 2)) | |
1217 | + | let lpFee = $t03144331574._1 | |
1218 | + | let protocolFee = $t03144331574._2 | |
1219 | + | let sigmaFeePerLpUpdated = $t03144331574._3 | |
1243 | 1220 | $Tuple5(lpTokensToMint, assetBalances, lpFee, protocolFee, sigmaFeePerLpUpdated) | |
1244 | 1221 | } | |
1245 | 1222 | else throw("Strict value is not equal to itself.") | |
1246 | 1223 | } | |
1247 | 1224 | ||
1248 | 1225 | ||
1249 | 1226 | func _withdrawAll (amount_) = { | |
1250 | 1227 | let storage = _loadStorage() | |
1251 | 1228 | let lpTotalSupply = storage._3 | |
1252 | 1229 | let maxAllocAmplifier = storage._6 | |
1253 | 1230 | let weightAmplifier = storage._7 | |
1254 | 1231 | let slippageRate = storage._8 | |
1255 | 1232 | let feeMaxRate = storage._9 | |
1256 | - | let $ | |
1257 | - | let prevAssetBalances = $ | |
1258 | - | let prevAssetTotalSupply = $ | |
1259 | - | let $ | |
1260 | - | let assetWeights = $ | |
1261 | - | let sigmaWeight = $ | |
1233 | + | let $t03190831976 = _loadAssetBalances() | |
1234 | + | let prevAssetBalances = $t03190831976._1 | |
1235 | + | let prevAssetTotalSupply = $t03190831976._2 | |
1236 | + | let $t03198132034 = _loadAssetWeights() | |
1237 | + | let assetWeights = $t03198132034._1 | |
1238 | + | let sigmaWeight = $t03198132034._2 | |
1262 | 1239 | let lpTokensToBurn = amount_ | |
1263 | 1240 | let err = _validateInt(lpTokensToBurn, 0, MAX_INT, "_withdrawAll: lpTokensToBurn less than 0") | |
1264 | 1241 | if ((err == err)) | |
1265 | 1242 | then { | |
1266 | - | let $ | |
1267 | - | let assetBalances = $ | |
1268 | - | let assetTotalSupply = $ | |
1269 | - | let balancesToPay = $ | |
1243 | + | let $t03217632309 = _decrementBalancesByLpAmount(prevAssetBalances, lpTokensToBurn, lpTotalSupply) | |
1244 | + | let assetBalances = $t03217632309._1 | |
1245 | + | let assetTotalSupply = $t03217632309._2 | |
1246 | + | let balancesToPay = $t03217632309._3 | |
1270 | 1247 | let err2 = _validateLiquidityInvariant(prevAssetBalances, prevAssetTotalSupply, assetBalances, assetTotalSupply, lpTotalSupply, (lpTotalSupply - lpTokensToBurn), assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate) | |
1271 | 1248 | if ((err2 == err2)) | |
1272 | 1249 | then $Tuple3(lpTokensToBurn, balancesToPay, assetBalances) | |
1273 | 1250 | else throw("Strict value is not equal to itself.") | |
1274 | 1251 | } | |
1275 | 1252 | else throw("Strict value is not equal to itself.") | |
1276 | 1253 | } | |
1277 | 1254 | ||
1278 | 1255 | ||
1279 | 1256 | func _withdraw (assetId_,lpAmount_) = { | |
1280 | 1257 | let storage = _loadStorage() | |
1281 | 1258 | let lpTotalSupply = storage._3 | |
1282 | 1259 | let lpFeeRate = storage._4 | |
1283 | 1260 | let protocolFeeRate = storage._5 | |
1284 | 1261 | let maxAllocAmplifier = storage._6 | |
1285 | 1262 | let weightAmplifier = storage._7 | |
1286 | 1263 | let slippageRate = storage._8 | |
1287 | 1264 | let feeMaxRate = storage._9 | |
1288 | 1265 | let precision = _loadPrecision() | |
1289 | 1266 | let assets = _loadAssets() | |
1290 | - | let $ | |
1291 | - | let prevAssetBalances = $ | |
1292 | - | let prevAssetTotalSupply = $ | |
1293 | - | let $ | |
1294 | - | let assetWeights = $ | |
1295 | - | let sigmaWeight = $ | |
1267 | + | let $t03310133169 = _loadAssetBalances() | |
1268 | + | let prevAssetBalances = $t03310133169._1 | |
1269 | + | let prevAssetTotalSupply = $t03310133169._2 | |
1270 | + | let $t03317433227 = _loadAssetWeights() | |
1271 | + | let assetWeights = $t03317433227._1 | |
1272 | + | let sigmaWeight = $t03317433227._2 | |
1296 | 1273 | let targetAssetIndex = value(indexOf(assets, assetId_)) | |
1297 | 1274 | let prevFee = _calculateFee(prevAssetBalances, prevAssetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate) | |
1298 | 1275 | let prevUtilValue = (prevAssetTotalSupply - prevFee) | |
1299 | 1276 | let k = fraction(toBigInt((lpTotalSupply - lpAmount_)), PERCENT_FACTOR, toBigInt(lpTotalSupply)) | |
1300 | 1277 | let prevUtilValueWithK = toInt(fraction(toBigInt(prevUtilValue), k, PERCENT_FACTOR)) | |
1301 | 1278 | let prevUtilValueDivLp = fraction(toBigInt(prevUtilValue), PERCENT_FACTOR, toBigInt(lpTotalSupply), CEILING) | |
1302 | 1279 | func foldFunc (acc,elem) = if (acc._1) | |
1303 | 1280 | then acc | |
1304 | 1281 | else { | |
1305 | 1282 | let startInner = acc._2 | |
1306 | 1283 | let stopInner = acc._3 | |
1307 | 1284 | let currentAmount = ((stopInner + startInner) / 2) | |
1308 | 1285 | let tempAssetBalances = _decrementBalanceByIndex(prevAssetBalances, targetAssetIndex, currentAmount) | |
1309 | 1286 | let tempAssetTotalSupply = (prevAssetTotalSupply - currentAmount) | |
1310 | 1287 | let utilValue = (tempAssetTotalSupply - _calculateFee(tempAssetBalances, tempAssetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate)) | |
1311 | 1288 | if (if (((utilValue - prevUtilValueWithK) > (-1 * precision))) | |
1312 | 1289 | then (precision > (utilValue - prevUtilValueWithK)) | |
1313 | 1290 | else false) | |
1314 | 1291 | then $Tuple5(true, startInner, stopInner, currentAmount, (utilValue - prevUtilValueWithK)) | |
1315 | 1292 | else if ((0 > (utilValue - prevUtilValueWithK))) | |
1316 | 1293 | then $Tuple5(false, startInner, currentAmount, currentAmount, (utilValue - prevUtilValueWithK)) | |
1317 | 1294 | else $Tuple5(false, currentAmount, stopInner, currentAmount, (utilValue - prevUtilValueWithK)) | |
1318 | 1295 | } | |
1319 | 1296 | ||
1320 | 1297 | let targetAmount = { | |
1321 | 1298 | let stop = toInt(fraction(toBigInt((lpAmount_ + prevFee)), prevUtilValueDivLp, PERCENT_FACTOR, CEILING)) | |
1322 | - | let $ | |
1299 | + | let $t03509335205 = { | |
1323 | 1300 | let $l = LIST_64 | |
1324 | 1301 | let $s = size($l) | |
1325 | 1302 | let $acc0 = $Tuple5(false, 0, stop, 0, 0) | |
1326 | 1303 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1327 | 1304 | then $a | |
1328 | 1305 | else foldFunc($a, $l[$i]) | |
1329 | 1306 | ||
1330 | 1307 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1331 | 1308 | then $a | |
1332 | 1309 | else throw("List size exceeds 64") | |
1333 | 1310 | ||
1334 | 1311 | $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) | |
1335 | 1312 | } | |
1336 | - | let success = $ | |
1337 | - | let startOut = $ | |
1338 | - | let stopOut = $ | |
1339 | - | let targetAmountOut = $ | |
1340 | - | let diffOut = $ | |
1313 | + | let success = $t03509335205._1 | |
1314 | + | let startOut = $t03509335205._2 | |
1315 | + | let stopOut = $t03509335205._3 | |
1316 | + | let targetAmountOut = $t03509335205._4 | |
1317 | + | let diffOut = $t03509335205._5 | |
1341 | 1318 | if (!(success)) | |
1342 | 1319 | then throw(((("_withdraw: can't calculate targetAmount=" + toString(targetAmountOut)) + ",diff=") + toString(diffOut))) | |
1343 | 1320 | else targetAmountOut | |
1344 | 1321 | } | |
1345 | 1322 | let finalAssetBalances = _decrementBalanceByIndex(prevAssetBalances, targetAssetIndex, targetAmount) | |
1346 | 1323 | let finalAssetTotalSupply = (prevAssetTotalSupply - targetAmount) | |
1347 | 1324 | let err1 = if (_validateAllocation(finalAssetBalances, finalAssetTotalSupply, prevAssetBalances, prevAssetTotalSupply, assetWeights, sigmaWeight, maxAllocAmplifier)) | |
1348 | 1325 | then _validateLiquidityInvariant(prevAssetBalances, prevAssetTotalSupply, finalAssetBalances, finalAssetTotalSupply, lpTotalSupply, (lpTotalSupply - lpAmount_), assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate) | |
1349 | 1326 | else false | |
1350 | 1327 | if ((err1 == err1)) | |
1351 | 1328 | then { | |
1352 | - | let $ | |
1353 | - | let lpFee = $ | |
1354 | - | let protocolFee = $ | |
1355 | - | let sigmaFeePerLpUpdated = $ | |
1329 | + | let $t03619736345 = _calculateLpAndProtocolFees((targetAssetIndex + 1), targetAmount, (lpFeeRate / 2), (protocolFeeRate / 2)) | |
1330 | + | let lpFee = $t03619736345._1 | |
1331 | + | let protocolFee = $t03619736345._2 | |
1332 | + | let sigmaFeePerLpUpdated = $t03619736345._3 | |
1356 | 1333 | $Tuple5(targetAmount, finalAssetBalances, lpFee, protocolFee, sigmaFeePerLpUpdated) | |
1357 | 1334 | } | |
1358 | 1335 | else throw("Strict value is not equal to itself.") | |
1359 | 1336 | } | |
1360 | 1337 | ||
1361 | 1338 | ||
1362 | 1339 | func _swap (sourceAssetIndex_,targetAssetIndex_,sourceAmount_) = { | |
1363 | 1340 | let storage = _loadStorage() | |
1364 | 1341 | let lpAssetId = storage._1 | |
1365 | 1342 | let lpDecimals = _getDecimals(toBase58String(lpAssetId)) | |
1366 | 1343 | let lpTotalSupply = storage._3 | |
1367 | 1344 | let lpFeeRate = storage._4 | |
1368 | 1345 | let protocolFeeRate = storage._5 | |
1369 | 1346 | let maxAllocAmplifier = storage._6 | |
1370 | 1347 | let weightAmplifier = storage._7 | |
1371 | 1348 | let slippageRate = storage._8 | |
1372 | 1349 | let feeMaxRate = storage._9 | |
1373 | 1350 | let precision = _loadPrecision() | |
1374 | - | let $ | |
1375 | - | let prevAssetBalances = $ | |
1376 | - | let prevAssetTotalSupply = $ | |
1377 | - | let $ | |
1378 | - | let assetWeights = $ | |
1379 | - | let sigmaWeight = $ | |
1351 | + | let $t03692736995 = _loadAssetBalances() | |
1352 | + | let prevAssetBalances = $t03692736995._1 | |
1353 | + | let prevAssetTotalSupply = $t03692736995._2 | |
1354 | + | let $t03700037053 = _loadAssetWeights() | |
1355 | + | let assetWeights = $t03700037053._1 | |
1356 | + | let sigmaWeight = $t03700037053._2 | |
1380 | 1357 | let assetBalances = _incrementBalanceByIndex(prevAssetBalances, sourceAssetIndex_, sourceAmount_) | |
1381 | 1358 | let assetTotalSupply = (prevAssetTotalSupply + sourceAmount_) | |
1382 | 1359 | let prevFee = _calculateFee(prevAssetBalances, prevAssetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate) | |
1383 | 1360 | let prevUtilValue = (prevAssetTotalSupply - prevFee) | |
1384 | 1361 | func foldFunc (acc,elem) = if (acc._1) | |
1385 | 1362 | then acc | |
1386 | 1363 | else { | |
1387 | 1364 | let startInner = acc._2 | |
1388 | 1365 | let stopInner = acc._3 | |
1389 | 1366 | let currentAmount = ((stopInner + startInner) / 2) | |
1390 | 1367 | let tempAssetBalances = _decrementBalanceByIndex(assetBalances, targetAssetIndex_, currentAmount) | |
1391 | 1368 | let tempAssetTotalSupply = (assetTotalSupply - currentAmount) | |
1392 | 1369 | let utilValue = (tempAssetTotalSupply - _calculateFee(tempAssetBalances, tempAssetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate)) | |
1393 | 1370 | if (if (((utilValue - prevUtilValue) > (-1 * precision))) | |
1394 | 1371 | then (precision > (utilValue - prevUtilValue)) | |
1395 | 1372 | else false) | |
1396 | 1373 | then $Tuple5(true, startInner, stopInner, currentAmount, (utilValue - prevUtilValue)) | |
1397 | 1374 | else if ((0 > (utilValue - prevUtilValue))) | |
1398 | 1375 | then $Tuple5(false, startInner, currentAmount, currentAmount, (utilValue - prevUtilValue)) | |
1399 | 1376 | else $Tuple5(false, currentAmount, stopInner, currentAmount, (utilValue - prevUtilValue)) | |
1400 | 1377 | } | |
1401 | 1378 | ||
1402 | 1379 | let targetAmount = { | |
1403 | 1380 | let targetAmount = sourceAmount_ | |
1404 | 1381 | let tempAssetBalances = _decrementBalanceByIndex(assetBalances, targetAssetIndex_, targetAmount) | |
1405 | 1382 | let tempAssetTotalSupply = (assetTotalSupply - targetAmount) | |
1406 | 1383 | let fee = _calculateFee(tempAssetBalances, tempAssetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate) | |
1407 | 1384 | let feeDiff = (fee - prevFee) | |
1408 | 1385 | if ((feeDiff == 0)) | |
1409 | 1386 | then targetAmount | |
1410 | 1387 | else { | |
1411 | - | let $ | |
1388 | + | let $t03902639157 = { | |
1412 | 1389 | let $l = LIST_64 | |
1413 | 1390 | let $s = size($l) | |
1414 | 1391 | let $acc0 = $Tuple5(false, 0, (sourceAmount_ + prevFee), 0, 0) | |
1415 | 1392 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1416 | 1393 | then $a | |
1417 | 1394 | else foldFunc($a, $l[$i]) | |
1418 | 1395 | ||
1419 | 1396 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1420 | 1397 | then $a | |
1421 | 1398 | else throw("List size exceeds 64") | |
1422 | 1399 | ||
1423 | 1400 | $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) | |
1424 | 1401 | } | |
1425 | - | let success = $ | |
1426 | - | let startOut = $ | |
1427 | - | let stopOut = $ | |
1428 | - | let targetAmountOut = $ | |
1429 | - | let diffOut = $ | |
1402 | + | let success = $t03902639157._1 | |
1403 | + | let startOut = $t03902639157._2 | |
1404 | + | let stopOut = $t03902639157._3 | |
1405 | + | let targetAmountOut = $t03902639157._4 | |
1406 | + | let diffOut = $t03902639157._5 | |
1430 | 1407 | if (!(success)) | |
1431 | 1408 | then throw(((("_swap: can't calculate targetAmount=" + toString(targetAmountOut)) + ",diff=") + toString(diffOut))) | |
1432 | 1409 | else targetAmountOut | |
1433 | 1410 | } | |
1434 | 1411 | } | |
1435 | 1412 | let finalAssetBalances = _decrementBalanceByIndex(assetBalances, targetAssetIndex_, targetAmount) | |
1436 | 1413 | let finalAssetTotalSupply = (assetTotalSupply - targetAmount) | |
1437 | 1414 | let err1 = if (_validateAllocation(finalAssetBalances, finalAssetTotalSupply, prevAssetBalances, prevAssetTotalSupply, assetWeights, sigmaWeight, maxAllocAmplifier)) | |
1438 | 1415 | then _validateSwapInvariant(prevAssetBalances, prevAssetTotalSupply, finalAssetBalances, finalAssetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate) | |
1439 | 1416 | else false | |
1440 | 1417 | if ((err1 == err1)) | |
1441 | 1418 | then { | |
1442 | - | let $ | |
1443 | - | let lpFee = $ | |
1444 | - | let protocolFee = $ | |
1445 | - | let sigmaFeePerLpUpdated = $ | |
1419 | + | let $t04000440145 = _calculateLpAndProtocolFees((targetAssetIndex_ + 1), targetAmount, lpFeeRate, protocolFeeRate) | |
1420 | + | let lpFee = $t04000440145._1 | |
1421 | + | let protocolFee = $t04000440145._2 | |
1422 | + | let sigmaFeePerLpUpdated = $t04000440145._3 | |
1446 | 1423 | $Tuple5(targetAmount, finalAssetBalances, lpFee, protocolFee, sigmaFeePerLpUpdated) | |
1447 | 1424 | } | |
1448 | 1425 | else throw("Strict value is not equal to itself.") | |
1449 | 1426 | } | |
1450 | 1427 | ||
1451 | 1428 | ||
1452 | 1429 | @Callable(i) | |
1453 | 1430 | func init (assets_,assetWeights_,lpFeeRate_,protocolFeeRate_,lpTokenName_,lpTokenDescr_,lpTokenDecimals_,maxAllocationAmplifier_,weightAmplifier_,slippageRate_,feeMaxRate_,protocolFeeContract_,precision_,pauser_) = { | |
1454 | 1431 | let err = if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (_onlyThisContract(i.caller)) | |
1455 | 1432 | then _whenNotInitialized() | |
1456 | 1433 | else false) | |
1457 | 1434 | then _whenMultisigSet() | |
1458 | 1435 | else false) | |
1459 | 1436 | then _validateAssets(assets_, "init: invalid assets") | |
1460 | 1437 | else false) | |
1461 | 1438 | then _validateIntList(assetWeights_, 1, MAX_WEIGHT, "init: invalid assetWeights") | |
1462 | 1439 | else false) | |
1463 | 1440 | then _validateIntEquals(size(assets_), size(assetWeights_), "init: invalid assetWeights size") | |
1464 | 1441 | else false) | |
1465 | 1442 | then _validateInt(lpFeeRate_, 0, MAX_FEE, "init: invalid lp fee") | |
1466 | 1443 | else false) | |
1467 | 1444 | then _validateInt(protocolFeeRate_, 0, MAX_FEE, "init: invalid protocol fee") | |
1468 | 1445 | else false) | |
1469 | 1446 | then _validateTokenName(lpTokenName_, "init: invalid name") | |
1470 | 1447 | else false) | |
1471 | 1448 | then _validateTokenDescr(lpTokenDescr_, "init: invalid descr") | |
1472 | 1449 | else false) | |
1473 | 1450 | then _validateDecimals(lpTokenDecimals_, "init: invalid decimals") | |
1474 | 1451 | else false) | |
1475 | 1452 | then _validateInt(maxAllocationAmplifier_, 0, MAX_AMPLIFIER, "init: invalid maxAllocationAmplifier") | |
1476 | 1453 | else false) | |
1477 | 1454 | then _validateInt(weightAmplifier_, 0, maxAllocationAmplifier_, "init: invalid weightAmplifier") | |
1478 | 1455 | else false) | |
1479 | 1456 | then _validateInt(slippageRate_, 0, MAX_INT, "init: invalid slippageRate") | |
1480 | 1457 | else false) | |
1481 | 1458 | then _validateInt(feeMaxRate_, 0, MAX_INT, "init: invalid feeMaxRate") | |
1482 | 1459 | else false) | |
1483 | 1460 | then _validateAddress(protocolFeeContract_, "init: invalid protocolFeeContract") | |
1484 | 1461 | else false) | |
1485 | 1462 | then _validateInt(precision_, 1, MAX_INT, "init: invalid precision") | |
1486 | 1463 | else false) | |
1487 | 1464 | then _validateAddress(pauser_, "init: invalid pauser") | |
1488 | 1465 | else false | |
1489 | 1466 | if ((err == err)) | |
1490 | 1467 | then { | |
1491 | - | let $ | |
1492 | - | let assetWeights = $ | |
1493 | - | let sigmaWeight = $ | |
1468 | + | let $t04200842077 = _prepareAssetWeights(assetWeights_) | |
1469 | + | let assetWeights = $t04200842077._1 | |
1470 | + | let sigmaWeight = $t04200842077._2 | |
1494 | 1471 | let assetBalances = _prepareAssetBalances(assets_) | |
1495 | 1472 | let issue = Issue(lpTokenName_, lpTokenDescr_, 0, lpTokenDecimals_, true) | |
1496 | 1473 | let lpAssetId = calculateAssetId(issue) | |
1497 | 1474 | let storageUpdated = $Tuple10(lpAssetId, true, 0, lpFeeRate_, protocolFeeRate_, maxAllocationAmplifier_, weightAmplifier_, slippageRate_, feeMaxRate_, addressFromStringValue(protocolFeeContract_)) | |
1498 | 1475 | $Tuple2(((((((([issue] ++ _saveStorage(storageUpdated)) ++ _saveAssets(assets_)) ++ _saveAssetBalances(assetBalances)) ++ _saveAssetWeights(assetWeights)) ++ _savePrecision(precision_)) ++ _saveSigmaFeePerLp(_loadSigmaFeePerLp())) ++ _savePauser(addressFromStringValue(pauser_))), unit) | |
1499 | 1476 | } | |
1500 | 1477 | else throw("Strict value is not equal to itself.") | |
1501 | 1478 | } | |
1502 | 1479 | ||
1503 | 1480 | ||
1504 | 1481 | ||
1505 | 1482 | @Callable(i) | |
1506 | 1483 | func depositAll (amount_) = { | |
1507 | 1484 | let err = if (if (_whenInitialized()) | |
1508 | 1485 | then _whenNotPaused() | |
1509 | 1486 | else false) | |
1510 | 1487 | then _validateInt(amount_, 0, MAX_INT, "depositAll: invalid amount") | |
1511 | 1488 | else false | |
1512 | 1489 | if ((err == err)) | |
1513 | 1490 | then { | |
1514 | 1491 | let storage = _loadStorage() | |
1515 | 1492 | let lpAssetId = storage._1 | |
1516 | 1493 | let lpDecimals = _getDecimals(toBase58String(lpAssetId)) | |
1517 | 1494 | let assets = _loadAssets() | |
1518 | - | let $ | |
1519 | - | let lpTokensToMint = $ | |
1520 | - | let requiredAmountsNormalized = $ | |
1521 | - | let assetBalances = $ | |
1495 | + | let $t04382743912 = _depositAll(amount_) | |
1496 | + | let lpTokensToMint = $t04382743912._1 | |
1497 | + | let requiredAmountsNormalized = $t04382743912._2 | |
1498 | + | let assetBalances = $t04382743912._3 | |
1522 | 1499 | func foldFunc (acc,elem) = { | |
1523 | 1500 | let index = acc._1 | |
1524 | 1501 | let paymentAssetStr = _assetToStr(i.payments[index].assetId) | |
1525 | 1502 | let paymentAssetDecimals = _getDecimals(paymentAssetStr) | |
1526 | 1503 | let requiredAmountNormalized = requiredAmountsNormalized[index] | |
1527 | 1504 | let requiredAmount = _normalizeDecimals(requiredAmountNormalized, lpDecimals, paymentAssetDecimals, CEILING) | |
1528 | 1505 | let err1 = if ((paymentAssetStr != elem)) | |
1529 | 1506 | then throw(("depositAll: invalid payment: index=" + toString(index))) | |
1530 | 1507 | else if ((0 >= requiredAmount)) | |
1531 | 1508 | then throw("depositAll: too little amount required") | |
1532 | 1509 | else unit | |
1533 | 1510 | if ((err1 == err1)) | |
1534 | 1511 | then { | |
1535 | 1512 | let change = if ((i.payments[index].amount > requiredAmount)) | |
1536 | 1513 | then [ScriptTransfer(i.caller, (i.payments[index].amount - requiredAmount), i.payments[index].assetId)] | |
1537 | 1514 | else if ((requiredAmount > i.payments[index].amount)) | |
1538 | 1515 | then throw(((("depositAll: insufficient payment, index=" + toString(index)) + ", required=") + toString(requiredAmount))) | |
1539 | 1516 | else nil | |
1540 | 1517 | $Tuple2((index + 1), (acc._2 ++ change)) | |
1541 | 1518 | } | |
1542 | 1519 | else throw("Strict value is not equal to itself.") | |
1543 | 1520 | } | |
1544 | 1521 | ||
1545 | - | let $ | |
1522 | + | let $t04505545117 = { | |
1546 | 1523 | let $l = assets | |
1547 | 1524 | let $s = size($l) | |
1548 | 1525 | let $acc0 = $Tuple2(0, nil) | |
1549 | 1526 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1550 | 1527 | then $a | |
1551 | 1528 | else foldFunc($a, $l[$i]) | |
1552 | 1529 | ||
1553 | 1530 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1554 | 1531 | then $a | |
1555 | 1532 | else throw("List size exceeds 10") | |
1556 | 1533 | ||
1557 | 1534 | $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) | |
1558 | 1535 | } | |
1559 | - | let idx = $ | |
1560 | - | let changeActions = $ | |
1536 | + | let idx = $t04505545117._1 | |
1537 | + | let changeActions = $t04505545117._2 | |
1561 | 1538 | let storageUpdated = $Tuple10(storage._1, storage._2, (storage._3 + lpTokensToMint), storage._4, storage._5, storage._6, storage._7, storage._8, storage._9, storage._10) | |
1562 | 1539 | $Tuple2(((([Reissue(lpAssetId, lpTokensToMint, true), ScriptTransfer(i.caller, lpTokensToMint, lpAssetId)] ++ _saveStorage(storageUpdated)) ++ _saveAssetBalances(assetBalances)) ++ changeActions), unit) | |
1563 | 1540 | } | |
1564 | 1541 | else throw("Strict value is not equal to itself.") | |
1565 | 1542 | } | |
1566 | 1543 | ||
1567 | 1544 | ||
1568 | 1545 | ||
1569 | 1546 | @Callable(i) | |
1570 | 1547 | func deposit (minLpAmount_) = { | |
1571 | 1548 | let err = _validateInt(minLpAmount_, 0, MAX_INT, "deposit: invalid min lp amount") | |
1572 | 1549 | if ((err == err)) | |
1573 | 1550 | then { | |
1574 | 1551 | let storage = _loadStorage() | |
1575 | 1552 | let lpAssetId = storage._1 | |
1576 | 1553 | let lpAssetIdStr = _assetToStr(lpAssetId) | |
1577 | 1554 | let lpDecimals = _getDecimals(lpAssetIdStr) | |
1578 | 1555 | let err1 = if (if (if (if (if (_whenInitialized()) | |
1579 | 1556 | then _whenNotPaused() | |
1580 | 1557 | else false) | |
1581 | 1558 | then _checkWatchdog() | |
1582 | 1559 | else false) | |
1583 | 1560 | then _validateIntEquals(size(i.payments), 1, "deposit: invalid payments size") | |
1584 | 1561 | else false) | |
1585 | 1562 | then _validateListContains(_loadAssets(), _assetToStr(i.payments[0].assetId), "deposit: invalid payment asset") | |
1586 | 1563 | else false) | |
1587 | 1564 | then _validateInt(i.payments[0].amount, 1, MAX_INT, "deposit: invalid payment amount") | |
1588 | 1565 | else false | |
1589 | 1566 | if ((err1 == err1)) | |
1590 | 1567 | then { | |
1591 | 1568 | let assetStr = _assetToStr(i.payments[0].assetId) | |
1592 | 1569 | let assetDecimals = _getDecimals(assetStr) | |
1593 | 1570 | let amountNormalized = _normalizeDecimals(i.payments[0].amount, assetDecimals, lpDecimals, DOWN) | |
1594 | - | let $ | |
1595 | - | let lpTokensToMint = $ | |
1596 | - | let assetBalances = $ | |
1597 | - | let lpFee = $ | |
1598 | - | let protocolFee = $ | |
1599 | - | let sigmaFeePerLpUpdated = $ | |
1571 | + | let $t04655746673 = _deposit(assetStr, amountNormalized) | |
1572 | + | let lpTokensToMint = $t04655746673._1 | |
1573 | + | let assetBalances = $t04655746673._2 | |
1574 | + | let lpFee = $t04655746673._3 | |
1575 | + | let protocolFee = $t04655746673._4 | |
1576 | + | let sigmaFeePerLpUpdated = $t04655746673._5 | |
1600 | 1577 | let lpTokensToSend = ((lpTokensToMint - lpFee) - protocolFee) | |
1601 | 1578 | let err2 = _validateInt(lpTokensToSend, minLpAmount_, MAX_INT, "deposit: less than min") | |
1602 | 1579 | if ((err2 == err2)) | |
1603 | 1580 | then { | |
1604 | 1581 | let storageUpdated = $Tuple10(storage._1, storage._2, (storage._3 + lpTokensToMint), storage._4, storage._5, storage._6, storage._7, storage._8, storage._9, storage._10) | |
1605 | 1582 | $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) | |
1606 | 1583 | } | |
1607 | 1584 | else throw("Strict value is not equal to itself.") | |
1608 | 1585 | } | |
1609 | 1586 | else throw("Strict value is not equal to itself.") | |
1610 | 1587 | } | |
1611 | 1588 | else throw("Strict value is not equal to itself.") | |
1612 | 1589 | } | |
1613 | 1590 | ||
1614 | 1591 | ||
1615 | 1592 | ||
1616 | 1593 | @Callable(i) | |
1617 | 1594 | func withdrawAll () = { | |
1618 | 1595 | let storage = _loadStorage() | |
1619 | 1596 | let lpAssetId = storage._1 | |
1620 | 1597 | let lpAssetIdStr = toBase58String(lpAssetId) | |
1621 | 1598 | let lpDecimals = _getDecimals(lpAssetIdStr) | |
1622 | 1599 | let assets = _loadAssets() | |
1623 | 1600 | let err = if (if (if (_whenInitialized()) | |
1624 | 1601 | then _validateIntEquals(size(i.payments), 1, "withdrawAll: invalid payments size") | |
1625 | 1602 | else false) | |
1626 | 1603 | then _validateStringEqual(lpAssetIdStr, _assetToStr(i.payments[0].assetId), "withdrawAll: invalid payment asset") | |
1627 | 1604 | else false) | |
1628 | 1605 | then _validateInt(i.payments[0].amount, 1, MAX_INT, "withdrawAll: invalid payment amount") | |
1629 | 1606 | else false | |
1630 | 1607 | if ((err == err)) | |
1631 | 1608 | then { | |
1632 | - | let $ | |
1633 | - | let lpTokensToBurn = $ | |
1634 | - | let balancesToPay = $ | |
1635 | - | let assetBalances = $ | |
1609 | + | let $t04813448221 = _withdrawAll(i.payments[0].amount) | |
1610 | + | let lpTokensToBurn = $t04813448221._1 | |
1611 | + | let balancesToPay = $t04813448221._2 | |
1612 | + | let assetBalances = $t04813448221._3 | |
1636 | 1613 | let paymentActions = _getPaymentsFromBalances(assets, balancesToPay, i.caller, lpDecimals) | |
1637 | 1614 | let storageUpdated = $Tuple10(storage._1, storage._2, (storage._3 - lpTokensToBurn), storage._4, storage._5, storage._6, storage._7, storage._8, storage._9, storage._10) | |
1638 | 1615 | $Tuple2(((([Burn(lpAssetId, lpTokensToBurn)] ++ paymentActions) ++ _saveStorage(storageUpdated)) ++ _saveAssetBalances(assetBalances)), unit) | |
1639 | 1616 | } | |
1640 | 1617 | else throw("Strict value is not equal to itself.") | |
1641 | 1618 | } | |
1642 | 1619 | ||
1643 | 1620 | ||
1644 | 1621 | ||
1645 | 1622 | @Callable(i) | |
1646 | 1623 | func withdraw (assetId_,minAmount_) = { | |
1647 | 1624 | let storage = _loadStorage() | |
1648 | 1625 | let lpAssetId = storage._1 | |
1649 | 1626 | let lpAssetIdStr = toBase58String(lpAssetId) | |
1650 | 1627 | let lpDecimals = _getDecimals(lpAssetIdStr) | |
1651 | 1628 | let assets = _loadAssets() | |
1652 | 1629 | let err = if (if (if (if (if (if (if (_whenInitialized()) | |
1653 | 1630 | then _whenNotPaused() | |
1654 | 1631 | else false) | |
1655 | 1632 | then _checkWatchdog() | |
1656 | 1633 | else false) | |
1657 | 1634 | then _validateIntEquals(size(i.payments), 1, "withdraw: invalid payments size") | |
1658 | 1635 | else false) | |
1659 | 1636 | then _validateStringEqual(lpAssetIdStr, _assetToStr(i.payments[0].assetId), "withdraw: invalid payment asset") | |
1660 | 1637 | else false) | |
1661 | 1638 | then _validateInt(i.payments[0].amount, 1, MAX_INT, "withdraw: invalid payment amount") | |
1662 | 1639 | else false) | |
1663 | 1640 | then _validateListContains(assets, assetId_, "withdraw: invalid assetId") | |
1664 | 1641 | else false) | |
1665 | 1642 | then _validateInt(minAmount_, 0, MAX_INT, "withdraw: invalid minAmount") | |
1666 | 1643 | else false | |
1667 | 1644 | if ((err == err)) | |
1668 | 1645 | then { | |
1669 | - | let $ | |
1670 | - | let targetAmountNormalized = $ | |
1671 | - | let finalAssetBalances = $ | |
1672 | - | let lpFee = $ | |
1673 | - | let protocolFee = $ | |
1674 | - | let sigmaFeePerLpUpdated = $ | |
1646 | + | let $t04957549709 = _withdraw(assetId_, i.payments[0].amount) | |
1647 | + | let targetAmountNormalized = $t04957549709._1 | |
1648 | + | let finalAssetBalances = $t04957549709._2 | |
1649 | + | let lpFee = $t04957549709._3 | |
1650 | + | let protocolFee = $t04957549709._4 | |
1651 | + | let sigmaFeePerLpUpdated = $t04957549709._5 | |
1675 | 1652 | let finalAmountNormalized = ((targetAmountNormalized - lpFee) - protocolFee) | |
1676 | 1653 | let targetDecimals = _getDecimals(assetId_) | |
1677 | 1654 | let finalAmount = _normalizeDecimals(finalAmountNormalized, lpDecimals, targetDecimals, DOWN) | |
1678 | 1655 | let err1 = _validateInt(finalAmount, minAmount_, MAX_INT, "withdraw: less than min") | |
1679 | 1656 | if ((err1 == err1)) | |
1680 | 1657 | then { | |
1681 | 1658 | 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) | |
1682 | 1659 | $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) | |
1683 | 1660 | } | |
1684 | 1661 | else throw("Strict value is not equal to itself.") | |
1685 | 1662 | } | |
1686 | 1663 | else throw("Strict value is not equal to itself.") | |
1687 | 1664 | } | |
1688 | 1665 | ||
1689 | 1666 | ||
1690 | 1667 | ||
1691 | 1668 | @Callable(i) | |
1692 | 1669 | func swap (targetAssetId_,minAmount_) = { | |
1693 | 1670 | let storage = _loadStorage() | |
1694 | 1671 | let lpAssetId = storage._1 | |
1695 | 1672 | let lpDecimals = _getDecimals(toBase58String(lpAssetId)) | |
1696 | 1673 | let assets = _loadAssets() | |
1697 | 1674 | let sourceAssetStr = _assetToStr(i.payments[0].assetId) | |
1698 | 1675 | let sourceAmountNormalized = _normalizeDecimals(i.payments[0].amount, _getDecimals(sourceAssetStr), lpDecimals, DOWN) | |
1699 | 1676 | let sourceAssetIndex = valueOrErrorMessage(indexOf(assets, sourceAssetStr), "swap: invalid source asset") | |
1700 | 1677 | if ((sourceAssetIndex == sourceAssetIndex)) | |
1701 | 1678 | then { | |
1702 | 1679 | let targetAssetIndex = valueOrErrorMessage(indexOf(assets, targetAssetId_), "swap: invalid target asset") | |
1703 | 1680 | if ((targetAssetIndex == targetAssetIndex)) | |
1704 | 1681 | then { | |
1705 | 1682 | let err = if (if (if (if (if (if (_whenInitialized()) | |
1706 | 1683 | then _whenNotPaused() | |
1707 | 1684 | else false) | |
1708 | 1685 | then _checkWatchdog() | |
1709 | 1686 | else false) | |
1710 | 1687 | then _validateInt(minAmount_, 0, MAX_INT, "swap: invalid min target amount") | |
1711 | 1688 | else false) | |
1712 | 1689 | then _validateInt(sourceAmountNormalized, 1, MAX_INT, "swap: invalid source amount") | |
1713 | 1690 | else false) | |
1714 | 1691 | then _validateStringNotEq(sourceAssetStr, targetAssetId_, "swap: same assets") | |
1715 | 1692 | else false) | |
1716 | 1693 | then _validateIntEquals(size(i.payments), 1, "swap: invalid payments size") | |
1717 | 1694 | else false | |
1718 | 1695 | if ((err == err)) | |
1719 | 1696 | then { | |
1720 | - | let $ | |
1721 | - | let targetAmountNormalized = $ | |
1722 | - | let finalAssetBalances = $ | |
1723 | - | let lpFee = $ | |
1724 | - | let protocolFee = $ | |
1725 | - | let sigmaFeePerLpUpdated = $ | |
1697 | + | let $t05182251980 = _swap(sourceAssetIndex, targetAssetIndex, sourceAmountNormalized) | |
1698 | + | let targetAmountNormalized = $t05182251980._1 | |
1699 | + | let finalAssetBalances = $t05182251980._2 | |
1700 | + | let lpFee = $t05182251980._3 | |
1701 | + | let protocolFee = $t05182251980._4 | |
1702 | + | let sigmaFeePerLpUpdated = $t05182251980._5 | |
1726 | 1703 | let finalAmountNormalized = ((targetAmountNormalized - lpFee) - protocolFee) | |
1727 | 1704 | let targetDecimals = _getDecimals(targetAssetId_) | |
1728 | 1705 | let finalAmount = _normalizeDecimals(finalAmountNormalized, lpDecimals, targetDecimals, DOWN) | |
1729 | 1706 | let err1 = _validateInt(finalAmount, minAmount_, MAX_INT, "swap: less than min") | |
1730 | 1707 | if ((err1 == err1)) | |
1731 | 1708 | then $Tuple2((((([ScriptTransfer(i.caller, finalAmount, _strToAsset(targetAssetId_))] ++ _saveAssetBalances(finalAssetBalances)) ++ _saveLpFee(targetAssetId_, (lpFee + _loadLpFee(targetAssetId_)))) ++ _saveProtocolFee(targetAssetId_, (protocolFee + _loadProtocolFee(targetAssetId_)))) ++ _saveSigmaFeePerLp(sigmaFeePerLpUpdated)), unit) | |
1732 | 1709 | else throw("Strict value is not equal to itself.") | |
1733 | 1710 | } | |
1734 | 1711 | else throw("Strict value is not equal to itself.") | |
1735 | 1712 | } | |
1736 | 1713 | else throw("Strict value is not equal to itself.") | |
1737 | 1714 | } | |
1738 | 1715 | else throw("Strict value is not equal to itself.") | |
1739 | 1716 | } | |
1740 | 1717 | ||
1741 | 1718 | ||
1742 | 1719 | ||
1743 | 1720 | @Callable(i) | |
1744 | 1721 | func getDepositAll (lpAmount_) = { | |
1745 | 1722 | let err = _validateInt(lpAmount_, 1, MAX_INT, "getDepositAll: invalid amount") | |
1746 | 1723 | if ((err == err)) | |
1747 | 1724 | then { | |
1748 | - | let $ | |
1749 | - | let lpTokensToMint = $ | |
1750 | - | let requiredAmountsNormalized = $ | |
1751 | - | let assetBalances = $ | |
1725 | + | let $t05310053187 = _depositAll(lpAmount_) | |
1726 | + | let lpTokensToMint = $t05310053187._1 | |
1727 | + | let requiredAmountsNormalized = $t05310053187._2 | |
1728 | + | let assetBalances = $t05310053187._3 | |
1752 | 1729 | $Tuple2(nil, $Tuple2(lpTokensToMint, requiredAmountsNormalized)) | |
1753 | 1730 | } | |
1754 | 1731 | else throw("Strict value is not equal to itself.") | |
1755 | 1732 | } | |
1756 | 1733 | ||
1757 | 1734 | ||
1758 | 1735 | ||
1759 | 1736 | @Callable(i) | |
1760 | 1737 | func getDeposit (assetId_,amount_) = { | |
1761 | 1738 | let err = if (_validateListContains(_loadAssets(), assetId_, "getDeposit: invalid asset")) | |
1762 | 1739 | then _validateInt(amount_, 1, MAX_INT, "getDeposit: invalid amount") | |
1763 | 1740 | else false | |
1764 | 1741 | if ((err == err)) | |
1765 | 1742 | then { | |
1766 | 1743 | let storage = _loadStorage() | |
1767 | 1744 | let lpAssetId = storage._1 | |
1768 | 1745 | let lpDecimals = _getDecimals(toBase58String(lpAssetId)) | |
1769 | 1746 | let assetDecimals = _getDecimals(assetId_) | |
1770 | 1747 | let amountNormalized = _normalizeDecimals(amount_, assetDecimals, lpDecimals, DOWN) | |
1771 | - | let $ | |
1772 | - | let lpTokensToMint = $ | |
1773 | - | let assetBalances = $ | |
1774 | - | let lpFee = $ | |
1775 | - | let protocolFee = $ | |
1776 | - | let sigmaFeePerLpUpdated = $ | |
1748 | + | let $t05394654062 = _deposit(assetId_, amountNormalized) | |
1749 | + | let lpTokensToMint = $t05394654062._1 | |
1750 | + | let assetBalances = $t05394654062._2 | |
1751 | + | let lpFee = $t05394654062._3 | |
1752 | + | let protocolFee = $t05394654062._4 | |
1753 | + | let sigmaFeePerLpUpdated = $t05394654062._5 | |
1777 | 1754 | let lpTokensToSend = ((lpTokensToMint - lpFee) - protocolFee) | |
1778 | 1755 | $Tuple2(nil, lpTokensToSend) | |
1779 | 1756 | } | |
1780 | 1757 | else throw("Strict value is not equal to itself.") | |
1781 | 1758 | } | |
1782 | 1759 | ||
1783 | 1760 | ||
1784 | 1761 | ||
1785 | 1762 | @Callable(i) | |
1786 | 1763 | func getWithdrawAll (lpAmount_) = { | |
1787 | 1764 | let err = _validateInt(lpAmount_, 0, MAX_INT, "getWithdrawAll: invalid amount") | |
1788 | 1765 | if ((err == err)) | |
1789 | 1766 | then { | |
1790 | - | let $ | |
1791 | - | let lpTokensToBurn = $ | |
1792 | - | let balancesToGet = $ | |
1793 | - | let assetBalances = $ | |
1767 | + | let $t05450154577 = _withdrawAll(lpAmount_) | |
1768 | + | let lpTokensToBurn = $t05450154577._1 | |
1769 | + | let balancesToGet = $t05450154577._2 | |
1770 | + | let assetBalances = $t05450154577._3 | |
1794 | 1771 | $Tuple2(nil, balancesToGet) | |
1795 | 1772 | } | |
1796 | 1773 | else throw("Strict value is not equal to itself.") | |
1797 | 1774 | } | |
1798 | 1775 | ||
1799 | 1776 | ||
1800 | 1777 | ||
1801 | 1778 | @Callable(i) | |
1802 | 1779 | func getWithdraw (assetId_,amount_) = { | |
1803 | 1780 | let err = if (_validateListContains(_loadAssets(), assetId_, "getWithdraw: invalid asset")) | |
1804 | 1781 | then _validateInt(amount_, 1, MAX_INT, "getWithdraw: invalid amount") | |
1805 | 1782 | else false | |
1806 | 1783 | if ((err == err)) | |
1807 | 1784 | then { | |
1808 | 1785 | let storage = _loadStorage() | |
1809 | 1786 | let lpAssetId = storage._1 | |
1810 | 1787 | let lpDecimals = _getDecimals(toBase58String(lpAssetId)) | |
1811 | - | let $ | |
1812 | - | let targetAmountNormalized = $ | |
1813 | - | let assetBalances = $ | |
1814 | - | let lpFee = $ | |
1815 | - | let protocolFee = $ | |
1816 | - | let sigmaFeePerLpUpdated = $ | |
1788 | + | let $t05522855344 = _withdraw(assetId_, amount_) | |
1789 | + | let targetAmountNormalized = $t05522855344._1 | |
1790 | + | let assetBalances = $t05522855344._2 | |
1791 | + | let lpFee = $t05522855344._3 | |
1792 | + | let protocolFee = $t05522855344._4 | |
1793 | + | let sigmaFeePerLpUpdated = $t05522855344._5 | |
1817 | 1794 | let finalAmountNormalized = ((targetAmountNormalized - lpFee) - protocolFee) | |
1818 | 1795 | let targetDecimals = _getDecimals(assetId_) | |
1819 | 1796 | let finalAmount = _normalizeDecimals(finalAmountNormalized, lpDecimals, targetDecimals, DOWN) | |
1820 | 1797 | $Tuple2(nil, finalAmount) | |
1821 | 1798 | } | |
1822 | 1799 | else throw("Strict value is not equal to itself.") | |
1823 | 1800 | } | |
1824 | 1801 | ||
1825 | 1802 | ||
1826 | 1803 | ||
1827 | 1804 | @Callable(i) | |
1828 | 1805 | func getSwap (sourceAssetId_,targetAssetId_,sourceAmount_) = { | |
1829 | 1806 | let storage = _loadStorage() | |
1830 | 1807 | let lpAssetId = storage._1 | |
1831 | 1808 | let lpDecimals = _getDecimals(toBase58String(lpAssetId)) | |
1832 | 1809 | let assets = _loadAssets() | |
1833 | 1810 | let sourceAssetIndex = valueOrErrorMessage(indexOf(assets, sourceAssetId_), "swap: invalid source asset") | |
1834 | 1811 | if ((sourceAssetIndex == sourceAssetIndex)) | |
1835 | 1812 | then { | |
1836 | 1813 | let targetAssetIndex = valueOrErrorMessage(indexOf(assets, targetAssetId_), "swap: invalid target asset") | |
1837 | 1814 | if ((targetAssetIndex == targetAssetIndex)) | |
1838 | 1815 | then { | |
1839 | 1816 | let sourceAmountNormalized = _normalizeDecimals(sourceAmount_, _getDecimals(sourceAssetId_), lpDecimals, DOWN) | |
1840 | 1817 | let err = if (_validateInt(sourceAmountNormalized, 1, MAX_INT, "swap: invalid source amount")) | |
1841 | 1818 | then _validateStringNotEq(sourceAssetId_, targetAssetId_, "swap: same assets") | |
1842 | 1819 | else false | |
1843 | 1820 | if ((err == err)) | |
1844 | 1821 | then { | |
1845 | - | let $ | |
1846 | - | let targetAmountNormalized = $ | |
1847 | - | let finalAssetBalances = $ | |
1848 | - | let lpFee = $ | |
1849 | - | let protocolFee = $ | |
1850 | - | let sigmaFeePerLpUpdated = $ | |
1822 | + | let $t05675456912 = _swap(sourceAssetIndex, targetAssetIndex, sourceAmountNormalized) | |
1823 | + | let targetAmountNormalized = $t05675456912._1 | |
1824 | + | let finalAssetBalances = $t05675456912._2 | |
1825 | + | let lpFee = $t05675456912._3 | |
1826 | + | let protocolFee = $t05675456912._4 | |
1827 | + | let sigmaFeePerLpUpdated = $t05675456912._5 | |
1851 | 1828 | let finalAmountNormalized = ((targetAmountNormalized - lpFee) - protocolFee) | |
1852 | 1829 | let targetDecimals = _getDecimals(targetAssetId_) | |
1853 | 1830 | let finalAmount = _normalizeDecimals(finalAmountNormalized, lpDecimals, targetDecimals, DOWN) | |
1854 | 1831 | $Tuple2(nil, finalAmount) | |
1855 | 1832 | } | |
1856 | 1833 | else throw("Strict value is not equal to itself.") | |
1857 | 1834 | } | |
1858 | 1835 | else throw("Strict value is not equal to itself.") | |
1859 | 1836 | } | |
1860 | 1837 | else throw("Strict value is not equal to itself.") | |
1861 | 1838 | } | |
1862 | 1839 | ||
1863 | 1840 | ||
1864 | 1841 | ||
1865 | 1842 | @Callable(i) | |
1866 | 1843 | func getClaim (user_) = { | |
1867 | 1844 | let user = if ((size(user_) > 0)) | |
1868 | 1845 | then valueOrErrorMessage(addressFromString(user_), "getClaim: invalid user") | |
1869 | 1846 | else i.caller | |
1870 | - | let $ | |
1871 | - | let checkpointActions = $ | |
1872 | - | let userProfits = $ | |
1847 | + | let $t05755457610 = _checkpoint(user) | |
1848 | + | let checkpointActions = $t05755457610._1 | |
1849 | + | let userProfits = $t05755457610._2 | |
1873 | 1850 | $Tuple2(nil, userProfits) | |
1874 | 1851 | } | |
1875 | 1852 | ||
1876 | 1853 | ||
1877 | 1854 | ||
1878 | 1855 | @Callable(i) | |
1879 | 1856 | func getUtilFunc () = { | |
1880 | 1857 | let storage = _loadStorage() | |
1881 | 1858 | let lpTotalSupply = storage._3 | |
1882 | 1859 | let weightAmplifier = storage._7 | |
1883 | 1860 | let slippageRate = storage._8 | |
1884 | 1861 | let feeMaxRate = storage._9 | |
1885 | - | let $ | |
1886 | - | let assetBalances = $ | |
1887 | - | let assetTotalSupply = $ | |
1888 | - | let $ | |
1889 | - | let assetWeights = $ | |
1890 | - | let sigmaWeight = $ | |
1862 | + | let $t05794358003 = _loadAssetBalances() | |
1863 | + | let assetBalances = $t05794358003._1 | |
1864 | + | let assetTotalSupply = $t05794358003._2 | |
1865 | + | let $t05800858061 = _loadAssetWeights() | |
1866 | + | let assetWeights = $t05800858061._1 | |
1867 | + | let sigmaWeight = $t05800858061._2 | |
1891 | 1868 | let fee = _calculateFee(assetBalances, assetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate) | |
1892 | 1869 | let utilValue = (assetTotalSupply - fee) | |
1893 | 1870 | $Tuple2(nil, $Tuple2(utilValue, lpTotalSupply)) | |
1894 | 1871 | } | |
1895 | 1872 | ||
1896 | 1873 | ||
1897 | 1874 | ||
1898 | 1875 | @Callable(i) | |
1899 | 1876 | func getFeeFunc () = { | |
1900 | 1877 | let storage = _loadStorage() | |
1901 | 1878 | let weightAmplifier = storage._7 | |
1902 | 1879 | let slippageRate = storage._8 | |
1903 | 1880 | let feeMaxRate = storage._9 | |
1904 | - | let $ | |
1905 | - | let assetBalances = $ | |
1906 | - | let assetTotalSupply = $ | |
1907 | - | let $ | |
1908 | - | let assetWeights = $ | |
1909 | - | let sigmaWeight = $ | |
1881 | + | let $t05849358553 = _loadAssetBalances() | |
1882 | + | let assetBalances = $t05849358553._1 | |
1883 | + | let assetTotalSupply = $t05849358553._2 | |
1884 | + | let $t05855858611 = _loadAssetWeights() | |
1885 | + | let assetWeights = $t05855858611._1 | |
1886 | + | let sigmaWeight = $t05855858611._2 | |
1910 | 1887 | let fee = _calculateFee(assetBalances, assetTotalSupply, assetWeights, sigmaWeight, weightAmplifier, slippageRate, feeMaxRate) | |
1911 | 1888 | $Tuple2(nil, fee) | |
1912 | 1889 | } | |
1913 | 1890 | ||
1914 | 1891 | ||
1915 | 1892 | ||
1916 | 1893 | @Callable(i) | |
1917 | 1894 | func checkpoint (user_) = { | |
1918 | 1895 | let err = if (_whenInitialized()) | |
1919 | 1896 | then _whenNotPaused() | |
1920 | 1897 | else false | |
1921 | 1898 | if ((err == err)) | |
1922 | 1899 | then { | |
1923 | 1900 | let user = if ((size(user_) > 0)) | |
1924 | 1901 | then valueOrErrorMessage(addressFromString(user_), "checkpoint: invalid user") | |
1925 | 1902 | else i.caller | |
1926 | 1903 | _checkpoint(user) | |
1927 | 1904 | } | |
1928 | 1905 | else throw("Strict value is not equal to itself.") | |
1929 | 1906 | } | |
1930 | 1907 | ||
1931 | 1908 | ||
1932 | 1909 | ||
1933 | 1910 | @Callable(i) | |
1934 | 1911 | func stake () = { | |
1935 | 1912 | let err = if (_whenInitialized()) | |
1936 | 1913 | then _whenNotPaused() | |
1937 | 1914 | else false | |
1938 | 1915 | if ((err == err)) | |
1939 | 1916 | then { | |
1940 | 1917 | let storage = _loadStorage() | |
1941 | 1918 | let lpAssetIdStr = _assetToStr(storage._1) | |
1942 | 1919 | let err1 = if (if (_validateIntEquals(size(i.payments), 1, "stake: invalid payments size")) | |
1943 | 1920 | then _validateStringEqual(lpAssetIdStr, _assetToStr(i.payments[0].assetId), "stake: invalid payment asset") | |
1944 | 1921 | else false) | |
1945 | 1922 | then _validateInt(i.payments[0].amount, 0, MAX_INT, "stake: invalid payment amount") | |
1946 | 1923 | else false | |
1947 | 1924 | if ((err1 == err1)) | |
1948 | 1925 | then { | |
1949 | - | let $ | |
1950 | - | let checkpointActions = $ | |
1951 | - | let userProfits = $ | |
1926 | + | let $t05961959679 = _checkpoint(i.caller) | |
1927 | + | let checkpointActions = $t05961959679._1 | |
1928 | + | let userProfits = $t05961959679._2 | |
1952 | 1929 | $Tuple2(((checkpointActions ++ _saveUserLp(i.caller, (_loadUserLp(i.caller) + i.payments[0].amount))) ++ _saveTotalLp((_loadTotalLp() + i.payments[0].amount))), unit) | |
1953 | 1930 | } | |
1954 | 1931 | else throw("Strict value is not equal to itself.") | |
1955 | 1932 | } | |
1956 | 1933 | else throw("Strict value is not equal to itself.") | |
1957 | 1934 | } | |
1958 | 1935 | ||
1959 | 1936 | ||
1960 | 1937 | ||
1961 | 1938 | @Callable(i) | |
1962 | 1939 | func unstake (amount_) = { | |
1963 | 1940 | let err = if (_whenInitialized()) | |
1964 | 1941 | then _whenNotPaused() | |
1965 | 1942 | else false | |
1966 | 1943 | if ((err == err)) | |
1967 | 1944 | then { | |
1968 | 1945 | let storage = _loadStorage() | |
1969 | 1946 | let lpAssetId = storage._1 | |
1970 | 1947 | let userLp = _loadUserLp(i.caller) | |
1971 | 1948 | let err1 = _validateInt(amount_, 0, userLp, "unstake: invalid amount") | |
1972 | 1949 | if ((err1 == err1)) | |
1973 | 1950 | then { | |
1974 | - | let $ | |
1975 | - | let checkpointActions = $ | |
1976 | - | let userProfits = $ | |
1951 | + | let $t06019060250 = _checkpoint(i.caller) | |
1952 | + | let checkpointActions = $t06019060250._1 | |
1953 | + | let userProfits = $t06019060250._2 | |
1977 | 1954 | $Tuple2(((([ScriptTransfer(i.caller, amount_, lpAssetId)] ++ checkpointActions) ++ _saveUserLp(i.caller, (userLp - amount_))) ++ _saveTotalLp((_loadTotalLp() - amount_))), unit) | |
1978 | 1955 | } | |
1979 | 1956 | else throw("Strict value is not equal to itself.") | |
1980 | 1957 | } | |
1981 | 1958 | else throw("Strict value is not equal to itself.") | |
1982 | 1959 | } | |
1983 | 1960 | ||
1984 | 1961 | ||
1985 | 1962 | ||
1986 | 1963 | @Callable(i) | |
1987 | 1964 | func claim (user_) = { | |
1988 | 1965 | let err = if (_whenInitialized()) | |
1989 | 1966 | then _whenNotPaused() | |
1990 | 1967 | else false | |
1991 | 1968 | if ((err == err)) | |
1992 | 1969 | then { | |
1993 | 1970 | let user = if ((size(user_) > 0)) | |
1994 | 1971 | then valueOrErrorMessage(addressFromString(user_), "claim: invalid user") | |
1995 | 1972 | else i.caller | |
1996 | 1973 | let storage = _loadStorage() | |
1997 | 1974 | let lpAssetId = storage._1 | |
1998 | 1975 | let lpAssetIdStr = _assetToStr(lpAssetId) | |
1999 | 1976 | let assets = [lpAssetIdStr, _loadAssets()] | |
2000 | 1977 | let maxIndex = (size(assets) - 1) | |
2001 | 1978 | let userLp = _loadUserLp(user) | |
2002 | - | let $ | |
2003 | - | let checkpointActions = $ | |
2004 | - | let userProfits = $ | |
1979 | + | let $t06097361029 = _checkpoint(user) | |
1980 | + | let checkpointActions = $t06097361029._1 | |
1981 | + | let userProfits = $t06097361029._2 | |
2005 | 1982 | func foldFunc (acc,profit) = { | |
2006 | 1983 | let index = acc._1 | |
2007 | 1984 | if (if ((maxIndex >= index)) | |
2008 | 1985 | then (profit > 0) | |
2009 | 1986 | else false) | |
2010 | 1987 | then { | |
2011 | 1988 | let asset = assets[index] | |
2012 | 1989 | $Tuple3((index + 1), (acc._2 :+ 0), (acc._3 :+ ScriptTransfer(user, profit, _strToAsset(asset)))) | |
2013 | 1990 | } | |
2014 | 1991 | else $Tuple3((index + 1), (acc._2 :+ profit), acc._3) | |
2015 | 1992 | } | |
2016 | 1993 | ||
2017 | - | let $ | |
1994 | + | let $t06140761498 = { | |
2018 | 1995 | let $l = userProfits | |
2019 | 1996 | let $s = size($l) | |
2020 | 1997 | let $acc0 = $Tuple3(0, nil, nil) | |
2021 | 1998 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
2022 | 1999 | then $a | |
2023 | 2000 | else foldFunc($a, $l[$i]) | |
2024 | 2001 | ||
2025 | 2002 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
2026 | 2003 | then $a | |
2027 | 2004 | else throw("List size exceeds 11") | |
2028 | 2005 | ||
2029 | 2006 | $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) | |
2030 | 2007 | } | |
2031 | - | let idx = $ | |
2032 | - | let userProfitsUpdated = $ | |
2033 | - | let profitActions = $ | |
2008 | + | let idx = $t06140761498._1 | |
2009 | + | let userProfitsUpdated = $t06140761498._2 | |
2010 | + | let profitActions = $t06140761498._3 | |
2034 | 2011 | $Tuple2(((profitActions ++ removeByIndex(checkpointActions, 0)) ++ _saveUserProfits(user, userProfitsUpdated)), unit) | |
2035 | 2012 | } | |
2036 | 2013 | else throw("Strict value is not equal to itself.") | |
2037 | 2014 | } | |
2038 | 2015 | ||
2039 | 2016 | ||
2040 | 2017 | ||
2041 | 2018 | @Callable(i) | |
2042 | 2019 | func pause () = { | |
2043 | 2020 | let err = if (if (_onlyPauser(i.caller)) | |
2044 | 2021 | then _whenInitialized() | |
2045 | 2022 | else false) | |
2046 | 2023 | then _whenNotPaused() | |
2047 | 2024 | else false | |
2048 | 2025 | if ((err == err)) | |
2049 | 2026 | then $Tuple2(_savePause(true), unit) | |
2050 | 2027 | else throw("Strict value is not equal to itself.") | |
2051 | 2028 | } | |
2052 | 2029 | ||
2053 | 2030 | ||
2054 | 2031 | ||
2055 | 2032 | @Callable(i) | |
2056 | 2033 | func unpause () = { | |
2057 | 2034 | let err = if (if (_onlyThisContract(i.caller)) | |
2058 | 2035 | then _whenInitialized() | |
2059 | 2036 | else false) | |
2060 | 2037 | then _whenPaused() | |
2061 | 2038 | else false | |
2062 | 2039 | if ((err == err)) | |
2063 | 2040 | then $Tuple2(_savePause(false), unit) | |
2064 | 2041 | else throw("Strict value is not equal to itself.") | |
2065 | 2042 | } | |
2066 | 2043 | ||
2067 | 2044 | ||
2068 | 2045 | ||
2069 | 2046 | @Callable(i) | |
2070 | 2047 | func updatePauser (pauser_) = { | |
2071 | 2048 | let err = if (if (_onlyThisContract(i.caller)) | |
2072 | 2049 | then _whenInitialized() | |
2073 | 2050 | else false) | |
2074 | 2051 | then _validateAddress(pauser_, "updatePauser: invalid pauser") | |
2075 | 2052 | else false | |
2076 | 2053 | if ((err == err)) | |
2077 | 2054 | then $Tuple2(_savePauser(addressFromStringValue(pauser_)), unit) | |
2078 | 2055 | else throw("Strict value is not equal to itself.") | |
2079 | 2056 | } | |
2080 | 2057 | ||
2081 | 2058 | ||
2082 | 2059 | ||
2083 | 2060 | @Callable(i) | |
2084 | 2061 | func updateWatchdog (watchdog_,offset_) = { | |
2085 | 2062 | let err = if (if (if (_onlyThisContract(i.caller)) | |
2086 | 2063 | then _whenInitialized() | |
2087 | 2064 | else false) | |
2088 | 2065 | then _validateAddress(watchdog_, "updateWatchdog: invalid watchdog") | |
2089 | 2066 | else false) | |
2090 | 2067 | then _validateInt(offset_, 0, MAX_INT, "updateWatchdog: invalid offset") | |
2091 | 2068 | else false | |
2092 | 2069 | if ((err == err)) | |
2093 | 2070 | then $Tuple2((_saveWatchdog(addressFromStringValue(watchdog_)) ++ _saveWatchdogOffset(offset_)), unit) | |
2094 | 2071 | else throw("Strict value is not equal to itself.") | |
2095 | 2072 | } | |
2096 | 2073 | ||
2097 | 2074 | ||
2098 | 2075 | ||
2099 | 2076 | @Callable(i) | |
2100 | 2077 | func setMultisig (multisig_) = { | |
2101 | 2078 | let err = if (_onlyThisContract(i.caller)) | |
2102 | 2079 | then _validateAddress(multisig_, "setMultisig: invalid multisig") | |
2103 | 2080 | else false | |
2104 | 2081 | if ((err == err)) | |
2105 | 2082 | then $Tuple2(_saveMultisig(addressFromStringValue(multisig_)), unit) | |
2106 | 2083 | else throw("Strict value is not equal to itself.") | |
2107 | 2084 | } | |
2108 | 2085 | ||
2109 | 2086 | ||
2110 | 2087 | @Verifier(tx) | |
2111 | 2088 | func verify () = match getString(KEY_MULTISIG) { | |
2112 | 2089 | case multisig: String => | |
2113 | 2090 | valueOrElse(getBoolean(addressFromStringValue(multisig), makeString([KEY_STATUS, toString(this), toBase58String(tx.id)], SEP)), false) | |
2114 | 2091 | case _ => | |
2115 | 2092 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
2116 | 2093 | } | |
2117 | 2094 |
github/deemru/w8io/026f985 222.38 ms ◑