tx · AzvBKi1Rn5LX2nwRd14t6BCsXiXzBeT5W435XQM3bkaV 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS: -0.03000000 Waves 2023.04.19 20:30 [2541737] smart account 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS > SELF 0.00000000 Waves
{ "type": 13, "id": "AzvBKi1Rn5LX2nwRd14t6BCsXiXzBeT5W435XQM3bkaV", "fee": 3000000, "feeAssetId": null, "timestamp": 1681925423121, "version": 2, "chainId": 84, "sender": "3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS", "senderPublicKey": "HP8sssVq1866F7CaPQJwgFrt6fsqhQjKwM84cL1wjD2a", "proofs": [ "4k714y4xfHfvCQmwXCDPw2v6XSMsWA7u7WnmAvFrqaZBcKEeiJHr25q9kMEBX7J9XocBCGy6WFemX5jGukybiUJQ" ], "script": "base64:BgJaCAISBQoDCAEIEgMKAQgSBQoDCAEIEgMKAQgSBAoCCAESAwoBCBIOCgwICAgBBBEYGBEBARgSCgoICAgIAQQIARgSDgoMCAgIAQQYGBgYGAEYEgcKBQgIAQEBRAAHU0ZfUE9PTAICU0YAB1dYX1BPT0wCAldYAAdDQVBfRkVFAgNjYXAACExPQU5fRkVFAgRsb2FuAAtOT19MT0FOX0ZFRQIGbm9Mb2FuAAZTQ0FMRTgAgMLXLwAHU0NBTEUxMACAyK+gJQAKRkVFX1NDQUxFNgDAhD0AFGtTRlBvb2xBQXNzZXRCYWxhbmNlAg9BX2Fzc2V0X2JhbGFuY2UAFGtTRlBvb2xCQXNzZXRCYWxhbmNlAg9CX2Fzc2V0X2JhbGFuY2UAD2tTRlBvb2xBQXNzZXRJZAIKQV9hc3NldF9pZAAPa1NGUG9vbEJBc3NldElkAgpCX2Fzc2V0X2lkAA5rU0ZQb29sU2hhcmVJZAIOc2hhcmVfYXNzZXRfaWQACmtTRlBvb2xGZWUCCmNvbW1pc3Npb24ADWtVc2VyUG9zaXRpb24CDl91c2VyX3Bv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CsAgIFBWtQb29sBQhwb29sQWRkcgUEdHlwZQUDbmlsAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleUPDgVI=", "height": 2541737, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 39TFbC5mtxkszWZnZGrJZdY5VTSohx4Hbh2QmrWm16oU Next: 3hoWt5UxKr2tE3ZN9Rdp28thqzX28PitvoW7kvgnDkXN Diff:
Old | New | Differences | |
---|---|---|---|
682 | 682 | let $t02216522274 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
683 | 683 | let userStaked = $t02216522274._1 | |
684 | 684 | let axlyFee = $t02216522274._2 | |
685 | - | nil | |
685 | + | $Tuple2(nil, userStaked) | |
686 | 686 | } | |
687 | 687 | } | |
688 | 688 | ||
695 | 695 | then throw("Leverage can't be <100 and >300") | |
696 | 696 | else { | |
697 | 697 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
698 | - | let $ | |
699 | - | let AId = $ | |
700 | - | let BId = $ | |
701 | - | let balA = $ | |
702 | - | let balB = $ | |
703 | - | let shareId = $ | |
704 | - | let $ | |
698 | + | let $t02260222692 = getPoolData(Address(fromBase58String(pool)), pType) | |
699 | + | let AId = $t02260222692._1 | |
700 | + | let BId = $t02260222692._2 | |
701 | + | let balA = $t02260222692._3 | |
702 | + | let balB = $t02260222692._4 | |
703 | + | let shareId = $t02260222692._5 | |
704 | + | let $t02269523332 = if ((size(i.payments) == 2)) | |
705 | 705 | then if ((assetIdToStr(i.payments[0].assetId) != AId)) | |
706 | 706 | then throw("Wrong payment asset A") | |
707 | 707 | else if ((assetIdToStr(i.payments[1].assetId) != BId)) | |
714 | 714 | then $Tuple4(0, AId, i.payments[0].amount, BId) | |
715 | 715 | else throw("Wrong payment") | |
716 | 716 | else throw("One or two payments expected") | |
717 | - | let pmtA = $ | |
718 | - | let pmtAssetA = $ | |
719 | - | let pmtB = $ | |
720 | - | let pmtAssetB = $ | |
717 | + | let pmtA = $t02269523332._1 | |
718 | + | let pmtAssetA = $t02269523332._2 | |
719 | + | let pmtB = $t02269523332._3 | |
720 | + | let pmtAssetB = $t02269523332._4 | |
721 | 721 | let newPosNum = getNewUserPositionNumber(pool, toString(i.caller)) | |
722 | 722 | if ((leverage > 100)) | |
723 | 723 | then { | |
749 | 749 | else throw("Strict value is not equal to itself.") | |
750 | 750 | } | |
751 | 751 | else { | |
752 | - | let $ | |
753 | - | let userStaked = $ | |
754 | - | let axlyFee = $ | |
752 | + | let $t02462924741 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
753 | + | let userStaked = $t02462924741._1 | |
754 | + | let axlyFee = $t02462924741._2 | |
755 | 755 | replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, pType) | |
756 | 756 | } | |
757 | 757 | } | |
760 | 760 | ||
761 | 761 | @Callable(i) | |
762 | 762 | func replenishFromLand (requestId) = { | |
763 | - | let $ | |
764 | - | let user = $ | |
765 | - | let pool = $ | |
766 | - | let pmtA = $ | |
767 | - | let AId = $ | |
768 | - | let pmtB = $ | |
769 | - | let BId = $ | |
770 | - | let balA = $ | |
771 | - | let balB = $ | |
772 | - | let shareId = $ | |
773 | - | let bwAsset = $ | |
774 | - | let bwAmount = $ | |
763 | + | let $t02490325007 = parseRequest(requestId) | |
764 | + | let user = $t02490325007._1 | |
765 | + | let pool = $t02490325007._2 | |
766 | + | let pmtA = $t02490325007._3 | |
767 | + | let AId = $t02490325007._4 | |
768 | + | let pmtB = $t02490325007._5 | |
769 | + | let BId = $t02490325007._6 | |
770 | + | let balA = $t02490325007._7 | |
771 | + | let balB = $t02490325007._8 | |
772 | + | let shareId = $t02490325007._9 | |
773 | + | let bwAsset = $t02490325007._10 | |
774 | + | let bwAmount = $t02490325007._11 | |
775 | 775 | if ((size(i.payments) != 1)) | |
776 | 776 | then throw("Wrong payment size") | |
777 | 777 | else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset)) | |
779 | 779 | else (i.payments[0].amount != bwAmount)) | |
780 | 780 | then throw("Wrong payment") | |
781 | 781 | else { | |
782 | - | let $ | |
782 | + | let $t02519725321 = if ((AId == bwAsset)) | |
783 | 783 | then $Tuple2((pmtA + i.payments[0].amount), pmtB) | |
784 | 784 | else $Tuple2(pmtA, (pmtB + i.payments[0].amount)) | |
785 | - | let pmtAllA = $ | |
786 | - | let pmtAllB = $ | |
785 | + | let pmtAllA = $t02519725321._1 | |
786 | + | let pmtAllB = $t02519725321._2 | |
787 | 787 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
788 | - | let $ | |
789 | - | let userStaked = $ | |
790 | - | let axlyFee = $ | |
788 | + | let $t02540325512 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
789 | + | let userStaked = $t02540325512._1 | |
790 | + | let axlyFee = $t02540325512._2 | |
791 | 791 | let posNum = getNewUserPositionNumber(pool, toString(i.caller)) | |
792 | 792 | let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)] | |
793 | 793 | let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType) | |
816 | 816 | else throw(($getType(@) + " couldn't be cast to Int")) | |
817 | 817 | } | |
818 | 818 | else 0 | |
819 | - | let $ | |
820 | - | if (($ | |
819 | + | let $t02695427074 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset) | |
820 | + | if (($t02695427074 == $t02695427074)) | |
821 | 821 | then { | |
822 | - | let assetIdB = $ | |
823 | - | let toUserAmountB = $ | |
824 | - | let assetIdA = $ | |
825 | - | let toUserAmountA = $ | |
822 | + | let assetIdB = $t02695427074._4 | |
823 | + | let toUserAmountB = $t02695427074._3 | |
824 | + | let assetIdA = $t02695427074._2 | |
825 | + | let toUserAmountA = $t02695427074._1 | |
826 | 826 | let closeDbtInv = if ((debt > 0)) | |
827 | 827 | then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + toString(posId))], [AttachedPayment(assetIdFromStr(borrowAsset), debt)]) | |
828 | 828 | else 0 | |
845 | 845 | ||
846 | 846 | @Callable(i) | |
847 | 847 | func capitalizeExKeeper (pool,type,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = { | |
848 | - | let $ | |
848 | + | let $t02837128565 = if (claim) | |
849 | 849 | then claimFarmed(type, pool) | |
850 | 850 | else { | |
851 | 851 | let claimedAsset = if ((type == SF_POOL)) | |
853 | 853 | else WXID | |
854 | 854 | $Tuple2(amountToExchange, claimedAsset) | |
855 | 855 | } | |
856 | - | let claimedAmount = $ | |
857 | - | let claimedAsset = $ | |
856 | + | let claimedAmount = $t02837128565._1 | |
857 | + | let claimedAsset = $t02837128565._2 | |
858 | 858 | let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options) | |
859 | 859 | let change = (claimedAmount - amountToExchange) | |
860 | 860 | let changeEntry = if ((change > 0)) | |
867 | 867 | ||
868 | 868 | @Callable(i) | |
869 | 869 | func capitalizeExPazzle (pool,type,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = { | |
870 | - | let $ | |
870 | + | let $t02922129415 = if (claim) | |
871 | 871 | then claimFarmed(type, pool) | |
872 | 872 | else { | |
873 | 873 | let claimedAsset = if ((type == SF_POOL)) | |
875 | 875 | else WXID | |
876 | 876 | $Tuple2(amountToExchange, claimedAsset) | |
877 | 877 | } | |
878 | - | let claimedAmount = $ | |
879 | - | let claimedAsset = $ | |
878 | + | let claimedAmount = $t02922129415._1 | |
879 | + | let claimedAsset = $t02922129415._2 | |
880 | 880 | let exchangedAmount = exchangePazzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options) | |
881 | 881 | let change = (claimedAmount - amountToExchange) | |
882 | 882 | let changeEntry = if ((change > 0)) | |
889 | 889 | ||
890 | 890 | @Callable(i) | |
891 | 891 | func capitalizeExSwopFi (pool,type,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = { | |
892 | - | let $ | |
892 | + | let $t03013830332 = if (claim) | |
893 | 893 | then claimFarmed(type, pool) | |
894 | 894 | else { | |
895 | 895 | let claimedAsset = if ((type == SF_POOL)) | |
897 | 897 | else WXID | |
898 | 898 | $Tuple2(amountToExchange, claimedAsset) | |
899 | 899 | } | |
900 | - | let claimedAmount = $ | |
901 | - | let claimedAsset = $ | |
900 | + | let claimedAmount = $t03013830332._1 | |
901 | + | let claimedAsset = $t03013830332._2 | |
902 | 902 | let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options) | |
903 | 903 | let change = (claimedAmount - amountToExchange) | |
904 | 904 | let changeEntry = if ((change > 0)) |
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 = "cap" | |
9 | 9 | ||
10 | 10 | let LOAN_FEE = "loan" | |
11 | 11 | ||
12 | 12 | let NO_LOAN_FEE = "noLoan" | |
13 | 13 | ||
14 | 14 | let SCALE8 = 100000000 | |
15 | 15 | ||
16 | 16 | let SCALE10 = 10000000000 | |
17 | 17 | ||
18 | 18 | let FEE_SCALE6 = 1000000 | |
19 | 19 | ||
20 | 20 | let kSFPoolAAssetBalance = "A_asset_balance" | |
21 | 21 | ||
22 | 22 | let kSFPoolBAssetBalance = "B_asset_balance" | |
23 | 23 | ||
24 | 24 | let kSFPoolAAssetId = "A_asset_id" | |
25 | 25 | ||
26 | 26 | let kSFPoolBAssetId = "B_asset_id" | |
27 | 27 | ||
28 | 28 | let kSFPoolShareId = "share_asset_id" | |
29 | 29 | ||
30 | 30 | let kSFPoolFee = "commission" | |
31 | 31 | ||
32 | 32 | let kUserPosition = "_user_position" | |
33 | 33 | ||
34 | 34 | let kUserBorrowAmount = "_user_position_borrow_amount" | |
35 | 35 | ||
36 | 36 | let kUserBorrowAssetId = "_user_position_borrow_asset_id" | |
37 | 37 | ||
38 | 38 | let kUserPositionNum = "_user_position_number" | |
39 | 39 | ||
40 | 40 | let kUserPositionInterest = "_user_position_interest" | |
41 | 41 | ||
42 | 42 | let kPoolTotal = "_pool_total" | |
43 | 43 | ||
44 | 44 | let kPoolInterest = "_pool_interest" | |
45 | 45 | ||
46 | 46 | let kAxlyInFeeWithoutLoan = "_axly_fee_without_loan" | |
47 | 47 | ||
48 | 48 | let kAxlyInFeeWithLoan = "_axly_fee_with_loan" | |
49 | 49 | ||
50 | 50 | let kAxlyCapFee = "_axly_fee_cap" | |
51 | 51 | ||
52 | 52 | let kRequestId = "_request_id" | |
53 | 53 | ||
54 | 54 | let kRequestIter = "requests_iter" | |
55 | 55 | ||
56 | 56 | let kPool = "pool_" | |
57 | 57 | ||
58 | 58 | let kPoolCapChange = "_pool_cap_change" | |
59 | 59 | ||
60 | 60 | let kMoneyBox = "axly_money_box" | |
61 | 61 | ||
62 | 62 | let kSFFarmingAddr = "swopfi_farming_addr" | |
63 | 63 | ||
64 | 64 | let kLendService = "lend_service_addr" | |
65 | 65 | ||
66 | 66 | let kPriceOracle = "price_oracle" | |
67 | 67 | ||
68 | 68 | let kExContract = "exchange_contract" | |
69 | 69 | ||
70 | 70 | let kWxSwapContract = "wx_swap_contract" | |
71 | 71 | ||
72 | 72 | let moneyBox = Address(fromBase58String(valueOrErrorMessage(getString(this, kMoneyBox), "No axly moneyBox address"))) | |
73 | 73 | ||
74 | 74 | let exContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kExContract), "No exchange contract address"))) | |
75 | 75 | ||
76 | 76 | let priceOracleAddr = Address(fromBase58String(valueOrErrorMessage(getString(this, kPriceOracle), "No price oracle address"))) | |
77 | 77 | ||
78 | 78 | let wxSwapContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kWxSwapContract), "No wx swap address"))) | |
79 | 79 | ||
80 | 80 | let SWOPID = base58'4W19ndijcc2CsQa9HGW2dfXKTVXhnneWWttxXrtjPmEp' | |
81 | 81 | ||
82 | 82 | let WXID = base58'EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc' | |
83 | 83 | ||
84 | 84 | func isSelfCall (i) = if ((i.caller == this)) | |
85 | 85 | then unit | |
86 | 86 | else throw("Only contract itself can call this function") | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func accountBalance (assetId) = match assetId { | |
90 | 90 | case id: ByteVector => | |
91 | 91 | assetBalance(this, id) | |
92 | 92 | case waves: Unit => | |
93 | 93 | wavesBalance(this).available | |
94 | 94 | case _ => | |
95 | 95 | throw("Match error") | |
96 | 96 | } | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | 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")) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func getWXPoolData (poolAddr) = { | |
103 | 103 | let cfg = { | |
104 | 104 | let @ = invoke(poolAddr, "getPoolConfigWrapperREADONLY", nil, nil) | |
105 | 105 | if ($isInstanceOf(@, "List[Any]")) | |
106 | 106 | then @ | |
107 | 107 | else throw(($getType(@) + " couldn't be cast to List[Any]")) | |
108 | 108 | } | |
109 | 109 | if ((cfg == cfg)) | |
110 | 110 | then $Tuple5(valueOrErrorMessage({ | |
111 | 111 | let @ = cfg[4] | |
112 | 112 | if ($isInstanceOf(@, "String")) | |
113 | 113 | then @ | |
114 | 114 | else unit | |
115 | 115 | }, "Can't get pool A asset id"), valueOrErrorMessage({ | |
116 | 116 | let @ = cfg[5] | |
117 | 117 | if ($isInstanceOf(@, "String")) | |
118 | 118 | then @ | |
119 | 119 | else unit | |
120 | 120 | }, "Can't get pool B asset id"), 0, 0, valueOrErrorMessage({ | |
121 | 121 | let @ = cfg[3] | |
122 | 122 | if ($isInstanceOf(@, "String")) | |
123 | 123 | then @ | |
124 | 124 | else unit | |
125 | 125 | }, "Can't get pool LP asset id")) | |
126 | 126 | else throw("Strict value is not equal to itself.") | |
127 | 127 | } | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func getPoolData (poolAddr,type) = if ((type == SF_POOL)) | |
131 | 131 | then getSFPoolData(poolAddr) | |
132 | 132 | else if ((type == WX_POOL)) | |
133 | 133 | then getWXPoolData(poolAddr) | |
134 | 134 | else throw("Wrong pool type") | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func getPoolTotalShare (pool) = valueOrElse(getInteger(this, (pool + kPoolTotal)), 0) | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func getNewUserPositionNumber (pool,user) = (valueOrElse(getInteger(this, (((pool + "_") + user) + kUserPositionNum)), 0) + 1) | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | func getAxlyFee (pool,feeType) = if ((feeType == "cap")) | |
144 | 144 | then getIntegerValue(this, (pool + kAxlyCapFee)) | |
145 | 145 | else if ((feeType == "loan")) | |
146 | 146 | then getIntegerValue(this, (pool + kAxlyInFeeWithLoan)) | |
147 | 147 | else if ((feeType == "noLoan")) | |
148 | 148 | then getIntegerValue(this, (pool + kAxlyInFeeWithoutLoan)) | |
149 | 149 | else throw("Wrong fee type") | |
150 | 150 | ||
151 | 151 | ||
152 | 152 | func getSFFarmingAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kSFFarmingAddr), "Can't get swopfi farming addr"))) | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | func getWXFarmingAddr (poolAddr) = { | |
156 | 156 | let fContract = Address(fromBase58String(valueOrErrorMessage(getString(poolAddr, "%s__factoryContract"), "Can't get WX factory contract addr"))) | |
157 | 157 | let factroyCfg = split(valueOrErrorMessage(getString(fContract, "%s__factoryConfig"), "Can't get WX factory cfg"), "__") | |
158 | 158 | Address(fromBase58String(factroyCfg[1])) | |
159 | 159 | } | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func getLendSrvAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kLendService), "Can't get lend service addr"))) | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | func assetIdToStr (assetId) = match assetId { | |
166 | 166 | case id: ByteVector => | |
167 | 167 | toBase58String(id) | |
168 | 168 | case waves: Unit => | |
169 | 169 | "WAVES" | |
170 | 170 | case _ => | |
171 | 171 | throw("Match error") | |
172 | 172 | } | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | func assetIdFromStr (assetId) = if ((assetId == "WAVES")) | |
176 | 176 | then unit | |
177 | 177 | else fromBase58String(assetId) | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | func getAssetDecimals (assetId) = if ((assetId == "WAVES")) | |
181 | 181 | then 8 | |
182 | 182 | else match assetInfo(fromBase58String(assetId)) { | |
183 | 183 | case asset: Asset => | |
184 | 184 | asset.decimals | |
185 | 185 | case _ => | |
186 | 186 | throw("Can't find asset") | |
187 | 187 | } | |
188 | 188 | ||
189 | 189 | ||
190 | 190 | func replenishSwopFi (pool,feeType,pmtA,pmtAssetA,pmtB,pmtAssetB,balA,balB,shareId) = { | |
191 | 191 | let shareBalanceBefore = accountBalance(fromBase58String(shareId)) | |
192 | 192 | if ((shareBalanceBefore == shareBalanceBefore)) | |
193 | 193 | then { | |
194 | 194 | let poolAddr = Address(fromBase58String(pool)) | |
195 | 195 | let ratioA = fraction(SCALE8, pmtA, balA) | |
196 | 196 | let ratioB = fraction(SCALE8, pmtB, balB) | |
197 | 197 | let $t063976689 = if ((ratioB > ratioA)) | |
198 | 198 | then { | |
199 | 199 | let pmt = fraction(balB, ratioA, SCALE8, CEILING) | |
200 | 200 | $Tuple4(pmtA, pmt, (pmtB - pmt), pmtAssetB) | |
201 | 201 | } | |
202 | 202 | else { | |
203 | 203 | let pmt = fraction(balA, ratioB, SCALE8, CEILING) | |
204 | 204 | $Tuple4(pmt, pmtB, (pmtA - pmt), pmtAssetA) | |
205 | 205 | } | |
206 | 206 | let pmtAmountA = $t063976689._1 | |
207 | 207 | let pmtAmountB = $t063976689._2 | |
208 | 208 | let change = $t063976689._3 | |
209 | 209 | let changeAssetId = $t063976689._4 | |
210 | 210 | let inv1 = if (if ((pmtAmountA > 0)) | |
211 | 211 | then (pmtAmountB > 0) | |
212 | 212 | else false) | |
213 | 213 | then { | |
214 | 214 | let payments = [AttachedPayment(assetIdFromStr(pmtAssetA), pmtAmountA), AttachedPayment(assetIdFromStr(pmtAssetB), pmtAmountB)] | |
215 | 215 | invoke(poolAddr, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], payments) | |
216 | 216 | } | |
217 | 217 | else 0 | |
218 | 218 | if ((inv1 == inv1)) | |
219 | 219 | then { | |
220 | 220 | let inv2 = if ((change > 0)) | |
221 | 221 | then { | |
222 | 222 | let payments = [AttachedPayment(assetIdFromStr(changeAssetId), change)] | |
223 | 223 | let vars = ["0", "false", "0"] | |
224 | 224 | invoke(poolAddr, "callFunction", ["replenishWithOneToken", vars], payments) | |
225 | 225 | } | |
226 | 226 | else 0 | |
227 | 227 | if ((inv2 == inv2)) | |
228 | 228 | then { | |
229 | 229 | let shareBalanceAfter = accountBalance(fromBase58String(shareId)) | |
230 | 230 | let totalStaked = (shareBalanceAfter - shareBalanceBefore) | |
231 | 231 | let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6) | |
232 | 232 | let userShareForStake = (totalStaked - axlyFeeAmount) | |
233 | 233 | if ((0 >= userShareForStake)) | |
234 | 234 | then throw("amount of staked sharetokens must be > 0") | |
235 | 235 | else { | |
236 | 236 | let inv3 = invoke(getSFFarmingAddr(), "lockShareTokens", [pool, 0], [AttachedPayment(fromBase58String(shareId), userShareForStake)]) | |
237 | 237 | if ((inv3 == inv3)) | |
238 | 238 | then $Tuple2(userShareForStake, axlyFeeAmount) | |
239 | 239 | else throw("Strict value is not equal to itself.") | |
240 | 240 | } | |
241 | 241 | } | |
242 | 242 | else throw("Strict value is not equal to itself.") | |
243 | 243 | } | |
244 | 244 | else throw("Strict value is not equal to itself.") | |
245 | 245 | } | |
246 | 246 | else throw("Strict value is not equal to itself.") | |
247 | 247 | } | |
248 | 248 | ||
249 | 249 | ||
250 | 250 | func replenishWX (pool,feeType,pmtA,pmtAssetA,pmtB,pmtAssetB,shareId) = { | |
251 | 251 | let poolAddr = Address(fromBase58String(pool)) | |
252 | 252 | let $t081408989 = if (if ((pmtA > 0)) | |
253 | 253 | then (pmtB > 0) | |
254 | 254 | else false) | |
255 | 255 | then { | |
256 | 256 | let evalPutInA = split({ | |
257 | 257 | let @ = invoke(poolAddr, "evaluatePutByAmountAssetREADONLY", [pmtA], nil) | |
258 | 258 | if ($isInstanceOf(@, "String")) | |
259 | 259 | then @ | |
260 | 260 | else throw(($getType(@) + " couldn't be cast to String")) | |
261 | 261 | }, "__") | |
262 | 262 | if ((evalPutInA == evalPutInA)) | |
263 | 263 | then { | |
264 | 264 | let evalPutInB = split({ | |
265 | 265 | let @ = invoke(poolAddr, "evaluatePutByPriceAssetREADONLY", [pmtB], nil) | |
266 | 266 | if ($isInstanceOf(@, "String")) | |
267 | 267 | then @ | |
268 | 268 | else throw(($getType(@) + " couldn't be cast to String")) | |
269 | 269 | }, "__") | |
270 | 270 | if ((evalPutInB == evalPutInB)) | |
271 | 271 | then { | |
272 | 272 | let lpInA = parseIntValue(evalPutInA[1]) | |
273 | 273 | let lpInB = parseIntValue(evalPutInB[1]) | |
274 | 274 | if ((lpInB > lpInA)) | |
275 | 275 | then { | |
276 | 276 | let pmtInB = parseIntValue(evalPutInA[8]) | |
277 | 277 | $Tuple4(pmtA, pmtInB, (pmtB - pmtInB), pmtAssetB) | |
278 | 278 | } | |
279 | 279 | else { | |
280 | 280 | let pmtInA = parseIntValue(evalPutInB[7]) | |
281 | 281 | $Tuple4(pmtInA, pmtB, (pmtA - pmtInA), pmtAssetA) | |
282 | 282 | } | |
283 | 283 | } | |
284 | 284 | else throw("Strict value is not equal to itself.") | |
285 | 285 | } | |
286 | 286 | else throw("Strict value is not equal to itself.") | |
287 | 287 | } | |
288 | 288 | else if ((pmtA > 0)) | |
289 | 289 | then $Tuple4(pmtA, pmtB, pmtA, pmtAssetA) | |
290 | 290 | else if ((pmtB > 0)) | |
291 | 291 | then $Tuple4(pmtA, pmtB, pmtB, pmtAssetB) | |
292 | 292 | else throw("pmts must be > 0") | |
293 | 293 | let pmtAmountA = $t081408989._1 | |
294 | 294 | let pmtAmountB = $t081408989._2 | |
295 | 295 | let change = $t081408989._3 | |
296 | 296 | let changeAssetId = $t081408989._4 | |
297 | 297 | let shareBalanceBefore = accountBalance(fromBase58String(shareId)) | |
298 | 298 | if ((shareBalanceBefore == shareBalanceBefore)) | |
299 | 299 | then { | |
300 | 300 | let inv1 = if (if ((pmtAmountA > 0)) | |
301 | 301 | then (pmtAmountB > 0) | |
302 | 302 | else false) | |
303 | 303 | then { | |
304 | 304 | let payments = [AttachedPayment(assetIdFromStr(pmtAssetA), pmtAmountA), AttachedPayment(assetIdFromStr(pmtAssetB), pmtAmountB)] | |
305 | 305 | invoke(poolAddr, "put", [1000000, false], payments) | |
306 | 306 | } | |
307 | 307 | else 0 | |
308 | 308 | if ((inv1 == inv1)) | |
309 | 309 | then { | |
310 | 310 | let inv2 = if ((change > 0)) | |
311 | 311 | then { | |
312 | 312 | let payments = [AttachedPayment(assetIdFromStr(changeAssetId), change)] | |
313 | 313 | invoke(poolAddr, "putOneTkn", [0, false], payments) | |
314 | 314 | } | |
315 | 315 | else 0 | |
316 | 316 | if ((inv2 == inv2)) | |
317 | 317 | then { | |
318 | 318 | let shareBalanceAfter = accountBalance(fromBase58String(shareId)) | |
319 | 319 | let totalStaked = (shareBalanceAfter - shareBalanceBefore) | |
320 | 320 | let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6) | |
321 | 321 | let userShareForStake = (totalStaked - axlyFeeAmount) | |
322 | 322 | if ((0 >= userShareForStake)) | |
323 | 323 | then throw("amount of staked sharetokens must be > 0") | |
324 | 324 | else { | |
325 | 325 | let inv3 = invoke(getWXFarmingAddr(poolAddr), "stake", nil, [AttachedPayment(fromBase58String(shareId), userShareForStake)]) | |
326 | 326 | if ((inv3 == inv3)) | |
327 | 327 | then $Tuple2(userShareForStake, axlyFeeAmount) | |
328 | 328 | else throw("Strict value is not equal to itself.") | |
329 | 329 | } | |
330 | 330 | } | |
331 | 331 | else throw("Strict value is not equal to itself.") | |
332 | 332 | } | |
333 | 333 | else throw("Strict value is not equal to itself.") | |
334 | 334 | } | |
335 | 335 | else throw("Strict value is not equal to itself.") | |
336 | 336 | } | |
337 | 337 | ||
338 | 338 | ||
339 | 339 | func replenishByType (type,pool,feeType,pmtA,AId,pmtB,BId,balA,balB,shareId) = if ((type == SF_POOL)) | |
340 | 340 | then replenishSwopFi(pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
341 | 341 | else if ((type == WX_POOL)) | |
342 | 342 | then replenishWX(pool, LOAN_FEE, pmtA, AId, pmtB, BId, shareId) | |
343 | 343 | else throw("Wrong pool type") | |
344 | 344 | ||
345 | 345 | ||
346 | 346 | func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type) = { | |
347 | 347 | let totalAmount = getPoolTotalShare(pool) | |
348 | 348 | let curPoolInterest = getIntegerValue(this, (pool + kPoolInterest)) | |
349 | 349 | [IntegerEntry((pool + kPoolTotal), (totalAmount + stakedAmount)), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPosition), stakedAmount), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPositionInterest), curPoolInterest), IntegerEntry((((pool + "_") + user) + kUserPositionNum), posNum), ScriptTransfer(moneyBox, axlyFeeAmount, fromBase58String(shareId))] | |
350 | 350 | } | |
351 | 351 | ||
352 | 352 | ||
353 | 353 | func claimFarmed (type,pool) = if ((type == SF_POOL)) | |
354 | 354 | then { | |
355 | 355 | let balBefore = accountBalance(SWOPID) | |
356 | 356 | if ((balBefore == balBefore)) | |
357 | 357 | then { | |
358 | 358 | let inv = invoke(getSFFarmingAddr(), "claim", [pool], nil) | |
359 | 359 | if ((inv == inv)) | |
360 | 360 | then { | |
361 | 361 | let balAfter = accountBalance(SWOPID) | |
362 | 362 | $Tuple2((balAfter - balBefore), SWOPID) | |
363 | 363 | } | |
364 | 364 | else throw("Strict value is not equal to itself.") | |
365 | 365 | } | |
366 | 366 | else throw("Strict value is not equal to itself.") | |
367 | 367 | } | |
368 | 368 | else if ((type == WX_POOL)) | |
369 | 369 | then { | |
370 | 370 | let balBefore = accountBalance(WXID) | |
371 | 371 | if ((balBefore == balBefore)) | |
372 | 372 | then { | |
373 | 373 | let inv = invoke(getWXFarmingAddr(Address(fromBase58String(pool))), "claimWX", [pool], nil) | |
374 | 374 | if ((inv == inv)) | |
375 | 375 | then { | |
376 | 376 | let balAfter = accountBalance(WXID) | |
377 | 377 | $Tuple2((balAfter - balBefore), WXID) | |
378 | 378 | } | |
379 | 379 | else throw("Strict value is not equal to itself.") | |
380 | 380 | } | |
381 | 381 | else throw("Strict value is not equal to itself.") | |
382 | 382 | } | |
383 | 383 | else throw("Wrong pool type") | |
384 | 384 | ||
385 | 385 | ||
386 | 386 | func exchangeKeeper (toToken,pmtAmount,pmtAsset,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = { | |
387 | 387 | let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken)) | |
388 | 388 | if ((tokenBalanceBefore == tokenBalanceBefore)) | |
389 | 389 | then { | |
390 | 390 | let inv = invoke(exContract, "swap", [amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options], [AttachedPayment(pmtAsset, pmtAmount)]) | |
391 | 391 | if ((inv == inv)) | |
392 | 392 | then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore) | |
393 | 393 | else throw("Strict value is not equal to itself.") | |
394 | 394 | } | |
395 | 395 | else throw("Strict value is not equal to itself.") | |
396 | 396 | } | |
397 | 397 | ||
398 | 398 | ||
399 | 399 | func exchangePazzle (toToken,pmtAmount,pmtAsset,routesStr,minToReceive,options) = { | |
400 | 400 | let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken)) | |
401 | 401 | if ((tokenBalanceBefore == tokenBalanceBefore)) | |
402 | 402 | then { | |
403 | 403 | let inv = invoke(exContract, "puzzleSwap", [routesStr, minToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)]) | |
404 | 404 | if ((inv == inv)) | |
405 | 405 | then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore) | |
406 | 406 | else throw("Strict value is not equal to itself.") | |
407 | 407 | } | |
408 | 408 | else throw("Strict value is not equal to itself.") | |
409 | 409 | } | |
410 | 410 | ||
411 | 411 | ||
412 | 412 | func exchangeSwopFi (toToken,pmtAmount,pmtAsset,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = { | |
413 | 413 | let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken)) | |
414 | 414 | if ((tokenBalanceBefore == tokenBalanceBefore)) | |
415 | 415 | then { | |
416 | 416 | let inv = invoke(exContract, "swopfiSwap", [exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)]) | |
417 | 417 | if ((inv == inv)) | |
418 | 418 | then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore) | |
419 | 419 | else throw("Strict value is not equal to itself.") | |
420 | 420 | } | |
421 | 421 | else throw("Strict value is not equal to itself.") | |
422 | 422 | } | |
423 | 423 | ||
424 | 424 | ||
425 | 425 | func capitalize (pool,pType,tokenId,tokenAmount) = { | |
426 | 426 | let poolAddr = Address(fromBase58String(pool)) | |
427 | 427 | let $t01382413903 = getPoolData(poolAddr, pType) | |
428 | 428 | let AId = $t01382413903._1 | |
429 | 429 | let BId = $t01382413903._2 | |
430 | 430 | let balA = $t01382413903._3 | |
431 | 431 | let balB = $t01382413903._4 | |
432 | 432 | let shareId = $t01382413903._5 | |
433 | 433 | let $t01390613986 = if ((tokenId == AId)) | |
434 | 434 | then $Tuple2(tokenAmount, 0) | |
435 | 435 | else $Tuple2(0, tokenAmount) | |
436 | 436 | let pmtA = $t01390613986._1 | |
437 | 437 | let pmtB = $t01390613986._2 | |
438 | 438 | let $t01398914099 = replenishByType(pType, pool, CAP_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
439 | 439 | let stakedAmount = $t01398914099._1 | |
440 | 440 | let axlyFee = $t01398914099._2 | |
441 | 441 | let curPoolInterest = valueOrElse(getInteger(this, (pool + kPoolInterest)), 0) | |
442 | 442 | let totalShareAmount = getPoolTotalShare(pool) | |
443 | 443 | let newInterest = (curPoolInterest + fraction(stakedAmount, SCALE10, totalShareAmount)) | |
444 | 444 | [IntegerEntry((pool + kPoolInterest), newInterest), ScriptTransfer(moneyBox, axlyFee, fromBase58String(shareId))] | |
445 | 445 | } | |
446 | 446 | ||
447 | 447 | ||
448 | 448 | func exchangeDirectlySF (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = { | |
449 | 449 | let poolAddr = Address(fromBase58String(pool)) | |
450 | 450 | let feeScale6 = 1000000 | |
451 | 451 | let fee = getIntegerValue(poolAddr, kSFPoolFee) | |
452 | 452 | let amntGetNoFee = fraction(amountTokenToGet, feeScale6, (feeScale6 - fee)) | |
453 | 453 | let $t01479215080 = if ((assetTokenToGet == assetIdA)) | |
454 | 454 | then { | |
455 | 455 | let amountToPay = fraction(balA, amntGetNoFee, (balB - amntGetNoFee)) | |
456 | 456 | $Tuple2(amountToPay, assetIdB) | |
457 | 457 | } | |
458 | 458 | else { | |
459 | 459 | let amountToPay = fraction(balB, amntGetNoFee, (balA - amntGetNoFee)) | |
460 | 460 | $Tuple2(amountToPay, assetIdA) | |
461 | 461 | } | |
462 | 462 | let amountToPay = $t01479215080._1 | |
463 | 463 | let assetToPay = $t01479215080._2 | |
464 | 464 | invoke(poolAddr, "callFunction", ["exchange", ["1"]], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)]) | |
465 | 465 | } | |
466 | 466 | ||
467 | 467 | ||
468 | 468 | func exchangeDirectlyWX (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = { | |
469 | 469 | let poolAddr = Address(fromBase58String(pool)) | |
470 | 470 | let prFee = getIntegerValue(wxSwapContract, "%s__protocolFee") | |
471 | 471 | let pFee = getIntegerValue(wxSwapContract, "%s__poolFee") | |
472 | 472 | let feeScale = toBigInt(100000000) | |
473 | 473 | let $t01555915867 = if ((assetTokenToGet == assetIdA)) | |
474 | 474 | then { | |
475 | 475 | let amountToPay = fraction(balA, amountTokenToGet, (balB - amountTokenToGet)) | |
476 | 476 | $Tuple2(amountToPay, assetIdB) | |
477 | 477 | } | |
478 | 478 | else { | |
479 | 479 | let amountToPay = fraction(balB, amountTokenToGet, (balA - amountTokenToGet)) | |
480 | 480 | $Tuple2(amountToPay, assetIdA) | |
481 | 481 | } | |
482 | 482 | let amountToPay = $t01555915867._1 | |
483 | 483 | let assetToPay = $t01555915867._2 | |
484 | 484 | let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee))))) | |
485 | 485 | invoke(wxSwapContract, "swap", [1, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPayWithFee)]) | |
486 | 486 | } | |
487 | 487 | ||
488 | 488 | ||
489 | 489 | func exchangeDirectly (type,pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = if ((type == SF_POOL)) | |
490 | 490 | then exchangeDirectlySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet) | |
491 | 491 | else exchangeDirectlyWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet) | |
492 | 492 | ||
493 | 493 | ||
494 | 494 | func withdrawAmountCalc (pool,userCanWithdraw,debt,borrowAsset) = { | |
495 | 495 | let poolAddr = Address(fromBase58String(pool)) | |
496 | 496 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
497 | 497 | let $t01673216799 = getPoolData(poolAddr, pType) | |
498 | 498 | let assetIdA = $t01673216799._1 | |
499 | 499 | let assetIdB = $t01673216799._2 | |
500 | 500 | let balA = $t01673216799._3 | |
501 | 501 | let balB = $t01673216799._4 | |
502 | 502 | let cBalABefore = accountBalance(assetIdFromStr(assetIdA)) | |
503 | 503 | if ((cBalABefore == cBalABefore)) | |
504 | 504 | then { | |
505 | 505 | let cBalBBefore = accountBalance(assetIdFromStr(assetIdB)) | |
506 | 506 | if ((cBalBBefore == cBalBBefore)) | |
507 | 507 | then { | |
508 | 508 | let inv = if ((pType == SF_POOL)) | |
509 | 509 | then invoke(poolAddr, "callFunction", ["withdraw", [toString(userCanWithdraw)]], nil) | |
510 | 510 | else if ((pType == WX_POOL)) | |
511 | 511 | then invoke(poolAddr, "unstakeAndGet", [userCanWithdraw], nil) | |
512 | 512 | else throw("Wrong position type") | |
513 | 513 | if ((inv == inv)) | |
514 | 514 | then { | |
515 | 515 | let cBalAAfter = accountBalance(assetIdFromStr(assetIdA)) | |
516 | 516 | let cBalBAfter = accountBalance(assetIdFromStr(assetIdB)) | |
517 | 517 | let $t01731117400 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore)) | |
518 | 518 | let tokensAmountA = $t01731117400._1 | |
519 | 519 | let tokensAmountB = $t01731117400._2 | |
520 | 520 | let $t01740318099 = if ((debt > 0)) | |
521 | 521 | then { | |
522 | 522 | let amountToGetEx = if (if ((borrowAsset == assetIdA)) | |
523 | 523 | then (debt > tokensAmountA) | |
524 | 524 | else false) | |
525 | 525 | then (debt - tokensAmountA) | |
526 | 526 | else if (if ((borrowAsset == assetIdB)) | |
527 | 527 | then (debt > tokensAmountB) | |
528 | 528 | else false) | |
529 | 529 | then (debt - tokensAmountB) | |
530 | 530 | else 0 | |
531 | 531 | let exInv = if ((amountToGetEx > 0)) | |
532 | 532 | then exchangeDirectly(pType, pool, assetIdA, assetIdB, balA, balB, amountToGetEx, borrowAsset) | |
533 | 533 | else 0 | |
534 | 534 | if ((exInv == exInv)) | |
535 | 535 | then { | |
536 | 536 | let cBalAAfterRepay = accountBalance(assetIdFromStr(assetIdA)) | |
537 | 537 | let cBalBAfterRepay = accountBalance(assetIdFromStr(assetIdB)) | |
538 | 538 | $Tuple2((cBalAAfterRepay - cBalABefore), (cBalBAfterRepay - cBalBBefore)) | |
539 | 539 | } | |
540 | 540 | else throw("Strict value is not equal to itself.") | |
541 | 541 | } | |
542 | 542 | else $Tuple2(tokensAmountA, tokensAmountB) | |
543 | 543 | let toUserAmountA = $t01740318099._1 | |
544 | 544 | let toUserAmountB = $t01740318099._2 | |
545 | 545 | $Tuple4(toUserAmountA, assetIdA, toUserAmountB, assetIdB) | |
546 | 546 | } | |
547 | 547 | else throw("Strict value is not equal to itself.") | |
548 | 548 | } | |
549 | 549 | else throw("Strict value is not equal to itself.") | |
550 | 550 | } | |
551 | 551 | else throw("Strict value is not equal to itself.") | |
552 | 552 | } | |
553 | 553 | ||
554 | 554 | ||
555 | 555 | func parseRequest (requestId) = { | |
556 | 556 | let request = split(valueOrErrorMessage(getString(this, (requestId + kRequestId)), ("No request with id " + requestId)), ",") | |
557 | 557 | let user = request[0] | |
558 | 558 | let pool = request[1] | |
559 | 559 | let pmtA = parseIntValue(request[2]) | |
560 | 560 | let AId = request[3] | |
561 | 561 | let pmtB = parseIntValue(request[4]) | |
562 | 562 | let BId = request[5] | |
563 | 563 | let balA = parseIntValue(request[6]) | |
564 | 564 | let balB = parseIntValue(request[7]) | |
565 | 565 | let shareId = request[8] | |
566 | 566 | let bwAsset = request[9] | |
567 | 567 | let bwAmount = parseIntValue(request[10]) | |
568 | 568 | $Tuple11(user, pool, pmtA, AId, pmtB, BId, balA, balB, shareId, bwAsset, bwAmount) | |
569 | 569 | } | |
570 | 570 | ||
571 | 571 | ||
572 | 572 | @Callable(i) | |
573 | 573 | func replenishREADONLY (pool,leverage,borrowAssetId) = if (if ((100 > leverage)) | |
574 | 574 | then true | |
575 | 575 | else (leverage > 300)) | |
576 | 576 | then throw("Leverage can't be <100 and >300") | |
577 | 577 | else { | |
578 | 578 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
579 | 579 | let $t01905319143 = getPoolData(Address(fromBase58String(pool)), pType) | |
580 | 580 | let AId = $t01905319143._1 | |
581 | 581 | let BId = $t01905319143._2 | |
582 | 582 | let balA = $t01905319143._3 | |
583 | 583 | let balB = $t01905319143._4 | |
584 | 584 | let shareId = $t01905319143._5 | |
585 | 585 | let $t01914619783 = if ((size(i.payments) == 2)) | |
586 | 586 | then if ((assetIdToStr(i.payments[0].assetId) != AId)) | |
587 | 587 | then throw("Wrong payment asset A") | |
588 | 588 | else if ((assetIdToStr(i.payments[1].assetId) != BId)) | |
589 | 589 | then throw("Wrong payment asset B") | |
590 | 590 | else $Tuple4(i.payments[0].amount, AId, i.payments[1].amount, BId) | |
591 | 591 | else if ((size(i.payments) == 1)) | |
592 | 592 | then if ((assetIdToStr(i.payments[0].assetId) == AId)) | |
593 | 593 | then $Tuple4(i.payments[0].amount, AId, 0, BId) | |
594 | 594 | else if ((assetIdToStr(i.payments[0].assetId) == BId)) | |
595 | 595 | then $Tuple4(0, AId, i.payments[0].amount, BId) | |
596 | 596 | else throw("Wrong payment") | |
597 | 597 | else throw("One or two payments expected") | |
598 | 598 | let pmtA = $t01914619783._1 | |
599 | 599 | let pmtAssetA = $t01914619783._2 | |
600 | 600 | let pmtB = $t01914619783._3 | |
601 | 601 | let pmtAssetB = $t01914619783._4 | |
602 | 602 | let $t01978621297 = if ((leverage > 100)) | |
603 | 603 | then { | |
604 | 604 | let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetA, false], nil) | |
605 | 605 | if ($isInstanceOf(@, "(Int, Int)")) | |
606 | 606 | then @ | |
607 | 607 | else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1 | |
608 | 608 | let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetB, false], nil) | |
609 | 609 | if ($isInstanceOf(@, "(Int, Int)")) | |
610 | 610 | then @ | |
611 | 611 | else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1 | |
612 | 612 | let paydInDollar = (fraction(dPriceA, pmtA, pow(10, 0, getAssetDecimals(pmtAssetA), 0, 0, DOWN)) + fraction(dPriceB, pmtB, pow(10, 0, getAssetDecimals(pmtAssetB), 0, 0, DOWN))) | |
613 | 613 | let borrowAmount = fraction(paydInDollar, (leverage - 100), 100) | |
614 | 614 | let request = makeString([toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowAssetId, toString(borrowAmount), toString(1)], ",") | |
615 | 615 | let newRequestId = { | |
616 | 616 | let @ = invoke(this, "createNewRequest", [request], nil) | |
617 | 617 | if ($isInstanceOf(@, "Int")) | |
618 | 618 | then @ | |
619 | 619 | else throw(($getType(@) + " couldn't be cast to Int")) | |
620 | 620 | } | |
621 | 621 | if ((newRequestId == newRequestId)) | |
622 | 622 | then { | |
623 | 623 | let args = [((toString(i.caller) + "_") + toString(1)), shareId, borrowAssetId, borrowAmount, toString(this), "replenishFromLandReadOnly", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))] | |
624 | 624 | let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil) | |
625 | 625 | if ((inv == inv)) | |
626 | 626 | then if ((borrowAssetId == pmtAssetA)) | |
627 | 627 | then $Tuple4((pmtA + borrowAmount), pmtB, LOAN_FEE, borrowAmount) | |
628 | 628 | else $Tuple4(pmtA, (pmtB + borrowAmount), LOAN_FEE, borrowAmount) | |
629 | 629 | else throw("Strict value is not equal to itself.") | |
630 | 630 | } | |
631 | 631 | else throw("Strict value is not equal to itself.") | |
632 | 632 | } | |
633 | 633 | else $Tuple4(pmtA, pmtB, NO_LOAN_FEE, 0) | |
634 | 634 | let paymentA = $t01978621297._1 | |
635 | 635 | let paymentB = $t01978621297._2 | |
636 | 636 | let feeType = $t01978621297._3 | |
637 | 637 | let borrowAmount = $t01978621297._4 | |
638 | 638 | let $t02130021412 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
639 | 639 | let userStaked = $t02130021412._1 | |
640 | 640 | let axlyFee = $t02130021412._2 | |
641 | 641 | let $t02141621541 = withdrawAmountCalc(pool, userStaked, borrowAmount, borrowAssetId) | |
642 | 642 | if (($t02141621541 == $t02141621541)) | |
643 | 643 | then { | |
644 | 644 | let assetIdB = $t02141621541._4 | |
645 | 645 | let toUserAmountB = $t02141621541._3 | |
646 | 646 | let assetIdA = $t02141621541._2 | |
647 | 647 | let toUserAmountA = $t02141621541._1 | |
648 | 648 | $Tuple2(nil, [userStaked, toUserAmountA, toUserAmountB]) | |
649 | 649 | } | |
650 | 650 | else throw("Strict value is not equal to itself.") | |
651 | 651 | } | |
652 | 652 | ||
653 | 653 | ||
654 | 654 | ||
655 | 655 | @Callable(i) | |
656 | 656 | func replenishFromLandReadOnly (requestId) = { | |
657 | 657 | let $t02166521769 = parseRequest(requestId) | |
658 | 658 | let user = $t02166521769._1 | |
659 | 659 | let pool = $t02166521769._2 | |
660 | 660 | let pmtA = $t02166521769._3 | |
661 | 661 | let AId = $t02166521769._4 | |
662 | 662 | let pmtB = $t02166521769._5 | |
663 | 663 | let BId = $t02166521769._6 | |
664 | 664 | let balA = $t02166521769._7 | |
665 | 665 | let balB = $t02166521769._8 | |
666 | 666 | let shareId = $t02166521769._9 | |
667 | 667 | let bwAsset = $t02166521769._10 | |
668 | 668 | let bwAmount = $t02166521769._11 | |
669 | 669 | if ((size(i.payments) != 1)) | |
670 | 670 | then throw("Wrong payment size") | |
671 | 671 | else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset)) | |
672 | 672 | then true | |
673 | 673 | else (i.payments[0].amount != bwAmount)) | |
674 | 674 | then throw("Wrong payment") | |
675 | 675 | else { | |
676 | 676 | let $t02195922083 = if ((AId == bwAsset)) | |
677 | 677 | then $Tuple2((pmtA + i.payments[0].amount), pmtB) | |
678 | 678 | else $Tuple2(pmtA, (pmtB + i.payments[0].amount)) | |
679 | 679 | let pmtAllA = $t02195922083._1 | |
680 | 680 | let pmtAllB = $t02195922083._2 | |
681 | 681 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
682 | 682 | let $t02216522274 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
683 | 683 | let userStaked = $t02216522274._1 | |
684 | 684 | let axlyFee = $t02216522274._2 | |
685 | - | nil | |
685 | + | $Tuple2(nil, userStaked) | |
686 | 686 | } | |
687 | 687 | } | |
688 | 688 | ||
689 | 689 | ||
690 | 690 | ||
691 | 691 | @Callable(i) | |
692 | 692 | func replenish (pool,leverage,borrowAssetId) = if (if ((100 > leverage)) | |
693 | 693 | then true | |
694 | 694 | else (leverage > 300)) | |
695 | 695 | then throw("Leverage can't be <100 and >300") | |
696 | 696 | else { | |
697 | 697 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
698 | - | let $ | |
699 | - | let AId = $ | |
700 | - | let BId = $ | |
701 | - | let balA = $ | |
702 | - | let balB = $ | |
703 | - | let shareId = $ | |
704 | - | let $ | |
698 | + | let $t02260222692 = getPoolData(Address(fromBase58String(pool)), pType) | |
699 | + | let AId = $t02260222692._1 | |
700 | + | let BId = $t02260222692._2 | |
701 | + | let balA = $t02260222692._3 | |
702 | + | let balB = $t02260222692._4 | |
703 | + | let shareId = $t02260222692._5 | |
704 | + | let $t02269523332 = if ((size(i.payments) == 2)) | |
705 | 705 | then if ((assetIdToStr(i.payments[0].assetId) != AId)) | |
706 | 706 | then throw("Wrong payment asset A") | |
707 | 707 | else if ((assetIdToStr(i.payments[1].assetId) != BId)) | |
708 | 708 | then throw("Wrong payment asset B") | |
709 | 709 | else $Tuple4(i.payments[0].amount, AId, i.payments[1].amount, BId) | |
710 | 710 | else if ((size(i.payments) == 1)) | |
711 | 711 | then if ((assetIdToStr(i.payments[0].assetId) == AId)) | |
712 | 712 | then $Tuple4(i.payments[0].amount, AId, 0, BId) | |
713 | 713 | else if ((assetIdToStr(i.payments[0].assetId) == BId)) | |
714 | 714 | then $Tuple4(0, AId, i.payments[0].amount, BId) | |
715 | 715 | else throw("Wrong payment") | |
716 | 716 | else throw("One or two payments expected") | |
717 | - | let pmtA = $ | |
718 | - | let pmtAssetA = $ | |
719 | - | let pmtB = $ | |
720 | - | let pmtAssetB = $ | |
717 | + | let pmtA = $t02269523332._1 | |
718 | + | let pmtAssetA = $t02269523332._2 | |
719 | + | let pmtB = $t02269523332._3 | |
720 | + | let pmtAssetB = $t02269523332._4 | |
721 | 721 | let newPosNum = getNewUserPositionNumber(pool, toString(i.caller)) | |
722 | 722 | if ((leverage > 100)) | |
723 | 723 | then { | |
724 | 724 | let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetA, false], nil) | |
725 | 725 | if ($isInstanceOf(@, "(Int, Int)")) | |
726 | 726 | then @ | |
727 | 727 | else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1 | |
728 | 728 | let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetB, false], nil) | |
729 | 729 | if ($isInstanceOf(@, "(Int, Int)")) | |
730 | 730 | then @ | |
731 | 731 | else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1 | |
732 | 732 | let paydInDollar = (fraction(dPriceA, pmtA, pow(10, 0, getAssetDecimals(pmtAssetA), 0, 0, DOWN)) + fraction(dPriceB, pmtB, pow(10, 0, getAssetDecimals(pmtAssetB), 0, 0, DOWN))) | |
733 | 733 | let borrowAmount = fraction(paydInDollar, (leverage - 100), 100) | |
734 | 734 | let request = makeString([toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowAssetId, toString(borrowAmount)], ",") | |
735 | 735 | let newRequestId = { | |
736 | 736 | let @ = invoke(this, "createNewRequest", [request], nil) | |
737 | 737 | if ($isInstanceOf(@, "Int")) | |
738 | 738 | then @ | |
739 | 739 | else throw(($getType(@) + " couldn't be cast to Int")) | |
740 | 740 | } | |
741 | 741 | if ((newRequestId == newRequestId)) | |
742 | 742 | then { | |
743 | 743 | let args = [((toString(i.caller) + "_") + toString(newPosNum)), shareId, borrowAssetId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))] | |
744 | 744 | let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil) | |
745 | 745 | if ((inv == inv)) | |
746 | 746 | then nil | |
747 | 747 | else throw("Strict value is not equal to itself.") | |
748 | 748 | } | |
749 | 749 | else throw("Strict value is not equal to itself.") | |
750 | 750 | } | |
751 | 751 | else { | |
752 | - | let $ | |
753 | - | let userStaked = $ | |
754 | - | let axlyFee = $ | |
752 | + | let $t02462924741 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
753 | + | let userStaked = $t02462924741._1 | |
754 | + | let axlyFee = $t02462924741._2 | |
755 | 755 | replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, pType) | |
756 | 756 | } | |
757 | 757 | } | |
758 | 758 | ||
759 | 759 | ||
760 | 760 | ||
761 | 761 | @Callable(i) | |
762 | 762 | func replenishFromLand (requestId) = { | |
763 | - | let $ | |
764 | - | let user = $ | |
765 | - | let pool = $ | |
766 | - | let pmtA = $ | |
767 | - | let AId = $ | |
768 | - | let pmtB = $ | |
769 | - | let BId = $ | |
770 | - | let balA = $ | |
771 | - | let balB = $ | |
772 | - | let shareId = $ | |
773 | - | let bwAsset = $ | |
774 | - | let bwAmount = $ | |
763 | + | let $t02490325007 = parseRequest(requestId) | |
764 | + | let user = $t02490325007._1 | |
765 | + | let pool = $t02490325007._2 | |
766 | + | let pmtA = $t02490325007._3 | |
767 | + | let AId = $t02490325007._4 | |
768 | + | let pmtB = $t02490325007._5 | |
769 | + | let BId = $t02490325007._6 | |
770 | + | let balA = $t02490325007._7 | |
771 | + | let balB = $t02490325007._8 | |
772 | + | let shareId = $t02490325007._9 | |
773 | + | let bwAsset = $t02490325007._10 | |
774 | + | let bwAmount = $t02490325007._11 | |
775 | 775 | if ((size(i.payments) != 1)) | |
776 | 776 | then throw("Wrong payment size") | |
777 | 777 | else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset)) | |
778 | 778 | then true | |
779 | 779 | else (i.payments[0].amount != bwAmount)) | |
780 | 780 | then throw("Wrong payment") | |
781 | 781 | else { | |
782 | - | let $ | |
782 | + | let $t02519725321 = if ((AId == bwAsset)) | |
783 | 783 | then $Tuple2((pmtA + i.payments[0].amount), pmtB) | |
784 | 784 | else $Tuple2(pmtA, (pmtB + i.payments[0].amount)) | |
785 | - | let pmtAllA = $ | |
786 | - | let pmtAllB = $ | |
785 | + | let pmtAllA = $t02519725321._1 | |
786 | + | let pmtAllB = $t02519725321._2 | |
787 | 787 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
788 | - | let $ | |
789 | - | let userStaked = $ | |
790 | - | let axlyFee = $ | |
788 | + | let $t02540325512 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
789 | + | let userStaked = $t02540325512._1 | |
790 | + | let axlyFee = $t02540325512._2 | |
791 | 791 | let posNum = getNewUserPositionNumber(pool, toString(i.caller)) | |
792 | 792 | let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)] | |
793 | 793 | let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType) | |
794 | 794 | $Tuple2(((entries ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked) | |
795 | 795 | } | |
796 | 796 | } | |
797 | 797 | ||
798 | 798 | ||
799 | 799 | ||
800 | 800 | @Callable(i) | |
801 | 801 | func withdraw (pool,posId) = { | |
802 | 802 | let user = toString(i.caller) | |
803 | 803 | let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserPosition)), "Unknown position") | |
804 | 804 | let userInterest = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserPositionInterest)) | |
805 | 805 | let poolInterst = getIntegerValue(this, (pool + kPoolInterest)) | |
806 | 806 | let poolTotalShare = getPoolTotalShare(pool) | |
807 | 807 | let userCanWithdraw = (pAmount + fraction(pAmount, (poolInterst - userInterest), SCALE10)) | |
808 | 808 | let userAddr = Address(fromBase58String(user)) | |
809 | 809 | let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserBorrowAmount)) | |
810 | 810 | let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserBorrowAssetId)) | |
811 | 811 | let debt = if ((borrowAmount > 0)) | |
812 | 812 | then { | |
813 | 813 | let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((((pool + "_") + user) + "_") + toString(posId)), borrowAsset], nil) | |
814 | 814 | if ($isInstanceOf(@, "Int")) | |
815 | 815 | then @ | |
816 | 816 | else throw(($getType(@) + " couldn't be cast to Int")) | |
817 | 817 | } | |
818 | 818 | else 0 | |
819 | - | let $ | |
820 | - | if (($ | |
819 | + | let $t02695427074 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset) | |
820 | + | if (($t02695427074 == $t02695427074)) | |
821 | 821 | then { | |
822 | - | let assetIdB = $ | |
823 | - | let toUserAmountB = $ | |
824 | - | let assetIdA = $ | |
825 | - | let toUserAmountA = $ | |
822 | + | let assetIdB = $t02695427074._4 | |
823 | + | let toUserAmountB = $t02695427074._3 | |
824 | + | let assetIdA = $t02695427074._2 | |
825 | + | let toUserAmountA = $t02695427074._1 | |
826 | 826 | let closeDbtInv = if ((debt > 0)) | |
827 | 827 | then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + toString(posId))], [AttachedPayment(assetIdFromStr(borrowAsset), debt)]) | |
828 | 828 | else 0 | |
829 | 829 | if ((closeDbtInv == closeDbtInv)) | |
830 | 830 | then [DeleteEntry((((((pool + "_") + user) + "_") + toString(posId)) + kUserPosition)), DeleteEntry((((((pool + "_") + user) + "_") + toString(posId)) + kUserPositionInterest)), IntegerEntry((pool + kPoolTotal), (poolTotalShare - userCanWithdraw)), ScriptTransfer(userAddr, toUserAmountA, assetIdFromStr(assetIdA)), ScriptTransfer(userAddr, toUserAmountB, assetIdFromStr(assetIdB))] | |
831 | 831 | else throw("Strict value is not equal to itself.") | |
832 | 832 | } | |
833 | 833 | else throw("Strict value is not equal to itself.") | |
834 | 834 | } | |
835 | 835 | ||
836 | 836 | ||
837 | 837 | ||
838 | 838 | @Callable(i) | |
839 | 839 | func createNewRequest (params) = valueOrElse(isSelfCall(i), { | |
840 | 840 | let newRequestId = (valueOrElse(getInteger(this, kRequestIter), 0) + 1) | |
841 | 841 | $Tuple2([StringEntry((toString(newRequestId) + kRequestId), params), IntegerEntry(kRequestIter, newRequestId)], newRequestId) | |
842 | 842 | }) | |
843 | 843 | ||
844 | 844 | ||
845 | 845 | ||
846 | 846 | @Callable(i) | |
847 | 847 | func capitalizeExKeeper (pool,type,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = { | |
848 | - | let $ | |
848 | + | let $t02837128565 = if (claim) | |
849 | 849 | then claimFarmed(type, pool) | |
850 | 850 | else { | |
851 | 851 | let claimedAsset = if ((type == SF_POOL)) | |
852 | 852 | then SWOPID | |
853 | 853 | else WXID | |
854 | 854 | $Tuple2(amountToExchange, claimedAsset) | |
855 | 855 | } | |
856 | - | let claimedAmount = $ | |
857 | - | let claimedAsset = $ | |
856 | + | let claimedAmount = $t02837128565._1 | |
857 | + | let claimedAsset = $t02837128565._2 | |
858 | 858 | let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options) | |
859 | 859 | let change = (claimedAmount - amountToExchange) | |
860 | 860 | let changeEntry = if ((change > 0)) | |
861 | 861 | then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))] | |
862 | 862 | else nil | |
863 | 863 | (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry) | |
864 | 864 | } | |
865 | 865 | ||
866 | 866 | ||
867 | 867 | ||
868 | 868 | @Callable(i) | |
869 | 869 | func capitalizeExPazzle (pool,type,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = { | |
870 | - | let $ | |
870 | + | let $t02922129415 = if (claim) | |
871 | 871 | then claimFarmed(type, pool) | |
872 | 872 | else { | |
873 | 873 | let claimedAsset = if ((type == SF_POOL)) | |
874 | 874 | then SWOPID | |
875 | 875 | else WXID | |
876 | 876 | $Tuple2(amountToExchange, claimedAsset) | |
877 | 877 | } | |
878 | - | let claimedAmount = $ | |
879 | - | let claimedAsset = $ | |
878 | + | let claimedAmount = $t02922129415._1 | |
879 | + | let claimedAsset = $t02922129415._2 | |
880 | 880 | let exchangedAmount = exchangePazzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options) | |
881 | 881 | let change = (claimedAmount - amountToExchange) | |
882 | 882 | let changeEntry = if ((change > 0)) | |
883 | 883 | then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))] | |
884 | 884 | else nil | |
885 | 885 | (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry) | |
886 | 886 | } | |
887 | 887 | ||
888 | 888 | ||
889 | 889 | ||
890 | 890 | @Callable(i) | |
891 | 891 | func capitalizeExSwopFi (pool,type,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = { | |
892 | - | let $ | |
892 | + | let $t03013830332 = if (claim) | |
893 | 893 | then claimFarmed(type, pool) | |
894 | 894 | else { | |
895 | 895 | let claimedAsset = if ((type == SF_POOL)) | |
896 | 896 | then SWOPID | |
897 | 897 | else WXID | |
898 | 898 | $Tuple2(amountToExchange, claimedAsset) | |
899 | 899 | } | |
900 | - | let claimedAmount = $ | |
901 | - | let claimedAsset = $ | |
900 | + | let claimedAmount = $t03013830332._1 | |
901 | + | let claimedAsset = $t03013830332._2 | |
902 | 902 | let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options) | |
903 | 903 | let change = (claimedAmount - amountToExchange) | |
904 | 904 | let changeEntry = if ((change > 0)) | |
905 | 905 | then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))] | |
906 | 906 | else nil | |
907 | 907 | (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry) | |
908 | 908 | } | |
909 | 909 | ||
910 | 910 | ||
911 | 911 | ||
912 | 912 | @Callable(i) | |
913 | 913 | func initNewPool (type,poolAddr,inFeeNoLoan,inFeeLoan,capFee) = if (if ((type != SF_POOL)) | |
914 | 914 | then (type != WX_POOL) | |
915 | 915 | else false) | |
916 | 916 | then throw("Wrong type") | |
917 | 917 | else [IntegerEntry((poolAddr + kAxlyInFeeWithoutLoan), inFeeNoLoan), IntegerEntry((poolAddr + kAxlyInFeeWithLoan), inFeeLoan), IntegerEntry((poolAddr + kAxlyCapFee), capFee), IntegerEntry((poolAddr + kPoolInterest), 0), StringEntry((kPool + poolAddr), type)] | |
918 | 918 | ||
919 | 919 | ||
920 | 920 | @Verifier(tx) | |
921 | 921 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
922 | 922 |
github/deemru/w8io/026f985 128.69 ms ◑