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