tx · Aykfwr5jGhNU1JhkCPYo8TqJ3CeJcoZe7MeXSiyMnhgb 3MxWgDbE9EmjQj8b3LfFwa91FZizptyeQXS: -0.14000000 Waves 2022.10.24 16:06 [2286532] smart account 3MxWgDbE9EmjQj8b3LfFwa91FZizptyeQXS > SELF 0.00000000 Waves
{ "type": 13, "id": "Aykfwr5jGhNU1JhkCPYo8TqJ3CeJcoZe7MeXSiyMnhgb", "fee": 14000000, "feeAssetId": null, "timestamp": 1666616810525, "version": 2, "chainId": 84, "sender": "3MxWgDbE9EmjQj8b3LfFwa91FZizptyeQXS", "senderPublicKey": "C7xgcYqQ8qV8rmvzAjhQWq4cz82F6VJfXMNygvrTXsfW", "proofs": [ "5BZXzsSYq9yZD9Y2Uxc3H4ykVxPn5wUPMqtRW7gytH79Jn1omvsmQdSBFcx7QGMDeiQ8cfxzcT4C8QZqSYWGUGq9", "3AnhyBKhrqvBbai5RR9CGhEn1hQwdmfJanoQ1oPZDKfwcjZTKfbwxUUqSd4dTYA11cjASpFA5HCWLAESp36G4tiD" ], "script": "base64:BgJmCAISBAoCEQESBQoDCAEBEgUKAwEEARIECgIRCBIDCgEBEgYKBAgIAQgSBAoCCAESAwoBERIECgIRARIFCgMBCAgSBAoCCAESBQoDCAEBEgASABIECgIRBBIECgIBARIAEgASABIAWAAJUFJFQ0lTSU9OAMCEPQAFTUFYX0EAwIQ9AAxNQVhfQV9DSEFOR0UACgAIREVDSU1BTFMABgANTUlOX1JBTVBfVElNRQkAaQIAgKMFADwAB3ZlcnNpb24CBTMuMC4wAAhrVmVyc2lvbgIHdmVyc2lvbgAHa0Fzc2V0cwIJYXNzZXRfaWRzAA1rQXNzZXRCYWxhbmNlAghfYmFsYW5jZQAHa0FjdGl2ZQIGYWN0aXZlAAZrQ2F1c2UCDnNodXRkb3duX2NhdXNlAA1rU2hhcmVBc3NldElkAg5zaGFyZV9hc3NldF9pZAARa1NoYXJlQXNzZXRTdXBwbHkCEnNoYXJlX2Fzc2V0X3N1cHB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AFBHRoaXMJAAACCAUDaW52CGZ1bmN0aW9uAhl0YWtlSW50b0FjY291bnRFeHRyYUZ1bmRzBwQNc2lnbmVkQnlBZG1pbgMDAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUMYWRtaW5QdWJLZXkxBgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUMYWRtaW5QdWJLZXkyBgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUMYWRtaW5QdWJLZXkzBgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAURYWRtaW5QdWJLZXlJbnZva2UDAwUTY2FsbFRha2VJbnRvQWNjb3VudAUNc2lnbmVkQnlBZG1pbgcGBRNtdWx0aVNpZ25lZEJ5QWRtaW5zBRNtdWx0aVNpZ25lZEJ5QWRtaW5z1L0Ezw==", "height": 2286532, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9GDJqh7tMaqmqFFHYGC89reXt68bGsNyNuufFpxj1mEp Next: H5nDHCAQYfWvdHmpwq6BAKet1aHwZp2YKtdkh8e4rTVo Diff:
Old | New | Differences | |
---|---|---|---|
714 | 714 | let D0 = if ((shareSupply == 0)) | |
715 | 715 | then 0 | |
716 | 716 | else getDMem(xp, amp) | |
717 | - | let payments = msg.payments | |
717 | + | let $t01534915562 = if ((size(msg.payments) > nCoins)) | |
718 | + | then $Tuple2(removeByIndex(msg.payments, (size(msg.payments) - 1)), [msg.payments[(size(msg.payments) - 1)]]) | |
719 | + | else $Tuple2(msg.payments, nil) | |
720 | + | let payments = $t01534915562._1 | |
721 | + | let lockFee = $t01534915562._2 | |
718 | 722 | let paymentsSize = size(payments) | |
719 | 723 | func validPayments (n) = if ((paymentsSize > nCoins)) | |
720 | 724 | then throw(("payments size > " + toString(nCoins))) | |
751 | 755 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, payments)) | |
752 | 756 | else { | |
753 | 757 | func parsePayments (acc,assetId) = { | |
754 | - | let $ | |
755 | - | let newBalances = $ | |
756 | - | let i = $ | |
758 | + | let $t01643216458 = acc | |
759 | + | let newBalances = $t01643216458._1 | |
760 | + | let i = $t01643216458._2 | |
757 | 761 | func parsePayment (newBalance,payment) = if ((getStrAssetId(payment.assetId) == assetId)) | |
758 | 762 | then (newBalance + payment.amount) | |
759 | 763 | else newBalance | |
775 | 779 | $Tuple2((newBalances :+ newBalace), (i + 1)) | |
776 | 780 | } | |
777 | 781 | ||
778 | - | let $ | |
782 | + | let $t01680816875 = { | |
779 | 783 | let $l = assetIds | |
780 | 784 | let $s = size($l) | |
781 | 785 | let $acc0 = $Tuple2(nil, 0) | |
789 | 793 | ||
790 | 794 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
791 | 795 | } | |
792 | - | let newBalances = $ | |
793 | - | let k = $ | |
796 | + | let newBalances = $t01680816875._1 | |
797 | + | let k = $t01680816875._2 | |
794 | 798 | if (checkDAppThreshold(newBalances)) | |
795 | 799 | then throw() | |
796 | 800 | else { | |
800 | 804 | else { | |
801 | 805 | let feeDiscount = calculateFeeDiscount(msg.caller) | |
802 | 806 | func calcScriptActions (acc,newBalance) = { | |
803 | - | let $ | |
804 | - | let invBalances = $ | |
805 | - | let scriptActions = $ | |
806 | - | let i = $ | |
807 | + | let $t01719517236 = acc | |
808 | + | let invBalances = $t01719517236._1 | |
809 | + | let scriptActions = $t01719517236._2 | |
810 | + | let i = $t01719517236._3 | |
807 | 811 | if ((shareSupply > 0)) | |
808 | 812 | then { | |
809 | 813 | let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1))) | |
841 | 845 | } | |
842 | 846 | } | |
843 | 847 | ||
844 | - | let $ | |
848 | + | let $t01894119029 = { | |
845 | 849 | let $l = newBalances | |
846 | 850 | let $s = size($l) | |
847 | 851 | let $acc0 = $Tuple3(nil, nil, 0) | |
855 | 859 | ||
856 | 860 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
857 | 861 | } | |
858 | - | let invBalances = $ | |
859 | - | let scriptActions = $ | |
862 | + | let invBalances = $t01894119029._1 | |
863 | + | let scriptActions = $t01894119029._2 | |
860 | 864 | let D2 = getDMem(invBalances, amp) | |
861 | 865 | let mint_amount = if ((shareSupply == 0)) | |
862 | 866 | then D1 | |
868 | 872 | let re = invoke(this, "reissueShare", [mint_amount], nil) | |
869 | 873 | if ((re == re)) | |
870 | 874 | then { | |
871 | - | let s = invoke(farmingAddress, "lockShareTokens", [toString(this), lockType], [AttachedPayment(shareAssetId, mint_amount)]) | |
875 | + | let s = invoke(farmingAddress, "lockShareTokens", [toString(this), lockType], ([AttachedPayment(shareAssetId, mint_amount)] ++ lockFee)) | |
872 | 876 | if ((s == s)) | |
873 | 877 | then (scriptActions :+ IntegerEntry(kShareAssetSupply, (shareSupply + mint_amount))) | |
874 | 878 | else throw("Strict value is not equal to itself.") | |
895 | 899 | let D0 = getDMem(xp, amp) | |
896 | 900 | let feeDiscount = calculateFeeDiscount(user) | |
897 | 901 | func calcInvBalances (acc,newBalance) = { | |
898 | - | let $ | |
899 | - | let invBalances = $ | |
900 | - | let i = $ | |
902 | + | let $t02027920305 = acc | |
903 | + | let invBalances = $t02027920305._1 | |
904 | + | let i = $t02027920305._2 | |
901 | 905 | let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1))) | |
902 | 906 | let fees = { | |
903 | 907 | let idealBalance = fraction(D1, xp[i], D0) | |
910 | 914 | $Tuple2((invBalances :+ invariantBalance), (i + 1)) | |
911 | 915 | } | |
912 | 916 | ||
913 | - | let $ | |
917 | + | let $t02090720977 = { | |
914 | 918 | let $l = newBalances | |
915 | 919 | let $s = size($l) | |
916 | 920 | let $acc0 = $Tuple2(nil, 0) | |
924 | 928 | ||
925 | 929 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
926 | 930 | } | |
927 | - | let invBalances = $ | |
928 | - | let k = $ | |
931 | + | let invBalances = $t02090720977._1 | |
932 | + | let k = $t02090720977._2 | |
929 | 933 | let D2 = getDMem(invBalances, amp) | |
930 | 934 | let mintAmount = fraction(shareSupply, (D2 - D0), D0) | |
931 | 935 | $Tuple2(nil, mintAmount) | |
980 | 984 | then throw("Exchange resulted in fewer coins than expected") | |
981 | 985 | else { | |
982 | 986 | func makeNewBalances (acc,tokenBalance) = { | |
983 | - | let $ | |
984 | - | let newBalances = $ | |
985 | - | let i = $ | |
987 | + | let $t02301823044 = acc | |
988 | + | let newBalances = $t02301823044._1 | |
989 | + | let i = $t02301823044._2 | |
986 | 990 | if ((i == fromIndex)) | |
987 | 991 | then $Tuple2((newBalances :+ (tokenBalance + dx)), (i + 1)) | |
988 | 992 | else if ((i == toIndex)) | |
990 | 994 | else $Tuple2((newBalances :+ tokenBalance), (i + 1)) | |
991 | 995 | } | |
992 | 996 | ||
993 | - | let $ | |
997 | + | let $t02329523356 = { | |
994 | 998 | let $l = xp | |
995 | 999 | let $s = size($l) | |
996 | 1000 | let $acc0 = $Tuple2(nil, 0) | |
1004 | 1008 | ||
1005 | 1009 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1006 | 1010 | } | |
1007 | - | let newBalances = $ | |
1008 | - | let i = $ | |
1011 | + | let newBalances = $t02329523356._1 | |
1012 | + | let i = $t02329523356._2 | |
1009 | 1013 | if (checkDAppThreshold(newBalances)) | |
1010 | 1014 | then throw() | |
1011 | 1015 | else { | |
1047 | 1051 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.originCaller, msg.payments)) | |
1048 | 1052 | else { | |
1049 | 1053 | func calcScriptActions (acc,balance) = { | |
1050 | - | let $ | |
1051 | - | let scriptActions = $ | |
1052 | - | let i = $ | |
1054 | + | let $t02464724675 = acc | |
1055 | + | let scriptActions = $t02464724675._1 | |
1056 | + | let i = $t02464724675._2 | |
1053 | 1057 | let wAmount = fraction(balance, pmtAmount, shareSupply) | |
1054 | 1058 | if (assert((wAmount >= minAmounts[i]))) | |
1055 | 1059 | then throw("Withdrawal resulted in fewer coins than expected") | |
1061 | 1065 | } | |
1062 | 1066 | } | |
1063 | 1067 | ||
1064 | - | let $ | |
1068 | + | let $t02516525233 = { | |
1065 | 1069 | let $l = _xp() | |
1066 | 1070 | let $s = size($l) | |
1067 | 1071 | let $acc0 = $Tuple2(nil, 0) | |
1075 | 1079 | ||
1076 | 1080 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1077 | 1081 | } | |
1078 | - | let scriptActions = $ | |
1079 | - | let i = $ | |
1082 | + | let scriptActions = $t02516525233._1 | |
1083 | + | let i = $t02516525233._2 | |
1080 | 1084 | (scriptActions ++ [Burn(shareAssetId, pmtAmount), IntegerEntry(kShareAssetSupply, (shareSupply - pmtAmount))]) | |
1081 | 1085 | } | |
1082 | 1086 | } | |
1143 | 1147 | let outIndex = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out") | |
1144 | 1148 | let tokenOutB58 = fromBase58String(tokenOut) | |
1145 | 1149 | let xp = _xp() | |
1146 | - | let $ | |
1147 | - | let dy = $ | |
1148 | - | let dy_fee = $ | |
1150 | + | let $t02726527347 = _calcWithdrawOneCoin(xp, pmtAmount, outIndex, msg.originCaller) | |
1151 | + | let dy = $t02726527347._1 | |
1152 | + | let dy_fee = $t02726527347._2 | |
1149 | 1153 | if (assert((dy >= minAmount))) | |
1150 | 1154 | then throw("Not enough coins removed") | |
1151 | 1155 | else { | |
1152 | 1156 | let governanceFees = fraction(dy_fee, feeGovernance, feeScale6) | |
1153 | 1157 | let dy_and_fee = (dy + dy_fee) | |
1154 | 1158 | func makeNewBalances (acc,tokenBalance) = { | |
1155 | - | let $ | |
1156 | - | let newBalances = $ | |
1157 | - | let i = $ | |
1159 | + | let $t02760527631 = acc | |
1160 | + | let newBalances = $t02760527631._1 | |
1161 | + | let i = $t02760527631._2 | |
1158 | 1162 | if ((i == outIndex)) | |
1159 | 1163 | then $Tuple2((newBalances :+ (tokenBalance - dy_and_fee)), (i + 1)) | |
1160 | 1164 | else $Tuple2((newBalances :+ tokenBalance), (i + 1)) | |
1161 | 1165 | } | |
1162 | 1166 | ||
1163 | - | let $ | |
1167 | + | let $t02779827859 = { | |
1164 | 1168 | let $l = xp | |
1165 | 1169 | let $s = size($l) | |
1166 | 1170 | let $acc0 = $Tuple2(nil, 0) | |
1174 | 1178 | ||
1175 | 1179 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1176 | 1180 | } | |
1177 | - | let newBalances = $ | |
1178 | - | let v = $ | |
1181 | + | let newBalances = $t02779827859._1 | |
1182 | + | let v = $t02779827859._2 | |
1179 | 1183 | if (checkDAppThreshold(newBalances)) | |
1180 | 1184 | then throw() | |
1181 | 1185 | else { | |
1251 | 1255 | let balances = _xp() | |
1252 | 1256 | let D0 = getDMem(balances, amp) | |
1253 | 1257 | func calcNewBalances (acc,balance) = { | |
1254 | - | let $ | |
1255 | - | let newBalances = $ | |
1256 | - | let i = $ | |
1258 | + | let $t02987629902 = acc | |
1259 | + | let newBalances = $t02987629902._1 | |
1260 | + | let i = $t02987629902._2 | |
1257 | 1261 | let newBalance = (balance + (if (deposit) | |
1258 | 1262 | then amounts[i] | |
1259 | 1263 | else -(amounts[i]))) | |
1333 | 1337 | else { | |
1334 | 1338 | let balances = _xp() | |
1335 | 1339 | func takeExtraFunds (acc,assetId) = { | |
1336 | - | let $ | |
1337 | - | let sum = $ | |
1338 | - | let i = $ | |
1340 | + | let $t03224432262 = acc | |
1341 | + | let sum = $t03224432262._1 | |
1342 | + | let i = $t03224432262._2 | |
1339 | 1343 | let tokenB58 = fromBase58String(assetId) | |
1340 | 1344 | let rBalance = (assetBalance(this, tokenB58) + stakedAmount(tokenB58)) | |
1341 | 1345 | let enrollAmount = (rBalance - balances[i]) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let PRECISION = 1000000 | |
5 | 5 | ||
6 | 6 | let MAX_A = 1000000 | |
7 | 7 | ||
8 | 8 | let MAX_A_CHANGE = 10 | |
9 | 9 | ||
10 | 10 | let DECIMALS = 6 | |
11 | 11 | ||
12 | 12 | let MIN_RAMP_TIME = (86400 / 60) | |
13 | 13 | ||
14 | 14 | let version = "3.0.0" | |
15 | 15 | ||
16 | 16 | let kVersion = "version" | |
17 | 17 | ||
18 | 18 | let kAssets = "asset_ids" | |
19 | 19 | ||
20 | 20 | let kAssetBalance = "_balance" | |
21 | 21 | ||
22 | 22 | let kActive = "active" | |
23 | 23 | ||
24 | 24 | let kCause = "shutdown_cause" | |
25 | 25 | ||
26 | 26 | let kShareAssetId = "share_asset_id" | |
27 | 27 | ||
28 | 28 | let kShareAssetSupply = "share_asset_supply" | |
29 | 29 | ||
30 | 30 | let kFee = "commission" | |
31 | 31 | ||
32 | 32 | let kDAppThresholdCoef = "dAppThresholdCoef" | |
33 | 33 | ||
34 | 34 | let kUSDNAddress = "staking_usdnnsbt_address" | |
35 | 35 | ||
36 | 36 | let kDiscounts = "discounts" | |
37 | 37 | ||
38 | 38 | let kDiscountValues = "discount_values" | |
39 | 39 | ||
40 | 40 | let kUserSwopInGov = "_SWOP_amount" | |
41 | 41 | ||
42 | 42 | let kUserGSwopInGov = "_GSwop_amount" | |
43 | 43 | ||
44 | 44 | let kAdminPubKey1 = "admin_pub_1" | |
45 | 45 | ||
46 | 46 | let kAdminPubKey2 = "admin_pub_2" | |
47 | 47 | ||
48 | 48 | let kAdminPubKey3 = "admin_pub_3" | |
49 | 49 | ||
50 | 50 | let kAdminInvokePubKey = "admin_invoke_pub" | |
51 | 51 | ||
52 | 52 | let kMoneyBoxAddress = "money_box_address" | |
53 | 53 | ||
54 | 54 | let kGovAddress = "governance_address" | |
55 | 55 | ||
56 | 56 | let kVotingAddress = "voting_address" | |
57 | 57 | ||
58 | 58 | let kFarmingAddress = "farming_address" | |
59 | 59 | ||
60 | 60 | let kLPFarmingAddress = "lp_farming" | |
61 | 61 | ||
62 | 62 | let oracle = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz') | |
63 | 63 | ||
64 | 64 | func getBase58FromOracle (key) = match getString(oracle, key) { | |
65 | 65 | case string: String => | |
66 | 66 | fromBase58String(string) | |
67 | 67 | case nothing => | |
68 | 68 | throw((key + "is empty")) | |
69 | 69 | } | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | let adminPubKey1 = getBase58FromOracle(kAdminPubKey1) | |
73 | 73 | ||
74 | 74 | let adminPubKey2 = getBase58FromOracle(kAdminPubKey2) | |
75 | 75 | ||
76 | 76 | let adminPubKey3 = getBase58FromOracle(kAdminPubKey3) | |
77 | 77 | ||
78 | 78 | let adminPubKeyInvoke = getBase58FromOracle(kAdminInvokePubKey) | |
79 | 79 | ||
80 | 80 | let moneyBoxAddress = Address(getBase58FromOracle(kMoneyBoxAddress)) | |
81 | 81 | ||
82 | 82 | let govAddress = Address(getBase58FromOracle(kGovAddress)) | |
83 | 83 | ||
84 | 84 | let stakingUSDNAddress = Address(getBase58FromOracle(kUSDNAddress)) | |
85 | 85 | ||
86 | 86 | let votingAddress = Address(getBase58FromOracle(kVotingAddress)) | |
87 | 87 | ||
88 | 88 | let farmingAddress = Address(getBase58FromOracle(kFarmingAddress)) | |
89 | 89 | ||
90 | 90 | let lpFarmingAddress = Address(getBase58FromOracle(kLPFarmingAddress)) | |
91 | 91 | ||
92 | 92 | let USDN = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p' | |
93 | 93 | ||
94 | 94 | let stakingAssets = [toBase58String(USDN)] | |
95 | 95 | ||
96 | 96 | let active = getBooleanValue(this, kActive) | |
97 | 97 | ||
98 | 98 | let shareAssetId = fromBase58String(getStringValue(this, kShareAssetId)) | |
99 | 99 | ||
100 | 100 | let shareSupply = getIntegerValue(this, kShareAssetSupply) | |
101 | 101 | ||
102 | 102 | let feeScale6 = 1000000 | |
103 | 103 | ||
104 | 104 | let fee = getIntegerValue(this, kFee) | |
105 | 105 | ||
106 | 106 | let feeGovernance = fraction(40, feeScale6, 100) | |
107 | 107 | ||
108 | 108 | let initial_A = getIntegerValue(this, "initial_A") | |
109 | 109 | ||
110 | 110 | let future_A = getIntegerValue(this, "future_A") | |
111 | 111 | ||
112 | 112 | let initial_A_time = valueOrElse(getInteger(this, "initial_A_time"), 0) | |
113 | 113 | ||
114 | 114 | let future_A_time = valueOrElse(getInteger(this, "future_A_time"), 0) | |
115 | 115 | ||
116 | 116 | let assetIds = split(getStringValue(this, kAssets), ",") | |
117 | 117 | ||
118 | 118 | let nCoins = size(assetIds) | |
119 | 119 | ||
120 | 120 | func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)] | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func throwIsActive () = throw("DApp is already active") | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func isActive () = if (active) | |
127 | 127 | then unit | |
128 | 128 | else throw("DApp is inactive at this moment") | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func isAdminCall (i) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)) | |
132 | 132 | then unit | |
133 | 133 | else throw("Only admin can call this function") | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func isSelfCall (i) = if ((this == i.caller)) | |
137 | 137 | then unit | |
138 | 138 | else throw("Only contract itself can call this function") | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | let big2 = toBigInt(2) | |
142 | 142 | ||
143 | 143 | let iter10 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | |
144 | 144 | ||
145 | 145 | let iter15 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
146 | 146 | ||
147 | 147 | let iter16 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] | |
148 | 148 | ||
149 | 149 | let blockTimestamp = height | |
150 | 150 | ||
151 | 151 | func assert (a) = if (a) | |
152 | 152 | then false | |
153 | 153 | else true | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | func calculateFeeDiscount (userAddr) = { | |
157 | 157 | let user = match userAddr { | |
158 | 158 | case u: Address => | |
159 | 159 | toString(u) | |
160 | 160 | case u: String => | |
161 | 161 | u | |
162 | 162 | case _ => | |
163 | 163 | throw("Unknow type of user Addr") | |
164 | 164 | } | |
165 | 165 | let swopAmount = valueOrElse(getInteger(govAddress, (user + kUserGSwopInGov)), 0) | |
166 | 166 | let gSwopAmount = valueOrElse(getInteger(govAddress, (user + kUserGSwopInGov)), swopAmount) | |
167 | 167 | let discountValues = split(getStringValue(oracle, kDiscountValues), ",") | |
168 | 168 | let discounts = split(getStringValue(oracle, kDiscounts), ",") | |
169 | 169 | if (if ((gSwopAmount >= parseIntValue(discountValues[0]))) | |
170 | 170 | then (parseIntValue(discountValues[1]) > gSwopAmount) | |
171 | 171 | else false) | |
172 | 172 | then (feeScale6 - parseIntValue(discounts[0])) | |
173 | 173 | else if (if ((gSwopAmount >= parseIntValue(discountValues[1]))) | |
174 | 174 | then (parseIntValue(discountValues[2]) > gSwopAmount) | |
175 | 175 | else false) | |
176 | 176 | then (feeScale6 - parseIntValue(discounts[1])) | |
177 | 177 | else if (if ((gSwopAmount >= parseIntValue(discountValues[2]))) | |
178 | 178 | then (parseIntValue(discountValues[3]) > gSwopAmount) | |
179 | 179 | else false) | |
180 | 180 | then (feeScale6 - parseIntValue(discounts[2])) | |
181 | 181 | else if (if ((gSwopAmount >= parseIntValue(discountValues[3]))) | |
182 | 182 | then (parseIntValue(discountValues[4]) > gSwopAmount) | |
183 | 183 | else false) | |
184 | 184 | then (feeScale6 - parseIntValue(discounts[3])) | |
185 | 185 | else if ((gSwopAmount >= parseIntValue(discountValues[4]))) | |
186 | 186 | then (feeScale6 - parseIntValue(discounts[4])) | |
187 | 187 | else feeScale6 | |
188 | 188 | } | |
189 | 189 | ||
190 | 190 | ||
191 | 191 | func _A () = { | |
192 | 192 | let t1 = future_A_time | |
193 | 193 | let A1 = future_A | |
194 | 194 | if ((t1 > blockTimestamp)) | |
195 | 195 | then { | |
196 | 196 | let A0 = initial_A | |
197 | 197 | let t0 = initial_A_time | |
198 | 198 | if ((A1 > A0)) | |
199 | 199 | then (A0 + (((A1 - A0) * (blockTimestamp - t0)) / (t1 - t0))) | |
200 | 200 | else (A0 - (((A0 - A1) * (blockTimestamp - t0)) / (t1 - t0))) | |
201 | 201 | } | |
202 | 202 | else A1 | |
203 | 203 | } | |
204 | 204 | ||
205 | 205 | ||
206 | 206 | func _xp () = { | |
207 | 207 | func assetBalances (acc,assetId) = (acc :+ valueOrElse(getInteger(this, (assetId + kAssetBalance)), 0)) | |
208 | 208 | ||
209 | 209 | let $l = assetIds | |
210 | 210 | let $s = size($l) | |
211 | 211 | let $acc0 = nil | |
212 | 212 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
213 | 213 | then $a | |
214 | 214 | else assetBalances($a, $l[$i]) | |
215 | 215 | ||
216 | 216 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
217 | 217 | then $a | |
218 | 218 | else throw("List size exceeds 10") | |
219 | 219 | ||
220 | 220 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
221 | 221 | } | |
222 | 222 | ||
223 | 223 | ||
224 | 224 | func _xp_mem (xp) = xp | |
225 | 225 | ||
226 | 226 | ||
227 | 227 | func sumList (acc,element) = (acc + element) | |
228 | 228 | ||
229 | 229 | ||
230 | 230 | func get_D (xp,amp) = { | |
231 | 231 | let @ = invoke(this, "D", [xp, amp], nil) | |
232 | 232 | if ($isInstanceOf(@, "Int")) | |
233 | 233 | then @ | |
234 | 234 | else throw(($getType(@) + " couldn't be cast to Int")) | |
235 | 235 | } | |
236 | 236 | ||
237 | 237 | ||
238 | 238 | func get_D_internal (xp,amp) = { | |
239 | 239 | let S = { | |
240 | 240 | let $l = xp | |
241 | 241 | let $s = size($l) | |
242 | 242 | let $acc0 = 0 | |
243 | 243 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
244 | 244 | then $a | |
245 | 245 | else sumList($a, $l[$i]) | |
246 | 246 | ||
247 | 247 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
248 | 248 | then $a | |
249 | 249 | else throw("List size exceeds 10") | |
250 | 250 | ||
251 | 251 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
252 | 252 | } | |
253 | 253 | if ((S == 0)) | |
254 | 254 | then 0 | |
255 | 255 | else { | |
256 | 256 | let Ann = (amp * nCoins) | |
257 | 257 | let AnnS = (toBigInt(Ann) * toBigInt(S)) | |
258 | 258 | let Ann1 = toBigInt((Ann - 1)) | |
259 | 259 | func Dproc (acc,i) = if ((acc._2 == true)) | |
260 | 260 | then acc | |
261 | 261 | else { | |
262 | 262 | let Dprev = acc._1 | |
263 | 263 | func D_PProc (D_P,i) = if ((nCoins > i)) | |
264 | 264 | then ((D_P * Dprev) / (toBigInt(xp[i]) * toBigInt(nCoins))) | |
265 | 265 | else D_P | |
266 | 266 | ||
267 | 267 | let D_P = { | |
268 | 268 | let $l = iter10 | |
269 | 269 | let $s = size($l) | |
270 | 270 | let $acc0 = Dprev | |
271 | 271 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
272 | 272 | then $a | |
273 | 273 | else D_PProc($a, $l[$i]) | |
274 | 274 | ||
275 | 275 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
276 | 276 | then $a | |
277 | 277 | else throw("List size exceeds 10") | |
278 | 278 | ||
279 | 279 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
280 | 280 | } | |
281 | 281 | let D = fraction((AnnS + (toBigInt(nCoins) * D_P)), Dprev, ((Ann1 * Dprev) + (toBigInt((nCoins + 1)) * D_P))) | |
282 | 282 | if ((D > Dprev)) | |
283 | 283 | then if ((1 >= toInt((D - Dprev)))) | |
284 | 284 | then $Tuple2(D, true) | |
285 | 285 | else $Tuple2(D, false) | |
286 | 286 | else if ((1 >= toInt((Dprev - D)))) | |
287 | 287 | then $Tuple2(D, true) | |
288 | 288 | else $Tuple2(D, false) | |
289 | 289 | } | |
290 | 290 | ||
291 | 291 | let $t064616527 = { | |
292 | 292 | let $l = iter15 | |
293 | 293 | let $s = size($l) | |
294 | 294 | let $acc0 = $Tuple2(toBigInt(S), false) | |
295 | 295 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
296 | 296 | then $a | |
297 | 297 | else Dproc($a, $l[$i]) | |
298 | 298 | ||
299 | 299 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
300 | 300 | then $a | |
301 | 301 | else throw("List size exceeds 15") | |
302 | 302 | ||
303 | 303 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
304 | 304 | } | |
305 | 305 | let D = $t064616527._1 | |
306 | 306 | let finished = $t064616527._2 | |
307 | 307 | if ((finished == false)) | |
308 | 308 | then throw(("get_D() not finished with " + toString(D))) | |
309 | 309 | else toInt(D) | |
310 | 310 | } | |
311 | 311 | } | |
312 | 312 | ||
313 | 313 | ||
314 | 314 | func getDMem (xp,amp) = get_D(_xp_mem(xp), amp) | |
315 | 315 | ||
316 | 316 | ||
317 | 317 | func getY (in,out,x,xp_) = if (assert((in != out))) | |
318 | 318 | then throw("same coin") | |
319 | 319 | else if (assert(if ((out >= 0)) | |
320 | 320 | then (in >= 0) | |
321 | 321 | else false)) | |
322 | 322 | then throw("below zero") | |
323 | 323 | else if (assert(if ((nCoins > out)) | |
324 | 324 | then (nCoins > in) | |
325 | 325 | else false)) | |
326 | 326 | then throw("above N_COINS") | |
327 | 327 | else { | |
328 | 328 | let amp = _A() | |
329 | 329 | let D = get_D(xp_, amp) | |
330 | 330 | let Ann = (amp * nCoins) | |
331 | 331 | func S_c (acc,i) = { | |
332 | 332 | let $t070987115 = acc | |
333 | 333 | let S_ = $t070987115._1 | |
334 | 334 | let c = $t070987115._2 | |
335 | 335 | let x_ = if ((in == i)) | |
336 | 336 | then x | |
337 | 337 | else xp_[i] | |
338 | 338 | if (if ((i != out)) | |
339 | 339 | then (nCoins > i) | |
340 | 340 | else false) | |
341 | 341 | then $Tuple2((S_ + x_), fraction(c, toBigInt(D), toBigInt((x_ * nCoins)))) | |
342 | 342 | else $Tuple2(S_, c) | |
343 | 343 | } | |
344 | 344 | ||
345 | 345 | let $t073237378 = { | |
346 | 346 | let $l = iter10 | |
347 | 347 | let $s = size($l) | |
348 | 348 | let $acc0 = $Tuple2(0, toBigInt(D)) | |
349 | 349 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
350 | 350 | then $a | |
351 | 351 | else S_c($a, $l[$i]) | |
352 | 352 | ||
353 | 353 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
354 | 354 | then $a | |
355 | 355 | else throw("List size exceeds 10") | |
356 | 356 | ||
357 | 357 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
358 | 358 | } | |
359 | 359 | let S_ = $t073237378._1 | |
360 | 360 | let c_ = $t073237378._2 | |
361 | 361 | let c = fraction(c_, toBigInt(D), toBigInt((Ann * nCoins))) | |
362 | 362 | let bD = toBigInt(((S_ + (D / Ann)) - D)) | |
363 | 363 | func y_proc (acc,_i) = if ((acc._2 == true)) | |
364 | 364 | then acc | |
365 | 365 | else { | |
366 | 366 | let y_prev = acc._1 | |
367 | 367 | let y = (((y_prev * y_prev) + c) / ((big2 * y_prev) + bD)) | |
368 | 368 | if ((y > y_prev)) | |
369 | 369 | then if ((1 >= toInt((y - y_prev)))) | |
370 | 370 | then $Tuple2(y, true) | |
371 | 371 | else $Tuple2(y, false) | |
372 | 372 | else if ((1 >= toInt((y_prev - y)))) | |
373 | 373 | then $Tuple2(y, true) | |
374 | 374 | else $Tuple2(y, false) | |
375 | 375 | } | |
376 | 376 | ||
377 | 377 | let $t078607927 = { | |
378 | 378 | let $l = iter16 | |
379 | 379 | let $s = size($l) | |
380 | 380 | let $acc0 = $Tuple2(toBigInt(D), false) | |
381 | 381 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
382 | 382 | then $a | |
383 | 383 | else y_proc($a, $l[$i]) | |
384 | 384 | ||
385 | 385 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
386 | 386 | then $a | |
387 | 387 | else throw("List size exceeds 16") | |
388 | 388 | ||
389 | 389 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16) | |
390 | 390 | } | |
391 | 391 | let y = $t078607927._1 | |
392 | 392 | let finished = $t078607927._2 | |
393 | 393 | if ((finished == false)) | |
394 | 394 | then throw(("getY() not finished with " + toString(y))) | |
395 | 395 | else toInt(y) | |
396 | 396 | } | |
397 | 397 | ||
398 | 398 | ||
399 | 399 | func get_y_D (A_,in,xp,D) = if (assert((in >= 0))) | |
400 | 400 | then throw("i below zero") | |
401 | 401 | else if (assert((nCoins > in))) | |
402 | 402 | then throw("i above N_COINS") | |
403 | 403 | else { | |
404 | 404 | let Ann = (A_ * nCoins) | |
405 | 405 | func S_c (acc,i) = { | |
406 | 406 | let $t083068323 = acc | |
407 | 407 | let S_ = $t083068323._1 | |
408 | 408 | let c = $t083068323._2 | |
409 | 409 | let x_ = if (if ((in != i)) | |
410 | 410 | then (nCoins > i) | |
411 | 411 | else false) | |
412 | 412 | then xp[i] | |
413 | 413 | else 0 | |
414 | 414 | if (if ((nCoins > i)) | |
415 | 415 | then (in != i) | |
416 | 416 | else false) | |
417 | 417 | then $Tuple2((S_ + x_), fraction(c, toBigInt(D), toBigInt((x_ * nCoins)))) | |
418 | 418 | else $Tuple2(S_, c) | |
419 | 419 | } | |
420 | 420 | ||
421 | 421 | let $t085438598 = { | |
422 | 422 | let $l = iter10 | |
423 | 423 | let $s = size($l) | |
424 | 424 | let $acc0 = $Tuple2(0, toBigInt(D)) | |
425 | 425 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
426 | 426 | then $a | |
427 | 427 | else S_c($a, $l[$i]) | |
428 | 428 | ||
429 | 429 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
430 | 430 | then $a | |
431 | 431 | else throw("List size exceeds 10") | |
432 | 432 | ||
433 | 433 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
434 | 434 | } | |
435 | 435 | let S_ = $t085438598._1 | |
436 | 436 | let c_ = $t085438598._2 | |
437 | 437 | let c = fraction(c_, toBigInt(D), toBigInt((Ann * nCoins))) | |
438 | 438 | let bD = toBigInt(((S_ + (D / Ann)) - D)) | |
439 | 439 | func y_D_proc (acc,i) = if ((acc._2 == true)) | |
440 | 440 | then acc | |
441 | 441 | else { | |
442 | 442 | let y_prev = acc._1 | |
443 | 443 | let y = (((y_prev * y_prev) + c) / ((big2 * y_prev) + bD)) | |
444 | 444 | if ((y > y_prev)) | |
445 | 445 | then if ((1 >= toInt((y - y_prev)))) | |
446 | 446 | then $Tuple2(y, true) | |
447 | 447 | else $Tuple2(y, false) | |
448 | 448 | else if ((1 >= toInt((y_prev - y)))) | |
449 | 449 | then $Tuple2(y, true) | |
450 | 450 | else $Tuple2(y, false) | |
451 | 451 | } | |
452 | 452 | ||
453 | 453 | let $t090819150 = { | |
454 | 454 | let $l = iter16 | |
455 | 455 | let $s = size($l) | |
456 | 456 | let $acc0 = $Tuple2(toBigInt(D), false) | |
457 | 457 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
458 | 458 | then $a | |
459 | 459 | else y_D_proc($a, $l[$i]) | |
460 | 460 | ||
461 | 461 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
462 | 462 | then $a | |
463 | 463 | else throw("List size exceeds 16") | |
464 | 464 | ||
465 | 465 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16) | |
466 | 466 | } | |
467 | 467 | let y = $t090819150._1 | |
468 | 468 | let finished = $t090819150._2 | |
469 | 469 | if ((finished == false)) | |
470 | 470 | then throw(("get_y_D() not finished with " + toString(y))) | |
471 | 471 | else toInt(y) | |
472 | 472 | } | |
473 | 473 | ||
474 | 474 | ||
475 | 475 | func _calcWithdrawOneCoin (xp,_token_amount,i,caller) = { | |
476 | 476 | let feeDiscount = calculateFeeDiscount(caller) | |
477 | 477 | let amp = _A() | |
478 | 478 | let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1))) | |
479 | 479 | let total_supply = shareSupply | |
480 | 480 | let D0 = get_D(xp, amp) | |
481 | 481 | let D1 = (D0 - fraction(_token_amount, D0, total_supply)) | |
482 | 482 | let new_y = get_y_D(amp, i, xp, D1) | |
483 | 483 | let dy_0 = (xp[i] - new_y) | |
484 | 484 | func xp_reduced_proc (acc,xp_j) = { | |
485 | 485 | let $t097919820 = acc | |
486 | 486 | let xp_reduced = $t097919820._1 | |
487 | 487 | let index = $t097919820._2 | |
488 | 488 | let dx_expected = if ((index == i)) | |
489 | 489 | then (fraction(xp_j, D1, D0) - new_y) | |
490 | 490 | else (xp_j - fraction(xp_j, D1, D0)) | |
491 | 491 | $Tuple2((xp_reduced :+ (xp_j - fraction(_fee, dx_expected, feeScale6))), (index + 1)) | |
492 | 492 | } | |
493 | 493 | ||
494 | 494 | let $t01008210146 = { | |
495 | 495 | let $l = xp | |
496 | 496 | let $s = size($l) | |
497 | 497 | let $acc0 = $Tuple2(nil, 0) | |
498 | 498 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
499 | 499 | then $a | |
500 | 500 | else xp_reduced_proc($a, $l[$i]) | |
501 | 501 | ||
502 | 502 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
503 | 503 | then $a | |
504 | 504 | else throw("List size exceeds 10") | |
505 | 505 | ||
506 | 506 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
507 | 507 | } | |
508 | 508 | let xp_reduced = $t01008210146._1 | |
509 | 509 | let index = $t01008210146._2 | |
510 | 510 | let xp_reduced_i = xp_reduced[i] | |
511 | 511 | let dy = ((xp_reduced_i - get_y_D(amp, i, xp_reduced, D1)) - 1) | |
512 | 512 | $Tuple2(dy, (dy_0 - dy)) | |
513 | 513 | } | |
514 | 514 | ||
515 | 515 | ||
516 | 516 | func getStrAssetId (assetId) = match assetId { | |
517 | 517 | case id: ByteVector => | |
518 | 518 | toBase58String(id) | |
519 | 519 | case waves: Unit => | |
520 | 520 | "WAVES" | |
521 | 521 | case _ => | |
522 | 522 | throw("Match error") | |
523 | 523 | } | |
524 | 524 | ||
525 | 525 | ||
526 | 526 | func calcStakingFuncAndAddres (stake,assetId) = if (stake) | |
527 | 527 | then $Tuple2("lockNeutrino", stakingUSDNAddress) | |
528 | 528 | else $Tuple2("unlockNeutrino", stakingUSDNAddress) | |
529 | 529 | ||
530 | 530 | ||
531 | 531 | func calcStakingParams (stake,amount,assetId) = if (stake) | |
532 | 532 | then { | |
533 | 533 | let $t01071010776 = calcStakingFuncAndAddres(stake, assetId) | |
534 | 534 | let call = $t01071010776._1 | |
535 | 535 | let stakingAddr = $t01071010776._2 | |
536 | 536 | $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)]) | |
537 | 537 | } | |
538 | 538 | else { | |
539 | 539 | let $t01086210928 = calcStakingFuncAndAddres(stake, assetId) | |
540 | 540 | let call = $t01086210928._1 | |
541 | 541 | let stakingAddr = $t01086210928._2 | |
542 | 542 | $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil) | |
543 | 543 | } | |
544 | 544 | ||
545 | 545 | ||
546 | 546 | func stake (amount,assetIdString) = if (containsElement(stakingAssets, assetIdString)) | |
547 | 547 | then { | |
548 | 548 | let $t01111511217 = calcStakingParams(true, amount, fromBase58String(assetIdString)) | |
549 | 549 | let call = $t01111511217._1 | |
550 | 550 | let addr = $t01111511217._2 | |
551 | 551 | let params = $t01111511217._3 | |
552 | 552 | let payments = $t01111511217._4 | |
553 | 553 | invoke(addr, call, params, payments) | |
554 | 554 | } | |
555 | 555 | else 0 | |
556 | 556 | ||
557 | 557 | ||
558 | 558 | func unstake (amount,assetIdString) = if (containsElement(stakingAssets, assetIdString)) | |
559 | 559 | then { | |
560 | 560 | let $t01140211505 = calcStakingParams(false, amount, fromBase58String(assetIdString)) | |
561 | 561 | let call = $t01140211505._1 | |
562 | 562 | let addr = $t01140211505._2 | |
563 | 563 | let params = $t01140211505._3 | |
564 | 564 | let payments = $t01140211505._4 | |
565 | 565 | invoke(addr, call, params, payments) | |
566 | 566 | } | |
567 | 567 | else 0 | |
568 | 568 | ||
569 | 569 | ||
570 | 570 | func stakedAmount (assetId) = { | |
571 | 571 | let stakedAmountCalculated = match assetId { | |
572 | 572 | case aId: ByteVector => | |
573 | 573 | if ((aId == USDN)) | |
574 | 574 | then getInteger(stakingUSDNAddress, ((("rpd_balance_" + toBase58String(aId)) + "_") + toString(this))) | |
575 | 575 | else 0 | |
576 | 576 | case _: Unit => | |
577 | 577 | 0 | |
578 | 578 | case _ => | |
579 | 579 | throw("Match error") | |
580 | 580 | } | |
581 | 581 | match stakedAmountCalculated { | |
582 | 582 | case i: Int => | |
583 | 583 | i | |
584 | 584 | case _ => | |
585 | 585 | 0 | |
586 | 586 | } | |
587 | 587 | } | |
588 | 588 | ||
589 | 589 | ||
590 | 590 | func checkSuspicious () = { | |
591 | 591 | let contractBalances = _xp() | |
592 | 592 | func checkBalance (acc,assetId) = { | |
593 | 593 | let $t01211612141 = acc | |
594 | 594 | let suspicious = $t01211612141._1 | |
595 | 595 | let i = $t01211612141._2 | |
596 | 596 | if (suspicious) | |
597 | 597 | then $Tuple2(suspicious, i) | |
598 | 598 | else { | |
599 | 599 | let aBalance = (assetBalance(this, fromBase58String(assetId)) + stakedAmount(fromBase58String(assetId))) | |
600 | 600 | if ((contractBalances[i] > aBalance)) | |
601 | 601 | then $Tuple2(true, i) | |
602 | 602 | else $Tuple2(false, (i + 1)) | |
603 | 603 | } | |
604 | 604 | } | |
605 | 605 | ||
606 | 606 | let $l = assetIds | |
607 | 607 | let $s = size($l) | |
608 | 608 | let $acc0 = $Tuple2(false, 0) | |
609 | 609 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
610 | 610 | then $a | |
611 | 611 | else checkBalance($a, $l[$i]) | |
612 | 612 | ||
613 | 613 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
614 | 614 | then $a | |
615 | 615 | else throw("List size exceeds 10") | |
616 | 616 | ||
617 | 617 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
618 | 618 | } | |
619 | 619 | ||
620 | 620 | ||
621 | 621 | func suspendSuspicious (i) = suspend(("Suspicious state with asset: " + assetIds[i])) | |
622 | 622 | ||
623 | 623 | ||
624 | 624 | func returnPayments (caller,payments) = { | |
625 | 625 | func parsePayments (acc,payment) = (acc :+ ScriptTransfer(caller, payment.amount, payment.assetId)) | |
626 | 626 | ||
627 | 627 | let $l = payments | |
628 | 628 | let $s = size($l) | |
629 | 629 | let $acc0 = nil | |
630 | 630 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
631 | 631 | then $a | |
632 | 632 | else parsePayments($a, $l[$i]) | |
633 | 633 | ||
634 | 634 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
635 | 635 | then $a | |
636 | 636 | else throw("List size exceeds 10") | |
637 | 637 | ||
638 | 638 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
639 | 639 | } | |
640 | 640 | ||
641 | 641 | ||
642 | 642 | func checkDAppThreshold (newBalances) = { | |
643 | 643 | let dAppThresholdCoef = valueOrErrorMessage(getInteger(this, kDAppThresholdCoef), "No dAppThresholdCoef key") | |
644 | 644 | let thresholdScale = 10000 | |
645 | 645 | let maxBalance = max(newBalances) | |
646 | 646 | let minBalance = min(newBalances) | |
647 | 647 | let ratio = fraction(maxBalance, thresholdScale, minBalance) | |
648 | 648 | if ((ratio > (dAppThresholdCoef * thresholdScale))) | |
649 | 649 | then throw("New balance in assets of the DApp is less than threshold") | |
650 | 650 | else false | |
651 | 651 | } | |
652 | 652 | ||
653 | 653 | ||
654 | 654 | func checkCoins (assetIds) = { | |
655 | 655 | let coins = split(assetIds, ",") | |
656 | 656 | if ((size(coins) > 10)) | |
657 | 657 | then throw("To many coins, max coins size 10") | |
658 | 658 | else { | |
659 | 659 | func checkCoin (error,assetId) = { | |
660 | 660 | let asset = valueOrErrorMessage(fromBase58String(assetId), ("fromBase58String: " + assetId)) | |
661 | 661 | let decimals = valueOrErrorMessage(assetInfo(asset), ("assetInfo: " + assetId)).decimals | |
662 | 662 | if ((decimals != DECIMALS)) | |
663 | 663 | then throw("wrong decimals") | |
664 | 664 | else false | |
665 | 665 | } | |
666 | 666 | ||
667 | 667 | let $l = coins | |
668 | 668 | let $s = size($l) | |
669 | 669 | let $acc0 = false | |
670 | 670 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
671 | 671 | then $a | |
672 | 672 | else checkCoin($a, $l[$i]) | |
673 | 673 | ||
674 | 674 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
675 | 675 | then $a | |
676 | 676 | else throw("List size exceeds 10") | |
677 | 677 | ||
678 | 678 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
679 | 679 | } | |
680 | 680 | } | |
681 | 681 | ||
682 | 682 | ||
683 | 683 | @Callable(msg) | |
684 | 684 | func D (xp,amp) = { | |
685 | 685 | let D = get_D_internal(xp, amp) | |
686 | 686 | $Tuple2([IntegerEntry("D", D)], D) | |
687 | 687 | } | |
688 | 688 | ||
689 | 689 | ||
690 | 690 | ||
691 | 691 | @Callable(msg) | |
692 | 692 | func init (assetIds,_A,_dAppThresholdCoef) = if (!(isDataStorageUntouched(this))) | |
693 | 693 | then throw("Already initialized") | |
694 | 694 | else if ((0 >= _A)) | |
695 | 695 | then throw("Amp must be must > 0") | |
696 | 696 | else if ((0 >= _dAppThresholdCoef)) | |
697 | 697 | then throw("dApp Threshold Coef must be > 0") | |
698 | 698 | else { | |
699 | 699 | let shareName = "s_Multi_USD" | |
700 | 700 | let shareDescription = ("ShareToken of SwopFi protocol for MultiStable USD pool at address " + toString(this)) | |
701 | 701 | let issueToken = Issue(shareName, shareDescription, 0, 6, true) | |
702 | 702 | let tokenId = calculateAssetId(issueToken) | |
703 | 703 | if (checkCoins(assetIds)) | |
704 | 704 | then throw() | |
705 | 705 | else [StringEntry(kVersion, version), StringEntry(kAssets, assetIds), IntegerEntry("initial_A", _A), IntegerEntry("future_A", _A), IntegerEntry(kFee, getIntegerValue(oracle, "base_fee_flat")), StringEntry(kShareAssetId, toBase58String(tokenId)), IntegerEntry(kShareAssetSupply, 0), IntegerEntry(kDAppThresholdCoef, _dAppThresholdCoef), BooleanEntry(kActive, true), issueToken] | |
706 | 706 | } | |
707 | 707 | ||
708 | 708 | ||
709 | 709 | ||
710 | 710 | @Callable(msg) | |
711 | 711 | func addLiquidity (minMintAmount,stakeFarming,lockType) = valueOrElse(isActive(), { | |
712 | 712 | let amp = _A() | |
713 | 713 | let xp = _xp() | |
714 | 714 | let D0 = if ((shareSupply == 0)) | |
715 | 715 | then 0 | |
716 | 716 | else getDMem(xp, amp) | |
717 | - | let payments = msg.payments | |
717 | + | let $t01534915562 = if ((size(msg.payments) > nCoins)) | |
718 | + | then $Tuple2(removeByIndex(msg.payments, (size(msg.payments) - 1)), [msg.payments[(size(msg.payments) - 1)]]) | |
719 | + | else $Tuple2(msg.payments, nil) | |
720 | + | let payments = $t01534915562._1 | |
721 | + | let lockFee = $t01534915562._2 | |
718 | 722 | let paymentsSize = size(payments) | |
719 | 723 | func validPayments (n) = if ((paymentsSize > nCoins)) | |
720 | 724 | then throw(("payments size > " + toString(nCoins))) | |
721 | 725 | else if ((1 > paymentsSize)) | |
722 | 726 | then throw("payments size < 1") | |
723 | 727 | else if (if ((shareSupply == 0)) | |
724 | 728 | then (nCoins != paymentsSize) | |
725 | 729 | else false) | |
726 | 730 | then throw("initial deposit requires all coins") | |
727 | 731 | else { | |
728 | 732 | func paymantValid (acc,payment) = if (containsElement(assetIds, getStrAssetId(payment.assetId))) | |
729 | 733 | then true | |
730 | 734 | else throw("Invalid asset in payment") | |
731 | 735 | ||
732 | 736 | let $l = payments | |
733 | 737 | let $s = size($l) | |
734 | 738 | let $acc0 = false | |
735 | 739 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
736 | 740 | then $a | |
737 | 741 | else paymantValid($a, $l[$i]) | |
738 | 742 | ||
739 | 743 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
740 | 744 | then $a | |
741 | 745 | else throw("List size exceeds 10") | |
742 | 746 | ||
743 | 747 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
744 | 748 | } | |
745 | 749 | ||
746 | 750 | if (!(validPayments(paymentsSize))) | |
747 | 751 | then throw() | |
748 | 752 | else { | |
749 | 753 | let suspicious = checkSuspicious() | |
750 | 754 | if (suspicious._1) | |
751 | 755 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, payments)) | |
752 | 756 | else { | |
753 | 757 | func parsePayments (acc,assetId) = { | |
754 | - | let $ | |
755 | - | let newBalances = $ | |
756 | - | let i = $ | |
758 | + | let $t01643216458 = acc | |
759 | + | let newBalances = $t01643216458._1 | |
760 | + | let i = $t01643216458._2 | |
757 | 761 | func parsePayment (newBalance,payment) = if ((getStrAssetId(payment.assetId) == assetId)) | |
758 | 762 | then (newBalance + payment.amount) | |
759 | 763 | else newBalance | |
760 | 764 | ||
761 | 765 | let newBalace = { | |
762 | 766 | let $l = payments | |
763 | 767 | let $s = size($l) | |
764 | 768 | let $acc0 = xp[i] | |
765 | 769 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
766 | 770 | then $a | |
767 | 771 | else parsePayment($a, $l[$i]) | |
768 | 772 | ||
769 | 773 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
770 | 774 | then $a | |
771 | 775 | else throw("List size exceeds 10") | |
772 | 776 | ||
773 | 777 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
774 | 778 | } | |
775 | 779 | $Tuple2((newBalances :+ newBalace), (i + 1)) | |
776 | 780 | } | |
777 | 781 | ||
778 | - | let $ | |
782 | + | let $t01680816875 = { | |
779 | 783 | let $l = assetIds | |
780 | 784 | let $s = size($l) | |
781 | 785 | let $acc0 = $Tuple2(nil, 0) | |
782 | 786 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
783 | 787 | then $a | |
784 | 788 | else parsePayments($a, $l[$i]) | |
785 | 789 | ||
786 | 790 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
787 | 791 | then $a | |
788 | 792 | else throw("List size exceeds 10") | |
789 | 793 | ||
790 | 794 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
791 | 795 | } | |
792 | - | let newBalances = $ | |
793 | - | let k = $ | |
796 | + | let newBalances = $t01680816875._1 | |
797 | + | let k = $t01680816875._2 | |
794 | 798 | if (checkDAppThreshold(newBalances)) | |
795 | 799 | then throw() | |
796 | 800 | else { | |
797 | 801 | let D1 = getDMem(newBalances, amp) | |
798 | 802 | if (assert((D1 > D0))) | |
799 | 803 | then throw("D1 > D0") | |
800 | 804 | else { | |
801 | 805 | let feeDiscount = calculateFeeDiscount(msg.caller) | |
802 | 806 | func calcScriptActions (acc,newBalance) = { | |
803 | - | let $ | |
804 | - | let invBalances = $ | |
805 | - | let scriptActions = $ | |
806 | - | let i = $ | |
807 | + | let $t01719517236 = acc | |
808 | + | let invBalances = $t01719517236._1 | |
809 | + | let scriptActions = $t01719517236._2 | |
810 | + | let i = $t01719517236._3 | |
807 | 811 | if ((shareSupply > 0)) | |
808 | 812 | then { | |
809 | 813 | let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1))) | |
810 | 814 | let fees = { | |
811 | 815 | let idealBalance = fraction(D1, xp[i], D0) | |
812 | 816 | let difference = if ((idealBalance > newBalance)) | |
813 | 817 | then (idealBalance - newBalance) | |
814 | 818 | else (newBalance - idealBalance) | |
815 | 819 | fraction(_fee, difference, feeScale6) | |
816 | 820 | } | |
817 | 821 | let governanceFees = fraction(fees, feeGovernance, feeScale6) | |
818 | 822 | let finalBalance = (newBalance - fees) | |
819 | 823 | let invariantBalance = (newBalance - fees) | |
820 | 824 | let pmt = (newBalance - xp[i]) | |
821 | 825 | let lpFees = (fees - governanceFees) | |
822 | 826 | let inv = if ((pmt > 0)) | |
823 | 827 | then stake((pmt - fees), assetIds[i]) | |
824 | 828 | else unstake(fees, assetIds[i]) | |
825 | 829 | if ((inv == inv)) | |
826 | 830 | then { | |
827 | 831 | let airdrop = if ((lpFees > 0)) | |
828 | 832 | then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(fromBase58String(assetIds[i]), lpFees)]) | |
829 | 833 | else 0 | |
830 | 834 | if ((airdrop == airdrop)) | |
831 | 835 | then $Tuple3((invBalances :+ invariantBalance), (scriptActions ++ [ScriptTransfer(moneyBoxAddress, governanceFees, fromBase58String(assetIds[i])), IntegerEntry((assetIds[i] + kAssetBalance), finalBalance)]), (i + 1)) | |
832 | 836 | else throw("Strict value is not equal to itself.") | |
833 | 837 | } | |
834 | 838 | else throw("Strict value is not equal to itself.") | |
835 | 839 | } | |
836 | 840 | else { | |
837 | 841 | let inv = stake(newBalance, assetIds[i]) | |
838 | 842 | if ((inv == inv)) | |
839 | 843 | then $Tuple3((invBalances :+ newBalance), (scriptActions :+ IntegerEntry((assetIds[i] + kAssetBalance), newBalance)), (i + 1)) | |
840 | 844 | else throw("Strict value is not equal to itself.") | |
841 | 845 | } | |
842 | 846 | } | |
843 | 847 | ||
844 | - | let $ | |
848 | + | let $t01894119029 = { | |
845 | 849 | let $l = newBalances | |
846 | 850 | let $s = size($l) | |
847 | 851 | let $acc0 = $Tuple3(nil, nil, 0) | |
848 | 852 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
849 | 853 | then $a | |
850 | 854 | else calcScriptActions($a, $l[$i]) | |
851 | 855 | ||
852 | 856 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
853 | 857 | then $a | |
854 | 858 | else throw("List size exceeds 10") | |
855 | 859 | ||
856 | 860 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
857 | 861 | } | |
858 | - | let invBalances = $ | |
859 | - | let scriptActions = $ | |
862 | + | let invBalances = $t01894119029._1 | |
863 | + | let scriptActions = $t01894119029._2 | |
860 | 864 | let D2 = getDMem(invBalances, amp) | |
861 | 865 | let mint_amount = if ((shareSupply == 0)) | |
862 | 866 | then D1 | |
863 | 867 | else fraction(shareSupply, (D2 - D0), D0) | |
864 | 868 | if (assert((mint_amount >= minMintAmount))) | |
865 | 869 | then throw("Slippage screwed you") | |
866 | 870 | else if (stakeFarming) | |
867 | 871 | then { | |
868 | 872 | let re = invoke(this, "reissueShare", [mint_amount], nil) | |
869 | 873 | if ((re == re)) | |
870 | 874 | then { | |
871 | - | let s = invoke(farmingAddress, "lockShareTokens", [toString(this), lockType], [AttachedPayment(shareAssetId, mint_amount)]) | |
875 | + | let s = invoke(farmingAddress, "lockShareTokens", [toString(this), lockType], ([AttachedPayment(shareAssetId, mint_amount)] ++ lockFee)) | |
872 | 876 | if ((s == s)) | |
873 | 877 | then (scriptActions :+ IntegerEntry(kShareAssetSupply, (shareSupply + mint_amount))) | |
874 | 878 | else throw("Strict value is not equal to itself.") | |
875 | 879 | } | |
876 | 880 | else throw("Strict value is not equal to itself.") | |
877 | 881 | } | |
878 | 882 | else (scriptActions ++ [Reissue(shareAssetId, mint_amount, true), ScriptTransfer(msg.caller, mint_amount, shareAssetId), IntegerEntry(kShareAssetSupply, (shareSupply + mint_amount))]) | |
879 | 883 | } | |
880 | 884 | } | |
881 | 885 | } | |
882 | 886 | } | |
883 | 887 | }) | |
884 | 888 | ||
885 | 889 | ||
886 | 890 | ||
887 | 891 | @Callable(msg) | |
888 | 892 | func calcMintAmount (newBalances,user) = { | |
889 | 893 | let amp = _A() | |
890 | 894 | let xp = _xp() | |
891 | 895 | let D1 = getDMem(newBalances, amp) | |
892 | 896 | if ((shareSupply == 0)) | |
893 | 897 | then $Tuple2(nil, D1) | |
894 | 898 | else { | |
895 | 899 | let D0 = getDMem(xp, amp) | |
896 | 900 | let feeDiscount = calculateFeeDiscount(user) | |
897 | 901 | func calcInvBalances (acc,newBalance) = { | |
898 | - | let $ | |
899 | - | let invBalances = $ | |
900 | - | let i = $ | |
902 | + | let $t02027920305 = acc | |
903 | + | let invBalances = $t02027920305._1 | |
904 | + | let i = $t02027920305._2 | |
901 | 905 | let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1))) | |
902 | 906 | let fees = { | |
903 | 907 | let idealBalance = fraction(D1, xp[i], D0) | |
904 | 908 | let difference = if ((idealBalance > newBalance)) | |
905 | 909 | then (idealBalance - newBalance) | |
906 | 910 | else (newBalance - idealBalance) | |
907 | 911 | fraction(_fee, difference, feeScale6) | |
908 | 912 | } | |
909 | 913 | let invariantBalance = (newBalance - fees) | |
910 | 914 | $Tuple2((invBalances :+ invariantBalance), (i + 1)) | |
911 | 915 | } | |
912 | 916 | ||
913 | - | let $ | |
917 | + | let $t02090720977 = { | |
914 | 918 | let $l = newBalances | |
915 | 919 | let $s = size($l) | |
916 | 920 | let $acc0 = $Tuple2(nil, 0) | |
917 | 921 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
918 | 922 | then $a | |
919 | 923 | else calcInvBalances($a, $l[$i]) | |
920 | 924 | ||
921 | 925 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
922 | 926 | then $a | |
923 | 927 | else throw("List size exceeds 10") | |
924 | 928 | ||
925 | 929 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
926 | 930 | } | |
927 | - | let invBalances = $ | |
928 | - | let k = $ | |
931 | + | let invBalances = $t02090720977._1 | |
932 | + | let k = $t02090720977._2 | |
929 | 933 | let D2 = getDMem(invBalances, amp) | |
930 | 934 | let mintAmount = fraction(shareSupply, (D2 - D0), D0) | |
931 | 935 | $Tuple2(nil, mintAmount) | |
932 | 936 | } | |
933 | 937 | } | |
934 | 938 | ||
935 | 939 | ||
936 | 940 | ||
937 | 941 | @Callable(msg) | |
938 | 942 | func reissueShare (amount) = valueOrElse(isSelfCall(msg), [Reissue(shareAssetId, amount, true)]) | |
939 | 943 | ||
940 | 944 | ||
941 | 945 | ||
942 | 946 | @Callable(msg) | |
943 | 947 | func getDy (assetFrom,assetTo,dx,userAddress) = { | |
944 | 948 | let xp = _xp() | |
945 | 949 | let fromIndex = valueOrErrorMessage(indexOf(assetIds, assetFrom), "unknown token in") | |
946 | 950 | let toIndex = valueOrErrorMessage(indexOf(assetIds, assetTo), "unknown token out") | |
947 | 951 | let x = (xp[fromIndex] + dx) | |
948 | 952 | let y = getY(fromIndex, toIndex, x, xp) | |
949 | 953 | let dy = ((xp[toIndex] - y) - 1) | |
950 | 954 | let feeDiscount = calculateFeeDiscount(Address(fromBase58String(userAddress))) | |
951 | 955 | let _fee = fraction(fraction(fee, feeDiscount, feeScale6, CEILING), dy, feeScale6) | |
952 | 956 | $Tuple2(nil, $Tuple2((dy - _fee), _fee)) | |
953 | 957 | } | |
954 | 958 | ||
955 | 959 | ||
956 | 960 | ||
957 | 961 | @Callable(msg) | |
958 | 962 | func exchange (tokenOut,min_dy) = valueOrElse(isActive(), if ((size(msg.payments) != 1)) | |
959 | 963 | then throw("size(payments) != 1") | |
960 | 964 | else { | |
961 | 965 | let suspicious = checkSuspicious() | |
962 | 966 | if (suspicious._1) | |
963 | 967 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments)) | |
964 | 968 | else { | |
965 | 969 | let payment = msg.payments[0] | |
966 | 970 | let tokenIn = getStrAssetId(payment.assetId) | |
967 | 971 | let tokenOutB58 = fromBase58String(tokenOut) | |
968 | 972 | let dx = payment.amount | |
969 | 973 | let fromIndex = valueOrErrorMessage(indexOf(assetIds, tokenIn), "unknown token in") | |
970 | 974 | let toIndex = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out") | |
971 | 975 | let xp = _xp() | |
972 | 976 | let x = (xp[fromIndex] + dx) | |
973 | 977 | let y = getY(fromIndex, toIndex, x, xp) | |
974 | 978 | let _dy = ((xp[toIndex] - y) - 1) | |
975 | 979 | let feeDiscount = calculateFeeDiscount(msg.originCaller) | |
976 | 980 | let _fee = fraction(_dy, fraction(fee, feeDiscount, feeScale6, CEILING), feeScale6) | |
977 | 981 | let dy = (_dy - _fee) | |
978 | 982 | let governanceFees = fraction(_fee, feeGovernance, feeScale6) | |
979 | 983 | if (assert((dy >= min_dy))) | |
980 | 984 | then throw("Exchange resulted in fewer coins than expected") | |
981 | 985 | else { | |
982 | 986 | func makeNewBalances (acc,tokenBalance) = { | |
983 | - | let $ | |
984 | - | let newBalances = $ | |
985 | - | let i = $ | |
987 | + | let $t02301823044 = acc | |
988 | + | let newBalances = $t02301823044._1 | |
989 | + | let i = $t02301823044._2 | |
986 | 990 | if ((i == fromIndex)) | |
987 | 991 | then $Tuple2((newBalances :+ (tokenBalance + dx)), (i + 1)) | |
988 | 992 | else if ((i == toIndex)) | |
989 | 993 | then $Tuple2((newBalances :+ (tokenBalance - _dy)), (i + 1)) | |
990 | 994 | else $Tuple2((newBalances :+ tokenBalance), (i + 1)) | |
991 | 995 | } | |
992 | 996 | ||
993 | - | let $ | |
997 | + | let $t02329523356 = { | |
994 | 998 | let $l = xp | |
995 | 999 | let $s = size($l) | |
996 | 1000 | let $acc0 = $Tuple2(nil, 0) | |
997 | 1001 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
998 | 1002 | then $a | |
999 | 1003 | else makeNewBalances($a, $l[$i]) | |
1000 | 1004 | ||
1001 | 1005 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1002 | 1006 | then $a | |
1003 | 1007 | else throw("List size exceeds 10") | |
1004 | 1008 | ||
1005 | 1009 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1006 | 1010 | } | |
1007 | - | let newBalances = $ | |
1008 | - | let i = $ | |
1011 | + | let newBalances = $t02329523356._1 | |
1012 | + | let i = $t02329523356._2 | |
1009 | 1013 | if (checkDAppThreshold(newBalances)) | |
1010 | 1014 | then throw() | |
1011 | 1015 | else { | |
1012 | 1016 | let s = stake(payment.amount, getStrAssetId(payment.assetId)) | |
1013 | 1017 | if ((s == s)) | |
1014 | 1018 | then { | |
1015 | 1019 | let us = unstake(_dy, tokenOut) | |
1016 | 1020 | if ((us == us)) | |
1017 | 1021 | then { | |
1018 | 1022 | let lpFees = (_fee - governanceFees) | |
1019 | 1023 | let airdrop = if ((lpFees > 0)) | |
1020 | 1024 | then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(tokenOutB58, lpFees)]) | |
1021 | 1025 | else 0 | |
1022 | 1026 | if ((airdrop == airdrop)) | |
1023 | 1027 | then $Tuple2([IntegerEntry((tokenIn + kAssetBalance), x), IntegerEntry((tokenOut + kAssetBalance), (xp[toIndex] - _dy)), ScriptTransfer(msg.caller, dy, tokenOutB58), ScriptTransfer(moneyBoxAddress, governanceFees, tokenOutB58)], [dy, tokenOutB58]) | |
1024 | 1028 | else throw("Strict value is not equal to itself.") | |
1025 | 1029 | } | |
1026 | 1030 | else throw("Strict value is not equal to itself.") | |
1027 | 1031 | } | |
1028 | 1032 | else throw("Strict value is not equal to itself.") | |
1029 | 1033 | } | |
1030 | 1034 | } | |
1031 | 1035 | } | |
1032 | 1036 | }) | |
1033 | 1037 | ||
1034 | 1038 | ||
1035 | 1039 | ||
1036 | 1040 | @Callable(msg) | |
1037 | 1041 | func withdraw (minAmounts) = valueOrElse(isActive(), if ((size(msg.payments) != 1)) | |
1038 | 1042 | then throw("size(payments) != 1") | |
1039 | 1043 | else { | |
1040 | 1044 | let pmtAmount = msg.payments[0].amount | |
1041 | 1045 | let pmtAssetId = msg.payments[0].assetId | |
1042 | 1046 | if ((shareAssetId != pmtAssetId)) | |
1043 | 1047 | then throw("unknown payment token") | |
1044 | 1048 | else { | |
1045 | 1049 | let suspicious = checkSuspicious() | |
1046 | 1050 | if (suspicious._1) | |
1047 | 1051 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.originCaller, msg.payments)) | |
1048 | 1052 | else { | |
1049 | 1053 | func calcScriptActions (acc,balance) = { | |
1050 | - | let $ | |
1051 | - | let scriptActions = $ | |
1052 | - | let i = $ | |
1054 | + | let $t02464724675 = acc | |
1055 | + | let scriptActions = $t02464724675._1 | |
1056 | + | let i = $t02464724675._2 | |
1053 | 1057 | let wAmount = fraction(balance, pmtAmount, shareSupply) | |
1054 | 1058 | if (assert((wAmount >= minAmounts[i]))) | |
1055 | 1059 | then throw("Withdrawal resulted in fewer coins than expected") | |
1056 | 1060 | else { | |
1057 | 1061 | let us = unstake(wAmount, assetIds[i]) | |
1058 | 1062 | if ((us == us)) | |
1059 | 1063 | then $Tuple2((scriptActions ++ [IntegerEntry((assetIds[i] + kAssetBalance), (balance - wAmount)), ScriptTransfer(msg.originCaller, wAmount, fromBase58String(assetIds[i]))]), (i + 1)) | |
1060 | 1064 | else throw("Strict value is not equal to itself.") | |
1061 | 1065 | } | |
1062 | 1066 | } | |
1063 | 1067 | ||
1064 | - | let $ | |
1068 | + | let $t02516525233 = { | |
1065 | 1069 | let $l = _xp() | |
1066 | 1070 | let $s = size($l) | |
1067 | 1071 | let $acc0 = $Tuple2(nil, 0) | |
1068 | 1072 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1069 | 1073 | then $a | |
1070 | 1074 | else calcScriptActions($a, $l[$i]) | |
1071 | 1075 | ||
1072 | 1076 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1073 | 1077 | then $a | |
1074 | 1078 | else throw("List size exceeds 10") | |
1075 | 1079 | ||
1076 | 1080 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1077 | 1081 | } | |
1078 | - | let scriptActions = $ | |
1079 | - | let i = $ | |
1082 | + | let scriptActions = $t02516525233._1 | |
1083 | + | let i = $t02516525233._2 | |
1080 | 1084 | (scriptActions ++ [Burn(shareAssetId, pmtAmount), IntegerEntry(kShareAssetSupply, (shareSupply - pmtAmount))]) | |
1081 | 1085 | } | |
1082 | 1086 | } | |
1083 | 1087 | }) | |
1084 | 1088 | ||
1085 | 1089 | ||
1086 | 1090 | ||
1087 | 1091 | @Callable(msg) | |
1088 | 1092 | func withdrawWithUnlock (minAmounts,unlockAmount) = valueOrElse(isActive(), if ((0 >= unlockAmount)) | |
1089 | 1093 | then throw("Unlock amount must be positive") | |
1090 | 1094 | else { | |
1091 | 1095 | let suspicious = checkSuspicious() | |
1092 | 1096 | if (suspicious._1) | |
1093 | 1097 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments)) | |
1094 | 1098 | else { | |
1095 | 1099 | let pmtAmount = if ((size(msg.payments) > 0)) | |
1096 | 1100 | then if ((size(msg.payments) != 1)) | |
1097 | 1101 | then throw("size(payments) != 1") | |
1098 | 1102 | else { | |
1099 | 1103 | let pmtAssetId = msg.payments[0].assetId | |
1100 | 1104 | if ((shareAssetId != pmtAssetId)) | |
1101 | 1105 | then throw("unknown payment token") | |
1102 | 1106 | else msg.payments[0].amount | |
1103 | 1107 | } | |
1104 | 1108 | else 0 | |
1105 | 1109 | let unlock = invoke(farmingAddress, "withdrawShareTokens", [toString(this), unlockAmount], nil) | |
1106 | 1110 | if ((unlock == unlock)) | |
1107 | 1111 | then { | |
1108 | 1112 | let withdrawAmount = (pmtAmount + unlockAmount) | |
1109 | 1113 | let inv = invoke(this, "withdraw", [minAmounts], [AttachedPayment(shareAssetId, withdrawAmount)]) | |
1110 | 1114 | if ((inv == inv)) | |
1111 | 1115 | then nil | |
1112 | 1116 | else throw("Strict value is not equal to itself.") | |
1113 | 1117 | } | |
1114 | 1118 | else throw("Strict value is not equal to itself.") | |
1115 | 1119 | } | |
1116 | 1120 | }) | |
1117 | 1121 | ||
1118 | 1122 | ||
1119 | 1123 | ||
1120 | 1124 | @Callable(msg) | |
1121 | 1125 | func calcWithdrawOneCoin (tokenAmount,tokenOut,user) = if ((0 >= tokenAmount)) | |
1122 | 1126 | then throw("Amount must be positive") | |
1123 | 1127 | else { | |
1124 | 1128 | let i = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out") | |
1125 | 1129 | $Tuple2(nil, _calcWithdrawOneCoin(_xp(), tokenAmount, i, Address(fromBase58String(user)))._1) | |
1126 | 1130 | } | |
1127 | 1131 | ||
1128 | 1132 | ||
1129 | 1133 | ||
1130 | 1134 | @Callable(msg) | |
1131 | 1135 | func withdrawOneCoin (tokenOut,minAmount) = valueOrElse(isActive(), if ((size(msg.payments) != 1)) | |
1132 | 1136 | then throw("size(payments) != 1") | |
1133 | 1137 | else { | |
1134 | 1138 | let suspicious = checkSuspicious() | |
1135 | 1139 | if (suspicious._1) | |
1136 | 1140 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.originCaller, msg.payments)) | |
1137 | 1141 | else { | |
1138 | 1142 | let pmtAmount = msg.payments[0].amount | |
1139 | 1143 | let pmtAssetId = msg.payments[0].assetId | |
1140 | 1144 | if ((pmtAssetId != shareAssetId)) | |
1141 | 1145 | then throw("unknown token") | |
1142 | 1146 | else { | |
1143 | 1147 | let outIndex = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out") | |
1144 | 1148 | let tokenOutB58 = fromBase58String(tokenOut) | |
1145 | 1149 | let xp = _xp() | |
1146 | - | let $ | |
1147 | - | let dy = $ | |
1148 | - | let dy_fee = $ | |
1150 | + | let $t02726527347 = _calcWithdrawOneCoin(xp, pmtAmount, outIndex, msg.originCaller) | |
1151 | + | let dy = $t02726527347._1 | |
1152 | + | let dy_fee = $t02726527347._2 | |
1149 | 1153 | if (assert((dy >= minAmount))) | |
1150 | 1154 | then throw("Not enough coins removed") | |
1151 | 1155 | else { | |
1152 | 1156 | let governanceFees = fraction(dy_fee, feeGovernance, feeScale6) | |
1153 | 1157 | let dy_and_fee = (dy + dy_fee) | |
1154 | 1158 | func makeNewBalances (acc,tokenBalance) = { | |
1155 | - | let $ | |
1156 | - | let newBalances = $ | |
1157 | - | let i = $ | |
1159 | + | let $t02760527631 = acc | |
1160 | + | let newBalances = $t02760527631._1 | |
1161 | + | let i = $t02760527631._2 | |
1158 | 1162 | if ((i == outIndex)) | |
1159 | 1163 | then $Tuple2((newBalances :+ (tokenBalance - dy_and_fee)), (i + 1)) | |
1160 | 1164 | else $Tuple2((newBalances :+ tokenBalance), (i + 1)) | |
1161 | 1165 | } | |
1162 | 1166 | ||
1163 | - | let $ | |
1167 | + | let $t02779827859 = { | |
1164 | 1168 | let $l = xp | |
1165 | 1169 | let $s = size($l) | |
1166 | 1170 | let $acc0 = $Tuple2(nil, 0) | |
1167 | 1171 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1168 | 1172 | then $a | |
1169 | 1173 | else makeNewBalances($a, $l[$i]) | |
1170 | 1174 | ||
1171 | 1175 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1172 | 1176 | then $a | |
1173 | 1177 | else throw("List size exceeds 10") | |
1174 | 1178 | ||
1175 | 1179 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1176 | 1180 | } | |
1177 | - | let newBalances = $ | |
1178 | - | let v = $ | |
1181 | + | let newBalances = $t02779827859._1 | |
1182 | + | let v = $t02779827859._2 | |
1179 | 1183 | if (checkDAppThreshold(newBalances)) | |
1180 | 1184 | then throw() | |
1181 | 1185 | else { | |
1182 | 1186 | let us = unstake(dy_and_fee, tokenOut) | |
1183 | 1187 | if ((us == us)) | |
1184 | 1188 | then { | |
1185 | 1189 | let lpFees = (dy_fee - governanceFees) | |
1186 | 1190 | let airdrop = if ((lpFees > 0)) | |
1187 | 1191 | then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(tokenOutB58, lpFees)]) | |
1188 | 1192 | else 0 | |
1189 | 1193 | if ((airdrop == airdrop)) | |
1190 | 1194 | then [ScriptTransfer(msg.originCaller, dy, tokenOutB58), IntegerEntry((assetIds[outIndex] + kAssetBalance), (xp[outIndex] - dy_and_fee)), Burn(shareAssetId, pmtAmount), ScriptTransfer(moneyBoxAddress, governanceFees, tokenOutB58), IntegerEntry(kShareAssetSupply, (shareSupply - pmtAmount))] | |
1191 | 1195 | else throw("Strict value is not equal to itself.") | |
1192 | 1196 | } | |
1193 | 1197 | else throw("Strict value is not equal to itself.") | |
1194 | 1198 | } | |
1195 | 1199 | } | |
1196 | 1200 | } | |
1197 | 1201 | } | |
1198 | 1202 | }) | |
1199 | 1203 | ||
1200 | 1204 | ||
1201 | 1205 | ||
1202 | 1206 | @Callable(msg) | |
1203 | 1207 | func withdrawOneCoinWithUnlock (tokenOut,minAmount,unlockAmount) = valueOrElse(isActive(), if ((0 >= unlockAmount)) | |
1204 | 1208 | then throw("Unlock amount must be positive") | |
1205 | 1209 | else { | |
1206 | 1210 | let suspicious = checkSuspicious() | |
1207 | 1211 | if (suspicious._1) | |
1208 | 1212 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments)) | |
1209 | 1213 | else { | |
1210 | 1214 | let pmtAmount = if ((size(msg.payments) > 0)) | |
1211 | 1215 | then if ((size(msg.payments) != 1)) | |
1212 | 1216 | then throw("size(payments) != 1") | |
1213 | 1217 | else { | |
1214 | 1218 | let pmtAssetId = msg.payments[0].assetId | |
1215 | 1219 | if ((shareAssetId != pmtAssetId)) | |
1216 | 1220 | then throw("unknown payment token") | |
1217 | 1221 | else msg.payments[0].amount | |
1218 | 1222 | } | |
1219 | 1223 | else 0 | |
1220 | 1224 | let unlock = invoke(farmingAddress, "withdrawShareTokens", [toString(this), unlockAmount], nil) | |
1221 | 1225 | if ((unlock == unlock)) | |
1222 | 1226 | then { | |
1223 | 1227 | let withdrawAmount = (pmtAmount + unlockAmount) | |
1224 | 1228 | let inv = invoke(this, "withdrawOneCoin", [tokenOut, minAmount], [AttachedPayment(shareAssetId, withdrawAmount)]) | |
1225 | 1229 | if ((inv == inv)) | |
1226 | 1230 | then nil | |
1227 | 1231 | else throw("Strict value is not equal to itself.") | |
1228 | 1232 | } | |
1229 | 1233 | else throw("Strict value is not equal to itself.") | |
1230 | 1234 | } | |
1231 | 1235 | }) | |
1232 | 1236 | ||
1233 | 1237 | ||
1234 | 1238 | ||
1235 | 1239 | @Callable(msg) | |
1236 | 1240 | func A () = $Tuple2(nil, _A()) | |
1237 | 1241 | ||
1238 | 1242 | ||
1239 | 1243 | ||
1240 | 1244 | @Callable(msg) | |
1241 | 1245 | func getVirtualPrice () = { | |
1242 | 1246 | let D = get_D(_xp(), _A()) | |
1243 | 1247 | $Tuple2(nil, fraction(D, PRECISION, shareSupply)) | |
1244 | 1248 | } | |
1245 | 1249 | ||
1246 | 1250 | ||
1247 | 1251 | ||
1248 | 1252 | @Callable(msg) | |
1249 | 1253 | func calcTokenAmount (amounts,deposit) = { | |
1250 | 1254 | let amp = _A() | |
1251 | 1255 | let balances = _xp() | |
1252 | 1256 | let D0 = getDMem(balances, amp) | |
1253 | 1257 | func calcNewBalances (acc,balance) = { | |
1254 | - | let $ | |
1255 | - | let newBalances = $ | |
1256 | - | let i = $ | |
1258 | + | let $t02987629902 = acc | |
1259 | + | let newBalances = $t02987629902._1 | |
1260 | + | let i = $t02987629902._2 | |
1257 | 1261 | let newBalance = (balance + (if (deposit) | |
1258 | 1262 | then amounts[i] | |
1259 | 1263 | else -(amounts[i]))) | |
1260 | 1264 | $Tuple2((newBalances :+ newBalance), (i + 1)) | |
1261 | 1265 | } | |
1262 | 1266 | ||
1263 | 1267 | let newBalances = ( let $l = balances | |
1264 | 1268 | let $s = size($l) | |
1265 | 1269 | let $acc0 = $Tuple2(nil, 0) | |
1266 | 1270 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1267 | 1271 | then $a | |
1268 | 1272 | else calcNewBalances($a, $l[$i]) | |
1269 | 1273 | ||
1270 | 1274 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1271 | 1275 | then $a | |
1272 | 1276 | else throw("List size exceeds 10") | |
1273 | 1277 | ||
1274 | 1278 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10))._1 | |
1275 | 1279 | let D1 = getDMem(newBalances, amp) | |
1276 | 1280 | let diff = if (deposit) | |
1277 | 1281 | then (D1 - D0) | |
1278 | 1282 | else (D0 - D1) | |
1279 | 1283 | $Tuple2(nil, fraction(diff, shareSupply, D0)) | |
1280 | 1284 | } | |
1281 | 1285 | ||
1282 | 1286 | ||
1283 | 1287 | ||
1284 | 1288 | @Callable(msg) | |
1285 | 1289 | func rampA (_futureA,_futureTime) = valueOrElse(isActive(), valueOrElse(isAdminCall(msg), if (assert((blockTimestamp >= (initial_A_time + MIN_RAMP_TIME)))) | |
1286 | 1290 | then throw("too often") | |
1287 | 1291 | else if (assert((_futureTime >= (blockTimestamp + MIN_RAMP_TIME)))) | |
1288 | 1292 | then throw("insufficient time") | |
1289 | 1293 | else { | |
1290 | 1294 | let _initial_A = _A() | |
1291 | 1295 | if (assert(if ((_futureA > 0)) | |
1292 | 1296 | then (MAX_A > _futureA) | |
1293 | 1297 | else false)) | |
1294 | 1298 | then throw("out of base range") | |
1295 | 1299 | else if (assert(if (if ((_futureA >= _initial_A)) | |
1296 | 1300 | then ((_initial_A * MAX_A_CHANGE) >= _futureA) | |
1297 | 1301 | else false) | |
1298 | 1302 | then true | |
1299 | 1303 | else if ((_initial_A > _futureA)) | |
1300 | 1304 | then ((_futureA * MAX_A_CHANGE) >= _initial_A) | |
1301 | 1305 | else false)) | |
1302 | 1306 | then throw("out of range") | |
1303 | 1307 | else [IntegerEntry("initial_A", _initial_A), IntegerEntry("future_A", _futureA), IntegerEntry("initial_A_time", blockTimestamp), IntegerEntry("future_A_time", _futureTime)] | |
1304 | 1308 | })) | |
1305 | 1309 | ||
1306 | 1310 | ||
1307 | 1311 | ||
1308 | 1312 | @Callable(msg) | |
1309 | 1313 | func stopRampA () = valueOrElse(isActive(), valueOrElse(isAdminCall(msg), { | |
1310 | 1314 | let currentA = _A() | |
1311 | 1315 | [IntegerEntry("initial_A", currentA), IntegerEntry("future_A", currentA), IntegerEntry("initial_A_time", blockTimestamp), IntegerEntry("future_A_time", blockTimestamp)] | |
1312 | 1316 | })) | |
1313 | 1317 | ||
1314 | 1318 | ||
1315 | 1319 | ||
1316 | 1320 | @Callable(msg) | |
1317 | 1321 | func shutdown () = valueOrElse(isAdminCall(msg), if (!(active)) | |
1318 | 1322 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified"))) | |
1319 | 1323 | else suspend("Paused by admin")) | |
1320 | 1324 | ||
1321 | 1325 | ||
1322 | 1326 | ||
1323 | 1327 | @Callable(msg) | |
1324 | 1328 | func activate () = valueOrElse(isAdminCall(msg), if (active) | |
1325 | 1329 | then throwIsActive() | |
1326 | 1330 | else [BooleanEntry(kActive, true), DeleteEntry(kCause)]) | |
1327 | 1331 | ||
1328 | 1332 | ||
1329 | 1333 | ||
1330 | 1334 | @Callable(msg) | |
1331 | 1335 | func takeIntoAccountExtraFunds () = valueOrElse(isActive(), if ((msg.caller != moneyBoxAddress)) | |
1332 | 1336 | then throw("Only the wallet can call this function") | |
1333 | 1337 | else { | |
1334 | 1338 | let balances = _xp() | |
1335 | 1339 | func takeExtraFunds (acc,assetId) = { | |
1336 | - | let $ | |
1337 | - | let sum = $ | |
1338 | - | let i = $ | |
1340 | + | let $t03224432262 = acc | |
1341 | + | let sum = $t03224432262._1 | |
1342 | + | let i = $t03224432262._2 | |
1339 | 1343 | let tokenB58 = fromBase58String(assetId) | |
1340 | 1344 | let rBalance = (assetBalance(this, tokenB58) + stakedAmount(tokenB58)) | |
1341 | 1345 | let enrollAmount = (rBalance - balances[i]) | |
1342 | 1346 | if ((0 > enrollAmount)) | |
1343 | 1347 | then suspend(("Enroll amount negative for asset" + assetId)) | |
1344 | 1348 | else { | |
1345 | 1349 | let airdrop = if ((enrollAmount > 0)) | |
1346 | 1350 | then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(tokenB58, enrollAmount)]) | |
1347 | 1351 | else 0 | |
1348 | 1352 | if ((airdrop == airdrop)) | |
1349 | 1353 | then $Tuple2((sum + enrollAmount), (i + 1)) | |
1350 | 1354 | else throw("Strict value is not equal to itself.") | |
1351 | 1355 | } | |
1352 | 1356 | } | |
1353 | 1357 | ||
1354 | 1358 | let k = { | |
1355 | 1359 | let $l = assetIds | |
1356 | 1360 | let $s = size($l) | |
1357 | 1361 | let $acc0 = $Tuple2(0, 0) | |
1358 | 1362 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1359 | 1363 | then $a | |
1360 | 1364 | else takeExtraFunds($a, $l[$i]) | |
1361 | 1365 | ||
1362 | 1366 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1363 | 1367 | then $a | |
1364 | 1368 | else throw("List size exceeds 10") | |
1365 | 1369 | ||
1366 | 1370 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1367 | 1371 | } | |
1368 | 1372 | if ((k._1 == 0)) | |
1369 | 1373 | then throw("No money to take") | |
1370 | 1374 | else nil | |
1371 | 1375 | }) | |
1372 | 1376 | ||
1373 | 1377 | ||
1374 | 1378 | @Verifier(tx) | |
1375 | 1379 | func verify () = { | |
1376 | 1380 | let multiSignedByAdmins = { | |
1377 | 1381 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
1378 | 1382 | then 1 | |
1379 | 1383 | else 0 | |
1380 | 1384 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
1381 | 1385 | then 1 | |
1382 | 1386 | else 0 | |
1383 | 1387 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
1384 | 1388 | then 1 | |
1385 | 1389 | else 0 | |
1386 | 1390 | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
1387 | 1391 | } | |
1388 | 1392 | match tx { | |
1389 | 1393 | case inv: InvokeScriptTransaction => | |
1390 | 1394 | let callTakeIntoAccount = if ((inv.dApp == this)) | |
1391 | 1395 | then (inv.function == "takeIntoAccountExtraFunds") | |
1392 | 1396 | else false | |
1393 | 1397 | let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
1394 | 1398 | then true | |
1395 | 1399 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2)) | |
1396 | 1400 | then true | |
1397 | 1401 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3)) | |
1398 | 1402 | then true | |
1399 | 1403 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyInvoke) | |
1400 | 1404 | if (if (callTakeIntoAccount) | |
1401 | 1405 | then signedByAdmin | |
1402 | 1406 | else false) | |
1403 | 1407 | then true | |
1404 | 1408 | else multiSignedByAdmins | |
1405 | 1409 | case _ => | |
1406 | 1410 | multiSignedByAdmins | |
1407 | 1411 | } | |
1408 | 1412 | } | |
1409 | 1413 |
github/deemru/w8io/026f985 149.71 ms ◑