tx · 665Db2eQhQvRHQhStSAHCRQVBctB7pBK5LK8AgM225Gv 3N5dPcBenjbD5yoHNxR4cukNYEa8X1fqxzu: -0.45000000 Waves 2023.08.07 13:38 [2700060] smart account 3N5dPcBenjbD5yoHNxR4cukNYEa8X1fqxzu > SELF 0.00000000 Waves
{ "type": 13, "id": "665Db2eQhQvRHQhStSAHCRQVBctB7pBK5LK8AgM225Gv", "fee": 45000000, "feeAssetId": null, "timestamp": 1691404755878, "version": 2, "chainId": 84, "sender": "3N5dPcBenjbD5yoHNxR4cukNYEa8X1fqxzu", "senderPublicKey": "4NEiftwbhnxcZx118iiCyYyGbuWt6mKWu7N84FJPveJR", "proofs": [ "5y9MENQ7eMyRpM7ZGcPNcuw1CwZZ88A64Lsbfq7XZshuYH9oNA1py74zt6bby1HVYgoHi2eT2fEDwKbvKNX7eFXb", "2BnBw4G1jyxjxijAoZYUi17NV9tYvyo6rkuHwp1i9fR4KJjE4wXEZPn3h9KiS13fWevjpUF5WhnJtkDTs7mypiR1" ], "script": "base64:BgK8AQgCEgMKAQgSBAoCCAgSBQoDCBgYEgUKAwgBCBIECgIIARIGCgQBCAgBEgUKAwEICBIPCg0ICAgICAgICAgICAgIEgMKAQgSAwoBCBIFCgMICAESBgoECAEICBINCgsICAEEERgYGAEBGBIJCgcICAEECAEYEg0KCwgIAQQYGBgYGAEYEgUKAwgEARILCgkICAEBAQEBAQQSCQoHCAEBAQEBARIAEgASABIAEgASABIAEgASAwoBCBIDCgEIgQEAB1NGX1BPT0wCAlNGAAdXWF9QT09MAgJXWAAPQ0FQX0ZFRV9OT19MT0FOAgljYXBOb0xvYW4ADENBUF9GRUVfTE9BTgIHY2FwTG9hbgAUU1RPUExPU1NfRkVFX05PX0xPQU4CDnN0b3BMb3NzTm9Mb2FuAA1TVE9QTE9TU19MT0FOAgxzdG9wTG9zc0xvYW4ACExPQU5fRkVFAgRsb2FuAAtOT19MT0FOX0ZFRQIGbm9Mb2FuAAZOT19GRUUCBW5vRmVlA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JsaWNLZXkECmlzUmlnaHRGZWUDCQAAAggFA2ludgNmZWUAoPc2CQAAAggFA2ludgpmZWVBc3NldElkBQR1bml0BwQKaXNJbml0Q2FsbAkAAAIIBQNpbnYIZnVuY3Rpb24CBGluaXQEDGlzbm9QYXltZW50cwkAAAIJAJADAQgFA2ludghwYXltZW50cwAAAwMDBQppc1JpZ2h0RmVlBQppc0luaXRDYWxsBwUGaXNTZWxmBwUMaXNub1BheW1lbnRzBwQMZ3JvdXAxU2lnbmVkAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUOZ3JvdXAxQWRtaW4xUEsAAQkAZAIAAAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFDmdyb3VwMUFkbWluMlBLAAEAAAQMZ3JvdXAyU2lnbmVkAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAQUOZ3JvdXAyQWRtaW4xUEsAAQkAZAIAAAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAEFDmdyb3VwMkFkbWluMlBLAAEAAAkAAAIJAGQCBQxncm91cDFTaWduZWQFDGdyb3VwMlNpZ25lZAAC0Uv4FQ==", "height": 2700060, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8EoCHr9MSn3kMMnCVTpFaiU4Gg1urhLWMcNGo6gJFuqc Next: 8GaYxcg6T7fN1v5ayabnSZJGSDqtjDXPLY6zcq3HihT8 Diff:
Old | New | Differences | |
---|---|---|---|
67 | 67 | ||
68 | 68 | let kAxlyInFeeWithLoan = "_axlyFeeWithLoan" | |
69 | 69 | ||
70 | - | let kAxlyNoLoanCapFee = "_ | |
70 | + | let kAxlyNoLoanCapFee = "_axlyFeeCapNoLoan" | |
71 | 71 | ||
72 | - | let kAxlyWithLoanCapFee = "_ | |
72 | + | let kAxlyWithLoanCapFee = "_axlyFeeCapWithLoan" | |
73 | 73 | ||
74 | 74 | let kAxlyStopLossNoLoanFee = "_axlyFeeStoplossWithLoan" | |
75 | 75 | ||
1318 | 1318 | else if ((size(fromBase58String(operatorPubKey)) != 32)) | |
1319 | 1319 | then throw("operatorPubKey is not correct") | |
1320 | 1320 | else if ((size(fromBase58String(group1Admin1PubKey)) != 32)) | |
1321 | - | then throw(" | |
1321 | + | then throw("group1Admin1PubKey is not correct") | |
1322 | 1322 | else if ((size(fromBase58String(group1Admin2PubKey)) != 32)) | |
1323 | - | then throw(" | |
1323 | + | then throw("group1Admin2PubKey is not correct") | |
1324 | 1324 | else if ((size(fromBase58String(group2Admin1PubKey)) != 32)) | |
1325 | - | then throw(" | |
1325 | + | then throw("group2Admin1PubKey is not correct") | |
1326 | 1326 | else if ((size(fromBase58String(group2Admin2PubKey)) != 32)) | |
1327 | - | then throw(" | |
1327 | + | then throw("group2Admin2PubKey is not correct") | |
1328 | 1328 | else [StringEntry(kMoneyBox, moneyBoxAddr), StringEntry(kSFFarmingAddr, sfFarmingAddr), StringEntry(kLendService, lendAddr), StringEntry(kPriceOracle, priceOracleAddr), StringEntry(kExContract, keeperExContract), StringEntry(kWxSwapContract, wxSwapContract), StringEntry(kSwopId, swopAssetId), StringEntry(kWxId, wxAssetId), StringEntry(kOperatorCallPK, operatorPubKey), StringEntry(kGroup1Admin1PK, group1Admin1PubKey), StringEntry(kGroup1Admin2PK, group1Admin2PubKey), StringEntry(kGroup2Admin1PK, group2Admin1PubKey), StringEntry(kGroup2Admin2PK, group2Admin2PubKey)]) | |
1329 | 1329 | ||
1330 | 1330 | ||
1339 | 1339 | ||
1340 | 1340 | @Callable(i) | |
1341 | 1341 | func replenishFromLand (requestId) = valueOrElse(isActive(), valueOrElse(isLandCall(i), { | |
1342 | - | let $ | |
1343 | - | let user = $ | |
1344 | - | let pool = $ | |
1345 | - | let pmtA = $ | |
1346 | - | let AId = $ | |
1347 | - | let pmtB = $ | |
1348 | - | let BId = $ | |
1349 | - | let balA = $ | |
1350 | - | let balB = $ | |
1351 | - | let shareId = $ | |
1352 | - | let bwAsset = $ | |
1353 | - | let bwAmount = $ | |
1342 | + | let $t04342743531 = parseRequest(requestId) | |
1343 | + | let user = $t04342743531._1 | |
1344 | + | let pool = $t04342743531._2 | |
1345 | + | let pmtA = $t04342743531._3 | |
1346 | + | let AId = $t04342743531._4 | |
1347 | + | let pmtB = $t04342743531._5 | |
1348 | + | let BId = $t04342743531._6 | |
1349 | + | let balA = $t04342743531._7 | |
1350 | + | let balB = $t04342743531._8 | |
1351 | + | let shareId = $t04342743531._9 | |
1352 | + | let bwAsset = $t04342743531._10 | |
1353 | + | let bwAmount = $t04342743531._11 | |
1354 | 1354 | if ((size(i.payments) != 1)) | |
1355 | 1355 | then throw("Wrong payment size") | |
1356 | 1356 | else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset)) | |
1358 | 1358 | else (i.payments[0].amount != bwAmount)) | |
1359 | 1359 | then throw("Wrong payment") | |
1360 | 1360 | else { | |
1361 | - | let $ | |
1361 | + | let $t04372143821 = if ((AId == bwAsset)) | |
1362 | 1362 | then $Tuple2((pmtA + bwAmount), pmtB) | |
1363 | 1363 | else $Tuple2(pmtA, (pmtB + bwAmount)) | |
1364 | - | let pmtAllA = $ | |
1365 | - | let pmtAllB = $ | |
1364 | + | let pmtAllA = $t04372143821._1 | |
1365 | + | let pmtAllB = $t04372143821._2 | |
1366 | 1366 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
1367 | - | let $ | |
1368 | - | let userStaked = $ | |
1369 | - | let axlyFee = $ | |
1367 | + | let $t04390344018 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId) | |
1368 | + | let userStaked = $t04390344018._1 | |
1369 | + | let axlyFee = $t04390344018._2 | |
1370 | 1370 | let posNum = getNewUserPositionNumber(user) | |
1371 | 1371 | let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)] | |
1372 | 1372 | let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true) | |
1373 | - | let $ | |
1374 | - | let wAmountA = $ | |
1375 | - | let wAmountB = $ | |
1373 | + | let $t04437844493 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1374 | + | let wAmountA = $t04437844493._1 | |
1375 | + | let wAmountB = $t04437844493._2 | |
1376 | 1376 | $Tuple2((((entries ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])) ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked) | |
1377 | 1377 | } | |
1378 | 1378 | })) | |
1383 | 1383 | func liquidate (user,posId,liquidateAmount) = valueOrElse(isActive(), valueOrElse(isLandCall(i), { | |
1384 | 1384 | let pool = valueOrErrorMessage(getString(this, (((user + "_") + posId) + kUserPositionPool)), "no position") | |
1385 | 1385 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1386 | - | let $ | |
1387 | - | let AId = $ | |
1388 | - | let BId = $ | |
1389 | - | let balA = $ | |
1390 | - | let balB = $ | |
1391 | - | let shareId = $ | |
1386 | + | let $t04501445104 = getPoolData(Address(fromBase58String(pool)), pType) | |
1387 | + | let AId = $t04501445104._1 | |
1388 | + | let BId = $t04501445104._2 | |
1389 | + | let balA = $t04501445104._3 | |
1390 | + | let balB = $t04501445104._4 | |
1391 | + | let shareId = $t04501445104._5 | |
1392 | 1392 | let amount = unstakeLP(pool, pType, shareId, liquidateAmount) | |
1393 | 1393 | let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)) | |
1394 | 1394 | let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)) | |
1420 | 1420 | func capitalizeExKeeper (pool,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = valueOrElse(isActive(), valueOrElse(isOperatorCall(i), { | |
1421 | 1421 | let pType = getStringValue(this, (kPool + pool)) | |
1422 | 1422 | let change = valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0) | |
1423 | - | let $ | |
1424 | - | let claimedAmount = $ | |
1425 | - | let claimedAsset = $ | |
1423 | + | let $t04725347352 = claimAndCheckAmnt(pool, pType, claim, amountToExchange, change) | |
1424 | + | let claimedAmount = $t04725347352._1 | |
1425 | + | let claimedAsset = $t04725347352._2 | |
1426 | 1426 | let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options) | |
1427 | 1427 | let newChange = ((claimedAmount + change) - amountToExchange) | |
1428 | 1428 | let changeEntry = if ((newChange >= 0)) | |
1437 | 1437 | func capitalizeExPuzzle (pool,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = valueOrElse(isActive(), valueOrElse(isOperatorCall(i), { | |
1438 | 1438 | let pType = getStringValue(this, (kPool + pool)) | |
1439 | 1439 | let change = valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0) | |
1440 | - | let $ | |
1441 | - | let claimedAmount = $ | |
1442 | - | let claimedAsset = $ | |
1440 | + | let $t04815248251 = claimAndCheckAmnt(pool, pType, claim, amountToExchange, change) | |
1441 | + | let claimedAmount = $t04815248251._1 | |
1442 | + | let claimedAsset = $t04815248251._2 | |
1443 | 1443 | let exchangedAmount = exchangePuzzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options) | |
1444 | 1444 | let newChange = ((claimedAmount + change) - amountToExchange) | |
1445 | 1445 | let changeEntry = if ((newChange >= 0)) | |
1454 | 1454 | func capitalizeExSwopFi (pool,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = valueOrElse(isActive(), valueOrElse(isOperatorCall(i), { | |
1455 | 1455 | let pType = getStringValue(this, (kPool + pool)) | |
1456 | 1456 | let change = valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0) | |
1457 | - | let $ | |
1458 | - | let claimedAmount = $ | |
1459 | - | let claimedAsset = $ | |
1457 | + | let $t04909649195 = claimAndCheckAmnt(pool, pType, claim, amountToExchange, change) | |
1458 | + | let claimedAmount = $t04909649195._1 | |
1459 | + | let claimedAsset = $t04909649195._2 | |
1460 | 1460 | let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options) | |
1461 | 1461 | let newChange = ((claimedAmount + change) - amountToExchange) | |
1462 | 1462 | let changeEntry = if ((newChange >= 0)) | |
1470 | 1470 | @Callable(i) | |
1471 | 1471 | func capitalizeNoEx (pool,claim,amountFromBalance) = valueOrElse(isActive(), valueOrElse(isOperatorCall(i), { | |
1472 | 1472 | let pType = getStringValue(this, (kPool + pool)) | |
1473 | - | let $ | |
1474 | - | let claimedAmount = $ | |
1475 | - | let claimedAsset = $ | |
1473 | + | let $t04979249887 = claimAndCheckAmnt(pool, pType, claim, amountFromBalance, 0) | |
1474 | + | let claimedAmount = $t04979249887._1 | |
1475 | + | let claimedAsset = $t04979249887._2 | |
1476 | 1476 | capitalize(pool, pType, assetIdToStr(claimedAsset), (claimedAmount + amountFromBalance)) | |
1477 | 1477 | })) | |
1478 | 1478 | ||
1484 | 1484 | else false) | |
1485 | 1485 | then throw("Wrong type") | |
1486 | 1486 | else { | |
1487 | - | let $ | |
1488 | - | let aId = $ | |
1489 | - | let bId = $ | |
1490 | - | let aBal = $ | |
1491 | - | let bBal = $ | |
1492 | - | let shareId = $ | |
1487 | + | let $t05031350407 = getPoolData(Address(fromBase58String(poolAddr)), type) | |
1488 | + | let aId = $t05031350407._1 | |
1489 | + | let bId = $t05031350407._2 | |
1490 | + | let aBal = $t05031350407._3 | |
1491 | + | let bBal = $t05031350407._4 | |
1492 | + | let shareId = $t05031350407._5 | |
1493 | 1493 | if ((0 > inFeeNoLoan)) | |
1494 | 1494 | then throw("inFeeNoLoan must be greater than 0") | |
1495 | 1495 | else if ((0 > inFeeLoan)) | |
1504 | 1504 | then throw("stoplossFeeWithLoan must be greater than 0") | |
1505 | 1505 | else [IntegerEntry((poolAddr + kAxlyInFeeWithoutLoan), inFeeNoLoan), IntegerEntry((poolAddr + kAxlyInFeeWithLoan), inFeeLoan), IntegerEntry((poolAddr + kAxlyNoLoanCapFee), capFeeNoLoan), IntegerEntry((poolAddr + kAxlyWithLoanCapFee), capFeeWithLoan), IntegerEntry((poolAddr + kAxlyStopLossNoLoanFee), stoplossFeeNoLoan), IntegerEntry((poolAddr + kAxlyStopLossLoanFee), stoplossFeeWithLoan), IntegerEntry((poolAddr + kPoolInterestLoan), 0), IntegerEntry((poolAddr + kPoolInterestNoLoan), 0), StringEntry((kPool + poolAddr), type), StringEntry((shareId + kSharePool), poolAddr), BooleanEntry((poolAddr + kPoolCanBorrow), canBorrow)] | |
1506 | 1506 | })) | |
1507 | + | ||
1508 | + | ||
1509 | + | ||
1510 | + | @Callable(i) | |
1511 | + | func updatePoolFees (poolAddr,inFeeNoLoan,inFeeLoan,capFeeNoLoan,capFeeWithLoan,stoplossFeeNoLoan,stoplossFeeWithLoan) = valueOrElse(isActive(), valueOrElse(isAdminCall(i), if (!(isDefined(getString(this, (kPool + poolAddr))))) | |
1512 | + | then throw(("Can't find pool with addr " + poolAddr)) | |
1513 | + | else if ((0 > inFeeNoLoan)) | |
1514 | + | then throw("inFeeNoLoan must be greater than 0") | |
1515 | + | else if ((0 > inFeeLoan)) | |
1516 | + | then throw("inFeeLoan must be greater than 0") | |
1517 | + | else if ((0 > capFeeNoLoan)) | |
1518 | + | then throw("capFeeNoLoan must be greater than 0") | |
1519 | + | else if ((0 > capFeeWithLoan)) | |
1520 | + | then throw("capFeeWithLoan must be greater than 0") | |
1521 | + | else if ((0 > stoplossFeeNoLoan)) | |
1522 | + | then throw("stoplossFeeNoLoan must be greater than 0") | |
1523 | + | else if ((0 > stoplossFeeWithLoan)) | |
1524 | + | then throw("stoplossFeeWithLoan must be greater than 0") | |
1525 | + | else [IntegerEntry((poolAddr + kAxlyInFeeWithoutLoan), inFeeNoLoan), IntegerEntry((poolAddr + kAxlyInFeeWithLoan), inFeeLoan), IntegerEntry((poolAddr + kAxlyNoLoanCapFee), capFeeNoLoan), IntegerEntry((poolAddr + kAxlyWithLoanCapFee), capFeeWithLoan), IntegerEntry((poolAddr + kAxlyStopLossNoLoanFee), stoplossFeeNoLoan), IntegerEntry((poolAddr + kAxlyStopLossLoanFee), stoplossFeeWithLoan)])) | |
1507 | 1526 | ||
1508 | 1527 | ||
1509 | 1528 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SF_POOL = "SF" | |
5 | 5 | ||
6 | 6 | let WX_POOL = "WX" | |
7 | 7 | ||
8 | 8 | let CAP_FEE_NO_LOAN = "capNoLoan" | |
9 | 9 | ||
10 | 10 | let CAP_FEE_LOAN = "capLoan" | |
11 | 11 | ||
12 | 12 | let STOPLOSS_FEE_NO_LOAN = "stopLossNoLoan" | |
13 | 13 | ||
14 | 14 | let STOPLOSS_LOAN = "stopLossLoan" | |
15 | 15 | ||
16 | 16 | let LOAN_FEE = "loan" | |
17 | 17 | ||
18 | 18 | let NO_LOAN_FEE = "noLoan" | |
19 | 19 | ||
20 | 20 | let NO_FEE = "noFee" | |
21 | 21 | ||
22 | 22 | let SCALE8 = 100000000 | |
23 | 23 | ||
24 | 24 | let SCALE10 = 10000000000 | |
25 | 25 | ||
26 | 26 | let SCALE16 = toBigInt(10000000000000000) | |
27 | 27 | ||
28 | 28 | let FEE_SCALE6 = 1000000 | |
29 | 29 | ||
30 | 30 | let kSFPoolAAssetBalance = "A_asset_balance" | |
31 | 31 | ||
32 | 32 | let kSFPoolBAssetBalance = "B_asset_balance" | |
33 | 33 | ||
34 | 34 | let kSFPoolAAssetId = "A_asset_id" | |
35 | 35 | ||
36 | 36 | let kSFPoolBAssetId = "B_asset_id" | |
37 | 37 | ||
38 | 38 | let kSFPoolShareId = "share_asset_id" | |
39 | 39 | ||
40 | 40 | let kSFPoolShareSupply = "share_asset_supply" | |
41 | 41 | ||
42 | 42 | let kSFPoolFee = "commission" | |
43 | 43 | ||
44 | 44 | let kUserPosition = "_userPosition" | |
45 | 45 | ||
46 | 46 | let kUserPositionPool = "_userPositionPool" | |
47 | 47 | ||
48 | 48 | let kUserBorrowAmount = "_userPositionBorrowAmount" | |
49 | 49 | ||
50 | 50 | let kUserBorrowAssetId = "_userPositionBorrowAssetId" | |
51 | 51 | ||
52 | 52 | let kUserPositionNum = "_userPositionNumber" | |
53 | 53 | ||
54 | 54 | let kUserPositionInterest = "_userPositionInterest" | |
55 | 55 | ||
56 | 56 | let kPoolTotal = "_poolTotal" | |
57 | 57 | ||
58 | 58 | let kPoolTotalLoan = "_poolTotalLoan" | |
59 | 59 | ||
60 | 60 | let kPoolInterestLoan = "_poolInterestLoan" | |
61 | 61 | ||
62 | 62 | let kPoolInterestNoLoan = "_poolInterestNoLoan" | |
63 | 63 | ||
64 | 64 | let kPoolCanBorrow = "_poolCanBorrow" | |
65 | 65 | ||
66 | 66 | let kAxlyInFeeWithoutLoan = "_axlyFeeNoLoan" | |
67 | 67 | ||
68 | 68 | let kAxlyInFeeWithLoan = "_axlyFeeWithLoan" | |
69 | 69 | ||
70 | - | let kAxlyNoLoanCapFee = "_ | |
70 | + | let kAxlyNoLoanCapFee = "_axlyFeeCapNoLoan" | |
71 | 71 | ||
72 | - | let kAxlyWithLoanCapFee = "_ | |
72 | + | let kAxlyWithLoanCapFee = "_axlyFeeCapWithLoan" | |
73 | 73 | ||
74 | 74 | let kAxlyStopLossNoLoanFee = "_axlyFeeStoplossWithLoan" | |
75 | 75 | ||
76 | 76 | let kAxlyStopLossLoanFee = "_axlyFeeStoplossNoLoan" | |
77 | 77 | ||
78 | 78 | let kRequestId = "_request_id" | |
79 | 79 | ||
80 | 80 | let kRequestIter = "requests_iter" | |
81 | 81 | ||
82 | 82 | let kPool = "pool_" | |
83 | 83 | ||
84 | 84 | let kSharePool = "_poolShareId" | |
85 | 85 | ||
86 | 86 | let kPoolCapChange = "_poolCapChange" | |
87 | 87 | ||
88 | 88 | let kTokenLastPrice = "last_price" | |
89 | 89 | ||
90 | 90 | let kPriceInOracle = "_twap5B" | |
91 | 91 | ||
92 | 92 | let kActive = "active" | |
93 | 93 | ||
94 | 94 | let kActiveUsers = "activeUsers" | |
95 | 95 | ||
96 | 96 | let kActiveSFWX = "_active" | |
97 | 97 | ||
98 | 98 | let kPoolActive = "_activePool" | |
99 | 99 | ||
100 | 100 | let kUserStopLoss = "_stopLoss" | |
101 | 101 | ||
102 | 102 | let kMoneyBox = "axly_money_box" | |
103 | 103 | ||
104 | 104 | let kSFFarmingAddr = "swopfi_farming_addr" | |
105 | 105 | ||
106 | 106 | let kLendService = "lend_service_addr" | |
107 | 107 | ||
108 | 108 | let kOperatorCallPK = "admin_call_pub_key" | |
109 | 109 | ||
110 | 110 | let kPriceOracle = "price_oracle" | |
111 | 111 | ||
112 | 112 | let kExContract = "exchange_contract" | |
113 | 113 | ||
114 | 114 | let kWxSwapContract = "wx_swap_contract" | |
115 | 115 | ||
116 | 116 | let kSwopId = "swop_id" | |
117 | 117 | ||
118 | 118 | let kWxId = "wx_id" | |
119 | 119 | ||
120 | 120 | let kGroup1Admin1PK = "group1_admin1_pub_key" | |
121 | 121 | ||
122 | 122 | let kGroup1Admin2PK = "group1_admin2_pub_key" | |
123 | 123 | ||
124 | 124 | let kGroup2Admin1PK = "group2_admin1_pub_key" | |
125 | 125 | ||
126 | 126 | let kGroup2Admin2PK = "group2_admin2_pub_key" | |
127 | 127 | ||
128 | 128 | let moneyBox = Address(fromBase58String(valueOrErrorMessage(getString(this, kMoneyBox), "No axly moneyBox address"))) | |
129 | 129 | ||
130 | 130 | let exContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kExContract), "No exchange contract address"))) | |
131 | 131 | ||
132 | 132 | let priceOracleAddr = Address(fromBase58String(valueOrErrorMessage(getString(this, kPriceOracle), "No price oracle address"))) | |
133 | 133 | ||
134 | 134 | let wxSwapContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kWxSwapContract), "No wx swap address"))) | |
135 | 135 | ||
136 | 136 | let SWOPID = fromBase58String(valueOrErrorMessage(getString(this, kSwopId), "No swop id")) | |
137 | 137 | ||
138 | 138 | let WXID = fromBase58String(valueOrErrorMessage(getString(this, kWxId), "No wx id")) | |
139 | 139 | ||
140 | 140 | let group1Admin1PK = fromBase58String(valueOrErrorMessage(getString(this, kGroup1Admin1PK), "Can't get kGroup1Admin1PK")) | |
141 | 141 | ||
142 | 142 | let group1Admin2PK = fromBase58String(valueOrErrorMessage(getString(this, kGroup1Admin2PK), "Can't get kGroup1Admin2PK")) | |
143 | 143 | ||
144 | 144 | let group2Admin1PK = fromBase58String(valueOrErrorMessage(getString(this, kGroup2Admin1PK), "Can't get kGroup2Admin1PK")) | |
145 | 145 | ||
146 | 146 | let group2Admin2PK = fromBase58String(valueOrErrorMessage(getString(this, kGroup2Admin2PK), "Can't get kGroup2Admin1PK")) | |
147 | 147 | ||
148 | 148 | let operatorPK = fromBase58String(valueOrErrorMessage(getString(this, kOperatorCallPK), "Can't get operatorPK")) | |
149 | 149 | ||
150 | 150 | func unknownPoolType () = throw("Wrong pool type") | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func getLendSrvAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kLendService), "Can't get lend service addr"))) | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | func isOperatorCall (i) = if ((i.callerPublicKey == operatorPK)) | |
157 | 157 | then unit | |
158 | 158 | else throw("Only operator can call this function") | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | func isAdminCall (i) = if (if ((i.callerPublicKey == group1Admin1PK)) | |
162 | 162 | then true | |
163 | 163 | else (i.callerPublicKey == group1Admin2PK)) | |
164 | 164 | then unit | |
165 | 165 | else throw("Only admin group1 can call this function") | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | func isSelfCall (i) = if ((i.caller == this)) | |
169 | 169 | then unit | |
170 | 170 | else throw("Only contract itself can call this function") | |
171 | 171 | ||
172 | 172 | ||
173 | 173 | func isLandCall (i) = if ((i.caller == getLendSrvAddr())) | |
174 | 174 | then unit | |
175 | 175 | else throw("Only land contract can call this function") | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func isActive () = if ((valueOrElse(getBoolean(this, kActive), true) == true)) | |
179 | 179 | then unit | |
180 | 180 | else throw("DApp is inactive at this moment") | |
181 | 181 | ||
182 | 182 | ||
183 | 183 | func isActiveForUsers () = if (if (valueOrElse(getBoolean(this, kActive), true)) | |
184 | 184 | then (valueOrElse(getBoolean(this, kActiveUsers), true) == true) | |
185 | 185 | else false) | |
186 | 186 | then unit | |
187 | 187 | else throw("DApp is inactive for users at this moment") | |
188 | 188 | ||
189 | 189 | ||
190 | 190 | func isPoolActive (pool,type) = { | |
191 | 191 | let WXSFActive = valueOrElse(getBoolean(this, (type + kActiveSFWX)), true) | |
192 | 192 | let poolActive = valueOrElse(getBoolean(this, (pool + kPoolActive)), true) | |
193 | 193 | if (if (WXSFActive) | |
194 | 194 | then poolActive | |
195 | 195 | else false) | |
196 | 196 | then true | |
197 | 197 | else false | |
198 | 198 | } | |
199 | 199 | ||
200 | 200 | ||
201 | 201 | func accountBalance (assetId) = match assetId { | |
202 | 202 | case id: ByteVector => | |
203 | 203 | assetBalance(this, id) | |
204 | 204 | case waves: Unit => | |
205 | 205 | wavesBalance(this).available | |
206 | 206 | case _ => | |
207 | 207 | throw("Match error") | |
208 | 208 | } | |
209 | 209 | ||
210 | 210 | ||
211 | 211 | func getSFPoolBalances (poolAddr) = $Tuple2(valueOrErrorMessage(getInteger(poolAddr, kSFPoolAAssetBalance), "Can't get pool A asset balance"), valueOrErrorMessage(getInteger(poolAddr, kSFPoolBAssetBalance), "Can't get pool B asset balance")) | |
212 | 212 | ||
213 | 213 | ||
214 | 214 | func getWXPoolBalances (poolAddr,aId,bId) = $Tuple2({ | |
215 | 215 | let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [aId], nil) | |
216 | 216 | if ($isInstanceOf(@, "Int")) | |
217 | 217 | then @ | |
218 | 218 | else throw(($getType(@) + " couldn't be cast to Int")) | |
219 | 219 | }, { | |
220 | 220 | let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [bId], nil) | |
221 | 221 | if ($isInstanceOf(@, "Int")) | |
222 | 222 | then @ | |
223 | 223 | else throw(($getType(@) + " couldn't be cast to Int")) | |
224 | 224 | }) | |
225 | 225 | ||
226 | 226 | ||
227 | 227 | func getPoolBalances (poolAddr,type,aId,bId) = if ((type == SF_POOL)) | |
228 | 228 | then getSFPoolBalances(poolAddr) | |
229 | 229 | else if ((type == WX_POOL)) | |
230 | 230 | then getWXPoolBalances(poolAddr, aId, bId) | |
231 | 231 | else unknownPoolType() | |
232 | 232 | ||
233 | 233 | ||
234 | 234 | func getSFPoolData (poolAddr) = { | |
235 | 235 | let $t078997948 = getSFPoolBalances(poolAddr) | |
236 | 236 | if (($t078997948 == $t078997948)) | |
237 | 237 | then { | |
238 | 238 | let balB = $t078997948._2 | |
239 | 239 | let balA = $t078997948._1 | |
240 | 240 | $Tuple5(valueOrErrorMessage(getString(poolAddr, kSFPoolAAssetId), "Can't get pool A asset id"), valueOrErrorMessage(getString(poolAddr, kSFPoolBAssetId), "Can't get pool B asset id"), balA, balB, valueOrErrorMessage(getString(poolAddr, kSFPoolShareId), "Can't get share asset id")) | |
241 | 241 | } | |
242 | 242 | else throw("Strict value is not equal to itself.") | |
243 | 243 | } | |
244 | 244 | ||
245 | 245 | ||
246 | 246 | func getWXPoolData (poolAddr) = { | |
247 | 247 | let cfg = { | |
248 | 248 | let @ = invoke(poolAddr, "getPoolConfigWrapperREADONLY", nil, nil) | |
249 | 249 | if ($isInstanceOf(@, "List[Any]")) | |
250 | 250 | then @ | |
251 | 251 | else throw(($getType(@) + " couldn't be cast to List[Any]")) | |
252 | 252 | } | |
253 | 253 | if ((cfg == cfg)) | |
254 | 254 | then { | |
255 | 255 | let aId = valueOrErrorMessage({ | |
256 | 256 | let @ = cfg[4] | |
257 | 257 | if ($isInstanceOf(@, "String")) | |
258 | 258 | then @ | |
259 | 259 | else unit | |
260 | 260 | }, "Can't get pool A asset id") | |
261 | 261 | let bId = valueOrErrorMessage({ | |
262 | 262 | let @ = cfg[5] | |
263 | 263 | if ($isInstanceOf(@, "String")) | |
264 | 264 | then @ | |
265 | 265 | else unit | |
266 | 266 | }, "Can't get pool B asset id") | |
267 | 267 | let shareId = valueOrErrorMessage({ | |
268 | 268 | let @ = cfg[3] | |
269 | 269 | if ($isInstanceOf(@, "String")) | |
270 | 270 | then @ | |
271 | 271 | else unit | |
272 | 272 | }, "Can't get pool LP asset id") | |
273 | 273 | let $t086458704 = getWXPoolBalances(poolAddr, aId, bId) | |
274 | 274 | if (($t086458704 == $t086458704)) | |
275 | 275 | then { | |
276 | 276 | let balB = $t086458704._2 | |
277 | 277 | let balA = $t086458704._1 | |
278 | 278 | $Tuple5(aId, bId, balA, balB, shareId) | |
279 | 279 | } | |
280 | 280 | else throw("Strict value is not equal to itself.") | |
281 | 281 | } | |
282 | 282 | else throw("Strict value is not equal to itself.") | |
283 | 283 | } | |
284 | 284 | ||
285 | 285 | ||
286 | 286 | func getPoolData (poolAddr,type) = if ((type == SF_POOL)) | |
287 | 287 | then getSFPoolData(poolAddr) | |
288 | 288 | else if ((type == WX_POOL)) | |
289 | 289 | then getWXPoolData(poolAddr) | |
290 | 290 | else unknownPoolType() | |
291 | 291 | ||
292 | 292 | ||
293 | 293 | func getShareSupply (poolAddr,type,shareId) = if ((type == SF_POOL)) | |
294 | 294 | then valueOrErrorMessage(getInteger(poolAddr, kSFPoolShareSupply), "Can't get share asset supply") | |
295 | 295 | else if ((type == WX_POOL)) | |
296 | 296 | then valueOrErrorMessage(assetInfo(fromBase58String(shareId)), "Wrong ShareId").quantity | |
297 | 297 | else unknownPoolType() | |
298 | 298 | ||
299 | 299 | ||
300 | 300 | func getPoolTotalShare (pool) = valueOrElse(getInteger(this, (pool + kPoolTotal)), 0) | |
301 | 301 | ||
302 | 302 | ||
303 | 303 | func getPoolTotalShareWithLoan (pool) = valueOrElse(getInteger(this, (pool + kPoolTotalLoan)), 0) | |
304 | 304 | ||
305 | 305 | ||
306 | 306 | func getNewUserPositionNumber (user) = (valueOrElse(getInteger(this, (user + kUserPositionNum)), 0) + 1) | |
307 | 307 | ||
308 | 308 | ||
309 | 309 | func getAxlyFee (pool,feeType) = if ((feeType == CAP_FEE_LOAN)) | |
310 | 310 | then getIntegerValue(this, (pool + kAxlyWithLoanCapFee)) | |
311 | 311 | else if ((feeType == CAP_FEE_NO_LOAN)) | |
312 | 312 | then getIntegerValue(this, (pool + kAxlyNoLoanCapFee)) | |
313 | 313 | else if ((feeType == LOAN_FEE)) | |
314 | 314 | then getIntegerValue(this, (pool + kAxlyInFeeWithLoan)) | |
315 | 315 | else if ((feeType == NO_LOAN_FEE)) | |
316 | 316 | then getIntegerValue(this, (pool + kAxlyInFeeWithoutLoan)) | |
317 | 317 | else if ((feeType == NO_FEE)) | |
318 | 318 | then 0 | |
319 | 319 | else throw("Wrong fee type") | |
320 | 320 | ||
321 | 321 | ||
322 | 322 | func getSFFarmingAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kSFFarmingAddr), "Can't get swopfi farming addr"))) | |
323 | 323 | ||
324 | 324 | ||
325 | 325 | func getWXFarmingAddr (poolAddr) = { | |
326 | 326 | let fContract = Address(fromBase58String(valueOrErrorMessage(getString(poolAddr, "%s__factoryContract"), "Can't get WX factory contract addr"))) | |
327 | 327 | let factroyCfg = split(valueOrErrorMessage(getString(fContract, "%s__factoryConfig"), "Can't get WX factory cfg"), "__") | |
328 | 328 | Address(fromBase58String(factroyCfg[1])) | |
329 | 329 | } | |
330 | 330 | ||
331 | 331 | ||
332 | 332 | func assetIdToStr (assetId) = match assetId { | |
333 | 333 | case id: ByteVector => | |
334 | 334 | toBase58String(id) | |
335 | 335 | case waves: Unit => | |
336 | 336 | "WAVES" | |
337 | 337 | case _ => | |
338 | 338 | throw("Not Asset id") | |
339 | 339 | } | |
340 | 340 | ||
341 | 341 | ||
342 | 342 | func assetIdFromStr (assetId) = if ((assetId == "WAVES")) | |
343 | 343 | then unit | |
344 | 344 | else fromBase58String(assetId) | |
345 | 345 | ||
346 | 346 | ||
347 | 347 | func getAssetDecimals (assetId) = if ((assetId == "WAVES")) | |
348 | 348 | then 8 | |
349 | 349 | else match assetInfo(fromBase58String(assetId)) { | |
350 | 350 | case asset: Asset => | |
351 | 351 | asset.decimals | |
352 | 352 | case _ => | |
353 | 353 | throw("Can't find asset") | |
354 | 354 | } | |
355 | 355 | ||
356 | 356 | ||
357 | 357 | func getAssetPrecition (assetId) = pow(10, 0, getAssetDecimals(assetId), 0, 0, DOWN) | |
358 | 358 | ||
359 | 359 | ||
360 | 360 | func getAssetsPrice (assetIds) = { | |
361 | 361 | func getPrices (a,assetId) = { | |
362 | 362 | let assetPrice = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle)) | |
363 | 363 | (a :+ assetPrice) | |
364 | 364 | } | |
365 | 365 | ||
366 | 366 | let $l = assetIds | |
367 | 367 | let $s = size($l) | |
368 | 368 | let $acc0 = nil | |
369 | 369 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
370 | 370 | then $a | |
371 | 371 | else getPrices($a, $l[$i]) | |
372 | 372 | ||
373 | 373 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
374 | 374 | then $a | |
375 | 375 | else throw("List size exceeds 50") | |
376 | 376 | ||
377 | 377 | $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($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) | |
378 | 378 | } | |
379 | 379 | ||
380 | 380 | ||
381 | 381 | func getSharePrice (shareId) = { | |
382 | 382 | let pool = valueOrErrorMessage(getString(this, (shareId + kSharePool)), "Can't find pool addr by share id") | |
383 | 383 | let poolAddr = Address(fromBase58String(pool)) | |
384 | 384 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
385 | 385 | let $t01168211747 = getPoolData(poolAddr, pType) | |
386 | 386 | let aId = $t01168211747._1 | |
387 | 387 | let bId = $t01168211747._2 | |
388 | 388 | let aBalance = $t01168211747._3 | |
389 | 389 | let bBalance = $t01168211747._4 | |
390 | 390 | let dPriceA = getIntegerValue(priceOracleAddr, (aId + kPriceInOracle)) | |
391 | 391 | let dPriceB = getIntegerValue(priceOracleAddr, (bId + kPriceInOracle)) | |
392 | 392 | let shareSupply = getShareSupply(poolAddr, pType, shareId) | |
393 | 393 | let APrecision = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN) | |
394 | 394 | let BPrecision = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN) | |
395 | 395 | let sharePrecision = pow(10, 0, getAssetDecimals(shareId), 0, 0, DOWN) | |
396 | 396 | let sum = (fraction(aBalance, dPriceA, APrecision) + fraction(bBalance, dPriceB, BPrecision)) | |
397 | 397 | fraction(sum, sharePrecision, shareSupply) | |
398 | 398 | } | |
399 | 399 | ||
400 | 400 | ||
401 | 401 | func getSharePrices (shareIds) = { | |
402 | 402 | func getPrices (a,shareId) = (a :+ getSharePrice(shareId)) | |
403 | 403 | ||
404 | 404 | let $l = shareIds | |
405 | 405 | let $s = size($l) | |
406 | 406 | let $acc0 = nil | |
407 | 407 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
408 | 408 | then $a | |
409 | 409 | else getPrices($a, $l[$i]) | |
410 | 410 | ||
411 | 411 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
412 | 412 | then $a | |
413 | 413 | else throw("List size exceeds 20") | |
414 | 414 | ||
415 | 415 | $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
416 | 416 | } | |
417 | 417 | ||
418 | 418 | ||
419 | 419 | func getCursEntries (aId,bId,shareId,wAmounts) = { | |
420 | 420 | let assetsPrices = getAssetsPrice([aId, bId]) | |
421 | 421 | let sharePrice = getSharePrice(shareId) | |
422 | 422 | let prices = ([toString(assetsPrices[0]), toString(assetsPrices[1]), toString(sharePrice)] ++ wAmounts) | |
423 | 423 | [StringEntry(kTokenLastPrice, makeString(prices, ","))] | |
424 | 424 | } | |
425 | 425 | ||
426 | 426 | ||
427 | 427 | func calcReplenishByTwoTokens (pType,poolAddr,pmtA,aId,pmtB,bId,balA,balB) = if ((pType == SF_POOL)) | |
428 | 428 | then { | |
429 | 429 | let repl = { | |
430 | 430 | let @ = invoke(poolAddr, "callFunction", ["calcLPReplenishTwoTokensREADONLY", [toString(pmtA), toString(pmtB)]], nil) | |
431 | 431 | if ($isInstanceOf(@, "List[Any]")) | |
432 | 432 | then @ | |
433 | 433 | else throw(($getType(@) + " couldn't be cast to List[Any]")) | |
434 | 434 | } | |
435 | 435 | if ((repl == repl)) | |
436 | 436 | then $Tuple5({ | |
437 | 437 | let @ = repl[3] | |
438 | 438 | if ($isInstanceOf(@, "Int")) | |
439 | 439 | then @ | |
440 | 440 | else throw(($getType(@) + " couldn't be cast to Int")) | |
441 | 441 | }, { | |
442 | 442 | let @ = repl[4] | |
443 | 443 | if ($isInstanceOf(@, "Int")) | |
444 | 444 | then @ | |
445 | 445 | else throw(($getType(@) + " couldn't be cast to Int")) | |
446 | 446 | }, { | |
447 | 447 | let @ = repl[1] | |
448 | 448 | if ($isInstanceOf(@, "Int")) | |
449 | 449 | then @ | |
450 | 450 | else throw(($getType(@) + " couldn't be cast to Int")) | |
451 | 451 | }, assetIdToStr(repl[2]), { | |
452 | 452 | let @ = repl[0] | |
453 | 453 | if ($isInstanceOf(@, "Int")) | |
454 | 454 | then @ | |
455 | 455 | else throw(($getType(@) + " couldn't be cast to Int")) | |
456 | 456 | }) | |
457 | 457 | else throw("Strict value is not equal to itself.") | |
458 | 458 | } | |
459 | 459 | else if ((pType == WX_POOL)) | |
460 | 460 | then { | |
461 | 461 | let $t01329213542 = $Tuple2(split({ | |
462 | 462 | let @ = invoke(poolAddr, "evaluatePutByAmountAssetREADONLY", [pmtA], nil) | |
463 | 463 | if ($isInstanceOf(@, "String")) | |
464 | 464 | then @ | |
465 | 465 | else throw(($getType(@) + " couldn't be cast to String")) | |
466 | 466 | }, "__"), split({ | |
467 | 467 | let @ = invoke(poolAddr, "evaluatePutByPriceAssetREADONLY", [pmtB], nil) | |
468 | 468 | if ($isInstanceOf(@, "String")) | |
469 | 469 | then @ | |
470 | 470 | else throw(($getType(@) + " couldn't be cast to String")) | |
471 | 471 | }, "__")) | |
472 | 472 | if (($t01329213542 == $t01329213542)) | |
473 | 473 | then { | |
474 | 474 | let evalPutInB = $t01329213542._2 | |
475 | 475 | let evalPutInA = $t01329213542._1 | |
476 | 476 | let lpInA = parseIntValue(evalPutInA[1]) | |
477 | 477 | let lpInB = parseIntValue(evalPutInB[1]) | |
478 | 478 | if ((lpInB > lpInA)) | |
479 | 479 | then { | |
480 | 480 | let pmt = parseIntValue(evalPutInA[8]) | |
481 | 481 | $Tuple5(pmtA, pmt, (pmtB - pmt), bId, lpInB) | |
482 | 482 | } | |
483 | 483 | else { | |
484 | 484 | let pmt = parseIntValue(evalPutInB[7]) | |
485 | 485 | $Tuple5(pmt, pmtB, (pmtA - pmt), aId, lpInA) | |
486 | 486 | } | |
487 | 487 | } | |
488 | 488 | else throw("Strict value is not equal to itself.") | |
489 | 489 | } | |
490 | 490 | else unknownPoolType() | |
491 | 491 | ||
492 | 492 | ||
493 | 493 | func replenishTwoTokensByType (poolAddr,pType,pmtA,aId,pmtB,bId) = { | |
494 | 494 | let payments = [AttachedPayment(assetIdFromStr(aId), pmtA), AttachedPayment(assetIdFromStr(bId), pmtB)] | |
495 | 495 | if ((pType == SF_POOL)) | |
496 | 496 | then invoke(poolAddr, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], payments) | |
497 | 497 | else if ((pType == WX_POOL)) | |
498 | 498 | then invoke(poolAddr, "put", [1000000, false], payments) | |
499 | 499 | else unknownPoolType() | |
500 | 500 | } | |
501 | 501 | ||
502 | 502 | ||
503 | 503 | func replenishOneTokenByType (poolAddr,pType,pmt,pmtId) = { | |
504 | 504 | let payments = [AttachedPayment(assetIdFromStr(pmtId), pmt)] | |
505 | 505 | if ((pType == SF_POOL)) | |
506 | 506 | then invoke(poolAddr, "callFunction", ["replenishWithOneToken", ["0", "false", "0"]], payments) | |
507 | 507 | else if ((pType == WX_POOL)) | |
508 | 508 | then invoke(poolAddr, "putOneTkn", [0, false], payments) | |
509 | 509 | else unknownPoolType() | |
510 | 510 | } | |
511 | 511 | ||
512 | 512 | ||
513 | 513 | func stakeLP (pool,pType,shareId,amount) = { | |
514 | 514 | let payments = [AttachedPayment(fromBase58String(shareId), amount)] | |
515 | 515 | if ((pType == SF_POOL)) | |
516 | 516 | then invoke(getSFFarmingAddr(), "lockShareTokens", [pool, 0], payments) | |
517 | 517 | else if ((pType == WX_POOL)) | |
518 | 518 | then invoke(getWXFarmingAddr(addressFromStringValue(pool)), "stake", nil, payments) | |
519 | 519 | else unknownPoolType() | |
520 | 520 | } | |
521 | 521 | ||
522 | 522 | ||
523 | 523 | func unstakeLP (pool,pType,shareId,amount) = { | |
524 | 524 | let $t01520115551 = if ((pType == SF_POOL)) | |
525 | 525 | then $Tuple3(getSFFarmingAddr(), "withdrawShareTokens", [pool, amount]) | |
526 | 526 | else if ((pType == WX_POOL)) | |
527 | 527 | then $Tuple3(getWXFarmingAddr(Address(fromBase58String(pool))), "unstake", [shareId, amount]) | |
528 | 528 | else unknownPoolType() | |
529 | 529 | let farmAddr = $t01520115551._1 | |
530 | 530 | let fName = $t01520115551._2 | |
531 | 531 | let params = $t01520115551._3 | |
532 | 532 | let inv = invoke(farmAddr, fName, params, nil) | |
533 | 533 | if ((inv == inv)) | |
534 | 534 | then amount | |
535 | 535 | else throw("Strict value is not equal to itself.") | |
536 | 536 | } | |
537 | 537 | ||
538 | 538 | ||
539 | 539 | func calcAmountToPaySF (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = { | |
540 | 540 | let poolAddr = Address(fromBase58String(pool)) | |
541 | 541 | let feeScale6 = 1000000 | |
542 | 542 | let fee = getIntegerValue(poolAddr, kSFPoolFee) | |
543 | 543 | let amntGetNoFee = fraction(amountTokenToGet, feeScale6, (feeScale6 - fee), CEILING) | |
544 | 544 | let $t01597316279 = if ((assetTokenToGet == assetIdA)) | |
545 | 545 | then { | |
546 | 546 | let amountToPay = fraction(amntGetNoFee, balB, (balA - amntGetNoFee), CEILING) | |
547 | 547 | $Tuple2(amountToPay, assetIdB) | |
548 | 548 | } | |
549 | 549 | else { | |
550 | 550 | let amountToPay = fraction(amntGetNoFee, balA, (balB - amntGetNoFee), CEILING) | |
551 | 551 | $Tuple2(amountToPay, assetIdA) | |
552 | 552 | } | |
553 | 553 | let amountToPay = $t01597316279._1 | |
554 | 554 | let assetToPay = $t01597316279._2 | |
555 | 555 | $Tuple2(assetToPay, amountToPay) | |
556 | 556 | } | |
557 | 557 | ||
558 | 558 | ||
559 | 559 | func getWXSwapFees (pool) = { | |
560 | 560 | let poolAddr = addressFromStringValue(pool) | |
561 | 561 | let fContract = addressFromStringValue(valueOrErrorMessage(getString(poolAddr, "%s__factoryContract"), "Can't get WX factory contract addr")) | |
562 | 562 | let poolFeeDefault = value(getInteger(wxSwapContract, "%s__poolFee")) | |
563 | 563 | let protocolFeeDefault = value(getInteger(wxSwapContract, "%s__protocolFee")) | |
564 | 564 | match invoke(fContract, "getSwapFeeREADONLY", [toString(poolAddr)], nil) { | |
565 | 565 | case fees: (Int, Int) => | |
566 | 566 | $Tuple2(fees._1, fees._2) | |
567 | 567 | case _ => | |
568 | 568 | $Tuple2(poolFeeDefault, protocolFeeDefault) | |
569 | 569 | } | |
570 | 570 | } | |
571 | 571 | ||
572 | 572 | ||
573 | 573 | func calcAmountToPayWX (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = { | |
574 | 574 | let $t01701917058 = getWXSwapFees(pool) | |
575 | 575 | let pFee = $t01701917058._1 | |
576 | 576 | let prFee = $t01701917058._2 | |
577 | 577 | let feeScale = toBigInt(100000000) | |
578 | 578 | let $t01709817406 = if ((assetTokenToGet == assetIdA)) | |
579 | 579 | then { | |
580 | 580 | let amountToPay = fraction(amountTokenToGet, balB, (balA - amountTokenToGet)) | |
581 | 581 | $Tuple2(amountToPay, assetIdB) | |
582 | 582 | } | |
583 | 583 | else { | |
584 | 584 | let amountToPay = fraction(amountTokenToGet, balA, (balB - amountTokenToGet)) | |
585 | 585 | $Tuple2(amountToPay, assetIdA) | |
586 | 586 | } | |
587 | 587 | let amountToPay = $t01709817406._1 | |
588 | 588 | let assetToPay = $t01709817406._2 | |
589 | 589 | let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee))), CEILING)) | |
590 | 590 | $Tuple2(assetToPay, amountToPayWithFee) | |
591 | 591 | } | |
592 | 592 | ||
593 | 593 | ||
594 | 594 | func exchangeDirectly (pType,pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = if ((pType == SF_POOL)) | |
595 | 595 | then { | |
596 | 596 | let $t01775317875 = calcAmountToPaySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet) | |
597 | 597 | let assetToPay = $t01775317875._1 | |
598 | 598 | let amountToPay = $t01775317875._2 | |
599 | 599 | invoke(addressFromStringValue(pool), "callFunction", ["exchange", [toString(amountTokenToGet)]], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)]) | |
600 | 600 | } | |
601 | 601 | else if ((pType == WX_POOL)) | |
602 | 602 | then { | |
603 | 603 | let $t01807518197 = calcAmountToPayWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet) | |
604 | 604 | let assetToPay = $t01807518197._1 | |
605 | 605 | let amountToPay = $t01807518197._2 | |
606 | 606 | invoke(wxSwapContract, "swap", [amountTokenToGet, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)]) | |
607 | 607 | } | |
608 | 608 | else unknownPoolType() | |
609 | 609 | ||
610 | 610 | ||
611 | 611 | func calcWithdrawLPFromPoolVirt (poolAddr,pType,shareId,userCanWithdraw) = { | |
612 | 612 | let $t01848418948 = if ((pType == SF_POOL)) | |
613 | 613 | then { | |
614 | 614 | let inv = { | |
615 | 615 | let @ = invoke(poolAddr, "callFunction", ["withdrawREADONLY", [toString(userCanWithdraw)]], nil) | |
616 | 616 | if ($isInstanceOf(@, "List[Any]")) | |
617 | 617 | then @ | |
618 | 618 | else throw(($getType(@) + " couldn't be cast to List[Any]")) | |
619 | 619 | } | |
620 | 620 | if ((inv == inv)) | |
621 | 621 | then $Tuple2({ | |
622 | 622 | let @ = inv[0] | |
623 | 623 | if ($isInstanceOf(@, "Int")) | |
624 | 624 | then @ | |
625 | 625 | else throw(($getType(@) + " couldn't be cast to Int")) | |
626 | 626 | }, { | |
627 | 627 | let @ = inv[1] | |
628 | 628 | if ($isInstanceOf(@, "Int")) | |
629 | 629 | then @ | |
630 | 630 | else throw(($getType(@) + " couldn't be cast to Int")) | |
631 | 631 | }) | |
632 | 632 | else throw("Strict value is not equal to itself.") | |
633 | 633 | } | |
634 | 634 | else if ((pType == WX_POOL)) | |
635 | 635 | then { | |
636 | 636 | let inv = split({ | |
637 | 637 | let @ = invoke(poolAddr, "evaluateGetREADONLY", [shareId, userCanWithdraw], nil) | |
638 | 638 | if ($isInstanceOf(@, "String")) | |
639 | 639 | then @ | |
640 | 640 | else throw(($getType(@) + " couldn't be cast to String")) | |
641 | 641 | }, "__") | |
642 | 642 | if ((inv == inv)) | |
643 | 643 | then $Tuple2(parseIntValue(inv[1]), parseIntValue(inv[2])) | |
644 | 644 | else throw("Strict value is not equal to itself.") | |
645 | 645 | } | |
646 | 646 | else unknownPoolType() | |
647 | 647 | let amountA = $t01848418948._1 | |
648 | 648 | let amountB = $t01848418948._2 | |
649 | 649 | $Tuple2(amountA, amountB) | |
650 | 650 | } | |
651 | 651 | ||
652 | 652 | ||
653 | 653 | func claimFarmed (pType,pool) = if ((pType == SF_POOL)) | |
654 | 654 | then { | |
655 | 655 | let balBefore = accountBalance(SWOPID) | |
656 | 656 | if ((balBefore == balBefore)) | |
657 | 657 | then { | |
658 | 658 | let inv = invoke(getSFFarmingAddr(), "claim", [pool], nil) | |
659 | 659 | if ((inv == inv)) | |
660 | 660 | then { | |
661 | 661 | let balAfter = accountBalance(SWOPID) | |
662 | 662 | $Tuple2((balAfter - balBefore), SWOPID) | |
663 | 663 | } | |
664 | 664 | else throw("Strict value is not equal to itself.") | |
665 | 665 | } | |
666 | 666 | else throw("Strict value is not equal to itself.") | |
667 | 667 | } | |
668 | 668 | else if ((pType == WX_POOL)) | |
669 | 669 | then { | |
670 | 670 | let $t01931619395 = getWXPoolData(addressFromStringValue(pool)) | |
671 | 671 | let aId = $t01931619395._1 | |
672 | 672 | let bId = $t01931619395._2 | |
673 | 673 | let aBal = $t01931619395._3 | |
674 | 674 | let bBal = $t01931619395._4 | |
675 | 675 | let lpId = $t01931619395._5 | |
676 | 676 | let balBefore = accountBalance(WXID) | |
677 | 677 | if ((balBefore == balBefore)) | |
678 | 678 | then { | |
679 | 679 | let inv = invoke(getWXFarmingAddr(addressFromStringValue(pool)), "claimWx", [lpId], nil) | |
680 | 680 | if ((inv == inv)) | |
681 | 681 | then { | |
682 | 682 | let balAfter = accountBalance(WXID) | |
683 | 683 | $Tuple2((balAfter - balBefore), WXID) | |
684 | 684 | } | |
685 | 685 | else throw("Strict value is not equal to itself.") | |
686 | 686 | } | |
687 | 687 | else throw("Strict value is not equal to itself.") | |
688 | 688 | } | |
689 | 689 | else unknownPoolType() | |
690 | 690 | ||
691 | 691 | ||
692 | 692 | func replenishByType (pType,pool,feeType,pmtA,aId,pmtB,bId,balA,balB,LPId) = { | |
693 | 693 | let lpBalanceBefore = accountBalance(fromBase58String(LPId)) | |
694 | 694 | if ((lpBalanceBefore == lpBalanceBefore)) | |
695 | 695 | then { | |
696 | 696 | let poolAddr = addressFromStringValue(pool) | |
697 | 697 | let $t01999320409 = if (if ((pmtA > 0)) | |
698 | 698 | then (pmtB > 0) | |
699 | 699 | else false) | |
700 | 700 | then { | |
701 | 701 | let $t02005920175 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB) | |
702 | 702 | let pmtInA = $t02005920175._1 | |
703 | 703 | let pmtInB = $t02005920175._2 | |
704 | 704 | let change = $t02005920175._3 | |
705 | 705 | let changeId = $t02005920175._4 | |
706 | 706 | let inv = replenishTwoTokensByType(poolAddr, pType, pmtInA, aId, pmtInB, bId) | |
707 | 707 | if ((inv == inv)) | |
708 | 708 | then $Tuple2(change, changeId) | |
709 | 709 | else throw("Strict value is not equal to itself.") | |
710 | 710 | } | |
711 | 711 | else if ((pmtA > 0)) | |
712 | 712 | then $Tuple2(pmtA, aId) | |
713 | 713 | else if ((pmtB > 0)) | |
714 | 714 | then $Tuple2(pmtB, bId) | |
715 | 715 | else throw("pmts must be > 0") | |
716 | 716 | let change = $t01999320409._1 | |
717 | 717 | let changeId = $t01999320409._2 | |
718 | 718 | let inv = if ((change > 0)) | |
719 | 719 | then replenishOneTokenByType(poolAddr, pType, change, changeId) | |
720 | 720 | else nil | |
721 | 721 | if ((inv == inv)) | |
722 | 722 | then { | |
723 | 723 | let lpBalanceAfter = accountBalance(fromBase58String(LPId)) | |
724 | 724 | let totalStaked = (lpBalanceAfter - lpBalanceBefore) | |
725 | 725 | let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6) | |
726 | 726 | let userShareForStake = (totalStaked - axlyFeeAmount) | |
727 | 727 | if ((0 >= userShareForStake)) | |
728 | 728 | then throw("amount of staked sharetokens must be > 0") | |
729 | 729 | else { | |
730 | 730 | let invLP = stakeLP(pool, pType, LPId, userShareForStake) | |
731 | 731 | if ((invLP == invLP)) | |
732 | 732 | then $Tuple2(userShareForStake, axlyFeeAmount) | |
733 | 733 | else throw("Strict value is not equal to itself.") | |
734 | 734 | } | |
735 | 735 | } | |
736 | 736 | else throw("Strict value is not equal to itself.") | |
737 | 737 | } | |
738 | 738 | else throw("Strict value is not equal to itself.") | |
739 | 739 | } | |
740 | 740 | ||
741 | 741 | ||
742 | 742 | func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type,withLoan) = { | |
743 | 743 | let totalAmount = getPoolTotalShare(pool) | |
744 | 744 | let totalAmountLoan = getPoolTotalShareWithLoan(pool) | |
745 | 745 | let $t02126621504 = if (withLoan) | |
746 | 746 | then $Tuple2(getIntegerValue(this, (pool + kPoolInterestLoan)), (totalAmountLoan + stakedAmount)) | |
747 | 747 | else $Tuple2(getIntegerValue(this, (pool + kPoolInterestNoLoan)), totalAmountLoan) | |
748 | 748 | let curPoolInterest = $t02126621504._1 | |
749 | 749 | let totalStakedWithLoan = $t02126621504._2 | |
750 | 750 | [IntegerEntry((pool + kPoolTotal), (totalAmount + stakedAmount)), IntegerEntry((pool + kPoolTotalLoan), totalStakedWithLoan), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPosition), stakedAmount), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPositionInterest), curPoolInterest), StringEntry((((user + "_") + toString(posNum)) + kUserPositionPool), pool), IntegerEntry((user + kUserPositionNum), posNum), ScriptTransfer(moneyBox, axlyFeeAmount, fromBase58String(shareId))] | |
751 | 751 | } | |
752 | 752 | ||
753 | 753 | ||
754 | 754 | func exchangeKeeper (toToken,pmtAmount,pmtAsset,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = { | |
755 | 755 | let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken)) | |
756 | 756 | if ((tokenBalanceBefore == tokenBalanceBefore)) | |
757 | 757 | then { | |
758 | 758 | let inv = invoke(exContract, "swap", [amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options], [AttachedPayment(pmtAsset, pmtAmount)]) | |
759 | 759 | if ((inv == inv)) | |
760 | 760 | then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore) | |
761 | 761 | else throw("Strict value is not equal to itself.") | |
762 | 762 | } | |
763 | 763 | else throw("Strict value is not equal to itself.") | |
764 | 764 | } | |
765 | 765 | ||
766 | 766 | ||
767 | 767 | func exchangePuzzle (toToken,pmtAmount,pmtAsset,routesStr,minToReceive,options) = { | |
768 | 768 | let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken)) | |
769 | 769 | if ((tokenBalanceBefore == tokenBalanceBefore)) | |
770 | 770 | then { | |
771 | 771 | let inv = invoke(exContract, "puzzleSwap", [routesStr, minToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)]) | |
772 | 772 | if ((inv == inv)) | |
773 | 773 | then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore) | |
774 | 774 | else throw("Strict value is not equal to itself.") | |
775 | 775 | } | |
776 | 776 | else throw("Strict value is not equal to itself.") | |
777 | 777 | } | |
778 | 778 | ||
779 | 779 | ||
780 | 780 | func exchangeSwopFi (toToken,pmtAmount,pmtAsset,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = { | |
781 | 781 | let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken)) | |
782 | 782 | if ((tokenBalanceBefore == tokenBalanceBefore)) | |
783 | 783 | then { | |
784 | 784 | let inv = invoke(exContract, "swopfiSwap", [exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)]) | |
785 | 785 | if ((inv == inv)) | |
786 | 786 | then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore) | |
787 | 787 | else throw("Strict value is not equal to itself.") | |
788 | 788 | } | |
789 | 789 | else throw("Strict value is not equal to itself.") | |
790 | 790 | } | |
791 | 791 | ||
792 | 792 | ||
793 | 793 | func capitalize (pool,pType,tokenId,tokenAmount) = { | |
794 | 794 | let poolAddr = Address(fromBase58String(pool)) | |
795 | 795 | let $t02385823924 = getPoolData(poolAddr, pType) | |
796 | 796 | let AId = $t02385823924._1 | |
797 | 797 | let BId = $t02385823924._2 | |
798 | 798 | let balA = $t02385823924._3 | |
799 | 799 | let balB = $t02385823924._4 | |
800 | 800 | let shareId = $t02385823924._5 | |
801 | 801 | if (if ((tokenId != AId)) | |
802 | 802 | then (tokenId != BId) | |
803 | 803 | else false) | |
804 | 804 | then throw("Wrong asset") | |
805 | 805 | else { | |
806 | 806 | let totalShareAmount = getPoolTotalShare(pool) | |
807 | 807 | let totalShareAmountWithLoan = getPoolTotalShareWithLoan(pool) | |
808 | 808 | let loanPercent = fraction(totalShareAmountWithLoan, SCALE8, totalShareAmount) | |
809 | 809 | let tokensForFeeLoan = fraction(tokenAmount, loanPercent, SCALE8) | |
810 | 810 | let tokensForFeeNoLoan = (tokenAmount - tokensForFeeLoan) | |
811 | 811 | let axlyFeeLoan = fraction(tokensForFeeLoan, getAxlyFee(pool, CAP_FEE_LOAN), FEE_SCALE6) | |
812 | 812 | let axlyFeeNoLoan = fraction(tokensForFeeNoLoan, getAxlyFee(pool, CAP_FEE_NO_LOAN), FEE_SCALE6) | |
813 | 813 | let axlyFee = (axlyFeeLoan + axlyFeeNoLoan) | |
814 | 814 | let $t02456424664 = if ((tokenId == AId)) | |
815 | 815 | then $Tuple2((tokenAmount - axlyFee), 0) | |
816 | 816 | else $Tuple2(0, (tokenAmount - axlyFee)) | |
817 | 817 | let pmtA = $t02456424664._1 | |
818 | 818 | let pmtB = $t02456424664._2 | |
819 | 819 | let $t02466724771 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
820 | 820 | let stakedAmount = $t02466724771._1 | |
821 | 821 | let nf = $t02466724771._2 | |
822 | 822 | let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0) | |
823 | 823 | let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0) | |
824 | 824 | let stakedLoan = fraction(stakedAmount, loanPercent, SCALE8) | |
825 | 825 | let stakedNoLoan = (stakedAmount - stakedLoan) | |
826 | 826 | let newInterestLoan = if ((totalShareAmountWithLoan > 0)) | |
827 | 827 | then (curPoolInterestLoan + fraction(stakedLoan, SCALE10, totalShareAmountWithLoan)) | |
828 | 828 | else 0 | |
829 | 829 | let newInterestNoLoan = if (((totalShareAmount - totalShareAmountWithLoan) > 0)) | |
830 | 830 | then (curPoolInterestNoLoan + fraction(stakedNoLoan, SCALE10, (totalShareAmount - totalShareAmountWithLoan))) | |
831 | 831 | else 0 | |
832 | 832 | ([IntegerEntry((pool + kPoolInterestLoan), newInterestLoan), IntegerEntry((pool + kPoolInterestNoLoan), newInterestNoLoan), IntegerEntry((pool + kPoolTotal), (totalShareAmount + stakedAmount)), IntegerEntry((pool + kPoolTotalLoan), (totalShareAmountWithLoan + stakedLoan)), ScriptTransfer(moneyBox, axlyFee, fromBase58String(tokenId))] ++ getCursEntries(AId, BId, shareId, nil)) | |
833 | 833 | } | |
834 | 834 | } | |
835 | 835 | ||
836 | 836 | ||
837 | 837 | func userCanWithdrawShareCalc (user,pool,posId,borrowed) = { | |
838 | 838 | let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserPosition)), "Unknown position") | |
839 | 839 | let userInterest = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserPositionInterest)) | |
840 | 840 | let poolInterest = if (borrowed) | |
841 | 841 | then getIntegerValue(this, (pool + kPoolInterestLoan)) | |
842 | 842 | else getIntegerValue(this, (pool + kPoolInterestNoLoan)) | |
843 | 843 | (pAmount + fraction(pAmount, (poolInterest - userInterest), SCALE10)) | |
844 | 844 | } | |
845 | 845 | ||
846 | 846 | ||
847 | 847 | func calcStopLossFee (pool,isBorrowed,stopLoss,lpWithdraw) = { | |
848 | 848 | let feeType = if (isBorrowed) | |
849 | 849 | then STOPLOSS_LOAN | |
850 | 850 | else STOPLOSS_FEE_NO_LOAN | |
851 | 851 | if (stopLoss) | |
852 | 852 | then fraction(lpWithdraw, getAxlyFee(pool, feeType), FEE_SCALE6) | |
853 | 853 | else 0 | |
854 | 854 | } | |
855 | 855 | ||
856 | 856 | ||
857 | 857 | func withdrawToUser (user,pool,posId,stopLoss) = { | |
858 | 858 | let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserPosition)), "Unknown position") | |
859 | 859 | let isBorrowed = (valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)), 0) > 0) | |
860 | 860 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posId, isBorrowed) | |
861 | 861 | let poolTotalShare = getPoolTotalShare(pool) | |
862 | 862 | let poolTotalShareLoan = getPoolTotalShareWithLoan(pool) | |
863 | 863 | let userAddr = Address(fromBase58String(user)) | |
864 | 864 | let poolAddr = Address(fromBase58String(pool)) | |
865 | 865 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
866 | 866 | let $t02730227374 = getPoolData(poolAddr, pType) | |
867 | 867 | let idAStr = $t02730227374._1 | |
868 | 868 | let idBStr = $t02730227374._2 | |
869 | 869 | let balA = $t02730227374._3 | |
870 | 870 | let balB = $t02730227374._4 | |
871 | 871 | let shareId = $t02730227374._5 | |
872 | 872 | let $t02737727444 = $Tuple2(assetIdFromStr(idAStr), assetIdFromStr(idBStr)) | |
873 | 873 | let idA = $t02737727444._1 | |
874 | 874 | let idB = $t02737727444._2 | |
875 | 875 | let stopLossFee = calcStopLossFee(pool, isBorrowed, stopLoss, userCanWithdraw) | |
876 | 876 | let cBalABefore = accountBalance(idA) | |
877 | 877 | if ((cBalABefore == cBalABefore)) | |
878 | 878 | then { | |
879 | 879 | let cBalBBefore = accountBalance(idB) | |
880 | 880 | if ((cBalBBefore == cBalBBefore)) | |
881 | 881 | then { | |
882 | 882 | let inv = if ((pType == SF_POOL)) | |
883 | 883 | then { | |
884 | 884 | let inv = unstakeLP(pool, pType, shareId, stopLossFee) | |
885 | 885 | if ((inv == inv)) | |
886 | 886 | then invoke(poolAddr, "callFunction", ["withdraw", [toString(userCanWithdraw)]], nil) | |
887 | 887 | else throw("Strict value is not equal to itself.") | |
888 | 888 | } | |
889 | 889 | else if ((pType == WX_POOL)) | |
890 | 890 | then { | |
891 | 891 | let inv = unstakeLP(pool, pType, shareId, (userCanWithdraw + stopLossFee)) | |
892 | 892 | if ((inv == inv)) | |
893 | 893 | then invoke(poolAddr, "get", nil, [AttachedPayment(assetIdFromStr(shareId), userCanWithdraw)]) | |
894 | 894 | else throw("Strict value is not equal to itself.") | |
895 | 895 | } | |
896 | 896 | else unknownPoolType() | |
897 | 897 | if ((inv == inv)) | |
898 | 898 | then { | |
899 | 899 | let cBalAAfter = accountBalance(idA) | |
900 | 900 | if ((cBalAAfter == cBalAAfter)) | |
901 | 901 | then { | |
902 | 902 | let cBalBAfter = accountBalance(idB) | |
903 | 903 | if ((cBalBAfter == cBalBAfter)) | |
904 | 904 | then { | |
905 | 905 | let $t02813928228 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore)) | |
906 | 906 | let tokensAmountA = $t02813928228._1 | |
907 | 907 | let tokensAmountB = $t02813928228._2 | |
908 | 908 | let $t02823129467 = if (isBorrowed) | |
909 | 909 | then { | |
910 | 910 | let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)) | |
911 | 911 | let debt = { | |
912 | 912 | let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((user + "_") + posId), borrowAsset], nil) | |
913 | 913 | if ($isInstanceOf(@, "Int")) | |
914 | 914 | then @ | |
915 | 915 | else throw(($getType(@) + " couldn't be cast to Int")) | |
916 | 916 | } | |
917 | 917 | if ((debt == debt)) | |
918 | 918 | then { | |
919 | 919 | let amountToGetEx = if (if ((borrowAsset == idAStr)) | |
920 | 920 | then (debt > tokensAmountA) | |
921 | 921 | else false) | |
922 | 922 | then (debt - tokensAmountA) | |
923 | 923 | else if (if ((borrowAsset == idBStr)) | |
924 | 924 | then (debt > tokensAmountB) | |
925 | 925 | else false) | |
926 | 926 | then (debt - tokensAmountB) | |
927 | 927 | else 0 | |
928 | 928 | let exInv = if ((amountToGetEx > 0)) | |
929 | 929 | then exchangeDirectly(pType, pool, idAStr, idBStr, (balA - tokensAmountA), (balB - tokensAmountB), amountToGetEx, borrowAsset) | |
930 | 930 | else nil | |
931 | 931 | if ((exInv == exInv)) | |
932 | 932 | then { | |
933 | 933 | let cBalAAfterRepay = accountBalance(idA) | |
934 | 934 | if ((cBalAAfterRepay == cBalAAfterRepay)) | |
935 | 935 | then { | |
936 | 936 | let cBalBAfterRepay = accountBalance(idB) | |
937 | 937 | if ((cBalBAfterRepay == cBalBAfterRepay)) | |
938 | 938 | then { | |
939 | 939 | let closeDbtInv = if ((debt > 0)) | |
940 | 940 | then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + posId)], [AttachedPayment(assetIdFromStr(borrowAsset), debt)]) | |
941 | 941 | else 0 | |
942 | 942 | if ((closeDbtInv == closeDbtInv)) | |
943 | 943 | then if ((borrowAsset == idAStr)) | |
944 | 944 | then $Tuple2(((cBalAAfterRepay - cBalABefore) - debt), (cBalBAfterRepay - cBalBBefore)) | |
945 | 945 | else $Tuple2((cBalAAfterRepay - cBalABefore), ((cBalBAfterRepay - cBalBBefore) - debt)) | |
946 | 946 | else throw("Strict value is not equal to itself.") | |
947 | 947 | } | |
948 | 948 | else throw("Strict value is not equal to itself.") | |
949 | 949 | } | |
950 | 950 | else throw("Strict value is not equal to itself.") | |
951 | 951 | } | |
952 | 952 | else throw("Strict value is not equal to itself.") | |
953 | 953 | } | |
954 | 954 | else throw("Strict value is not equal to itself.") | |
955 | 955 | } | |
956 | 956 | else $Tuple2(tokensAmountA, tokensAmountB) | |
957 | 957 | let toUserA = $t02823129467._1 | |
958 | 958 | let toUserB = $t02823129467._2 | |
959 | 959 | let poolTotalLoanEntries = if (isBorrowed) | |
960 | 960 | then [IntegerEntry((pool + kPoolTotalLoan), ((poolTotalShareLoan - userCanWithdraw) - stopLossFee))] | |
961 | 961 | else nil | |
962 | 962 | let entries = (([DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPosition)), DeleteEntry((((user + "_") + posId) + kUserPositionPool)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPositionInterest)), IntegerEntry((pool + kPoolTotal), ((poolTotalShare - userCanWithdraw) - stopLossFee)), ScriptTransfer(userAddr, toUserA, idA), ScriptTransfer(userAddr, toUserB, idB), ScriptTransfer(moneyBox, stopLossFee, fromBase58String(shareId))] ++ poolTotalLoanEntries) ++ getCursEntries(idAStr, idBStr, shareId, nil)) | |
963 | 963 | $Tuple2(entries, [toUserA, toUserB]) | |
964 | 964 | } | |
965 | 965 | else throw("Strict value is not equal to itself.") | |
966 | 966 | } | |
967 | 967 | else throw("Strict value is not equal to itself.") | |
968 | 968 | } | |
969 | 969 | else throw("Strict value is not equal to itself.") | |
970 | 970 | } | |
971 | 971 | else throw("Strict value is not equal to itself.") | |
972 | 972 | } | |
973 | 973 | else throw("Strict value is not equal to itself.") | |
974 | 974 | } | |
975 | 975 | ||
976 | 976 | ||
977 | 977 | func parseRequest (requestId) = { | |
978 | 978 | let request = split(valueOrErrorMessage(getString(this, (requestId + kRequestId)), ("No request with id " + requestId)), ",") | |
979 | 979 | let user = request[0] | |
980 | 980 | let pool = request[1] | |
981 | 981 | let pmtA = parseIntValue(request[2]) | |
982 | 982 | let AId = request[3] | |
983 | 983 | let pmtB = parseIntValue(request[4]) | |
984 | 984 | let BId = request[5] | |
985 | 985 | let balA = parseIntValue(request[6]) | |
986 | 986 | let balB = parseIntValue(request[7]) | |
987 | 987 | let shareId = request[8] | |
988 | 988 | let bwAsset = request[9] | |
989 | 989 | let bwAmount = parseIntValue(request[10]) | |
990 | 990 | $Tuple11(user, pool, pmtA, AId, pmtB, BId, balA, balB, shareId, bwAsset, bwAmount) | |
991 | 991 | } | |
992 | 992 | ||
993 | 993 | ||
994 | 994 | func calcBorrowAmount (pmtA,pmtB,aId,bId,leverage,borrowId) = if (if ((borrowId != aId)) | |
995 | 995 | then (borrowId != bId) | |
996 | 996 | else false) | |
997 | 997 | then throw("Wrong borrow asset") | |
998 | 998 | else { | |
999 | 999 | let dPriceA = getIntegerValue(priceOracleAddr, (aId + kPriceInOracle)) | |
1000 | 1000 | let dPriceB = getIntegerValue(priceOracleAddr, (bId + kPriceInOracle)) | |
1001 | 1001 | let decPrA = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN) | |
1002 | 1002 | let decPrB = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN) | |
1003 | 1003 | let paydInDollar = (fraction(dPriceA, pmtA, decPrA) + fraction(dPriceB, pmtB, decPrB)) | |
1004 | 1004 | let $t03144931546 = if ((borrowId == aId)) | |
1005 | 1005 | then $Tuple2(dPriceA, decPrA) | |
1006 | 1006 | else $Tuple2(dPriceB, decPrB) | |
1007 | 1007 | let borrowPrice = $t03144931546._1 | |
1008 | 1008 | let borrowDecPr = $t03144931546._2 | |
1009 | 1009 | fraction(fraction(paydInDollar, (leverage - 100), 100), borrowDecPr, borrowPrice) | |
1010 | 1010 | } | |
1011 | 1011 | ||
1012 | 1012 | ||
1013 | 1013 | func parseReplenishPmts (pmts,AId,BId) = if ((size(pmts) == 2)) | |
1014 | 1014 | then if ((assetIdToStr(pmts[0].assetId) != AId)) | |
1015 | 1015 | then throw("Wrong payment asset A") | |
1016 | 1016 | else if ((assetIdToStr(pmts[1].assetId) != BId)) | |
1017 | 1017 | then throw("Wrong payment asset B") | |
1018 | 1018 | else $Tuple2(pmts[0].amount, pmts[1].amount) | |
1019 | 1019 | else if ((size(pmts) == 1)) | |
1020 | 1020 | then if ((assetIdToStr(pmts[0].assetId) == AId)) | |
1021 | 1021 | then $Tuple2(pmts[0].amount, 0) | |
1022 | 1022 | else if ((assetIdToStr(pmts[0].assetId) == BId)) | |
1023 | 1023 | then $Tuple2(0, pmts[0].amount) | |
1024 | 1024 | else throw("Wrong payment") | |
1025 | 1025 | else throw("One or two payments expected") | |
1026 | 1026 | ||
1027 | 1027 | ||
1028 | 1028 | func calcPriceImpact (balA,balB,newBalA,newBalB) = { | |
1029 | 1029 | let pri = ((SCALE8 - fraction(fraction(balB, SCALE8, balA), SCALE8, fraction(newBalB, SCALE8, newBalA))) * 100) | |
1030 | 1030 | if ((0 > pri)) | |
1031 | 1031 | then (pri * -1) | |
1032 | 1032 | else pri | |
1033 | 1033 | } | |
1034 | 1034 | ||
1035 | 1035 | ||
1036 | 1036 | func claimAndCheckAmnt (pool,pType,claim,amount,change) = { | |
1037 | 1037 | let $t03254632805 = if (claim) | |
1038 | 1038 | then claimFarmed(pType, pool) | |
1039 | 1039 | else { | |
1040 | 1040 | let claimedAsset = if ((pType == SF_POOL)) | |
1041 | 1041 | then SWOPID | |
1042 | 1042 | else if ((pType == WX_POOL)) | |
1043 | 1043 | then WXID | |
1044 | 1044 | else unknownPoolType() | |
1045 | 1045 | $Tuple2(amount, claimedAsset) | |
1046 | 1046 | } | |
1047 | 1047 | let claimAmount = $t03254632805._1 | |
1048 | 1048 | let claimAsset = $t03254632805._2 | |
1049 | 1049 | let bal = accountBalance(claimAsset) | |
1050 | 1050 | if (if ((amount > (claimAmount + change))) | |
1051 | 1051 | then true | |
1052 | 1052 | else (amount > bal)) | |
1053 | 1053 | then throw("To big amount to exchange") | |
1054 | 1054 | else $Tuple2(claimAmount, claimAsset) | |
1055 | 1055 | } | |
1056 | 1056 | ||
1057 | 1057 | ||
1058 | 1058 | @Callable(i) | |
1059 | 1059 | func getShareAssetPriceREADONLY (shareId) = { | |
1060 | 1060 | let sharePrices = getSharePrice(shareId) | |
1061 | 1061 | $Tuple2(nil, sharePrices) | |
1062 | 1062 | } | |
1063 | 1063 | ||
1064 | 1064 | ||
1065 | 1065 | ||
1066 | 1066 | @Callable(i) | |
1067 | 1067 | func getUserPositionShareAmountREADONLY (user,posNum) = { | |
1068 | 1068 | let pool = valueOrErrorMessage(getString(this, (((user + "_") + posNum) + kUserPositionPool)), "Unknown position") | |
1069 | 1069 | let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posNum) + kUserBorrowAmount)) | |
1070 | 1070 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum, (borrowAmount > 0)) | |
1071 | 1071 | $Tuple2(nil, userCanWithdraw) | |
1072 | 1072 | } | |
1073 | 1073 | ||
1074 | 1074 | ||
1075 | 1075 | ||
1076 | 1076 | @Callable(i) | |
1077 | 1077 | func getUserPositionREADONLY (user,pools,posNum) = { | |
1078 | 1078 | func userPos (a,pool) = { | |
1079 | 1079 | let $t03376733837 = a | |
1080 | 1080 | let wAmountsA = $t03376733837._1 | |
1081 | 1081 | let wAmountsB = $t03376733837._2 | |
1082 | 1082 | let debts = $t03376733837._3 | |
1083 | 1083 | let eqWAmountsA = $t03376733837._4 | |
1084 | 1084 | let eqWAmountsB = $t03376733837._5 | |
1085 | 1085 | let index = $t03376733837._6 | |
1086 | 1086 | if (!(isDefined(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserPosition))))) | |
1087 | 1087 | then $Tuple6((wAmountsA :+ 0), (wAmountsB :+ 0), (debts :+ 0), (eqWAmountsA :+ 0), (eqWAmountsB :+ 0), (index + 1)) | |
1088 | 1088 | else { | |
1089 | 1089 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1090 | 1090 | let $t03411634206 = getPoolData(Address(fromBase58String(pool)), pType) | |
1091 | 1091 | let AId = $t03411634206._1 | |
1092 | 1092 | let BId = $t03411634206._2 | |
1093 | 1093 | let balA = $t03411634206._3 | |
1094 | 1094 | let balB = $t03411634206._4 | |
1095 | 1095 | let shareId = $t03411634206._5 | |
1096 | 1096 | let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAmount)), 0) | |
1097 | 1097 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum[index], (borrowAmount > 0)) | |
1098 | 1098 | let $t03442234542 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userCanWithdraw) | |
1099 | 1099 | let wAmountA = $t03442234542._1 | |
1100 | 1100 | let wAmountB = $t03442234542._2 | |
1101 | 1101 | if ((borrowAmount > 0)) | |
1102 | 1102 | then { | |
1103 | 1103 | let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAssetId)) | |
1104 | 1104 | let debt = { | |
1105 | 1105 | let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((user + "_") + posNum[index]), borrowAsset], nil) | |
1106 | 1106 | if ($isInstanceOf(@, "Int")) | |
1107 | 1107 | then @ | |
1108 | 1108 | else throw(($getType(@) + " couldn't be cast to Int")) | |
1109 | 1109 | } | |
1110 | 1110 | if ((debt == debt)) | |
1111 | 1111 | then { | |
1112 | 1112 | let amountToGetEx = if (if ((borrowAsset == AId)) | |
1113 | 1113 | then (debt > wAmountA) | |
1114 | 1114 | else false) | |
1115 | 1115 | then (debt - wAmountA) | |
1116 | 1116 | else if (if ((borrowAsset == BId)) | |
1117 | 1117 | then (debt > wAmountB) | |
1118 | 1118 | else false) | |
1119 | 1119 | then (debt - wAmountB) | |
1120 | 1120 | else 0 | |
1121 | 1121 | let amountToPay = if ((amountToGetEx > 0)) | |
1122 | 1122 | then if ((pType == SF_POOL)) | |
1123 | 1123 | then { | |
1124 | 1124 | let ex = calcAmountToPaySF(pool, AId, BId, balA, balB, amountToGetEx, borrowAsset) | |
1125 | 1125 | ex._2 | |
1126 | 1126 | } | |
1127 | 1127 | else if ((pType == WX_POOL)) | |
1128 | 1128 | then { | |
1129 | 1129 | let ex = calcAmountToPayWX(pool, AId, BId, balA, balB, amountToGetEx, borrowAsset) | |
1130 | 1130 | ex._2 | |
1131 | 1131 | } | |
1132 | 1132 | else unknownPoolType() | |
1133 | 1133 | else 0 | |
1134 | 1134 | let $t03545435673 = if ((borrowAsset == AId)) | |
1135 | 1135 | then $Tuple2(((wAmountA + amountToGetEx) - debt), (wAmountB - amountToPay)) | |
1136 | 1136 | else $Tuple2((wAmountA - amountToPay), ((wAmountB + amountToGetEx) - debt)) | |
1137 | 1137 | let eqWAmountA = $t03545435673._1 | |
1138 | 1138 | let eqWAmountB = $t03545435673._2 | |
1139 | 1139 | $Tuple6((wAmountsA :+ wAmountA), (wAmountsB :+ wAmountB), (debts :+ debt), (eqWAmountsA :+ eqWAmountA), (eqWAmountsB :+ eqWAmountB), (index + 1)) | |
1140 | 1140 | } | |
1141 | 1141 | else throw("Strict value is not equal to itself.") | |
1142 | 1142 | } | |
1143 | 1143 | else $Tuple6((wAmountsA :+ wAmountA), (wAmountsB :+ wAmountB), debts, (wAmountsA :+ wAmountA), (wAmountsB :+ wAmountB), (index + 1)) | |
1144 | 1144 | } | |
1145 | 1145 | } | |
1146 | 1146 | ||
1147 | 1147 | let $t03592836039 = { | |
1148 | 1148 | let $l = pools | |
1149 | 1149 | let $s = size($l) | |
1150 | 1150 | let $acc0 = $Tuple6(nil, nil, nil, nil, nil, 0) | |
1151 | 1151 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1152 | 1152 | then $a | |
1153 | 1153 | else userPos($a, $l[$i]) | |
1154 | 1154 | ||
1155 | 1155 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1156 | 1156 | then $a | |
1157 | 1157 | else throw("List size exceeds 20") | |
1158 | 1158 | ||
1159 | 1159 | $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
1160 | 1160 | } | |
1161 | 1161 | let wAmountsA = $t03592836039._1 | |
1162 | 1162 | let wAmountsB = $t03592836039._2 | |
1163 | 1163 | let debts = $t03592836039._3 | |
1164 | 1164 | let eqWAmountsA = $t03592836039._4 | |
1165 | 1165 | let eqWAmountsB = $t03592836039._5 | |
1166 | 1166 | $Tuple2(nil, $Tuple5(wAmountsA, wAmountsB, debts, eqWAmountsA, eqWAmountsB)) | |
1167 | 1167 | } | |
1168 | 1168 | ||
1169 | 1169 | ||
1170 | 1170 | ||
1171 | 1171 | @Callable(i) | |
1172 | 1172 | func replenish (pool,leverage,borrowId) = valueOrElse(isActiveForUsers(), { | |
1173 | 1173 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1174 | 1174 | if (!(isPoolActive(pool, pType))) | |
1175 | 1175 | then throw("Pool not active at this moment") | |
1176 | 1176 | else if (if ((100 > leverage)) | |
1177 | 1177 | then true | |
1178 | 1178 | else (leverage > 300)) | |
1179 | 1179 | then throw("Leverage can't be <100 and >300") | |
1180 | 1180 | else if (if (!(getBooleanValue(this, (pool + kPoolCanBorrow)))) | |
1181 | 1181 | then (leverage > 100) | |
1182 | 1182 | else false) | |
1183 | 1183 | then throw("You can't borrow in this pool") | |
1184 | 1184 | else { | |
1185 | 1185 | let $t03663736727 = getPoolData(Address(fromBase58String(pool)), pType) | |
1186 | 1186 | let AId = $t03663736727._1 | |
1187 | 1187 | let BId = $t03663736727._2 | |
1188 | 1188 | let balA = $t03663736727._3 | |
1189 | 1189 | let balB = $t03663736727._4 | |
1190 | 1190 | let shareId = $t03663736727._5 | |
1191 | 1191 | if (if ((borrowId != AId)) | |
1192 | 1192 | then (borrowId != BId) | |
1193 | 1193 | else false) | |
1194 | 1194 | then throw("Wrong borrow asset") | |
1195 | 1195 | else { | |
1196 | 1196 | let $t03680836867 = parseReplenishPmts(i.payments, AId, BId) | |
1197 | 1197 | let pmtA = $t03680836867._1 | |
1198 | 1198 | let pmtB = $t03680836867._2 | |
1199 | 1199 | let user = toString(i.caller) | |
1200 | 1200 | let newPosNum = getNewUserPositionNumber(user) | |
1201 | 1201 | if ((leverage > 100)) | |
1202 | 1202 | then { | |
1203 | 1203 | let borrowAmount = calcBorrowAmount(pmtA, pmtB, AId, BId, leverage, borrowId) | |
1204 | 1204 | let request = makeString([user, pool, toString(pmtA), AId, toString(pmtB), BId, toString(balA), toString(balB), shareId, borrowId, toString(borrowAmount)], ",") | |
1205 | 1205 | let newRequestId = { | |
1206 | 1206 | let @ = invoke(this, "createNewRequest", [request], nil) | |
1207 | 1207 | if ($isInstanceOf(@, "Int")) | |
1208 | 1208 | then @ | |
1209 | 1209 | else throw(($getType(@) + " couldn't be cast to Int")) | |
1210 | 1210 | } | |
1211 | 1211 | if ((newRequestId == newRequestId)) | |
1212 | 1212 | then { | |
1213 | 1213 | let args = [((user + "_") + toString(newPosNum)), shareId, borrowId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))] | |
1214 | 1214 | let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil) | |
1215 | 1215 | if ((inv == inv)) | |
1216 | 1216 | then { | |
1217 | 1217 | let userStaked = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(newPosNum)) + kUserPosition)) | |
1218 | 1218 | let $t03785637950 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId) | |
1219 | 1219 | if (($t03785637950 == $t03785637950)) | |
1220 | 1220 | then { | |
1221 | 1221 | let newBalB = $t03785637950._2 | |
1222 | 1222 | let newBalA = $t03785637950._1 | |
1223 | 1223 | let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB) | |
1224 | 1224 | let $t03802038135 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1225 | 1225 | let wAmountA = $t03802038135._1 | |
1226 | 1226 | let wAmountB = $t03802038135._2 | |
1227 | 1227 | $Tuple2(nil, [prImpact, wAmountA, wAmountB]) | |
1228 | 1228 | } | |
1229 | 1229 | else throw("Strict value is not equal to itself.") | |
1230 | 1230 | } | |
1231 | 1231 | else throw("Strict value is not equal to itself.") | |
1232 | 1232 | } | |
1233 | 1233 | else throw("Strict value is not equal to itself.") | |
1234 | 1234 | } | |
1235 | 1235 | else { | |
1236 | 1236 | let $t03818838303 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
1237 | 1237 | if (($t03818838303 == $t03818838303)) | |
1238 | 1238 | then { | |
1239 | 1239 | let axlyFee = $t03818838303._2 | |
1240 | 1240 | let userStaked = $t03818838303._1 | |
1241 | 1241 | let $t03830938403 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId) | |
1242 | 1242 | if (($t03830938403 == $t03830938403)) | |
1243 | 1243 | then { | |
1244 | 1244 | let newBalB = $t03830938403._2 | |
1245 | 1245 | let newBalA = $t03830938403._1 | |
1246 | 1246 | let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB) | |
1247 | 1247 | let $t03847338588 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1248 | 1248 | let wAmountA = $t03847338588._1 | |
1249 | 1249 | let wAmountB = $t03847338588._2 | |
1250 | 1250 | $Tuple2((replenishEntries(pool, user, userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])), [prImpact, wAmountA, wAmountB]) | |
1251 | 1251 | } | |
1252 | 1252 | else throw("Strict value is not equal to itself.") | |
1253 | 1253 | } | |
1254 | 1254 | else throw("Strict value is not equal to itself.") | |
1255 | 1255 | } | |
1256 | 1256 | } | |
1257 | 1257 | } | |
1258 | 1258 | }) | |
1259 | 1259 | ||
1260 | 1260 | ||
1261 | 1261 | ||
1262 | 1262 | @Callable(i) | |
1263 | 1263 | func withdraw (pool,posId) = valueOrElse(isActiveForUsers(), { | |
1264 | 1264 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1265 | 1265 | if (!(isPoolActive(pool, pType))) | |
1266 | 1266 | then throw("Pool not active at this moment") | |
1267 | 1267 | else withdrawToUser(toString(i.caller), pool, toString(posId), false) | |
1268 | 1268 | }) | |
1269 | 1269 | ||
1270 | 1270 | ||
1271 | 1271 | ||
1272 | 1272 | @Callable(i) | |
1273 | 1273 | func createUpdateStopLoss (posId,poolId,assetId,price) = valueOrElse(isActiveForUsers(), { | |
1274 | 1274 | let tokenOraclePrice = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle)) | |
1275 | 1275 | let pType = valueOrErrorMessage(getString(this, (kPool + poolId)), "Pool is not inited") | |
1276 | 1276 | if (!(isPoolActive(poolId, pType))) | |
1277 | 1277 | then throw("Pool not active at this moment") | |
1278 | 1278 | else if (!(isDefined(getInteger(this, (((((poolId + "_") + toString(i.caller)) + "_") + toString(posId)) + kUserPosition))))) | |
1279 | 1279 | then throw("There are no user position") | |
1280 | 1280 | else if ((0 >= price)) | |
1281 | 1281 | then throw("Price must be greater than 0") | |
1282 | 1282 | else if ((price > tokenOraclePrice)) | |
1283 | 1283 | then throw("Price must be less than current token price") | |
1284 | 1284 | else [IntegerEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss), price)] | |
1285 | 1285 | }) | |
1286 | 1286 | ||
1287 | 1287 | ||
1288 | 1288 | ||
1289 | 1289 | @Callable(i) | |
1290 | 1290 | func deleteStopLoss (posId,poolId,assetId) = valueOrElse(isActiveForUsers(), { | |
1291 | 1291 | let pType = valueOrErrorMessage(getString(this, (kPool + poolId)), "Pool is not inited") | |
1292 | 1292 | if (!(isPoolActive(poolId, pType))) | |
1293 | 1293 | then throw("Pool not active at this moment") | |
1294 | 1294 | else if (!(isDefined(getInteger(this, (((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss))))) | |
1295 | 1295 | then throw("No entry") | |
1296 | 1296 | else [DeleteEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss))] | |
1297 | 1297 | }) | |
1298 | 1298 | ||
1299 | 1299 | ||
1300 | 1300 | ||
1301 | 1301 | @Callable(i) | |
1302 | 1302 | func init (moneyBoxAddr,sfFarmingAddr,lendAddr,priceOracleAddr,keeperExContract,wxSwapContract,swopAssetId,wxAssetId,operatorPubKey,group1Admin1PubKey,group1Admin2PubKey,group2Admin1PubKey,group2Admin2PubKey) = valueOrElse(isSelfCall(i), if (isDefined(getString(kOperatorCallPK))) | |
1303 | 1303 | then throw("Already inited") | |
1304 | 1304 | else if (!(isDefined(addressFromString(moneyBoxAddr)))) | |
1305 | 1305 | then throw("moneyBoxAddr is not correct address") | |
1306 | 1306 | else if (!(isDefined(addressFromString(sfFarmingAddr)))) | |
1307 | 1307 | then throw("sfFarmingAddr is not correct address") | |
1308 | 1308 | else if (!(isDefined(addressFromString(lendAddr)))) | |
1309 | 1309 | then throw("lendAddr is not correct address") | |
1310 | 1310 | else if (!(isDefined(addressFromString(priceOracleAddr)))) | |
1311 | 1311 | then throw("priceOracleAddr is not correct address") | |
1312 | 1312 | else if (!(isDefined(addressFromString(keeperExContract)))) | |
1313 | 1313 | then throw("keeperExContract is not correct address") | |
1314 | 1314 | else if (!(isDefined(assetInfo(fromBase58String(swopAssetId))))) | |
1315 | 1315 | then throw("swopAssetId is not correct asset id") | |
1316 | 1316 | else if (!(isDefined(assetInfo(fromBase58String(wxAssetId))))) | |
1317 | 1317 | then throw("swopAssetId is not correct asset id") | |
1318 | 1318 | else if ((size(fromBase58String(operatorPubKey)) != 32)) | |
1319 | 1319 | then throw("operatorPubKey is not correct") | |
1320 | 1320 | else if ((size(fromBase58String(group1Admin1PubKey)) != 32)) | |
1321 | - | then throw(" | |
1321 | + | then throw("group1Admin1PubKey is not correct") | |
1322 | 1322 | else if ((size(fromBase58String(group1Admin2PubKey)) != 32)) | |
1323 | - | then throw(" | |
1323 | + | then throw("group1Admin2PubKey is not correct") | |
1324 | 1324 | else if ((size(fromBase58String(group2Admin1PubKey)) != 32)) | |
1325 | - | then throw(" | |
1325 | + | then throw("group2Admin1PubKey is not correct") | |
1326 | 1326 | else if ((size(fromBase58String(group2Admin2PubKey)) != 32)) | |
1327 | - | then throw(" | |
1327 | + | then throw("group2Admin2PubKey is not correct") | |
1328 | 1328 | else [StringEntry(kMoneyBox, moneyBoxAddr), StringEntry(kSFFarmingAddr, sfFarmingAddr), StringEntry(kLendService, lendAddr), StringEntry(kPriceOracle, priceOracleAddr), StringEntry(kExContract, keeperExContract), StringEntry(kWxSwapContract, wxSwapContract), StringEntry(kSwopId, swopAssetId), StringEntry(kWxId, wxAssetId), StringEntry(kOperatorCallPK, operatorPubKey), StringEntry(kGroup1Admin1PK, group1Admin1PubKey), StringEntry(kGroup1Admin2PK, group1Admin2PubKey), StringEntry(kGroup2Admin1PK, group2Admin1PubKey), StringEntry(kGroup2Admin2PK, group2Admin2PubKey)]) | |
1329 | 1329 | ||
1330 | 1330 | ||
1331 | 1331 | ||
1332 | 1332 | @Callable(i) | |
1333 | 1333 | func createNewRequest (params) = valueOrElse(isSelfCall(i), { | |
1334 | 1334 | let newRequestId = (valueOrElse(getInteger(this, kRequestIter), 0) + 1) | |
1335 | 1335 | $Tuple2([StringEntry((toString(newRequestId) + kRequestId), params), IntegerEntry(kRequestIter, newRequestId)], newRequestId) | |
1336 | 1336 | }) | |
1337 | 1337 | ||
1338 | 1338 | ||
1339 | 1339 | ||
1340 | 1340 | @Callable(i) | |
1341 | 1341 | func replenishFromLand (requestId) = valueOrElse(isActive(), valueOrElse(isLandCall(i), { | |
1342 | - | let $ | |
1343 | - | let user = $ | |
1344 | - | let pool = $ | |
1345 | - | let pmtA = $ | |
1346 | - | let AId = $ | |
1347 | - | let pmtB = $ | |
1348 | - | let BId = $ | |
1349 | - | let balA = $ | |
1350 | - | let balB = $ | |
1351 | - | let shareId = $ | |
1352 | - | let bwAsset = $ | |
1353 | - | let bwAmount = $ | |
1342 | + | let $t04342743531 = parseRequest(requestId) | |
1343 | + | let user = $t04342743531._1 | |
1344 | + | let pool = $t04342743531._2 | |
1345 | + | let pmtA = $t04342743531._3 | |
1346 | + | let AId = $t04342743531._4 | |
1347 | + | let pmtB = $t04342743531._5 | |
1348 | + | let BId = $t04342743531._6 | |
1349 | + | let balA = $t04342743531._7 | |
1350 | + | let balB = $t04342743531._8 | |
1351 | + | let shareId = $t04342743531._9 | |
1352 | + | let bwAsset = $t04342743531._10 | |
1353 | + | let bwAmount = $t04342743531._11 | |
1354 | 1354 | if ((size(i.payments) != 1)) | |
1355 | 1355 | then throw("Wrong payment size") | |
1356 | 1356 | else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset)) | |
1357 | 1357 | then true | |
1358 | 1358 | else (i.payments[0].amount != bwAmount)) | |
1359 | 1359 | then throw("Wrong payment") | |
1360 | 1360 | else { | |
1361 | - | let $ | |
1361 | + | let $t04372143821 = if ((AId == bwAsset)) | |
1362 | 1362 | then $Tuple2((pmtA + bwAmount), pmtB) | |
1363 | 1363 | else $Tuple2(pmtA, (pmtB + bwAmount)) | |
1364 | - | let pmtAllA = $ | |
1365 | - | let pmtAllB = $ | |
1364 | + | let pmtAllA = $t04372143821._1 | |
1365 | + | let pmtAllB = $t04372143821._2 | |
1366 | 1366 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
1367 | - | let $ | |
1368 | - | let userStaked = $ | |
1369 | - | let axlyFee = $ | |
1367 | + | let $t04390344018 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId) | |
1368 | + | let userStaked = $t04390344018._1 | |
1369 | + | let axlyFee = $t04390344018._2 | |
1370 | 1370 | let posNum = getNewUserPositionNumber(user) | |
1371 | 1371 | let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)] | |
1372 | 1372 | let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true) | |
1373 | - | let $ | |
1374 | - | let wAmountA = $ | |
1375 | - | let wAmountB = $ | |
1373 | + | let $t04437844493 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1374 | + | let wAmountA = $t04437844493._1 | |
1375 | + | let wAmountB = $t04437844493._2 | |
1376 | 1376 | $Tuple2((((entries ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])) ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked) | |
1377 | 1377 | } | |
1378 | 1378 | })) | |
1379 | 1379 | ||
1380 | 1380 | ||
1381 | 1381 | ||
1382 | 1382 | @Callable(i) | |
1383 | 1383 | func liquidate (user,posId,liquidateAmount) = valueOrElse(isActive(), valueOrElse(isLandCall(i), { | |
1384 | 1384 | let pool = valueOrErrorMessage(getString(this, (((user + "_") + posId) + kUserPositionPool)), "no position") | |
1385 | 1385 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1386 | - | let $ | |
1387 | - | let AId = $ | |
1388 | - | let BId = $ | |
1389 | - | let balA = $ | |
1390 | - | let balB = $ | |
1391 | - | let shareId = $ | |
1386 | + | let $t04501445104 = getPoolData(Address(fromBase58String(pool)), pType) | |
1387 | + | let AId = $t04501445104._1 | |
1388 | + | let BId = $t04501445104._2 | |
1389 | + | let balA = $t04501445104._3 | |
1390 | + | let balB = $t04501445104._4 | |
1391 | + | let shareId = $t04501445104._5 | |
1392 | 1392 | let amount = unstakeLP(pool, pType, shareId, liquidateAmount) | |
1393 | 1393 | let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)) | |
1394 | 1394 | let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)) | |
1395 | 1395 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posId, (borrowAmount > 0)) | |
1396 | 1396 | if ((liquidateAmount > userCanWithdraw)) | |
1397 | 1397 | then throw("You can't liquidate more than user have") | |
1398 | 1398 | else if ((borrowAmount == 0)) | |
1399 | 1399 | then throw("You can't liquidate position without borrow") | |
1400 | 1400 | else [IntegerEntry((((((pool + "_") + user) + "_") + posId) + kUserPositionInterest), getIntegerValue(this, (pool + kPoolInterestLoan))), IntegerEntry((pool + kPoolTotalLoan), (getPoolTotalShareWithLoan(pool) - liquidateAmount)), IntegerEntry((pool + kPoolTotal), (getPoolTotalShare(pool) - liquidateAmount)), IntegerEntry((((((pool + "_") + user) + "_") + posId) + kUserPosition), (userCanWithdraw - liquidateAmount)), ScriptTransfer(i.caller, amount, fromBase58String(shareId))] | |
1401 | 1401 | })) | |
1402 | 1402 | ||
1403 | 1403 | ||
1404 | 1404 | ||
1405 | 1405 | @Callable(i) | |
1406 | 1406 | func stopLoss (user,posId,pool,assetId) = valueOrElse(isActive(), valueOrElse(isOperatorCall(i), { | |
1407 | 1407 | let tokenOraclePrice = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle)) | |
1408 | 1408 | let stopLossPrice = valueOrErrorMessage(getInteger(this, (((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss)), "No entry") | |
1409 | 1409 | if ((tokenOraclePrice > stopLossPrice)) | |
1410 | 1410 | then throw("Token price greater stop loss price") | |
1411 | 1411 | else { | |
1412 | 1412 | let res = withdrawToUser(user, pool, toString(posId), true) | |
1413 | 1413 | $Tuple2((res._1 :+ DeleteEntry((((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss))), res._2) | |
1414 | 1414 | } | |
1415 | 1415 | })) | |
1416 | 1416 | ||
1417 | 1417 | ||
1418 | 1418 | ||
1419 | 1419 | @Callable(i) | |
1420 | 1420 | func capitalizeExKeeper (pool,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = valueOrElse(isActive(), valueOrElse(isOperatorCall(i), { | |
1421 | 1421 | let pType = getStringValue(this, (kPool + pool)) | |
1422 | 1422 | let change = valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0) | |
1423 | - | let $ | |
1424 | - | let claimedAmount = $ | |
1425 | - | let claimedAsset = $ | |
1423 | + | let $t04725347352 = claimAndCheckAmnt(pool, pType, claim, amountToExchange, change) | |
1424 | + | let claimedAmount = $t04725347352._1 | |
1425 | + | let claimedAsset = $t04725347352._2 | |
1426 | 1426 | let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options) | |
1427 | 1427 | let newChange = ((claimedAmount + change) - amountToExchange) | |
1428 | 1428 | let changeEntry = if ((newChange >= 0)) | |
1429 | 1429 | then [IntegerEntry((pool + kPoolCapChange), newChange)] | |
1430 | 1430 | else throw("Negative change") | |
1431 | 1431 | (capitalize(pool, pType, tokenToId, exchangedAmount) ++ changeEntry) | |
1432 | 1432 | })) | |
1433 | 1433 | ||
1434 | 1434 | ||
1435 | 1435 | ||
1436 | 1436 | @Callable(i) | |
1437 | 1437 | func capitalizeExPuzzle (pool,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = valueOrElse(isActive(), valueOrElse(isOperatorCall(i), { | |
1438 | 1438 | let pType = getStringValue(this, (kPool + pool)) | |
1439 | 1439 | let change = valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0) | |
1440 | - | let $ | |
1441 | - | let claimedAmount = $ | |
1442 | - | let claimedAsset = $ | |
1440 | + | let $t04815248251 = claimAndCheckAmnt(pool, pType, claim, amountToExchange, change) | |
1441 | + | let claimedAmount = $t04815248251._1 | |
1442 | + | let claimedAsset = $t04815248251._2 | |
1443 | 1443 | let exchangedAmount = exchangePuzzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options) | |
1444 | 1444 | let newChange = ((claimedAmount + change) - amountToExchange) | |
1445 | 1445 | let changeEntry = if ((newChange >= 0)) | |
1446 | 1446 | then [IntegerEntry((pool + kPoolCapChange), newChange)] | |
1447 | 1447 | else nil | |
1448 | 1448 | (capitalize(pool, pType, tokenToId, exchangedAmount) ++ changeEntry) | |
1449 | 1449 | })) | |
1450 | 1450 | ||
1451 | 1451 | ||
1452 | 1452 | ||
1453 | 1453 | @Callable(i) | |
1454 | 1454 | func capitalizeExSwopFi (pool,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = valueOrElse(isActive(), valueOrElse(isOperatorCall(i), { | |
1455 | 1455 | let pType = getStringValue(this, (kPool + pool)) | |
1456 | 1456 | let change = valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0) | |
1457 | - | let $ | |
1458 | - | let claimedAmount = $ | |
1459 | - | let claimedAsset = $ | |
1457 | + | let $t04909649195 = claimAndCheckAmnt(pool, pType, claim, amountToExchange, change) | |
1458 | + | let claimedAmount = $t04909649195._1 | |
1459 | + | let claimedAsset = $t04909649195._2 | |
1460 | 1460 | let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options) | |
1461 | 1461 | let newChange = ((claimedAmount + change) - amountToExchange) | |
1462 | 1462 | let changeEntry = if ((newChange >= 0)) | |
1463 | 1463 | then [IntegerEntry((pool + kPoolCapChange), newChange)] | |
1464 | 1464 | else nil | |
1465 | 1465 | (capitalize(pool, pType, tokenToId, exchangedAmount) ++ changeEntry) | |
1466 | 1466 | })) | |
1467 | 1467 | ||
1468 | 1468 | ||
1469 | 1469 | ||
1470 | 1470 | @Callable(i) | |
1471 | 1471 | func capitalizeNoEx (pool,claim,amountFromBalance) = valueOrElse(isActive(), valueOrElse(isOperatorCall(i), { | |
1472 | 1472 | let pType = getStringValue(this, (kPool + pool)) | |
1473 | - | let $ | |
1474 | - | let claimedAmount = $ | |
1475 | - | let claimedAsset = $ | |
1473 | + | let $t04979249887 = claimAndCheckAmnt(pool, pType, claim, amountFromBalance, 0) | |
1474 | + | let claimedAmount = $t04979249887._1 | |
1475 | + | let claimedAsset = $t04979249887._2 | |
1476 | 1476 | capitalize(pool, pType, assetIdToStr(claimedAsset), (claimedAmount + amountFromBalance)) | |
1477 | 1477 | })) | |
1478 | 1478 | ||
1479 | 1479 | ||
1480 | 1480 | ||
1481 | 1481 | @Callable(i) | |
1482 | 1482 | func initNewPool (type,poolAddr,inFeeNoLoan,inFeeLoan,capFeeNoLoan,capFeeWithLoan,stoplossFeeNoLoan,stoplossFeeWithLoan,canBorrow) = valueOrElse(isActive(), valueOrElse(isAdminCall(i), if (if ((type != SF_POOL)) | |
1483 | 1483 | then (type != WX_POOL) | |
1484 | 1484 | else false) | |
1485 | 1485 | then throw("Wrong type") | |
1486 | 1486 | else { | |
1487 | - | let $ | |
1488 | - | let aId = $ | |
1489 | - | let bId = $ | |
1490 | - | let aBal = $ | |
1491 | - | let bBal = $ | |
1492 | - | let shareId = $ | |
1487 | + | let $t05031350407 = getPoolData(Address(fromBase58String(poolAddr)), type) | |
1488 | + | let aId = $t05031350407._1 | |
1489 | + | let bId = $t05031350407._2 | |
1490 | + | let aBal = $t05031350407._3 | |
1491 | + | let bBal = $t05031350407._4 | |
1492 | + | let shareId = $t05031350407._5 | |
1493 | 1493 | if ((0 > inFeeNoLoan)) | |
1494 | 1494 | then throw("inFeeNoLoan must be greater than 0") | |
1495 | 1495 | else if ((0 > inFeeLoan)) | |
1496 | 1496 | then throw("inFeeLoan must be greater than 0") | |
1497 | 1497 | else if ((0 > capFeeNoLoan)) | |
1498 | 1498 | then throw("capFeeNoLoan must be greater than 0") | |
1499 | 1499 | else if ((0 > capFeeWithLoan)) | |
1500 | 1500 | then throw("capFeeWithLoan must be greater than 0") | |
1501 | 1501 | else if ((0 > stoplossFeeNoLoan)) | |
1502 | 1502 | then throw("stoplossFeeNoLoan must be greater than 0") | |
1503 | 1503 | else if ((0 > stoplossFeeWithLoan)) | |
1504 | 1504 | then throw("stoplossFeeWithLoan must be greater than 0") | |
1505 | 1505 | else [IntegerEntry((poolAddr + kAxlyInFeeWithoutLoan), inFeeNoLoan), IntegerEntry((poolAddr + kAxlyInFeeWithLoan), inFeeLoan), IntegerEntry((poolAddr + kAxlyNoLoanCapFee), capFeeNoLoan), IntegerEntry((poolAddr + kAxlyWithLoanCapFee), capFeeWithLoan), IntegerEntry((poolAddr + kAxlyStopLossNoLoanFee), stoplossFeeNoLoan), IntegerEntry((poolAddr + kAxlyStopLossLoanFee), stoplossFeeWithLoan), IntegerEntry((poolAddr + kPoolInterestLoan), 0), IntegerEntry((poolAddr + kPoolInterestNoLoan), 0), StringEntry((kPool + poolAddr), type), StringEntry((shareId + kSharePool), poolAddr), BooleanEntry((poolAddr + kPoolCanBorrow), canBorrow)] | |
1506 | 1506 | })) | |
1507 | + | ||
1508 | + | ||
1509 | + | ||
1510 | + | @Callable(i) | |
1511 | + | func updatePoolFees (poolAddr,inFeeNoLoan,inFeeLoan,capFeeNoLoan,capFeeWithLoan,stoplossFeeNoLoan,stoplossFeeWithLoan) = valueOrElse(isActive(), valueOrElse(isAdminCall(i), if (!(isDefined(getString(this, (kPool + poolAddr))))) | |
1512 | + | then throw(("Can't find pool with addr " + poolAddr)) | |
1513 | + | else if ((0 > inFeeNoLoan)) | |
1514 | + | then throw("inFeeNoLoan must be greater than 0") | |
1515 | + | else if ((0 > inFeeLoan)) | |
1516 | + | then throw("inFeeLoan must be greater than 0") | |
1517 | + | else if ((0 > capFeeNoLoan)) | |
1518 | + | then throw("capFeeNoLoan must be greater than 0") | |
1519 | + | else if ((0 > capFeeWithLoan)) | |
1520 | + | then throw("capFeeWithLoan must be greater than 0") | |
1521 | + | else if ((0 > stoplossFeeNoLoan)) | |
1522 | + | then throw("stoplossFeeNoLoan must be greater than 0") | |
1523 | + | else if ((0 > stoplossFeeWithLoan)) | |
1524 | + | then throw("stoplossFeeWithLoan must be greater than 0") | |
1525 | + | else [IntegerEntry((poolAddr + kAxlyInFeeWithoutLoan), inFeeNoLoan), IntegerEntry((poolAddr + kAxlyInFeeWithLoan), inFeeLoan), IntegerEntry((poolAddr + kAxlyNoLoanCapFee), capFeeNoLoan), IntegerEntry((poolAddr + kAxlyWithLoanCapFee), capFeeWithLoan), IntegerEntry((poolAddr + kAxlyStopLossNoLoanFee), stoplossFeeNoLoan), IntegerEntry((poolAddr + kAxlyStopLossLoanFee), stoplossFeeWithLoan)])) | |
1507 | 1526 | ||
1508 | 1527 | ||
1509 | 1528 | ||
1510 | 1529 | @Callable(i) | |
1511 | 1530 | func activate () = valueOrElse(isAdminCall(i), if (valueOrElse(getBoolean(this, kActive), true)) | |
1512 | 1531 | then throw("dApp already active") | |
1513 | 1532 | else [BooleanEntry(kActive, true)]) | |
1514 | 1533 | ||
1515 | 1534 | ||
1516 | 1535 | ||
1517 | 1536 | @Callable(i) | |
1518 | 1537 | func shutdown () = valueOrElse(isAdminCall(i), if (!(valueOrElse(getBoolean(this, kActive), true))) | |
1519 | 1538 | then throw("dApp already shutdown") | |
1520 | 1539 | else [BooleanEntry(kActive, false)]) | |
1521 | 1540 | ||
1522 | 1541 | ||
1523 | 1542 | ||
1524 | 1543 | @Callable(i) | |
1525 | 1544 | func activateForUsers () = valueOrElse(isAdminCall(i), if (valueOrElse(getBoolean(this, kActiveUsers), true)) | |
1526 | 1545 | then throw("dApp already active for users") | |
1527 | 1546 | else [BooleanEntry(kActiveUsers, true)]) | |
1528 | 1547 | ||
1529 | 1548 | ||
1530 | 1549 | ||
1531 | 1550 | @Callable(i) | |
1532 | 1551 | func shutdownForUsers () = valueOrElse(isAdminCall(i), if (!(valueOrElse(getBoolean(this, kActiveUsers), true))) | |
1533 | 1552 | then throw("dApp already shutdown for users") | |
1534 | 1553 | else [BooleanEntry(kActiveUsers, false)]) | |
1535 | 1554 | ||
1536 | 1555 | ||
1537 | 1556 | ||
1538 | 1557 | @Callable(i) | |
1539 | 1558 | func activateSF () = valueOrElse(isAdminCall(i), if (valueOrElse(getBoolean(this, (SF_POOL + kActiveSFWX)), true)) | |
1540 | 1559 | then throw("SWOPFI already active") | |
1541 | 1560 | else [BooleanEntry((SF_POOL + kActiveSFWX), true)]) | |
1542 | 1561 | ||
1543 | 1562 | ||
1544 | 1563 | ||
1545 | 1564 | @Callable(i) | |
1546 | 1565 | func shutdownSF () = valueOrElse(isAdminCall(i), if (!(valueOrElse(getBoolean(this, (SF_POOL + kActiveSFWX)), true))) | |
1547 | 1566 | then throw("SWOPFI already shutdown") | |
1548 | 1567 | else [BooleanEntry((SF_POOL + kActiveSFWX), false)]) | |
1549 | 1568 | ||
1550 | 1569 | ||
1551 | 1570 | ||
1552 | 1571 | @Callable(i) | |
1553 | 1572 | func activateWX () = valueOrElse(isAdminCall(i), if (valueOrElse(getBoolean(this, (WX_POOL + kActiveSFWX)), true)) | |
1554 | 1573 | then throw("WX already active") | |
1555 | 1574 | else [BooleanEntry((WX_POOL + kActiveSFWX), true)]) | |
1556 | 1575 | ||
1557 | 1576 | ||
1558 | 1577 | ||
1559 | 1578 | @Callable(i) | |
1560 | 1579 | func shutdownWX () = valueOrElse(isAdminCall(i), if (!(valueOrElse(getBoolean(this, (WX_POOL + kActiveSFWX)), true))) | |
1561 | 1580 | then throw("WX already shutdown") | |
1562 | 1581 | else [BooleanEntry((WX_POOL + kActiveSFWX), false)]) | |
1563 | 1582 | ||
1564 | 1583 | ||
1565 | 1584 | ||
1566 | 1585 | @Callable(i) | |
1567 | 1586 | func activatePool (pool) = valueOrElse(isAdminCall(i), if (!(isDefined(getString(this, (kPool + pool))))) | |
1568 | 1587 | then throw("Unknown pool") | |
1569 | 1588 | else if (valueOrElse(getBoolean(this, (pool + kPoolActive)), true)) | |
1570 | 1589 | then throw("Pool already active") | |
1571 | 1590 | else [BooleanEntry((pool + kPoolActive), true)]) | |
1572 | 1591 | ||
1573 | 1592 | ||
1574 | 1593 | ||
1575 | 1594 | @Callable(i) | |
1576 | 1595 | func shutdownPool (pool) = valueOrElse(isAdminCall(i), if (!(isDefined(getString(this, (kPool + pool))))) | |
1577 | 1596 | then throw("Unknown pool") | |
1578 | 1597 | else if (!(valueOrElse(getBoolean(this, (pool + kPoolActive)), true))) | |
1579 | 1598 | then throw("Pool already shutdown") | |
1580 | 1599 | else [BooleanEntry((pool + kPoolActive), false)]) | |
1581 | 1600 | ||
1582 | 1601 | ||
1583 | 1602 | @Verifier(tx) | |
1584 | 1603 | func verify () = match tx { | |
1585 | 1604 | case inv: InvokeScriptTransaction => | |
1586 | 1605 | let isSelf = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
1587 | 1606 | let isRightFee = if ((inv.fee == 900000)) | |
1588 | 1607 | then (inv.feeAssetId == unit) | |
1589 | 1608 | else false | |
1590 | 1609 | let isInitCall = (inv.function == "init") | |
1591 | 1610 | let isnoPayments = (size(inv.payments) == 0) | |
1592 | 1611 | if (if (if (isRightFee) | |
1593 | 1612 | then isInitCall | |
1594 | 1613 | else false) | |
1595 | 1614 | then isSelf | |
1596 | 1615 | else false) | |
1597 | 1616 | then isnoPayments | |
1598 | 1617 | else false | |
1599 | 1618 | case _ => | |
1600 | 1619 | let group1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], group1Admin1PK)) | |
1601 | 1620 | then 1 | |
1602 | 1621 | else (0 + (if (sigVerify(tx.bodyBytes, tx.proofs[0], group1Admin2PK)) | |
1603 | 1622 | then 1 | |
1604 | 1623 | else 0)) | |
1605 | 1624 | let group2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], group2Admin1PK)) | |
1606 | 1625 | then 1 | |
1607 | 1626 | else (0 + (if (sigVerify(tx.bodyBytes, tx.proofs[1], group2Admin2PK)) | |
1608 | 1627 | then 1 | |
1609 | 1628 | else 0)) | |
1610 | 1629 | ((group1Signed + group2Signed) == 2) | |
1611 | 1630 | } | |
1612 | 1631 |
github/deemru/w8io/169f3d6 163.43 ms ◑