tx · CKegv3nBeZXNT8TaH5TS7f6RFSrBSmHpfcoQAf9CH8i2 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS: -0.04200000 Waves 2023.07.17 13:04 [2669712] smart account 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS > SELF 0.00000000 Waves
{ "type": 13, "id": "CKegv3nBeZXNT8TaH5TS7f6RFSrBSmHpfcoQAf9CH8i2", "fee": 4200000, "feeAssetId": null, "timestamp": 1689588284092, "version": 2, "chainId": 84, "sender": "3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS", "senderPublicKey": "HP8sssVq1866F7CaPQJwgFrt6fsqhQjKwM84cL1wjD2a", "proofs": [ "4TTWeMvgz2e6PsWDGaUxjJvKytqjvZNZQNvBnFXZ8NC7ax1B2cXdPujpZ4ADzjeqUE8uhDdMtAqw7dUQPTkts1jj" ], "script": "base64:BgKMAQgCEgMKAQgSBAoCCAgSBQoDCBgYEgUKAwgBCBIECgIIARIGCgQBCAgBEgUKAwEICBILCgkICAgICAgICAgSAwoBCBIDCgEIEgUKAwgIARIGCgQIAQgIEg0KCwgIAQQRGBgRAQEYEgkKBwgIAQQIARgSDQoLCAgBBBgYGBgYARgSCwoJCAgBAQEBAQEEbgAHU0ZfUE9PTAICU0YAB1dYX1BPT0wCAldYAA9DQVBfRkVFX05PX0xPQU4CCWNhcE5vTG9hbgAMQ0FQX0ZFRV9MT0FOAgdjYXBMb2FuABRTVE9QTE9TU19GRUVfTk9fTE9BTgIOc3RvcExvc3NOb0xvYW4ADVNUT1BMT1NTX0xPQU4CDHN0b3BMb3NzTG9hbgAITE9BTl9GRUUCBGxvYW4AC05PX0xPQU5fRkVFAgZub0xvYW4ABk5PX0ZFRQIFbm9GZWUABlNDQUxFOACAwtcvAAdTQ0FMRTEwAIDIr6AlAAdTQ0FMRTE2CQC2AgEAgICE/qbe4REACkZFRV9TQ0FMRTYAwIQ9ABRrU0ZQb29sQUFzc2V0QmFsYW5jZQ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CmtTaGFyZVBvb2wFCHBvb2xBZGRyCQDMCAIJAQxCb29sZWFuRW50cnkCCQCsAgIFCHBvb2xBZGRyBQ5rUG9vbENhbkJvcnJvdwUJY2FuQm9ycm93BQNuaWwBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5b1AxWA==", "height": 2669712, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: JBuqH64sDbEgp5ujCnL39kaS2G1hNJy1k4DCmr2MsK7z Next: 4bMJ1pGGg6VNhmSb5F74VxHTeVTT8WcKGE7h5qPyovJP Diff:
Old | New | Differences | |
---|---|---|---|
176 | 176 | ||
177 | 177 | ||
178 | 178 | func getSFPoolData (poolAddr) = { | |
179 | - | let $ | |
180 | - | if (($ | |
179 | + | let $t061916240 = getSFPoolBalances(poolAddr) | |
180 | + | if (($t061916240 == $t061916240)) | |
181 | 181 | then { | |
182 | - | let balB = $ | |
183 | - | let balA = $ | |
182 | + | let balB = $t061916240._2 | |
183 | + | let balA = $t061916240._1 | |
184 | 184 | $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")) | |
185 | 185 | } | |
186 | 186 | else throw("Strict value is not equal to itself.") | |
214 | 214 | then @ | |
215 | 215 | else unit | |
216 | 216 | }, "Can't get pool LP asset id") | |
217 | - | let $ | |
218 | - | if (($ | |
217 | + | let $t069376996 = getWXPoolBalances(poolAddr, aId, bId) | |
218 | + | if (($t069376996 == $t069376996)) | |
219 | 219 | then { | |
220 | - | let balB = $ | |
221 | - | let balA = $ | |
220 | + | let balB = $t069376996._2 | |
221 | + | let balA = $t069376996._1 | |
222 | 222 | $Tuple5(aId, bId, balA, balB, shareId) | |
223 | 223 | } | |
224 | 224 | else throw("Strict value is not equal to itself.") | |
326 | 326 | let pool = valueOrErrorMessage(getString(this, (shareId + kSharePool)), "Can't find pool addr by share id") | |
327 | 327 | let poolAddr = Address(fromBase58String(pool)) | |
328 | 328 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
329 | - | let $ | |
330 | - | let aId = $ | |
331 | - | let bId = $ | |
332 | - | let aBalance = $ | |
333 | - | let bBalance = $ | |
329 | + | let $t0998810053 = getPoolData(poolAddr, pType) | |
330 | + | let aId = $t0998810053._1 | |
331 | + | let bId = $t0998810053._2 | |
332 | + | let aBalance = $t0998810053._3 | |
333 | + | let bBalance = $t0998810053._4 | |
334 | 334 | let dPriceA = getIntegerValue(priceOracleAddr, (aId + kPriceInOracle)) | |
335 | 335 | let dPriceB = getIntegerValue(priceOracleAddr, (bId + kPriceInOracle)) | |
336 | 336 | let shareSupply = getShareSupply(poolAddr, pType, shareId) | |
401 | 401 | else throw("Strict value is not equal to itself.") | |
402 | 402 | } | |
403 | 403 | else { | |
404 | - | let $ | |
404 | + | let $t01157311823 = $Tuple2(split({ | |
405 | 405 | let @ = invoke(poolAddr, "evaluatePutByAmountAssetREADONLY", [pmtA], nil) | |
406 | 406 | if ($isInstanceOf(@, "String")) | |
407 | 407 | then @ | |
412 | 412 | then @ | |
413 | 413 | else throw(($getType(@) + " couldn't be cast to String")) | |
414 | 414 | }, "__")) | |
415 | - | if (($ | |
415 | + | if (($t01157311823 == $t01157311823)) | |
416 | 416 | then { | |
417 | - | let evalPutInB = $ | |
418 | - | let evalPutInA = $ | |
417 | + | let evalPutInB = $t01157311823._2 | |
418 | + | let evalPutInA = $t01157311823._1 | |
419 | 419 | let lpInA = parseIntValue(evalPutInA[1]) | |
420 | 420 | let lpInB = parseIntValue(evalPutInB[1]) | |
421 | 421 | if ((lpInB > lpInA)) | |
457 | 457 | ||
458 | 458 | ||
459 | 459 | func unstakeLP (pool,pType,shareId,amount) = { | |
460 | - | let $ | |
460 | + | let $t01330813665 = if ((pType == SF_POOL)) | |
461 | 461 | then $Tuple3(getSFFarmingAddr(), "withdrawShareTokens", [pool, amount]) | |
462 | 462 | else if ((pType == WX_POOL)) | |
463 | 463 | then $Tuple3(getWXFarmingAddr(Address(fromBase58String(pool))), "unstake", [shareId, amount]) | |
464 | 464 | else throw("Wrong pool type") | |
465 | - | let farmAddr = $ | |
466 | - | let fName = $ | |
467 | - | let params = $ | |
465 | + | let farmAddr = $t01330813665._1 | |
466 | + | let fName = $t01330813665._2 | |
467 | + | let params = $t01330813665._3 | |
468 | 468 | let inv = invoke(farmAddr, fName, params, nil) | |
469 | 469 | if ((inv == inv)) | |
470 | 470 | then amount | |
477 | 477 | let feeScale6 = 1000000 | |
478 | 478 | let fee = getIntegerValue(poolAddr, kSFPoolFee) | |
479 | 479 | let amntGetNoFee = fraction(amountTokenToGet, feeScale6, (feeScale6 - fee), CEILING) | |
480 | - | let $ | |
480 | + | let $t01408714393 = if ((assetTokenToGet == assetIdA)) | |
481 | 481 | then { | |
482 | 482 | let amountToPay = fraction(amntGetNoFee, balB, (balA - amntGetNoFee), CEILING) | |
483 | 483 | $Tuple2(amountToPay, assetIdB) | |
486 | 486 | let amountToPay = fraction(amntGetNoFee, balA, (balB - amntGetNoFee), CEILING) | |
487 | 487 | $Tuple2(amountToPay, assetIdA) | |
488 | 488 | } | |
489 | - | let amountToPay = $ | |
490 | - | let assetToPay = $ | |
489 | + | let amountToPay = $t01408714393._1 | |
490 | + | let assetToPay = $t01408714393._2 | |
491 | 491 | $Tuple2(assetToPay, amountToPay) | |
492 | 492 | } | |
493 | 493 | ||
496 | 496 | let prFee = getIntegerValue(wxSwapContract, "%s__protocolFee") | |
497 | 497 | let pFee = getIntegerValue(wxSwapContract, "%s__poolFee") | |
498 | 498 | let feeScale = toBigInt(100000000) | |
499 | - | let $ | |
499 | + | let $t01473215040 = if ((assetTokenToGet == assetIdA)) | |
500 | 500 | then { | |
501 | 501 | let amountToPay = fraction(amountTokenToGet, balB, (balA - amountTokenToGet)) | |
502 | 502 | $Tuple2(amountToPay, assetIdB) | |
505 | 505 | let amountToPay = fraction(amountTokenToGet, balA, (balB - amountTokenToGet)) | |
506 | 506 | $Tuple2(amountToPay, assetIdA) | |
507 | 507 | } | |
508 | - | let amountToPay = $ | |
509 | - | let assetToPay = $ | |
508 | + | let amountToPay = $t01473215040._1 | |
509 | + | let assetToPay = $t01473215040._2 | |
510 | 510 | let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee))), CEILING)) | |
511 | 511 | $Tuple2(assetToPay, amountToPayWithFee) | |
512 | 512 | } | |
514 | 514 | ||
515 | 515 | func exchangeDirectly (type,pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = if ((type == SF_POOL)) | |
516 | 516 | then { | |
517 | - | let $ | |
518 | - | let assetToPay = $ | |
519 | - | let amountToPay = $ | |
517 | + | let $t01538515507 = calcAmountToPaySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet) | |
518 | + | let assetToPay = $t01538515507._1 | |
519 | + | let amountToPay = $t01538515507._2 | |
520 | 520 | invoke(addressFromStringValue(pool), "callFunction", ["exchange", [toString(amountTokenToGet)]], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)]) | |
521 | 521 | } | |
522 | 522 | else { | |
523 | - | let $ | |
524 | - | let assetToPay = $ | |
525 | - | let amountToPay = $ | |
523 | + | let $t01568215804 = calcAmountToPayWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet) | |
524 | + | let assetToPay = $t01568215804._1 | |
525 | + | let amountToPay = $t01568215804._2 | |
526 | 526 | invoke(wxSwapContract, "swap", [amountTokenToGet, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)]) | |
527 | 527 | } | |
528 | 528 | ||
529 | 529 | ||
530 | 530 | func calcWithdrawLPFromPoolVirt (poolAddr,pType,shareId,userCanWithdraw) = { | |
531 | - | let $ | |
531 | + | let $t01606616453 = if ((pType == SF_POOL)) | |
532 | 532 | then { | |
533 | 533 | let inv = { | |
534 | 534 | let @ = invoke(poolAddr, "callFunction", ["withdrawREADONLY", [toString(userCanWithdraw)]], nil) | |
551 | 551 | then $Tuple2(parseIntValue(inv[1]), parseIntValue(inv[2])) | |
552 | 552 | else throw("Strict value is not equal to itself.") | |
553 | 553 | } | |
554 | - | let amountA = $ | |
555 | - | let amountB = $ | |
554 | + | let amountA = $t01606616453._1 | |
555 | + | let amountB = $t01606616453._2 | |
556 | 556 | $Tuple2(amountA, amountB) | |
557 | 557 | } | |
558 | 558 | ||
595 | 595 | if ((lpBalanceBefore == lpBalanceBefore)) | |
596 | 596 | then { | |
597 | 597 | let poolAddr = addressFromStringValue(pool) | |
598 | - | let $ | |
598 | + | let $t01743917855 = if (if ((pmtA > 0)) | |
599 | 599 | then (pmtB > 0) | |
600 | 600 | else false) | |
601 | 601 | then { | |
602 | - | let $ | |
603 | - | let pmtInA = $ | |
604 | - | let pmtInB = $ | |
605 | - | let change = $ | |
606 | - | let changeId = $ | |
602 | + | let $t01750517621 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB) | |
603 | + | let pmtInA = $t01750517621._1 | |
604 | + | let pmtInB = $t01750517621._2 | |
605 | + | let change = $t01750517621._3 | |
606 | + | let changeId = $t01750517621._4 | |
607 | 607 | let inv = replenishTwoTokensByType(poolAddr, pType, pmtInA, aId, pmtInB, bId) | |
608 | 608 | if ((inv == inv)) | |
609 | 609 | then $Tuple2(change, changeId) | |
614 | 614 | else if ((pmtB > 0)) | |
615 | 615 | then $Tuple2(pmtB, bId) | |
616 | 616 | else throw("pmts must be > 0") | |
617 | - | let change = $ | |
618 | - | let changeId = $ | |
617 | + | let change = $t01743917855._1 | |
618 | + | let changeId = $t01743917855._2 | |
619 | 619 | let inv = if ((change > 0)) | |
620 | 620 | then replenishOneTokenByType(poolAddr, pType, change, changeId) | |
621 | 621 | else nil | |
643 | 643 | func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type,withLoan) = { | |
644 | 644 | let totalAmount = getPoolTotalShare(pool) | |
645 | 645 | let totalAmountLoan = getPoolTotalShareWithLoan(pool) | |
646 | - | let $ | |
646 | + | let $t01871318951 = if (withLoan) | |
647 | 647 | then $Tuple2(getIntegerValue(this, (pool + kPoolInterestLoan)), (totalAmountLoan + stakedAmount)) | |
648 | 648 | else $Tuple2(getIntegerValue(this, (pool + kPoolInterestNoLoan)), totalAmountLoan) | |
649 | - | let curPoolInterest = $ | |
650 | - | let totalStakedWithLoan = $ | |
649 | + | let curPoolInterest = $t01871318951._1 | |
650 | + | let totalStakedWithLoan = $t01871318951._2 | |
651 | 651 | [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))] | |
652 | 652 | } | |
653 | 653 | ||
693 | 693 | ||
694 | 694 | func capitalize (pool,pType,tokenId,tokenAmount) = { | |
695 | 695 | let poolAddr = Address(fromBase58String(pool)) | |
696 | - | let $ | |
697 | - | let AId = $ | |
698 | - | let BId = $ | |
699 | - | let balA = $ | |
700 | - | let balB = $ | |
701 | - | let shareId = $ | |
696 | + | let $t02130221368 = getPoolData(poolAddr, pType) | |
697 | + | let AId = $t02130221368._1 | |
698 | + | let BId = $t02130221368._2 | |
699 | + | let balA = $t02130221368._3 | |
700 | + | let balB = $t02130221368._4 | |
701 | + | let shareId = $t02130221368._5 | |
702 | 702 | if (if ((tokenId != AId)) | |
703 | 703 | then (tokenId != BId) | |
704 | 704 | else false) | |
705 | 705 | then throw("Wrong asset") | |
706 | 706 | else { | |
707 | - | let $ | |
707 | + | let $t02145321533 = if ((tokenId == AId)) | |
708 | 708 | then $Tuple2(tokenAmount, 0) | |
709 | 709 | else $Tuple2(0, tokenAmount) | |
710 | - | let pmtA = $ | |
711 | - | let pmtB = $ | |
712 | - | let $ | |
713 | - | let stakedAmount = $ | |
714 | - | let nf = $ | |
710 | + | let pmtA = $t02145321533._1 | |
711 | + | let pmtB = $t02145321533._2 | |
712 | + | let $t02153621640 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
713 | + | let stakedAmount = $t02153621640._1 | |
714 | + | let nf = $t02153621640._2 | |
715 | 715 | let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0) | |
716 | 716 | let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0) | |
717 | 717 | let totalShareAmount = getPoolTotalShare(pool) | |
738 | 738 | func withdrawAmountCalc (pool,userCanWithdraw,debt,borrowAsset) = { | |
739 | 739 | let poolAddr = Address(fromBase58String(pool)) | |
740 | 740 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
741 | - | let $ | |
742 | - | let assetIdA = $ | |
743 | - | let assetIdB = $ | |
744 | - | let balA = $ | |
745 | - | let balB = $ | |
746 | - | let shareId = $ | |
741 | + | let $t02341223488 = getPoolData(poolAddr, pType) | |
742 | + | let assetIdA = $t02341223488._1 | |
743 | + | let assetIdB = $t02341223488._2 | |
744 | + | let balA = $t02341223488._3 | |
745 | + | let balB = $t02341223488._4 | |
746 | + | let shareId = $t02341223488._5 | |
747 | 747 | let cBalABefore = accountBalance(assetIdFromStr(assetIdA)) | |
748 | 748 | if ((cBalABefore == cBalABefore)) | |
749 | 749 | then { | |
762 | 762 | then { | |
763 | 763 | let cBalAAfter = accountBalance(assetIdFromStr(assetIdA)) | |
764 | 764 | let cBalBAfter = accountBalance(assetIdFromStr(assetIdB)) | |
765 | - | let $ | |
766 | - | let tokensAmountA = $ | |
767 | - | let tokensAmountB = $ | |
768 | - | let $ | |
765 | + | let $t02405124140 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore)) | |
766 | + | let tokensAmountA = $t02405124140._1 | |
767 | + | let tokensAmountB = $t02405124140._2 | |
768 | + | let $t02414324997 = if ((debt > 0)) | |
769 | 769 | then { | |
770 | 770 | let amountToGetEx = if (if ((borrowAsset == assetIdA)) | |
771 | 771 | then (debt > tokensAmountA) | |
790 | 790 | else throw("Strict value is not equal to itself.") | |
791 | 791 | } | |
792 | 792 | else $Tuple2(tokensAmountA, tokensAmountB) | |
793 | - | let toUserA = $ | |
794 | - | let toUserB = $ | |
793 | + | let toUserA = $t02414324997._1 | |
794 | + | let toUserB = $t02414324997._2 | |
795 | 795 | $Tuple7(toUserA, assetIdA, toUserB, assetIdB, cBalAAfter, cBalBAfter, shareId) | |
796 | 796 | } | |
797 | 797 | else throw("Strict value is not equal to itself.") | |
827 | 827 | else throw(($getType(@) + " couldn't be cast to Int")) | |
828 | 828 | } | |
829 | 829 | else 0 | |
830 | - | let $ | |
831 | - | if (($ | |
830 | + | let $t02638526538 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset) | |
831 | + | if (($t02638526538 == $t02638526538)) | |
832 | 832 | then { | |
833 | - | let shareId = $ | |
834 | - | let cBalBAfter = $ | |
835 | - | let cBalAAfter = $ | |
836 | - | let assetIdB = $ | |
837 | - | let toUserAmountB = $ | |
838 | - | let assetIdA = $ | |
839 | - | let toUserAmountA = $ | |
833 | + | let shareId = $t02638526538._7 | |
834 | + | let cBalBAfter = $t02638526538._6 | |
835 | + | let cBalAAfter = $t02638526538._5 | |
836 | + | let assetIdB = $t02638526538._4 | |
837 | + | let toUserAmountB = $t02638526538._3 | |
838 | + | let assetIdA = $t02638526538._2 | |
839 | + | let toUserAmountA = $t02638526538._1 | |
840 | 840 | let closeDbtInv = if ((debt > 0)) | |
841 | 841 | then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + posId)], [AttachedPayment(assetIdFromStr(borrowAsset), debt)]) | |
842 | 842 | else 0 | |
871 | 871 | let decPrA = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN) | |
872 | 872 | let decPrB = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN) | |
873 | 873 | let paydInDollar = (fraction(dPriceA, pmtA, decPrA) + fraction(dPriceB, pmtB, decPrB)) | |
874 | - | let $ | |
874 | + | let $t02818228279 = if ((borrowId == aId)) | |
875 | 875 | then $Tuple2(dPriceA, decPrA) | |
876 | 876 | else $Tuple2(dPriceB, decPrB) | |
877 | - | let borrowPrice = $ | |
878 | - | let borrowDecPr = $ | |
877 | + | let borrowPrice = $t02818228279._1 | |
878 | + | let borrowDecPr = $t02818228279._2 | |
879 | 879 | fraction(fraction(paydInDollar, (leverage - 100), 100), borrowDecPr, borrowPrice) | |
880 | 880 | } | |
881 | 881 | ||
924 | 924 | @Callable(i) | |
925 | 925 | func getUserPositionInDollarsREADONLY (user,pools,posNum) = { | |
926 | 926 | func userPos (a,pool) = { | |
927 | - | let $ | |
928 | - | let totalPos = $ | |
929 | - | let posDebt = $ | |
930 | - | let index = $ | |
927 | + | let $t02997830012 = a | |
928 | + | let totalPos = $t02997830012._1 | |
929 | + | let posDebt = $t02997830012._2 | |
930 | + | let index = $t02997830012._3 | |
931 | 931 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
932 | - | let $ | |
933 | - | let AId = $ | |
934 | - | let BId = $ | |
935 | - | let balA = $ | |
936 | - | let balB = $ | |
937 | - | let shareId = $ | |
932 | + | let $t03010430194 = getPoolData(Address(fromBase58String(pool)), pType) | |
933 | + | let AId = $t03010430194._1 | |
934 | + | let BId = $t03010430194._2 | |
935 | + | let balA = $t03010430194._3 | |
936 | + | let balB = $t03010430194._4 | |
937 | + | let shareId = $t03010430194._5 | |
938 | 938 | let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAmount)), 0) | |
939 | 939 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum[index], (borrowAmount > 0)) | |
940 | 940 | let sharePrices = getSharePrice(shareId) | |
957 | 957 | } | |
958 | 958 | } | |
959 | 959 | ||
960 | - | let $ | |
960 | + | let $t03121431269 = { | |
961 | 961 | let $l = pools | |
962 | 962 | let $s = size($l) | |
963 | 963 | let $acc0 = $Tuple3(nil, nil, 0) | |
971 | 971 | ||
972 | 972 | $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) | |
973 | 973 | } | |
974 | - | let pos = $ | |
975 | - | let debt = $ | |
974 | + | let pos = $t03121431269._1 | |
975 | + | let debt = $t03121431269._2 | |
976 | 976 | $Tuple2(nil, $Tuple2(pos, debt)) | |
977 | 977 | } | |
978 | 978 | ||
989 | 989 | then throw("You can't borrow in this pool") | |
990 | 990 | else { | |
991 | 991 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
992 | - | let $ | |
993 | - | let AId = $ | |
994 | - | let BId = $ | |
995 | - | let balA = $ | |
996 | - | let balB = $ | |
997 | - | let shareId = $ | |
998 | - | let $ | |
999 | - | let pmtA = $ | |
1000 | - | let pmtAssetA = $ | |
1001 | - | let pmtB = $ | |
1002 | - | let pmtAssetB = $ | |
992 | + | let $t03170931799 = getPoolData(Address(fromBase58String(pool)), pType) | |
993 | + | let AId = $t03170931799._1 | |
994 | + | let BId = $t03170931799._2 | |
995 | + | let balA = $t03170931799._3 | |
996 | + | let balB = $t03170931799._4 | |
997 | + | let shareId = $t03170931799._5 | |
998 | + | let $t03180231883 = parseReplenishPmts(i.payments, AId, BId) | |
999 | + | let pmtA = $t03180231883._1 | |
1000 | + | let pmtAssetA = $t03180231883._2 | |
1001 | + | let pmtB = $t03180231883._3 | |
1002 | + | let pmtAssetB = $t03180231883._4 | |
1003 | 1003 | let user = toString(i.caller) | |
1004 | 1004 | let newPosNum = getNewUserPositionNumber(user) | |
1005 | 1005 | if ((leverage > 100)) | |
1019 | 1019 | if ((inv == inv)) | |
1020 | 1020 | then { | |
1021 | 1021 | let userStaked = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(newPosNum)) + kUserPosition)) | |
1022 | - | let $ | |
1023 | - | if (($ | |
1022 | + | let $t03289632990 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId) | |
1023 | + | if (($t03289632990 == $t03289632990)) | |
1024 | 1024 | then { | |
1025 | - | let newBalB = $ | |
1026 | - | let newBalA = $ | |
1025 | + | let newBalB = $t03289632990._2 | |
1026 | + | let newBalA = $t03289632990._1 | |
1027 | 1027 | let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB) | |
1028 | - | let $ | |
1029 | - | let wAmountA = $ | |
1030 | - | let wAmountB = $ | |
1028 | + | let $t03306033175 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1029 | + | let wAmountA = $t03306033175._1 | |
1030 | + | let wAmountB = $t03306033175._2 | |
1031 | 1031 | $Tuple2(nil, [prImpact, wAmountA, wAmountB]) | |
1032 | 1032 | } | |
1033 | 1033 | else throw("Strict value is not equal to itself.") | |
1037 | 1037 | else throw("Strict value is not equal to itself.") | |
1038 | 1038 | } | |
1039 | 1039 | else { | |
1040 | - | let $ | |
1041 | - | let userStaked = $ | |
1042 | - | let axlyFee = $ | |
1043 | - | let $ | |
1044 | - | if (($ | |
1040 | + | let $t03322833340 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
1041 | + | let userStaked = $t03322833340._1 | |
1042 | + | let axlyFee = $t03322833340._2 | |
1043 | + | let $t03334633440 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId) | |
1044 | + | if (($t03334633440 == $t03334633440)) | |
1045 | 1045 | then { | |
1046 | - | let newBalB = $ | |
1047 | - | let newBalA = $ | |
1046 | + | let newBalB = $t03334633440._2 | |
1047 | + | let newBalA = $t03334633440._1 | |
1048 | 1048 | let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB) | |
1049 | - | let $ | |
1050 | - | let wAmountA = $ | |
1051 | - | let wAmountB = $ | |
1049 | + | let $t03351033625 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1050 | + | let wAmountA = $t03351033625._1 | |
1051 | + | let wAmountB = $t03351033625._2 | |
1052 | 1052 | $Tuple2((replenishEntries(pool, user, userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])), [prImpact, wAmountA, wAmountB]) | |
1053 | 1053 | } | |
1054 | 1054 | else throw("Strict value is not equal to itself.") | |
1100 | 1100 | ||
1101 | 1101 | @Callable(i) | |
1102 | 1102 | func replenishFromLand (requestId) = valueOrElse(isLandCall(i), { | |
1103 | - | let $ | |
1104 | - | let user = $ | |
1105 | - | let pool = $ | |
1106 | - | let pmtA = $ | |
1107 | - | let AId = $ | |
1108 | - | let pmtB = $ | |
1109 | - | let BId = $ | |
1110 | - | let balA = $ | |
1111 | - | let balB = $ | |
1112 | - | let shareId = $ | |
1113 | - | let bwAsset = $ | |
1114 | - | let bwAmount = $ | |
1103 | + | let $t03615136255 = parseRequest(requestId) | |
1104 | + | let user = $t03615136255._1 | |
1105 | + | let pool = $t03615136255._2 | |
1106 | + | let pmtA = $t03615136255._3 | |
1107 | + | let AId = $t03615136255._4 | |
1108 | + | let pmtB = $t03615136255._5 | |
1109 | + | let BId = $t03615136255._6 | |
1110 | + | let balA = $t03615136255._7 | |
1111 | + | let balB = $t03615136255._8 | |
1112 | + | let shareId = $t03615136255._9 | |
1113 | + | let bwAsset = $t03615136255._10 | |
1114 | + | let bwAmount = $t03615136255._11 | |
1115 | 1115 | if ((size(i.payments) != 1)) | |
1116 | 1116 | then throw("Wrong payment size") | |
1117 | 1117 | else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset)) | |
1119 | 1119 | else (i.payments[0].amount != bwAmount)) | |
1120 | 1120 | then throw("Wrong payment") | |
1121 | 1121 | else { | |
1122 | - | let $ | |
1122 | + | let $t03644536569 = if ((AId == bwAsset)) | |
1123 | 1123 | then $Tuple2((pmtA + i.payments[0].amount), pmtB) | |
1124 | 1124 | else $Tuple2(pmtA, (pmtB + i.payments[0].amount)) | |
1125 | - | let pmtAllA = $ | |
1126 | - | let pmtAllB = $ | |
1125 | + | let pmtAllA = $t03644536569._1 | |
1126 | + | let pmtAllB = $t03644536569._2 | |
1127 | 1127 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
1128 | - | let $ | |
1129 | - | let userStaked = $ | |
1130 | - | let axlyFee = $ | |
1128 | + | let $t03665136766 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId) | |
1129 | + | let userStaked = $t03665136766._1 | |
1130 | + | let axlyFee = $t03665136766._2 | |
1131 | 1131 | let posNum = getNewUserPositionNumber(user) | |
1132 | 1132 | let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)] | |
1133 | 1133 | let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true) | |
1134 | - | let $ | |
1135 | - | let wAmountA = $ | |
1136 | - | let wAmountB = $ | |
1134 | + | let $t03712637241 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1135 | + | let wAmountA = $t03712637241._1 | |
1136 | + | let wAmountB = $t03712637241._2 | |
1137 | 1137 | $Tuple2((((entries ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])) ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked) | |
1138 | 1138 | } | |
1139 | 1139 | }) | |
1144 | 1144 | func liquidate (user,posId,liquidateAmount) = valueOrElse(isLandCall(i), { | |
1145 | 1145 | let pool = valueOrErrorMessage(getString(this, (((user + "_") + posId) + kUserPositionPool)), "no position") | |
1146 | 1146 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1147 | - | let $ | |
1148 | - | let AId = $ | |
1149 | - | let BId = $ | |
1150 | - | let balA = $ | |
1151 | - | let balB = $ | |
1152 | - | let shareId = $ | |
1147 | + | let $t03773637826 = getPoolData(Address(fromBase58String(pool)), pType) | |
1148 | + | let AId = $t03773637826._1 | |
1149 | + | let BId = $t03773637826._2 | |
1150 | + | let balA = $t03773637826._3 | |
1151 | + | let balB = $t03773637826._4 | |
1152 | + | let shareId = $t03773637826._5 | |
1153 | 1153 | let amount = unstakeLP(pool, pType, shareId, liquidateAmount) | |
1154 | 1154 | let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)) | |
1155 | 1155 | let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)) | |
1172 | 1172 | ||
1173 | 1173 | ||
1174 | 1174 | @Callable(i) | |
1175 | - | func capitalizeExKeeper (pool,type,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = valueOrElse(isAdminCall(i), { | |
1176 | - | let $t03931139505 = if (claim) | |
1175 | + | func capitalizeExKeeper (pool,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = valueOrElse(isAdminCall(i), { | |
1176 | + | let type = getStringValue(this, (kPool + pool)) | |
1177 | + | let $t03961939813 = if (claim) | |
1177 | 1178 | then claimFarmed(type, pool) | |
1178 | 1179 | else { | |
1179 | 1180 | let claimedAsset = if ((type == SF_POOL)) | |
1181 | 1182 | else WXID | |
1182 | 1183 | $Tuple2(amountToExchange, claimedAsset) | |
1183 | 1184 | } | |
1184 | - | let claimedAmount = $ | |
1185 | - | let claimedAsset = $ | |
1185 | + | let claimedAmount = $t03961939813._1 | |
1186 | + | let claimedAsset = $t03961939813._2 | |
1186 | 1187 | let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options) | |
1187 | 1188 | let change = (claimedAmount - amountToExchange) | |
1188 | 1189 | let changeEntry = if ((change > 0)) | |
1194 | 1195 | ||
1195 | 1196 | ||
1196 | 1197 | @Callable(i) | |
1197 | - | func capitalizeExPuzzle (pool,type,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = valueOrElse(isAdminCall(i), { | |
1198 | - | let $t04019040384 = if (claim) | |
1198 | + | func capitalizeExPuzzle (pool,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = valueOrElse(isAdminCall(i), { | |
1199 | + | let type = getStringValue(this, (kPool + pool)) | |
1200 | + | let $t04052840722 = if (claim) | |
1199 | 1201 | then claimFarmed(type, pool) | |
1200 | 1202 | else { | |
1201 | 1203 | let claimedAsset = if ((type == SF_POOL)) | |
1203 | 1205 | else WXID | |
1204 | 1206 | $Tuple2(amountToExchange, claimedAsset) | |
1205 | 1207 | } | |
1206 | - | let claimedAmount = $ | |
1207 | - | let claimedAsset = $ | |
1208 | + | let claimedAmount = $t04052840722._1 | |
1209 | + | let claimedAsset = $t04052840722._2 | |
1208 | 1210 | let exchangedAmount = exchangePuzzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options) | |
1209 | 1211 | let change = (claimedAmount - amountToExchange) | |
1210 | 1212 | let changeEntry = if ((change > 0)) | |
1216 | 1218 | ||
1217 | 1219 | ||
1218 | 1220 | @Callable(i) | |
1219 | - | func capitalizeExSwopFi (pool,type,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = valueOrElse(isAdminCall(i), { | |
1220 | - | let $t04113541329 = if (claim) | |
1221 | + | func capitalizeExSwopFi (pool,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = valueOrElse(isAdminCall(i), { | |
1222 | + | let type = getStringValue(this, (kPool + pool)) | |
1223 | + | let $t04150441698 = if (claim) | |
1221 | 1224 | then claimFarmed(type, pool) | |
1222 | 1225 | else { | |
1223 | 1226 | let claimedAsset = if ((type == SF_POOL)) | |
1225 | 1228 | else WXID | |
1226 | 1229 | $Tuple2(amountToExchange, claimedAsset) | |
1227 | 1230 | } | |
1228 | - | let claimedAmount = $ | |
1229 | - | let claimedAsset = $ | |
1231 | + | let claimedAmount = $t04150441698._1 | |
1232 | + | let claimedAsset = $t04150441698._2 | |
1230 | 1233 | let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options) | |
1231 | 1234 | let change = (claimedAmount - amountToExchange) | |
1232 | 1235 | let changeEntry = if ((change > 0)) | |
1243 | 1246 | else false) | |
1244 | 1247 | then throw("Wrong type") | |
1245 | 1248 | else { | |
1246 | - | let $ | |
1247 | - | let aId = $ | |
1248 | - | let bId = $ | |
1249 | - | let aBal = $ | |
1250 | - | let bBal = $ | |
1251 | - | let shareId = $ | |
1249 | + | let $t04243942533 = getPoolData(Address(fromBase58String(poolAddr)), type) | |
1250 | + | let aId = $t04243942533._1 | |
1251 | + | let bId = $t04243942533._2 | |
1252 | + | let aBal = $t04243942533._3 | |
1253 | + | let bBal = $t04243942533._4 | |
1254 | + | let shareId = $t04243942533._5 | |
1252 | 1255 | [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)] | |
1253 | 1256 | }) | |
1254 | 1257 |
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 = "_user_position" | |
45 | 45 | ||
46 | 46 | let kUserPositionPool = "_user_position_pool" | |
47 | 47 | ||
48 | 48 | let kUserBorrowAmount = "_user_position_borrow_amount" | |
49 | 49 | ||
50 | 50 | let kUserBorrowAssetId = "_user_position_borrow_asset_id" | |
51 | 51 | ||
52 | 52 | let kUserPositionNum = "_user_position_number" | |
53 | 53 | ||
54 | 54 | let kUserPositionInterest = "_user_position_interest" | |
55 | 55 | ||
56 | 56 | let kPoolTotal = "_pool_total" | |
57 | 57 | ||
58 | 58 | let kPoolTotalLoan = "_pool_total_loan" | |
59 | 59 | ||
60 | 60 | let kPoolInterestLoan = "_pool_interest_loan" | |
61 | 61 | ||
62 | 62 | let kPoolInterestNoLoan = "_pool_interest_no_loan" | |
63 | 63 | ||
64 | 64 | let kPoolCanBorrow = "_pool_can_borrow" | |
65 | 65 | ||
66 | 66 | let kAxlyInFeeWithoutLoan = "_axly_fee_without_loan" | |
67 | 67 | ||
68 | 68 | let kAxlyInFeeWithLoan = "_axly_fee_with_loan" | |
69 | 69 | ||
70 | 70 | let kAxlyNoLoanCapFee = "_axly_fee_cap_with_loan" | |
71 | 71 | ||
72 | 72 | let kAxlyWithLoanCapFee = "_axly_fee_cap_no_loan" | |
73 | 73 | ||
74 | 74 | let kAxlyStopLossNoLoanFee = "_axly_fee_stoploss_with_loan" | |
75 | 75 | ||
76 | 76 | let kAxlyStopLossLoanFee = "_axly_fee_stoploss_no_loan" | |
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 = "_pool_share_id" | |
85 | 85 | ||
86 | 86 | let kPoolCapChange = "_pool_cap_change" | |
87 | 87 | ||
88 | 88 | let kTokenLastPrice = "last_price" | |
89 | 89 | ||
90 | 90 | let kPriceInOracle = "_twap5B" | |
91 | 91 | ||
92 | 92 | let kUserStopLoss = "_stop_loss" | |
93 | 93 | ||
94 | 94 | let kMoneyBox = "axly_money_box" | |
95 | 95 | ||
96 | 96 | let kSFFarmingAddr = "swopfi_farming_addr" | |
97 | 97 | ||
98 | 98 | let kLendService = "lend_service_addr" | |
99 | 99 | ||
100 | 100 | let kAdminCallPK = "admin_call_pub_key" | |
101 | 101 | ||
102 | 102 | let kPriceOracle = "price_oracle" | |
103 | 103 | ||
104 | 104 | let kExContract = "exchange_contract" | |
105 | 105 | ||
106 | 106 | let kWxSwapContract = "wx_swap_contract" | |
107 | 107 | ||
108 | 108 | let kSwopId = "swop_id" | |
109 | 109 | ||
110 | 110 | let kWxId = "wx_id" | |
111 | 111 | ||
112 | 112 | let moneyBox = Address(fromBase58String(valueOrErrorMessage(getString(this, kMoneyBox), "No axly moneyBox address"))) | |
113 | 113 | ||
114 | 114 | let exContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kExContract), "No exchange contract address"))) | |
115 | 115 | ||
116 | 116 | let priceOracleAddr = Address(fromBase58String(valueOrErrorMessage(getString(this, kPriceOracle), "No price oracle address"))) | |
117 | 117 | ||
118 | 118 | let wxSwapContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kWxSwapContract), "No wx swap address"))) | |
119 | 119 | ||
120 | 120 | let SWOPID = fromBase58String(valueOrErrorMessage(getString(this, kSwopId), "No swop id")) | |
121 | 121 | ||
122 | 122 | let WXID = fromBase58String(valueOrErrorMessage(getString(this, kWxId), "No wx id")) | |
123 | 123 | ||
124 | 124 | func getLendSrvAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kLendService), "Can't get lend service addr"))) | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func getAdminCallAddr () = addressFromPublicKey(fromBase58String(valueOrErrorMessage(getString(this, kAdminCallPK), "Can't get admin addr"))) | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func isAdminCall (i) = if ((i.caller == getAdminCallAddr())) | |
131 | 131 | then unit | |
132 | 132 | else throw("Only admin can call this function") | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func isSelfCall (i) = if ((i.caller == this)) | |
136 | 136 | then unit | |
137 | 137 | else throw("Only contract itself can call this function") | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func isLandCall (i) = if ((i.caller == getLendSrvAddr())) | |
141 | 141 | then unit | |
142 | 142 | else throw("Only land contract can call this function") | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func accountBalance (assetId) = match assetId { | |
146 | 146 | case id: ByteVector => | |
147 | 147 | assetBalance(this, id) | |
148 | 148 | case waves: Unit => | |
149 | 149 | wavesBalance(this).available | |
150 | 150 | case _ => | |
151 | 151 | throw("Match error") | |
152 | 152 | } | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | 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")) | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func getWXPoolBalances (poolAddr,aId,bId) = $Tuple2({ | |
159 | 159 | let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [aId], nil) | |
160 | 160 | if ($isInstanceOf(@, "Int")) | |
161 | 161 | then @ | |
162 | 162 | else throw(($getType(@) + " couldn't be cast to Int")) | |
163 | 163 | }, { | |
164 | 164 | let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [bId], nil) | |
165 | 165 | if ($isInstanceOf(@, "Int")) | |
166 | 166 | then @ | |
167 | 167 | else throw(($getType(@) + " couldn't be cast to Int")) | |
168 | 168 | }) | |
169 | 169 | ||
170 | 170 | ||
171 | 171 | func getPoolBalances (poolAddr,type,aId,bId) = if ((type == SF_POOL)) | |
172 | 172 | then getSFPoolBalances(poolAddr) | |
173 | 173 | else if ((type == WX_POOL)) | |
174 | 174 | then getWXPoolBalances(poolAddr, aId, bId) | |
175 | 175 | else throw("Wrong pool type") | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func getSFPoolData (poolAddr) = { | |
179 | - | let $ | |
180 | - | if (($ | |
179 | + | let $t061916240 = getSFPoolBalances(poolAddr) | |
180 | + | if (($t061916240 == $t061916240)) | |
181 | 181 | then { | |
182 | - | let balB = $ | |
183 | - | let balA = $ | |
182 | + | let balB = $t061916240._2 | |
183 | + | let balA = $t061916240._1 | |
184 | 184 | $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")) | |
185 | 185 | } | |
186 | 186 | else throw("Strict value is not equal to itself.") | |
187 | 187 | } | |
188 | 188 | ||
189 | 189 | ||
190 | 190 | func getWXPoolData (poolAddr) = { | |
191 | 191 | let cfg = { | |
192 | 192 | let @ = invoke(poolAddr, "getPoolConfigWrapperREADONLY", nil, nil) | |
193 | 193 | if ($isInstanceOf(@, "List[Any]")) | |
194 | 194 | then @ | |
195 | 195 | else throw(($getType(@) + " couldn't be cast to List[Any]")) | |
196 | 196 | } | |
197 | 197 | if ((cfg == cfg)) | |
198 | 198 | then { | |
199 | 199 | let aId = valueOrErrorMessage({ | |
200 | 200 | let @ = cfg[4] | |
201 | 201 | if ($isInstanceOf(@, "String")) | |
202 | 202 | then @ | |
203 | 203 | else unit | |
204 | 204 | }, "Can't get pool A asset id") | |
205 | 205 | let bId = valueOrErrorMessage({ | |
206 | 206 | let @ = cfg[5] | |
207 | 207 | if ($isInstanceOf(@, "String")) | |
208 | 208 | then @ | |
209 | 209 | else unit | |
210 | 210 | }, "Can't get pool B asset id") | |
211 | 211 | let shareId = valueOrErrorMessage({ | |
212 | 212 | let @ = cfg[3] | |
213 | 213 | if ($isInstanceOf(@, "String")) | |
214 | 214 | then @ | |
215 | 215 | else unit | |
216 | 216 | }, "Can't get pool LP asset id") | |
217 | - | let $ | |
218 | - | if (($ | |
217 | + | let $t069376996 = getWXPoolBalances(poolAddr, aId, bId) | |
218 | + | if (($t069376996 == $t069376996)) | |
219 | 219 | then { | |
220 | - | let balB = $ | |
221 | - | let balA = $ | |
220 | + | let balB = $t069376996._2 | |
221 | + | let balA = $t069376996._1 | |
222 | 222 | $Tuple5(aId, bId, balA, balB, shareId) | |
223 | 223 | } | |
224 | 224 | else throw("Strict value is not equal to itself.") | |
225 | 225 | } | |
226 | 226 | else throw("Strict value is not equal to itself.") | |
227 | 227 | } | |
228 | 228 | ||
229 | 229 | ||
230 | 230 | func getPoolData (poolAddr,type) = if ((type == SF_POOL)) | |
231 | 231 | then getSFPoolData(poolAddr) | |
232 | 232 | else if ((type == WX_POOL)) | |
233 | 233 | then getWXPoolData(poolAddr) | |
234 | 234 | else throw("Wrong pool type") | |
235 | 235 | ||
236 | 236 | ||
237 | 237 | func getShareSupply (poolAddr,type,shareId) = if ((type == SF_POOL)) | |
238 | 238 | then valueOrErrorMessage(getInteger(poolAddr, kSFPoolShareSupply), "Can't get share asset supply") | |
239 | 239 | else if ((type == WX_POOL)) | |
240 | 240 | then valueOrErrorMessage(assetInfo(fromBase58String(shareId)), "Wrong ShareId").quantity | |
241 | 241 | else throw("Wrong pool type") | |
242 | 242 | ||
243 | 243 | ||
244 | 244 | func getPoolTotalShare (pool) = valueOrElse(getInteger(this, (pool + kPoolTotal)), 0) | |
245 | 245 | ||
246 | 246 | ||
247 | 247 | func getPoolTotalShareWithLoan (pool) = valueOrElse(getInteger(this, (pool + kPoolTotalLoan)), 0) | |
248 | 248 | ||
249 | 249 | ||
250 | 250 | func getNewUserPositionNumber (user) = (valueOrElse(getInteger(this, (user + kUserPositionNum)), 0) + 1) | |
251 | 251 | ||
252 | 252 | ||
253 | 253 | func getAxlyFee (pool,feeType) = if ((feeType == CAP_FEE_LOAN)) | |
254 | 254 | then getIntegerValue(this, (pool + kAxlyWithLoanCapFee)) | |
255 | 255 | else if ((feeType == CAP_FEE_NO_LOAN)) | |
256 | 256 | then getIntegerValue(this, (pool + kAxlyNoLoanCapFee)) | |
257 | 257 | else if ((feeType == LOAN_FEE)) | |
258 | 258 | then getIntegerValue(this, (pool + kAxlyInFeeWithLoan)) | |
259 | 259 | else if ((feeType == NO_LOAN_FEE)) | |
260 | 260 | then getIntegerValue(this, (pool + kAxlyInFeeWithoutLoan)) | |
261 | 261 | else if ((feeType == NO_FEE)) | |
262 | 262 | then 0 | |
263 | 263 | else throw("Wrong fee type") | |
264 | 264 | ||
265 | 265 | ||
266 | 266 | func getSFFarmingAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kSFFarmingAddr), "Can't get swopfi farming addr"))) | |
267 | 267 | ||
268 | 268 | ||
269 | 269 | func getWXFarmingAddr (poolAddr) = { | |
270 | 270 | let fContract = Address(fromBase58String(valueOrErrorMessage(getString(poolAddr, "%s__factoryContract"), "Can't get WX factory contract addr"))) | |
271 | 271 | let factroyCfg = split(valueOrErrorMessage(getString(fContract, "%s__factoryConfig"), "Can't get WX factory cfg"), "__") | |
272 | 272 | Address(fromBase58String(factroyCfg[1])) | |
273 | 273 | } | |
274 | 274 | ||
275 | 275 | ||
276 | 276 | func assetIdToStr (assetId) = match assetId { | |
277 | 277 | case id: ByteVector => | |
278 | 278 | toBase58String(id) | |
279 | 279 | case waves: Unit => | |
280 | 280 | "WAVES" | |
281 | 281 | case _ => | |
282 | 282 | throw("Not Asset id") | |
283 | 283 | } | |
284 | 284 | ||
285 | 285 | ||
286 | 286 | func assetIdFromStr (assetId) = if ((assetId == "WAVES")) | |
287 | 287 | then unit | |
288 | 288 | else fromBase58String(assetId) | |
289 | 289 | ||
290 | 290 | ||
291 | 291 | func getAssetDecimals (assetId) = if ((assetId == "WAVES")) | |
292 | 292 | then 8 | |
293 | 293 | else match assetInfo(fromBase58String(assetId)) { | |
294 | 294 | case asset: Asset => | |
295 | 295 | asset.decimals | |
296 | 296 | case _ => | |
297 | 297 | throw("Can't find asset") | |
298 | 298 | } | |
299 | 299 | ||
300 | 300 | ||
301 | 301 | func getAssetPrecition (assetId) = pow(10, 0, getAssetDecimals(assetId), 0, 0, DOWN) | |
302 | 302 | ||
303 | 303 | ||
304 | 304 | func getAssetsPrice (assetIds) = { | |
305 | 305 | func getPrices (a,assetId) = { | |
306 | 306 | let assetPrice = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle)) | |
307 | 307 | (a :+ assetPrice) | |
308 | 308 | } | |
309 | 309 | ||
310 | 310 | let $l = assetIds | |
311 | 311 | let $s = size($l) | |
312 | 312 | let $acc0 = nil | |
313 | 313 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
314 | 314 | then $a | |
315 | 315 | else getPrices($a, $l[$i]) | |
316 | 316 | ||
317 | 317 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
318 | 318 | then $a | |
319 | 319 | else throw("List size exceeds 50") | |
320 | 320 | ||
321 | 321 | $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) | |
322 | 322 | } | |
323 | 323 | ||
324 | 324 | ||
325 | 325 | func getSharePrice (shareId) = { | |
326 | 326 | let pool = valueOrErrorMessage(getString(this, (shareId + kSharePool)), "Can't find pool addr by share id") | |
327 | 327 | let poolAddr = Address(fromBase58String(pool)) | |
328 | 328 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
329 | - | let $ | |
330 | - | let aId = $ | |
331 | - | let bId = $ | |
332 | - | let aBalance = $ | |
333 | - | let bBalance = $ | |
329 | + | let $t0998810053 = getPoolData(poolAddr, pType) | |
330 | + | let aId = $t0998810053._1 | |
331 | + | let bId = $t0998810053._2 | |
332 | + | let aBalance = $t0998810053._3 | |
333 | + | let bBalance = $t0998810053._4 | |
334 | 334 | let dPriceA = getIntegerValue(priceOracleAddr, (aId + kPriceInOracle)) | |
335 | 335 | let dPriceB = getIntegerValue(priceOracleAddr, (bId + kPriceInOracle)) | |
336 | 336 | let shareSupply = getShareSupply(poolAddr, pType, shareId) | |
337 | 337 | let APrecision = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN) | |
338 | 338 | let BPrecision = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN) | |
339 | 339 | let sharePrecision = pow(10, 0, getAssetDecimals(shareId), 0, 0, DOWN) | |
340 | 340 | let sum = (fraction(aBalance, dPriceA, APrecision) + fraction(bBalance, dPriceB, BPrecision)) | |
341 | 341 | fraction(sum, sharePrecision, shareSupply) | |
342 | 342 | } | |
343 | 343 | ||
344 | 344 | ||
345 | 345 | func getSharePrices (shareIds) = { | |
346 | 346 | func getPrices (a,shareId) = (a :+ getSharePrice(shareId)) | |
347 | 347 | ||
348 | 348 | let $l = shareIds | |
349 | 349 | let $s = size($l) | |
350 | 350 | let $acc0 = nil | |
351 | 351 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
352 | 352 | then $a | |
353 | 353 | else getPrices($a, $l[$i]) | |
354 | 354 | ||
355 | 355 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
356 | 356 | then $a | |
357 | 357 | else throw("List size exceeds 20") | |
358 | 358 | ||
359 | 359 | $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) | |
360 | 360 | } | |
361 | 361 | ||
362 | 362 | ||
363 | 363 | func getCursEntries (aId,bId,shareId,wAmounts) = { | |
364 | 364 | let assetsPrices = getAssetsPrice([aId, bId]) | |
365 | 365 | let sharePrice = getSharePrice(shareId) | |
366 | 366 | let prices = ([toString(assetsPrices[0]), toString(assetsPrices[1]), toString(sharePrice)] ++ wAmounts) | |
367 | 367 | [StringEntry(kTokenLastPrice, makeString(prices, ","))] | |
368 | 368 | } | |
369 | 369 | ||
370 | 370 | ||
371 | 371 | func calcReplenishByTwoTokens (pType,poolAddr,pmtA,aId,pmtB,bId,balA,balB) = if ((pType == SF_POOL)) | |
372 | 372 | then { | |
373 | 373 | let repl = { | |
374 | 374 | let @ = invoke(poolAddr, "callFunction", ["calcLPReplenishTwoTokensREADONLY", [toString(pmtA), toString(pmtB)]], nil) | |
375 | 375 | if ($isInstanceOf(@, "List[Any]")) | |
376 | 376 | then @ | |
377 | 377 | else throw(($getType(@) + " couldn't be cast to List[Any]")) | |
378 | 378 | } | |
379 | 379 | if ((repl == repl)) | |
380 | 380 | then $Tuple5({ | |
381 | 381 | let @ = repl[3] | |
382 | 382 | if ($isInstanceOf(@, "Int")) | |
383 | 383 | then @ | |
384 | 384 | else throw(($getType(@) + " couldn't be cast to Int")) | |
385 | 385 | }, { | |
386 | 386 | let @ = repl[4] | |
387 | 387 | if ($isInstanceOf(@, "Int")) | |
388 | 388 | then @ | |
389 | 389 | else throw(($getType(@) + " couldn't be cast to Int")) | |
390 | 390 | }, { | |
391 | 391 | let @ = repl[1] | |
392 | 392 | if ($isInstanceOf(@, "Int")) | |
393 | 393 | then @ | |
394 | 394 | else throw(($getType(@) + " couldn't be cast to Int")) | |
395 | 395 | }, assetIdToStr(repl[2]), { | |
396 | 396 | let @ = repl[0] | |
397 | 397 | if ($isInstanceOf(@, "Int")) | |
398 | 398 | then @ | |
399 | 399 | else throw(($getType(@) + " couldn't be cast to Int")) | |
400 | 400 | }) | |
401 | 401 | else throw("Strict value is not equal to itself.") | |
402 | 402 | } | |
403 | 403 | else { | |
404 | - | let $ | |
404 | + | let $t01157311823 = $Tuple2(split({ | |
405 | 405 | let @ = invoke(poolAddr, "evaluatePutByAmountAssetREADONLY", [pmtA], nil) | |
406 | 406 | if ($isInstanceOf(@, "String")) | |
407 | 407 | then @ | |
408 | 408 | else throw(($getType(@) + " couldn't be cast to String")) | |
409 | 409 | }, "__"), split({ | |
410 | 410 | let @ = invoke(poolAddr, "evaluatePutByPriceAssetREADONLY", [pmtB], nil) | |
411 | 411 | if ($isInstanceOf(@, "String")) | |
412 | 412 | then @ | |
413 | 413 | else throw(($getType(@) + " couldn't be cast to String")) | |
414 | 414 | }, "__")) | |
415 | - | if (($ | |
415 | + | if (($t01157311823 == $t01157311823)) | |
416 | 416 | then { | |
417 | - | let evalPutInB = $ | |
418 | - | let evalPutInA = $ | |
417 | + | let evalPutInB = $t01157311823._2 | |
418 | + | let evalPutInA = $t01157311823._1 | |
419 | 419 | let lpInA = parseIntValue(evalPutInA[1]) | |
420 | 420 | let lpInB = parseIntValue(evalPutInB[1]) | |
421 | 421 | if ((lpInB > lpInA)) | |
422 | 422 | then { | |
423 | 423 | let pmt = parseIntValue(evalPutInA[8]) | |
424 | 424 | $Tuple5(pmtA, pmt, (pmtB - pmt), bId, lpInB) | |
425 | 425 | } | |
426 | 426 | else { | |
427 | 427 | let pmt = parseIntValue(evalPutInB[7]) | |
428 | 428 | $Tuple5(pmt, pmtB, (pmtA - pmt), aId, lpInA) | |
429 | 429 | } | |
430 | 430 | } | |
431 | 431 | else throw("Strict value is not equal to itself.") | |
432 | 432 | } | |
433 | 433 | ||
434 | 434 | ||
435 | 435 | func replenishTwoTokensByType (poolAddr,pType,pmtA,aId,pmtB,bId) = { | |
436 | 436 | let payments = [AttachedPayment(assetIdFromStr(aId), pmtA), AttachedPayment(assetIdFromStr(bId), pmtB)] | |
437 | 437 | if ((pType == SF_POOL)) | |
438 | 438 | then invoke(poolAddr, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], payments) | |
439 | 439 | else invoke(poolAddr, "put", [1000000, false], payments) | |
440 | 440 | } | |
441 | 441 | ||
442 | 442 | ||
443 | 443 | func replenishOneTokenByType (poolAddr,pType,pmt,pmtId) = { | |
444 | 444 | let payments = [AttachedPayment(assetIdFromStr(pmtId), pmt)] | |
445 | 445 | if ((pType == SF_POOL)) | |
446 | 446 | then invoke(poolAddr, "callFunction", ["replenishWithOneToken", ["0", "false", "0"]], payments) | |
447 | 447 | else invoke(poolAddr, "putOneTkn", [0, false], payments) | |
448 | 448 | } | |
449 | 449 | ||
450 | 450 | ||
451 | 451 | func stakeLP (pool,pType,shareId,amount) = { | |
452 | 452 | let payments = [AttachedPayment(fromBase58String(shareId), amount)] | |
453 | 453 | if ((pType == SF_POOL)) | |
454 | 454 | then invoke(getSFFarmingAddr(), "lockShareTokens", [pool, 0], payments) | |
455 | 455 | else invoke(getWXFarmingAddr(addressFromStringValue(pool)), "stake", nil, payments) | |
456 | 456 | } | |
457 | 457 | ||
458 | 458 | ||
459 | 459 | func unstakeLP (pool,pType,shareId,amount) = { | |
460 | - | let $ | |
460 | + | let $t01330813665 = if ((pType == SF_POOL)) | |
461 | 461 | then $Tuple3(getSFFarmingAddr(), "withdrawShareTokens", [pool, amount]) | |
462 | 462 | else if ((pType == WX_POOL)) | |
463 | 463 | then $Tuple3(getWXFarmingAddr(Address(fromBase58String(pool))), "unstake", [shareId, amount]) | |
464 | 464 | else throw("Wrong pool type") | |
465 | - | let farmAddr = $ | |
466 | - | let fName = $ | |
467 | - | let params = $ | |
465 | + | let farmAddr = $t01330813665._1 | |
466 | + | let fName = $t01330813665._2 | |
467 | + | let params = $t01330813665._3 | |
468 | 468 | let inv = invoke(farmAddr, fName, params, nil) | |
469 | 469 | if ((inv == inv)) | |
470 | 470 | then amount | |
471 | 471 | else throw("Strict value is not equal to itself.") | |
472 | 472 | } | |
473 | 473 | ||
474 | 474 | ||
475 | 475 | func calcAmountToPaySF (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = { | |
476 | 476 | let poolAddr = Address(fromBase58String(pool)) | |
477 | 477 | let feeScale6 = 1000000 | |
478 | 478 | let fee = getIntegerValue(poolAddr, kSFPoolFee) | |
479 | 479 | let amntGetNoFee = fraction(amountTokenToGet, feeScale6, (feeScale6 - fee), CEILING) | |
480 | - | let $ | |
480 | + | let $t01408714393 = if ((assetTokenToGet == assetIdA)) | |
481 | 481 | then { | |
482 | 482 | let amountToPay = fraction(amntGetNoFee, balB, (balA - amntGetNoFee), CEILING) | |
483 | 483 | $Tuple2(amountToPay, assetIdB) | |
484 | 484 | } | |
485 | 485 | else { | |
486 | 486 | let amountToPay = fraction(amntGetNoFee, balA, (balB - amntGetNoFee), CEILING) | |
487 | 487 | $Tuple2(amountToPay, assetIdA) | |
488 | 488 | } | |
489 | - | let amountToPay = $ | |
490 | - | let assetToPay = $ | |
489 | + | let amountToPay = $t01408714393._1 | |
490 | + | let assetToPay = $t01408714393._2 | |
491 | 491 | $Tuple2(assetToPay, amountToPay) | |
492 | 492 | } | |
493 | 493 | ||
494 | 494 | ||
495 | 495 | func calcAmountToPayWX (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = { | |
496 | 496 | let prFee = getIntegerValue(wxSwapContract, "%s__protocolFee") | |
497 | 497 | let pFee = getIntegerValue(wxSwapContract, "%s__poolFee") | |
498 | 498 | let feeScale = toBigInt(100000000) | |
499 | - | let $ | |
499 | + | let $t01473215040 = if ((assetTokenToGet == assetIdA)) | |
500 | 500 | then { | |
501 | 501 | let amountToPay = fraction(amountTokenToGet, balB, (balA - amountTokenToGet)) | |
502 | 502 | $Tuple2(amountToPay, assetIdB) | |
503 | 503 | } | |
504 | 504 | else { | |
505 | 505 | let amountToPay = fraction(amountTokenToGet, balA, (balB - amountTokenToGet)) | |
506 | 506 | $Tuple2(amountToPay, assetIdA) | |
507 | 507 | } | |
508 | - | let amountToPay = $ | |
509 | - | let assetToPay = $ | |
508 | + | let amountToPay = $t01473215040._1 | |
509 | + | let assetToPay = $t01473215040._2 | |
510 | 510 | let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee))), CEILING)) | |
511 | 511 | $Tuple2(assetToPay, amountToPayWithFee) | |
512 | 512 | } | |
513 | 513 | ||
514 | 514 | ||
515 | 515 | func exchangeDirectly (type,pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = if ((type == SF_POOL)) | |
516 | 516 | then { | |
517 | - | let $ | |
518 | - | let assetToPay = $ | |
519 | - | let amountToPay = $ | |
517 | + | let $t01538515507 = calcAmountToPaySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet) | |
518 | + | let assetToPay = $t01538515507._1 | |
519 | + | let amountToPay = $t01538515507._2 | |
520 | 520 | invoke(addressFromStringValue(pool), "callFunction", ["exchange", [toString(amountTokenToGet)]], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)]) | |
521 | 521 | } | |
522 | 522 | else { | |
523 | - | let $ | |
524 | - | let assetToPay = $ | |
525 | - | let amountToPay = $ | |
523 | + | let $t01568215804 = calcAmountToPayWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet) | |
524 | + | let assetToPay = $t01568215804._1 | |
525 | + | let amountToPay = $t01568215804._2 | |
526 | 526 | invoke(wxSwapContract, "swap", [amountTokenToGet, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)]) | |
527 | 527 | } | |
528 | 528 | ||
529 | 529 | ||
530 | 530 | func calcWithdrawLPFromPoolVirt (poolAddr,pType,shareId,userCanWithdraw) = { | |
531 | - | let $ | |
531 | + | let $t01606616453 = if ((pType == SF_POOL)) | |
532 | 532 | then { | |
533 | 533 | let inv = { | |
534 | 534 | let @ = invoke(poolAddr, "callFunction", ["withdrawREADONLY", [toString(userCanWithdraw)]], nil) | |
535 | 535 | if ($isInstanceOf(@, "(Int, Int)")) | |
536 | 536 | then @ | |
537 | 537 | else throw(($getType(@) + " couldn't be cast to (Int, Int)")) | |
538 | 538 | } | |
539 | 539 | if ((inv == inv)) | |
540 | 540 | then $Tuple2(inv._1, inv._2) | |
541 | 541 | else throw("Strict value is not equal to itself.") | |
542 | 542 | } | |
543 | 543 | else { | |
544 | 544 | let inv = split({ | |
545 | 545 | let @ = invoke(poolAddr, "evaluateGetREADONLY", [shareId, userCanWithdraw], nil) | |
546 | 546 | if ($isInstanceOf(@, "String")) | |
547 | 547 | then @ | |
548 | 548 | else throw(($getType(@) + " couldn't be cast to String")) | |
549 | 549 | }, "__") | |
550 | 550 | if ((inv == inv)) | |
551 | 551 | then $Tuple2(parseIntValue(inv[1]), parseIntValue(inv[2])) | |
552 | 552 | else throw("Strict value is not equal to itself.") | |
553 | 553 | } | |
554 | - | let amountA = $ | |
555 | - | let amountB = $ | |
554 | + | let amountA = $t01606616453._1 | |
555 | + | let amountB = $t01606616453._2 | |
556 | 556 | $Tuple2(amountA, amountB) | |
557 | 557 | } | |
558 | 558 | ||
559 | 559 | ||
560 | 560 | func claimFarmed (type,pool) = if ((type == SF_POOL)) | |
561 | 561 | then { | |
562 | 562 | let balBefore = accountBalance(SWOPID) | |
563 | 563 | if ((balBefore == balBefore)) | |
564 | 564 | then { | |
565 | 565 | let inv = invoke(getSFFarmingAddr(), "claim", [pool], nil) | |
566 | 566 | if ((inv == inv)) | |
567 | 567 | then { | |
568 | 568 | let balAfter = accountBalance(SWOPID) | |
569 | 569 | $Tuple2((balAfter - balBefore), SWOPID) | |
570 | 570 | } | |
571 | 571 | else throw("Strict value is not equal to itself.") | |
572 | 572 | } | |
573 | 573 | else throw("Strict value is not equal to itself.") | |
574 | 574 | } | |
575 | 575 | else if ((type == WX_POOL)) | |
576 | 576 | then { | |
577 | 577 | let balBefore = accountBalance(WXID) | |
578 | 578 | if ((balBefore == balBefore)) | |
579 | 579 | then { | |
580 | 580 | let inv = invoke(getWXFarmingAddr(Address(fromBase58String(pool))), "claimWX", [pool], nil) | |
581 | 581 | if ((inv == inv)) | |
582 | 582 | then { | |
583 | 583 | let balAfter = accountBalance(WXID) | |
584 | 584 | $Tuple2((balAfter - balBefore), WXID) | |
585 | 585 | } | |
586 | 586 | else throw("Strict value is not equal to itself.") | |
587 | 587 | } | |
588 | 588 | else throw("Strict value is not equal to itself.") | |
589 | 589 | } | |
590 | 590 | else throw("Wrong pool type") | |
591 | 591 | ||
592 | 592 | ||
593 | 593 | func replenishByType (pType,pool,feeType,pmtA,aId,pmtB,bId,balA,balB,LPId) = { | |
594 | 594 | let lpBalanceBefore = accountBalance(fromBase58String(LPId)) | |
595 | 595 | if ((lpBalanceBefore == lpBalanceBefore)) | |
596 | 596 | then { | |
597 | 597 | let poolAddr = addressFromStringValue(pool) | |
598 | - | let $ | |
598 | + | let $t01743917855 = if (if ((pmtA > 0)) | |
599 | 599 | then (pmtB > 0) | |
600 | 600 | else false) | |
601 | 601 | then { | |
602 | - | let $ | |
603 | - | let pmtInA = $ | |
604 | - | let pmtInB = $ | |
605 | - | let change = $ | |
606 | - | let changeId = $ | |
602 | + | let $t01750517621 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB) | |
603 | + | let pmtInA = $t01750517621._1 | |
604 | + | let pmtInB = $t01750517621._2 | |
605 | + | let change = $t01750517621._3 | |
606 | + | let changeId = $t01750517621._4 | |
607 | 607 | let inv = replenishTwoTokensByType(poolAddr, pType, pmtInA, aId, pmtInB, bId) | |
608 | 608 | if ((inv == inv)) | |
609 | 609 | then $Tuple2(change, changeId) | |
610 | 610 | else throw("Strict value is not equal to itself.") | |
611 | 611 | } | |
612 | 612 | else if ((pmtA > 0)) | |
613 | 613 | then $Tuple2(pmtA, aId) | |
614 | 614 | else if ((pmtB > 0)) | |
615 | 615 | then $Tuple2(pmtB, bId) | |
616 | 616 | else throw("pmts must be > 0") | |
617 | - | let change = $ | |
618 | - | let changeId = $ | |
617 | + | let change = $t01743917855._1 | |
618 | + | let changeId = $t01743917855._2 | |
619 | 619 | let inv = if ((change > 0)) | |
620 | 620 | then replenishOneTokenByType(poolAddr, pType, change, changeId) | |
621 | 621 | else nil | |
622 | 622 | if ((inv == inv)) | |
623 | 623 | then { | |
624 | 624 | let lpBalanceAfter = accountBalance(fromBase58String(LPId)) | |
625 | 625 | let totalStaked = (lpBalanceAfter - lpBalanceBefore) | |
626 | 626 | let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6) | |
627 | 627 | let userShareForStake = (totalStaked - axlyFeeAmount) | |
628 | 628 | if ((0 >= userShareForStake)) | |
629 | 629 | then throw("amount of staked sharetokens must be > 0") | |
630 | 630 | else { | |
631 | 631 | let invLP = stakeLP(pool, pType, LPId, userShareForStake) | |
632 | 632 | if ((invLP == invLP)) | |
633 | 633 | then $Tuple2(userShareForStake, axlyFeeAmount) | |
634 | 634 | else throw("Strict value is not equal to itself.") | |
635 | 635 | } | |
636 | 636 | } | |
637 | 637 | else throw("Strict value is not equal to itself.") | |
638 | 638 | } | |
639 | 639 | else throw("Strict value is not equal to itself.") | |
640 | 640 | } | |
641 | 641 | ||
642 | 642 | ||
643 | 643 | func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type,withLoan) = { | |
644 | 644 | let totalAmount = getPoolTotalShare(pool) | |
645 | 645 | let totalAmountLoan = getPoolTotalShareWithLoan(pool) | |
646 | - | let $ | |
646 | + | let $t01871318951 = if (withLoan) | |
647 | 647 | then $Tuple2(getIntegerValue(this, (pool + kPoolInterestLoan)), (totalAmountLoan + stakedAmount)) | |
648 | 648 | else $Tuple2(getIntegerValue(this, (pool + kPoolInterestNoLoan)), totalAmountLoan) | |
649 | - | let curPoolInterest = $ | |
650 | - | let totalStakedWithLoan = $ | |
649 | + | let curPoolInterest = $t01871318951._1 | |
650 | + | let totalStakedWithLoan = $t01871318951._2 | |
651 | 651 | [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))] | |
652 | 652 | } | |
653 | 653 | ||
654 | 654 | ||
655 | 655 | func exchangeKeeper (toToken,pmtAmount,pmtAsset,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = { | |
656 | 656 | let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken)) | |
657 | 657 | if ((tokenBalanceBefore == tokenBalanceBefore)) | |
658 | 658 | then { | |
659 | 659 | let inv = invoke(exContract, "swap", [amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options], [AttachedPayment(pmtAsset, pmtAmount)]) | |
660 | 660 | if ((inv == inv)) | |
661 | 661 | then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore) | |
662 | 662 | else throw("Strict value is not equal to itself.") | |
663 | 663 | } | |
664 | 664 | else throw("Strict value is not equal to itself.") | |
665 | 665 | } | |
666 | 666 | ||
667 | 667 | ||
668 | 668 | func exchangePuzzle (toToken,pmtAmount,pmtAsset,routesStr,minToReceive,options) = { | |
669 | 669 | let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken)) | |
670 | 670 | if ((tokenBalanceBefore == tokenBalanceBefore)) | |
671 | 671 | then { | |
672 | 672 | let inv = invoke(exContract, "puzzleSwap", [routesStr, minToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)]) | |
673 | 673 | if ((inv == inv)) | |
674 | 674 | then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore) | |
675 | 675 | else throw("Strict value is not equal to itself.") | |
676 | 676 | } | |
677 | 677 | else throw("Strict value is not equal to itself.") | |
678 | 678 | } | |
679 | 679 | ||
680 | 680 | ||
681 | 681 | func exchangeSwopFi (toToken,pmtAmount,pmtAsset,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = { | |
682 | 682 | let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken)) | |
683 | 683 | if ((tokenBalanceBefore == tokenBalanceBefore)) | |
684 | 684 | then { | |
685 | 685 | let inv = invoke(exContract, "swopfiSwap", [exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)]) | |
686 | 686 | if ((inv == inv)) | |
687 | 687 | then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore) | |
688 | 688 | else throw("Strict value is not equal to itself.") | |
689 | 689 | } | |
690 | 690 | else throw("Strict value is not equal to itself.") | |
691 | 691 | } | |
692 | 692 | ||
693 | 693 | ||
694 | 694 | func capitalize (pool,pType,tokenId,tokenAmount) = { | |
695 | 695 | let poolAddr = Address(fromBase58String(pool)) | |
696 | - | let $ | |
697 | - | let AId = $ | |
698 | - | let BId = $ | |
699 | - | let balA = $ | |
700 | - | let balB = $ | |
701 | - | let shareId = $ | |
696 | + | let $t02130221368 = getPoolData(poolAddr, pType) | |
697 | + | let AId = $t02130221368._1 | |
698 | + | let BId = $t02130221368._2 | |
699 | + | let balA = $t02130221368._3 | |
700 | + | let balB = $t02130221368._4 | |
701 | + | let shareId = $t02130221368._5 | |
702 | 702 | if (if ((tokenId != AId)) | |
703 | 703 | then (tokenId != BId) | |
704 | 704 | else false) | |
705 | 705 | then throw("Wrong asset") | |
706 | 706 | else { | |
707 | - | let $ | |
707 | + | let $t02145321533 = if ((tokenId == AId)) | |
708 | 708 | then $Tuple2(tokenAmount, 0) | |
709 | 709 | else $Tuple2(0, tokenAmount) | |
710 | - | let pmtA = $ | |
711 | - | let pmtB = $ | |
712 | - | let $ | |
713 | - | let stakedAmount = $ | |
714 | - | let nf = $ | |
710 | + | let pmtA = $t02145321533._1 | |
711 | + | let pmtB = $t02145321533._2 | |
712 | + | let $t02153621640 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
713 | + | let stakedAmount = $t02153621640._1 | |
714 | + | let nf = $t02153621640._2 | |
715 | 715 | let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0) | |
716 | 716 | let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0) | |
717 | 717 | let totalShareAmount = getPoolTotalShare(pool) | |
718 | 718 | let totalShareAmountWithLoan = getPoolTotalShareWithLoan(pool) | |
719 | 719 | let loanPercent = fraction(totalShareAmountWithLoan, SCALE8, totalShareAmount) | |
720 | 720 | let stakedLoan = fraction(stakedAmount, loanPercent, SCALE8) | |
721 | 721 | let stakedNoLoan = (stakedAmount - stakedLoan) | |
722 | 722 | let newInterestLoan = if ((totalShareAmountWithLoan > 0)) | |
723 | 723 | then (curPoolInterestLoan + fraction(stakedLoan, SCALE10, totalShareAmountWithLoan)) | |
724 | 724 | else 0 | |
725 | 725 | let newInterestNoLoan = if (((totalShareAmount - totalShareAmountWithLoan) > 0)) | |
726 | 726 | then (curPoolInterestNoLoan + fraction(stakedNoLoan, SCALE10, (totalShareAmount - totalShareAmountWithLoan))) | |
727 | 727 | else 0 | |
728 | 728 | let axlyFeeLoan = fraction(stakedLoan, getAxlyFee(pool, CAP_FEE_LOAN), FEE_SCALE6) | |
729 | 729 | let axlyFeeNoLoan = fraction(stakedNoLoan, getAxlyFee(pool, CAP_FEE_NO_LOAN), FEE_SCALE6) | |
730 | 730 | let axlyFee = unstakeLP(pool, pType, shareId, (axlyFeeLoan + axlyFeeNoLoan)) | |
731 | 731 | if ((axlyFee == axlyFee)) | |
732 | 732 | then ([IntegerEntry((pool + kPoolInterestLoan), newInterestLoan), IntegerEntry((pool + kPoolInterestNoLoan), newInterestNoLoan), IntegerEntry((pool + kPoolTotal), ((totalShareAmount + stakedAmount) - axlyFee)), IntegerEntry((pool + kPoolTotalLoan), ((totalShareAmountWithLoan + stakedLoan) - axlyFeeLoan)), ScriptTransfer(moneyBox, (axlyFeeLoan + axlyFeeNoLoan), fromBase58String(shareId))] ++ getCursEntries(AId, BId, shareId, nil)) | |
733 | 733 | else throw("Strict value is not equal to itself.") | |
734 | 734 | } | |
735 | 735 | } | |
736 | 736 | ||
737 | 737 | ||
738 | 738 | func withdrawAmountCalc (pool,userCanWithdraw,debt,borrowAsset) = { | |
739 | 739 | let poolAddr = Address(fromBase58String(pool)) | |
740 | 740 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
741 | - | let $ | |
742 | - | let assetIdA = $ | |
743 | - | let assetIdB = $ | |
744 | - | let balA = $ | |
745 | - | let balB = $ | |
746 | - | let shareId = $ | |
741 | + | let $t02341223488 = getPoolData(poolAddr, pType) | |
742 | + | let assetIdA = $t02341223488._1 | |
743 | + | let assetIdB = $t02341223488._2 | |
744 | + | let balA = $t02341223488._3 | |
745 | + | let balB = $t02341223488._4 | |
746 | + | let shareId = $t02341223488._5 | |
747 | 747 | let cBalABefore = accountBalance(assetIdFromStr(assetIdA)) | |
748 | 748 | if ((cBalABefore == cBalABefore)) | |
749 | 749 | then { | |
750 | 750 | let cBalBBefore = accountBalance(assetIdFromStr(assetIdB)) | |
751 | 751 | if ((cBalBBefore == cBalBBefore)) | |
752 | 752 | then { | |
753 | 753 | let inv = if ((pType == SF_POOL)) | |
754 | 754 | then invoke(poolAddr, "callFunction", ["withdraw", [toString(userCanWithdraw)]], nil) | |
755 | 755 | else { | |
756 | 756 | let inv = unstakeLP(pool, pType, shareId, userCanWithdraw) | |
757 | 757 | if ((inv == inv)) | |
758 | 758 | then invoke(poolAddr, "get", nil, [AttachedPayment(assetIdFromStr(shareId), userCanWithdraw)]) | |
759 | 759 | else throw("Strict value is not equal to itself.") | |
760 | 760 | } | |
761 | 761 | if ((inv == inv)) | |
762 | 762 | then { | |
763 | 763 | let cBalAAfter = accountBalance(assetIdFromStr(assetIdA)) | |
764 | 764 | let cBalBAfter = accountBalance(assetIdFromStr(assetIdB)) | |
765 | - | let $ | |
766 | - | let tokensAmountA = $ | |
767 | - | let tokensAmountB = $ | |
768 | - | let $ | |
765 | + | let $t02405124140 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore)) | |
766 | + | let tokensAmountA = $t02405124140._1 | |
767 | + | let tokensAmountB = $t02405124140._2 | |
768 | + | let $t02414324997 = if ((debt > 0)) | |
769 | 769 | then { | |
770 | 770 | let amountToGetEx = if (if ((borrowAsset == assetIdA)) | |
771 | 771 | then (debt > tokensAmountA) | |
772 | 772 | else false) | |
773 | 773 | then (debt - tokensAmountA) | |
774 | 774 | else if (if ((borrowAsset == assetIdB)) | |
775 | 775 | then (debt > tokensAmountB) | |
776 | 776 | else false) | |
777 | 777 | then (debt - tokensAmountB) | |
778 | 778 | else 0 | |
779 | 779 | let exInv = if ((amountToGetEx > 0)) | |
780 | 780 | then exchangeDirectly(pType, pool, assetIdA, assetIdB, (balA - tokensAmountA), (balB - tokensAmountB), amountToGetEx, borrowAsset) | |
781 | 781 | else nil | |
782 | 782 | if ((exInv == exInv)) | |
783 | 783 | then { | |
784 | 784 | let cBalAAfterRepay = accountBalance(assetIdFromStr(assetIdA)) | |
785 | 785 | let cBalBAfterRepay = accountBalance(assetIdFromStr(assetIdB)) | |
786 | 786 | if ((borrowAsset == assetIdA)) | |
787 | 787 | then $Tuple2(((cBalAAfterRepay - cBalABefore) - debt), (cBalBAfterRepay - cBalBBefore)) | |
788 | 788 | else $Tuple2((cBalAAfterRepay - cBalABefore), ((cBalBAfterRepay - cBalBBefore) - debt)) | |
789 | 789 | } | |
790 | 790 | else throw("Strict value is not equal to itself.") | |
791 | 791 | } | |
792 | 792 | else $Tuple2(tokensAmountA, tokensAmountB) | |
793 | - | let toUserA = $ | |
794 | - | let toUserB = $ | |
793 | + | let toUserA = $t02414324997._1 | |
794 | + | let toUserB = $t02414324997._2 | |
795 | 795 | $Tuple7(toUserA, assetIdA, toUserB, assetIdB, cBalAAfter, cBalBAfter, shareId) | |
796 | 796 | } | |
797 | 797 | else throw("Strict value is not equal to itself.") | |
798 | 798 | } | |
799 | 799 | else throw("Strict value is not equal to itself.") | |
800 | 800 | } | |
801 | 801 | else throw("Strict value is not equal to itself.") | |
802 | 802 | } | |
803 | 803 | ||
804 | 804 | ||
805 | 805 | func userCanWithdrawShareCalc (user,pool,posId,borrowed) = { | |
806 | 806 | let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserPosition)), "Unknown position") | |
807 | 807 | let userInterest = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserPositionInterest)) | |
808 | 808 | let poolInterest = if (borrowed) | |
809 | 809 | then getIntegerValue(this, (pool + kPoolInterestLoan)) | |
810 | 810 | else getIntegerValue(this, (pool + kPoolInterestNoLoan)) | |
811 | 811 | (pAmount + fraction(pAmount, (poolInterest - userInterest), SCALE10)) | |
812 | 812 | } | |
813 | 813 | ||
814 | 814 | ||
815 | 815 | func withdrawToUser (user,pool,posId,stopLoss) = { | |
816 | 816 | let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserPosition)), "Unknown position") | |
817 | 817 | let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)), 0) | |
818 | 818 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posId, (borrowAmount > 0)) | |
819 | 819 | let poolTotalShare = getPoolTotalShare(pool) | |
820 | 820 | let userAddr = Address(fromBase58String(user)) | |
821 | 821 | let borrowAsset = valueOrElse(getString(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)), "") | |
822 | 822 | let debt = if ((borrowAmount > 0)) | |
823 | 823 | then { | |
824 | 824 | let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((user + "_") + posId), borrowAsset], nil) | |
825 | 825 | if ($isInstanceOf(@, "Int")) | |
826 | 826 | then @ | |
827 | 827 | else throw(($getType(@) + " couldn't be cast to Int")) | |
828 | 828 | } | |
829 | 829 | else 0 | |
830 | - | let $ | |
831 | - | if (($ | |
830 | + | let $t02638526538 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset) | |
831 | + | if (($t02638526538 == $t02638526538)) | |
832 | 832 | then { | |
833 | - | let shareId = $ | |
834 | - | let cBalBAfter = $ | |
835 | - | let cBalAAfter = $ | |
836 | - | let assetIdB = $ | |
837 | - | let toUserAmountB = $ | |
838 | - | let assetIdA = $ | |
839 | - | let toUserAmountA = $ | |
833 | + | let shareId = $t02638526538._7 | |
834 | + | let cBalBAfter = $t02638526538._6 | |
835 | + | let cBalAAfter = $t02638526538._5 | |
836 | + | let assetIdB = $t02638526538._4 | |
837 | + | let toUserAmountB = $t02638526538._3 | |
838 | + | let assetIdA = $t02638526538._2 | |
839 | + | let toUserAmountA = $t02638526538._1 | |
840 | 840 | let closeDbtInv = if ((debt > 0)) | |
841 | 841 | then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + posId)], [AttachedPayment(assetIdFromStr(borrowAsset), debt)]) | |
842 | 842 | else 0 | |
843 | 843 | if ((closeDbtInv == closeDbtInv)) | |
844 | 844 | then ([DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPosition)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPositionInterest)), IntegerEntry((pool + kPoolTotal), (poolTotalShare - userCanWithdraw)), ScriptTransfer(userAddr, toUserAmountA, assetIdFromStr(assetIdA)), ScriptTransfer(userAddr, toUserAmountB, assetIdFromStr(assetIdB))] ++ getCursEntries(assetIdA, assetIdB, shareId, nil)) | |
845 | 845 | else throw("Strict value is not equal to itself.") | |
846 | 846 | } | |
847 | 847 | else throw("Strict value is not equal to itself.") | |
848 | 848 | } | |
849 | 849 | ||
850 | 850 | ||
851 | 851 | func parseRequest (requestId) = { | |
852 | 852 | let request = split(valueOrErrorMessage(getString(this, (requestId + kRequestId)), ("No request with id " + requestId)), ",") | |
853 | 853 | let user = request[0] | |
854 | 854 | let pool = request[1] | |
855 | 855 | let pmtA = parseIntValue(request[2]) | |
856 | 856 | let AId = request[3] | |
857 | 857 | let pmtB = parseIntValue(request[4]) | |
858 | 858 | let BId = request[5] | |
859 | 859 | let balA = parseIntValue(request[6]) | |
860 | 860 | let balB = parseIntValue(request[7]) | |
861 | 861 | let shareId = request[8] | |
862 | 862 | let bwAsset = request[9] | |
863 | 863 | let bwAmount = parseIntValue(request[10]) | |
864 | 864 | $Tuple11(user, pool, pmtA, AId, pmtB, BId, balA, balB, shareId, bwAsset, bwAmount) | |
865 | 865 | } | |
866 | 866 | ||
867 | 867 | ||
868 | 868 | func calcBorrowAmount (pmtA,pmtB,aId,bId,leverage,borrowId) = { | |
869 | 869 | let dPriceA = getIntegerValue(priceOracleAddr, (aId + kPriceInOracle)) | |
870 | 870 | let dPriceB = getIntegerValue(priceOracleAddr, (bId + kPriceInOracle)) | |
871 | 871 | let decPrA = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN) | |
872 | 872 | let decPrB = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN) | |
873 | 873 | let paydInDollar = (fraction(dPriceA, pmtA, decPrA) + fraction(dPriceB, pmtB, decPrB)) | |
874 | - | let $ | |
874 | + | let $t02818228279 = if ((borrowId == aId)) | |
875 | 875 | then $Tuple2(dPriceA, decPrA) | |
876 | 876 | else $Tuple2(dPriceB, decPrB) | |
877 | - | let borrowPrice = $ | |
878 | - | let borrowDecPr = $ | |
877 | + | let borrowPrice = $t02818228279._1 | |
878 | + | let borrowDecPr = $t02818228279._2 | |
879 | 879 | fraction(fraction(paydInDollar, (leverage - 100), 100), borrowDecPr, borrowPrice) | |
880 | 880 | } | |
881 | 881 | ||
882 | 882 | ||
883 | 883 | func parseReplenishPmts (pmts,AId,BId) = if ((size(pmts) == 2)) | |
884 | 884 | then if ((assetIdToStr(pmts[0].assetId) != AId)) | |
885 | 885 | then throw("Wrong payment asset A") | |
886 | 886 | else if ((assetIdToStr(pmts[1].assetId) != BId)) | |
887 | 887 | then throw("Wrong payment asset B") | |
888 | 888 | else $Tuple4(pmts[0].amount, AId, pmts[1].amount, BId) | |
889 | 889 | else if ((size(pmts) == 1)) | |
890 | 890 | then if ((assetIdToStr(pmts[0].assetId) == AId)) | |
891 | 891 | then $Tuple4(pmts[0].amount, AId, 0, BId) | |
892 | 892 | else if ((assetIdToStr(pmts[0].assetId) == BId)) | |
893 | 893 | then $Tuple4(0, AId, pmts[0].amount, BId) | |
894 | 894 | else throw("Wrong payment") | |
895 | 895 | else throw("One or two payments expected") | |
896 | 896 | ||
897 | 897 | ||
898 | 898 | func calcPriceImpact (balA,balB,newBalA,newBalB) = { | |
899 | 899 | let pri = ((SCALE8 - fraction(fraction(balB, SCALE8, balA), SCALE8, fraction(newBalB, SCALE8, newBalA))) * 100) | |
900 | 900 | if ((0 > pri)) | |
901 | 901 | then (pri * -1) | |
902 | 902 | else pri | |
903 | 903 | } | |
904 | 904 | ||
905 | 905 | ||
906 | 906 | @Callable(i) | |
907 | 907 | func getShareAssetPriceREADONLY (shareId) = { | |
908 | 908 | let sharePrices = getSharePrice(shareId) | |
909 | 909 | $Tuple2(nil, sharePrices) | |
910 | 910 | } | |
911 | 911 | ||
912 | 912 | ||
913 | 913 | ||
914 | 914 | @Callable(i) | |
915 | 915 | func getUserPositionShareAmountREADONLY (user,posNum) = { | |
916 | 916 | let pool = valueOrErrorMessage(getString(this, (((user + "_") + posNum) + kUserPositionPool)), "Unknown position") | |
917 | 917 | let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posNum) + kUserBorrowAmount)) | |
918 | 918 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum, (borrowAmount > 0)) | |
919 | 919 | $Tuple2(nil, userCanWithdraw) | |
920 | 920 | } | |
921 | 921 | ||
922 | 922 | ||
923 | 923 | ||
924 | 924 | @Callable(i) | |
925 | 925 | func getUserPositionInDollarsREADONLY (user,pools,posNum) = { | |
926 | 926 | func userPos (a,pool) = { | |
927 | - | let $ | |
928 | - | let totalPos = $ | |
929 | - | let posDebt = $ | |
930 | - | let index = $ | |
927 | + | let $t02997830012 = a | |
928 | + | let totalPos = $t02997830012._1 | |
929 | + | let posDebt = $t02997830012._2 | |
930 | + | let index = $t02997830012._3 | |
931 | 931 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
932 | - | let $ | |
933 | - | let AId = $ | |
934 | - | let BId = $ | |
935 | - | let balA = $ | |
936 | - | let balB = $ | |
937 | - | let shareId = $ | |
932 | + | let $t03010430194 = getPoolData(Address(fromBase58String(pool)), pType) | |
933 | + | let AId = $t03010430194._1 | |
934 | + | let BId = $t03010430194._2 | |
935 | + | let balA = $t03010430194._3 | |
936 | + | let balB = $t03010430194._4 | |
937 | + | let shareId = $t03010430194._5 | |
938 | 938 | let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAmount)), 0) | |
939 | 939 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum[index], (borrowAmount > 0)) | |
940 | 940 | let sharePrices = getSharePrice(shareId) | |
941 | 941 | let decPrShare = pow(10, 0, getAssetDecimals(shareId), 0, 0, DOWN) | |
942 | 942 | let shareD = fraction(userCanWithdraw, sharePrices, decPrShare) | |
943 | 943 | if ((borrowAmount == 0)) | |
944 | 944 | then $Tuple3((totalPos :+ shareD), (posDebt :+ 0), (index + 1)) | |
945 | 945 | else { | |
946 | 946 | let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAssetId)) | |
947 | 947 | let debt = { | |
948 | 948 | let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((user + "_") + posNum[index]), borrowAsset], nil) | |
949 | 949 | if ($isInstanceOf(@, "Int")) | |
950 | 950 | then @ | |
951 | 951 | else throw(($getType(@) + " couldn't be cast to Int")) | |
952 | 952 | } | |
953 | 953 | let borrowAssetPrice = getIntegerValue(priceOracleAddr, (borrowAsset + kPriceInOracle)) | |
954 | 954 | let decPrBorrowId = pow(10, 0, getAssetDecimals(borrowAsset), 0, 0, DOWN) | |
955 | 955 | let debtD = fraction(debt, borrowAssetPrice, decPrBorrowId) | |
956 | 956 | $Tuple3((totalPos :+ shareD), (posDebt :+ debtD), (index + 1)) | |
957 | 957 | } | |
958 | 958 | } | |
959 | 959 | ||
960 | - | let $ | |
960 | + | let $t03121431269 = { | |
961 | 961 | let $l = pools | |
962 | 962 | let $s = size($l) | |
963 | 963 | let $acc0 = $Tuple3(nil, nil, 0) | |
964 | 964 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
965 | 965 | then $a | |
966 | 966 | else userPos($a, $l[$i]) | |
967 | 967 | ||
968 | 968 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
969 | 969 | then $a | |
970 | 970 | else throw("List size exceeds 20") | |
971 | 971 | ||
972 | 972 | $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) | |
973 | 973 | } | |
974 | - | let pos = $ | |
975 | - | let debt = $ | |
974 | + | let pos = $t03121431269._1 | |
975 | + | let debt = $t03121431269._2 | |
976 | 976 | $Tuple2(nil, $Tuple2(pos, debt)) | |
977 | 977 | } | |
978 | 978 | ||
979 | 979 | ||
980 | 980 | ||
981 | 981 | @Callable(i) | |
982 | 982 | func replenish (pool,leverage,borrowId) = if (if ((100 > leverage)) | |
983 | 983 | then true | |
984 | 984 | else (leverage > 300)) | |
985 | 985 | then throw("Leverage can't be <100 and >300") | |
986 | 986 | else if (if (!(getBooleanValue(this, (pool + kPoolCanBorrow)))) | |
987 | 987 | then (leverage > 100) | |
988 | 988 | else false) | |
989 | 989 | then throw("You can't borrow in this pool") | |
990 | 990 | else { | |
991 | 991 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
992 | - | let $ | |
993 | - | let AId = $ | |
994 | - | let BId = $ | |
995 | - | let balA = $ | |
996 | - | let balB = $ | |
997 | - | let shareId = $ | |
998 | - | let $ | |
999 | - | let pmtA = $ | |
1000 | - | let pmtAssetA = $ | |
1001 | - | let pmtB = $ | |
1002 | - | let pmtAssetB = $ | |
992 | + | let $t03170931799 = getPoolData(Address(fromBase58String(pool)), pType) | |
993 | + | let AId = $t03170931799._1 | |
994 | + | let BId = $t03170931799._2 | |
995 | + | let balA = $t03170931799._3 | |
996 | + | let balB = $t03170931799._4 | |
997 | + | let shareId = $t03170931799._5 | |
998 | + | let $t03180231883 = parseReplenishPmts(i.payments, AId, BId) | |
999 | + | let pmtA = $t03180231883._1 | |
1000 | + | let pmtAssetA = $t03180231883._2 | |
1001 | + | let pmtB = $t03180231883._3 | |
1002 | + | let pmtAssetB = $t03180231883._4 | |
1003 | 1003 | let user = toString(i.caller) | |
1004 | 1004 | let newPosNum = getNewUserPositionNumber(user) | |
1005 | 1005 | if ((leverage > 100)) | |
1006 | 1006 | then { | |
1007 | 1007 | let borrowAmount = calcBorrowAmount(pmtA, pmtB, pmtAssetA, pmtAssetB, leverage, borrowId) | |
1008 | 1008 | let request = makeString([user, pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowId, toString(borrowAmount)], ",") | |
1009 | 1009 | let newRequestId = { | |
1010 | 1010 | let @ = invoke(this, "createNewRequest", [request], nil) | |
1011 | 1011 | if ($isInstanceOf(@, "Int")) | |
1012 | 1012 | then @ | |
1013 | 1013 | else throw(($getType(@) + " couldn't be cast to Int")) | |
1014 | 1014 | } | |
1015 | 1015 | if ((newRequestId == newRequestId)) | |
1016 | 1016 | then { | |
1017 | 1017 | let args = [((user + "_") + toString(newPosNum)), shareId, borrowId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))] | |
1018 | 1018 | let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil) | |
1019 | 1019 | if ((inv == inv)) | |
1020 | 1020 | then { | |
1021 | 1021 | let userStaked = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(newPosNum)) + kUserPosition)) | |
1022 | - | let $ | |
1023 | - | if (($ | |
1022 | + | let $t03289632990 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId) | |
1023 | + | if (($t03289632990 == $t03289632990)) | |
1024 | 1024 | then { | |
1025 | - | let newBalB = $ | |
1026 | - | let newBalA = $ | |
1025 | + | let newBalB = $t03289632990._2 | |
1026 | + | let newBalA = $t03289632990._1 | |
1027 | 1027 | let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB) | |
1028 | - | let $ | |
1029 | - | let wAmountA = $ | |
1030 | - | let wAmountB = $ | |
1028 | + | let $t03306033175 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1029 | + | let wAmountA = $t03306033175._1 | |
1030 | + | let wAmountB = $t03306033175._2 | |
1031 | 1031 | $Tuple2(nil, [prImpact, wAmountA, wAmountB]) | |
1032 | 1032 | } | |
1033 | 1033 | else throw("Strict value is not equal to itself.") | |
1034 | 1034 | } | |
1035 | 1035 | else throw("Strict value is not equal to itself.") | |
1036 | 1036 | } | |
1037 | 1037 | else throw("Strict value is not equal to itself.") | |
1038 | 1038 | } | |
1039 | 1039 | else { | |
1040 | - | let $ | |
1041 | - | let userStaked = $ | |
1042 | - | let axlyFee = $ | |
1043 | - | let $ | |
1044 | - | if (($ | |
1040 | + | let $t03322833340 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
1041 | + | let userStaked = $t03322833340._1 | |
1042 | + | let axlyFee = $t03322833340._2 | |
1043 | + | let $t03334633440 = getPoolBalances(Address(fromBase58String(pool)), pType, AId, BId) | |
1044 | + | if (($t03334633440 == $t03334633440)) | |
1045 | 1045 | then { | |
1046 | - | let newBalB = $ | |
1047 | - | let newBalA = $ | |
1046 | + | let newBalB = $t03334633440._2 | |
1047 | + | let newBalA = $t03334633440._1 | |
1048 | 1048 | let prImpact = calcPriceImpact(balA, balB, newBalA, newBalB) | |
1049 | - | let $ | |
1050 | - | let wAmountA = $ | |
1051 | - | let wAmountB = $ | |
1049 | + | let $t03351033625 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1050 | + | let wAmountA = $t03351033625._1 | |
1051 | + | let wAmountB = $t03351033625._2 | |
1052 | 1052 | $Tuple2((replenishEntries(pool, user, userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])), [prImpact, wAmountA, wAmountB]) | |
1053 | 1053 | } | |
1054 | 1054 | else throw("Strict value is not equal to itself.") | |
1055 | 1055 | } | |
1056 | 1056 | } | |
1057 | 1057 | ||
1058 | 1058 | ||
1059 | 1059 | ||
1060 | 1060 | @Callable(i) | |
1061 | 1061 | func withdraw (pool,posId) = withdrawToUser(toString(i.caller), pool, toString(posId), false) | |
1062 | 1062 | ||
1063 | 1063 | ||
1064 | 1064 | ||
1065 | 1065 | @Callable(i) | |
1066 | 1066 | func createUpdateStopLoss (posId,poolId,assetId,price) = { | |
1067 | 1067 | let tokenOraclePrice = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle)) | |
1068 | 1068 | if (!(isDefined(getInteger(this, (((((poolId + "_") + toString(i.caller)) + "_") + toString(posId)) + kUserPosition))))) | |
1069 | 1069 | then throw("There are no user position") | |
1070 | 1070 | else if ((0 >= price)) | |
1071 | 1071 | then throw("Price must be greater than 0") | |
1072 | 1072 | else if ((price > tokenOraclePrice)) | |
1073 | 1073 | then throw("Price must be less than current token price") | |
1074 | 1074 | else [IntegerEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss), price)] | |
1075 | 1075 | } | |
1076 | 1076 | ||
1077 | 1077 | ||
1078 | 1078 | ||
1079 | 1079 | @Callable(i) | |
1080 | 1080 | func deleteStopLoss (posId,poolId,assetId) = if (!(isDefined(getInteger(this, (((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss))))) | |
1081 | 1081 | then throw("No entry") | |
1082 | 1082 | else [DeleteEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss))] | |
1083 | 1083 | ||
1084 | 1084 | ||
1085 | 1085 | ||
1086 | 1086 | @Callable(i) | |
1087 | 1087 | func init (moneyBoxAddr,sfFarmingAddr,lendAddr,priceOracleAddr,keeperExContract,wxSwapContract,swopAssetId,wxAssetId,adminPubKey) = if (isDefined(getString(kMoneyBox))) | |
1088 | 1088 | then throw("Already inited") | |
1089 | 1089 | 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(kAdminCallPK, adminPubKey)] | |
1090 | 1090 | ||
1091 | 1091 | ||
1092 | 1092 | ||
1093 | 1093 | @Callable(i) | |
1094 | 1094 | func createNewRequest (params) = valueOrElse(isSelfCall(i), { | |
1095 | 1095 | let newRequestId = (valueOrElse(getInteger(this, kRequestIter), 0) + 1) | |
1096 | 1096 | $Tuple2([StringEntry((toString(newRequestId) + kRequestId), params), IntegerEntry(kRequestIter, newRequestId)], newRequestId) | |
1097 | 1097 | }) | |
1098 | 1098 | ||
1099 | 1099 | ||
1100 | 1100 | ||
1101 | 1101 | @Callable(i) | |
1102 | 1102 | func replenishFromLand (requestId) = valueOrElse(isLandCall(i), { | |
1103 | - | let $ | |
1104 | - | let user = $ | |
1105 | - | let pool = $ | |
1106 | - | let pmtA = $ | |
1107 | - | let AId = $ | |
1108 | - | let pmtB = $ | |
1109 | - | let BId = $ | |
1110 | - | let balA = $ | |
1111 | - | let balB = $ | |
1112 | - | let shareId = $ | |
1113 | - | let bwAsset = $ | |
1114 | - | let bwAmount = $ | |
1103 | + | let $t03615136255 = parseRequest(requestId) | |
1104 | + | let user = $t03615136255._1 | |
1105 | + | let pool = $t03615136255._2 | |
1106 | + | let pmtA = $t03615136255._3 | |
1107 | + | let AId = $t03615136255._4 | |
1108 | + | let pmtB = $t03615136255._5 | |
1109 | + | let BId = $t03615136255._6 | |
1110 | + | let balA = $t03615136255._7 | |
1111 | + | let balB = $t03615136255._8 | |
1112 | + | let shareId = $t03615136255._9 | |
1113 | + | let bwAsset = $t03615136255._10 | |
1114 | + | let bwAmount = $t03615136255._11 | |
1115 | 1115 | if ((size(i.payments) != 1)) | |
1116 | 1116 | then throw("Wrong payment size") | |
1117 | 1117 | else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset)) | |
1118 | 1118 | then true | |
1119 | 1119 | else (i.payments[0].amount != bwAmount)) | |
1120 | 1120 | then throw("Wrong payment") | |
1121 | 1121 | else { | |
1122 | - | let $ | |
1122 | + | let $t03644536569 = if ((AId == bwAsset)) | |
1123 | 1123 | then $Tuple2((pmtA + i.payments[0].amount), pmtB) | |
1124 | 1124 | else $Tuple2(pmtA, (pmtB + i.payments[0].amount)) | |
1125 | - | let pmtAllA = $ | |
1126 | - | let pmtAllB = $ | |
1125 | + | let pmtAllA = $t03644536569._1 | |
1126 | + | let pmtAllB = $t03644536569._2 | |
1127 | 1127 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
1128 | - | let $ | |
1129 | - | let userStaked = $ | |
1130 | - | let axlyFee = $ | |
1128 | + | let $t03665136766 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId) | |
1129 | + | let userStaked = $t03665136766._1 | |
1130 | + | let axlyFee = $t03665136766._2 | |
1131 | 1131 | let posNum = getNewUserPositionNumber(user) | |
1132 | 1132 | let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)] | |
1133 | 1133 | let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true) | |
1134 | - | let $ | |
1135 | - | let wAmountA = $ | |
1136 | - | let wAmountB = $ | |
1134 | + | let $t03712637241 = calcWithdrawLPFromPoolVirt(Address(fromBase58String(pool)), pType, shareId, userStaked) | |
1135 | + | let wAmountA = $t03712637241._1 | |
1136 | + | let wAmountB = $t03712637241._2 | |
1137 | 1137 | $Tuple2((((entries ++ getCursEntries(AId, BId, shareId, [toString(wAmountA), toString(wAmountB)])) ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked) | |
1138 | 1138 | } | |
1139 | 1139 | }) | |
1140 | 1140 | ||
1141 | 1141 | ||
1142 | 1142 | ||
1143 | 1143 | @Callable(i) | |
1144 | 1144 | func liquidate (user,posId,liquidateAmount) = valueOrElse(isLandCall(i), { | |
1145 | 1145 | let pool = valueOrErrorMessage(getString(this, (((user + "_") + posId) + kUserPositionPool)), "no position") | |
1146 | 1146 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1147 | - | let $ | |
1148 | - | let AId = $ | |
1149 | - | let BId = $ | |
1150 | - | let balA = $ | |
1151 | - | let balB = $ | |
1152 | - | let shareId = $ | |
1147 | + | let $t03773637826 = getPoolData(Address(fromBase58String(pool)), pType) | |
1148 | + | let AId = $t03773637826._1 | |
1149 | + | let BId = $t03773637826._2 | |
1150 | + | let balA = $t03773637826._3 | |
1151 | + | let balB = $t03773637826._4 | |
1152 | + | let shareId = $t03773637826._5 | |
1153 | 1153 | let amount = unstakeLP(pool, pType, shareId, liquidateAmount) | |
1154 | 1154 | let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)) | |
1155 | 1155 | let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)) | |
1156 | 1156 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posId, (borrowAmount > 0)) | |
1157 | 1157 | if ((borrowAmount == 0)) | |
1158 | 1158 | then throw("You can't liquidate position without borrow") | |
1159 | 1159 | 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))] | |
1160 | 1160 | }) | |
1161 | 1161 | ||
1162 | 1162 | ||
1163 | 1163 | ||
1164 | 1164 | @Callable(i) | |
1165 | 1165 | func stopLoss (user,posId,pool,assetId) = valueOrElse(isAdminCall(i), { | |
1166 | 1166 | let tokenOraclePrice = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle)) | |
1167 | 1167 | if (!(isDefined(getInteger(this, (((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss))))) | |
1168 | 1168 | then throw("No entry") | |
1169 | 1169 | else (withdrawToUser(toString(i.caller), pool, toString(posId), true) :+ DeleteEntry((((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss))) | |
1170 | 1170 | }) | |
1171 | 1171 | ||
1172 | 1172 | ||
1173 | 1173 | ||
1174 | 1174 | @Callable(i) | |
1175 | - | func capitalizeExKeeper (pool,type,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = valueOrElse(isAdminCall(i), { | |
1176 | - | let $t03931139505 = if (claim) | |
1175 | + | func capitalizeExKeeper (pool,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = valueOrElse(isAdminCall(i), { | |
1176 | + | let type = getStringValue(this, (kPool + pool)) | |
1177 | + | let $t03961939813 = if (claim) | |
1177 | 1178 | then claimFarmed(type, pool) | |
1178 | 1179 | else { | |
1179 | 1180 | let claimedAsset = if ((type == SF_POOL)) | |
1180 | 1181 | then SWOPID | |
1181 | 1182 | else WXID | |
1182 | 1183 | $Tuple2(amountToExchange, claimedAsset) | |
1183 | 1184 | } | |
1184 | - | let claimedAmount = $ | |
1185 | - | let claimedAsset = $ | |
1185 | + | let claimedAmount = $t03961939813._1 | |
1186 | + | let claimedAsset = $t03961939813._2 | |
1186 | 1187 | let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options) | |
1187 | 1188 | let change = (claimedAmount - amountToExchange) | |
1188 | 1189 | let changeEntry = if ((change > 0)) | |
1189 | 1190 | then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))] | |
1190 | 1191 | else nil | |
1191 | 1192 | (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry) | |
1192 | 1193 | }) | |
1193 | 1194 | ||
1194 | 1195 | ||
1195 | 1196 | ||
1196 | 1197 | @Callable(i) | |
1197 | - | func capitalizeExPuzzle (pool,type,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = valueOrElse(isAdminCall(i), { | |
1198 | - | let $t04019040384 = if (claim) | |
1198 | + | func capitalizeExPuzzle (pool,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = valueOrElse(isAdminCall(i), { | |
1199 | + | let type = getStringValue(this, (kPool + pool)) | |
1200 | + | let $t04052840722 = if (claim) | |
1199 | 1201 | then claimFarmed(type, pool) | |
1200 | 1202 | else { | |
1201 | 1203 | let claimedAsset = if ((type == SF_POOL)) | |
1202 | 1204 | then SWOPID | |
1203 | 1205 | else WXID | |
1204 | 1206 | $Tuple2(amountToExchange, claimedAsset) | |
1205 | 1207 | } | |
1206 | - | let claimedAmount = $ | |
1207 | - | let claimedAsset = $ | |
1208 | + | let claimedAmount = $t04052840722._1 | |
1209 | + | let claimedAsset = $t04052840722._2 | |
1208 | 1210 | let exchangedAmount = exchangePuzzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options) | |
1209 | 1211 | let change = (claimedAmount - amountToExchange) | |
1210 | 1212 | let changeEntry = if ((change > 0)) | |
1211 | 1213 | then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))] | |
1212 | 1214 | else nil | |
1213 | 1215 | (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry) | |
1214 | 1216 | }) | |
1215 | 1217 | ||
1216 | 1218 | ||
1217 | 1219 | ||
1218 | 1220 | @Callable(i) | |
1219 | - | func capitalizeExSwopFi (pool,type,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = valueOrElse(isAdminCall(i), { | |
1220 | - | let $t04113541329 = if (claim) | |
1221 | + | func capitalizeExSwopFi (pool,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = valueOrElse(isAdminCall(i), { | |
1222 | + | let type = getStringValue(this, (kPool + pool)) | |
1223 | + | let $t04150441698 = if (claim) | |
1221 | 1224 | then claimFarmed(type, pool) | |
1222 | 1225 | else { | |
1223 | 1226 | let claimedAsset = if ((type == SF_POOL)) | |
1224 | 1227 | then SWOPID | |
1225 | 1228 | else WXID | |
1226 | 1229 | $Tuple2(amountToExchange, claimedAsset) | |
1227 | 1230 | } | |
1228 | - | let claimedAmount = $ | |
1229 | - | let claimedAsset = $ | |
1231 | + | let claimedAmount = $t04150441698._1 | |
1232 | + | let claimedAsset = $t04150441698._2 | |
1230 | 1233 | let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options) | |
1231 | 1234 | let change = (claimedAmount - amountToExchange) | |
1232 | 1235 | let changeEntry = if ((change > 0)) | |
1233 | 1236 | then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))] | |
1234 | 1237 | else nil | |
1235 | 1238 | (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry) | |
1236 | 1239 | }) | |
1237 | 1240 | ||
1238 | 1241 | ||
1239 | 1242 | ||
1240 | 1243 | @Callable(i) | |
1241 | 1244 | func initNewPool (type,poolAddr,inFeeNoLoan,inFeeLoan,capFeeNoLoan,capFeeWithLoan,stoplossFeeNoLoan,stoplossFeeWithLoan,canBorrow) = valueOrElse(isAdminCall(i), if (if ((type != SF_POOL)) | |
1242 | 1245 | then (type != WX_POOL) | |
1243 | 1246 | else false) | |
1244 | 1247 | then throw("Wrong type") | |
1245 | 1248 | else { | |
1246 | - | let $ | |
1247 | - | let aId = $ | |
1248 | - | let bId = $ | |
1249 | - | let aBal = $ | |
1250 | - | let bBal = $ | |
1251 | - | let shareId = $ | |
1249 | + | let $t04243942533 = getPoolData(Address(fromBase58String(poolAddr)), type) | |
1250 | + | let aId = $t04243942533._1 | |
1251 | + | let bId = $t04243942533._2 | |
1252 | + | let aBal = $t04243942533._3 | |
1253 | + | let bBal = $t04243942533._4 | |
1254 | + | let shareId = $t04243942533._5 | |
1252 | 1255 | [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)] | |
1253 | 1256 | }) | |
1254 | 1257 | ||
1255 | 1258 | ||
1256 | 1259 | @Verifier(tx) | |
1257 | 1260 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
1258 | 1261 |
github/deemru/w8io/026f985 181.72 ms ◑