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