tx · H5nDHCAQYfWvdHmpwq6BAKet1aHwZp2YKtdkh8e4rTVo 3MxWgDbE9EmjQj8b3LfFwa91FZizptyeQXS: -0.05000000 Waves 2022.10.25 18:27 [2288099] smart account 3MxWgDbE9EmjQj8b3LfFwa91FZizptyeQXS > SELF 0.00000000 Waves
{ "type": 13, "id": "H5nDHCAQYfWvdHmpwq6BAKet1aHwZp2YKtdkh8e4rTVo", "fee": 5000000, "feeAssetId": null, "timestamp": 1666711602112, "version": 2, "chainId": 84, "sender": "3MxWgDbE9EmjQj8b3LfFwa91FZizptyeQXS", "senderPublicKey": "C7xgcYqQ8qV8rmvzAjhQWq4cz82F6VJfXMNygvrTXsfW", "proofs": [ "472PU9nPdWGStGaU5igTEDK2dP64NyKqnipRYSXTWR8h9wTATqYsFR4aXDHusb8a84MHFQ5rsKbQeYquDvzsYGt8", "4MmQYQs3KW1Ukdtf8RTHKba6wb5zrNRrBaUrmQzWEA2AEg4ExaZiPJKnUruuD7W96yFB3YDGLMhVNe3VFQhYd4B3" ], "script": "base64:BgJmCAISBAoCEQESBQoDCAEBEgUKAwEEARIECgIRCBIDCgEBEgYKBAgIAQgSBAoCCAESAwoBERIECgIRARIFCgMBCAgSBAoCCAESBQoDCAEBEgASABIECgIRBBIECgIBARIAEgASABIAWAAJUFJFQ0lTSU9OAMCEPQAFTUFYX0EAwIQ9AAxNQVhfQV9DSEFOR0UACgAIREVDSU1BTFMABgANTUlOX1JBTVBfVElNRQkAaQIAgKMFADwAB3ZlcnNpb24CBTMuMC4wAAhrVmVyc2lvbgIHdmVyc2lvbgAHa0Fzc2V0cwIJYXNzZXRfaWRzAA1rQXNzZXRCYWxhbmNlAghfYmFsYW5jZQAHa0FjdGl2ZQIGYWN0aXZlAAZrQ2F1c2UCDnNodXRkb3duX2NhdXNlAA1rU2hhcmVBc3NldElkAg5zaGFyZV9hc3NldF9pZAARa1NoYXJlQXNzZXRTdXBwbHkCEnNoYXJlX2Fzc2V0X3N1cHBseQAEa0ZlZQ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HJG1hdGNoMAQTY2FsbFRha2VJbnRvQWNjb3VudAMJAAACCAUDaW52BGRBcHAFBHRoaXMJAAACCAUDaW52CGZ1bmN0aW9uAhl0YWtlSW50b0FjY291bnRFeHRyYUZ1bmRzBwQNc2lnbmVkQnlBZG1pbgMDAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUMYWRtaW5QdWJLZXkxBgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUMYWRtaW5QdWJLZXkyBgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUMYWRtaW5QdWJLZXkzBgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAURYWRtaW5QdWJLZXlJbnZva2UDAwUTY2FsbFRha2VJbnRvQWNjb3VudAUNc2lnbmVkQnlBZG1pbgcGBRNtdWx0aVNpZ25lZEJ5QWRtaW5zBRNtdWx0aVNpZ25lZEJ5QWRtaW5z4QUuPg==", "height": 2288099, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Aykfwr5jGhNU1JhkCPYo8TqJ3CeJcoZe7MeXSiyMnhgb Next: 4q3Vp3qM3eNq4RPCGQm1hT9GtXi47KZS539WZp4kZnkL Diff:
Old | New | Differences | |
---|---|---|---|
89 | 89 | ||
90 | 90 | let lpFarmingAddress = Address(getBase58FromOracle(kLPFarmingAddress)) | |
91 | 91 | ||
92 | - | let USDN = base58' | |
92 | + | let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' | |
93 | 93 | ||
94 | 94 | let stakingAssets = [toBase58String(USDN)] | |
95 | 95 | ||
714 | 714 | let D0 = if ((shareSupply == 0)) | |
715 | 715 | then 0 | |
716 | 716 | else getDMem(xp, amp) | |
717 | - | let $t01534915562 = if ((size(msg.payments) > nCoins)) | |
717 | + | let $t01534915604 = if (if ((lockType > 0)) | |
718 | + | then (msg.payments[(size(msg.payments) - 1)].assetId == unit) | |
719 | + | else false) | |
718 | 720 | then $Tuple2(removeByIndex(msg.payments, (size(msg.payments) - 1)), [msg.payments[(size(msg.payments) - 1)]]) | |
719 | 721 | else $Tuple2(msg.payments, nil) | |
720 | - | let payments = $ | |
721 | - | let lockFee = $ | |
722 | + | let payments = $t01534915604._1 | |
723 | + | let lockFee = $t01534915604._2 | |
722 | 724 | let paymentsSize = size(payments) | |
723 | 725 | func validPayments (n) = if ((paymentsSize > nCoins)) | |
724 | 726 | then throw(("payments size > " + toString(nCoins))) | |
755 | 757 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, payments)) | |
756 | 758 | else { | |
757 | 759 | func parsePayments (acc,assetId) = { | |
758 | - | let $ | |
759 | - | let newBalances = $ | |
760 | - | let i = $ | |
760 | + | let $t01647416500 = acc | |
761 | + | let newBalances = $t01647416500._1 | |
762 | + | let i = $t01647416500._2 | |
761 | 763 | func parsePayment (newBalance,payment) = if ((getStrAssetId(payment.assetId) == assetId)) | |
762 | 764 | then (newBalance + payment.amount) | |
763 | 765 | else newBalance | |
779 | 781 | $Tuple2((newBalances :+ newBalace), (i + 1)) | |
780 | 782 | } | |
781 | 783 | ||
782 | - | let $ | |
784 | + | let $t01685016917 = { | |
783 | 785 | let $l = assetIds | |
784 | 786 | let $s = size($l) | |
785 | 787 | let $acc0 = $Tuple2(nil, 0) | |
793 | 795 | ||
794 | 796 | $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) | |
795 | 797 | } | |
796 | - | let newBalances = $ | |
797 | - | let k = $ | |
798 | + | let newBalances = $t01685016917._1 | |
799 | + | let k = $t01685016917._2 | |
798 | 800 | if (checkDAppThreshold(newBalances)) | |
799 | 801 | then throw() | |
800 | 802 | else { | |
804 | 806 | else { | |
805 | 807 | let feeDiscount = calculateFeeDiscount(msg.caller) | |
806 | 808 | func calcScriptActions (acc,newBalance) = { | |
807 | - | let $ | |
808 | - | let invBalances = $ | |
809 | - | let scriptActions = $ | |
810 | - | let i = $ | |
809 | + | let $t01723717278 = acc | |
810 | + | let invBalances = $t01723717278._1 | |
811 | + | let scriptActions = $t01723717278._2 | |
812 | + | let i = $t01723717278._3 | |
811 | 813 | if ((shareSupply > 0)) | |
812 | 814 | then { | |
813 | 815 | let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1))) | |
845 | 847 | } | |
846 | 848 | } | |
847 | 849 | ||
848 | - | let $ | |
850 | + | let $t01898319071 = { | |
849 | 851 | let $l = newBalances | |
850 | 852 | let $s = size($l) | |
851 | 853 | let $acc0 = $Tuple3(nil, nil, 0) | |
859 | 861 | ||
860 | 862 | $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) | |
861 | 863 | } | |
862 | - | let invBalances = $ | |
863 | - | let scriptActions = $ | |
864 | + | let invBalances = $t01898319071._1 | |
865 | + | let scriptActions = $t01898319071._2 | |
864 | 866 | let D2 = getDMem(invBalances, amp) | |
865 | 867 | let mint_amount = if ((shareSupply == 0)) | |
866 | 868 | then D1 | |
899 | 901 | let D0 = getDMem(xp, amp) | |
900 | 902 | let feeDiscount = calculateFeeDiscount(user) | |
901 | 903 | func calcInvBalances (acc,newBalance) = { | |
902 | - | let $ | |
903 | - | let invBalances = $ | |
904 | - | let i = $ | |
904 | + | let $t02032120347 = acc | |
905 | + | let invBalances = $t02032120347._1 | |
906 | + | let i = $t02032120347._2 | |
905 | 907 | let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1))) | |
906 | 908 | let fees = { | |
907 | 909 | let idealBalance = fraction(D1, xp[i], D0) | |
914 | 916 | $Tuple2((invBalances :+ invariantBalance), (i + 1)) | |
915 | 917 | } | |
916 | 918 | ||
917 | - | let $ | |
919 | + | let $t02094921019 = { | |
918 | 920 | let $l = newBalances | |
919 | 921 | let $s = size($l) | |
920 | 922 | let $acc0 = $Tuple2(nil, 0) | |
928 | 930 | ||
929 | 931 | $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) | |
930 | 932 | } | |
931 | - | let invBalances = $ | |
932 | - | let k = $ | |
933 | + | let invBalances = $t02094921019._1 | |
934 | + | let k = $t02094921019._2 | |
933 | 935 | let D2 = getDMem(invBalances, amp) | |
934 | 936 | let mintAmount = fraction(shareSupply, (D2 - D0), D0) | |
935 | 937 | $Tuple2(nil, mintAmount) | |
984 | 986 | then throw("Exchange resulted in fewer coins than expected") | |
985 | 987 | else { | |
986 | 988 | func makeNewBalances (acc,tokenBalance) = { | |
987 | - | let $ | |
988 | - | let newBalances = $ | |
989 | - | let i = $ | |
989 | + | let $t02306023086 = acc | |
990 | + | let newBalances = $t02306023086._1 | |
991 | + | let i = $t02306023086._2 | |
990 | 992 | if ((i == fromIndex)) | |
991 | 993 | then $Tuple2((newBalances :+ (tokenBalance + dx)), (i + 1)) | |
992 | 994 | else if ((i == toIndex)) | |
994 | 996 | else $Tuple2((newBalances :+ tokenBalance), (i + 1)) | |
995 | 997 | } | |
996 | 998 | ||
997 | - | let $ | |
999 | + | let $t02333723398 = { | |
998 | 1000 | let $l = xp | |
999 | 1001 | let $s = size($l) | |
1000 | 1002 | let $acc0 = $Tuple2(nil, 0) | |
1008 | 1010 | ||
1009 | 1011 | $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) | |
1010 | 1012 | } | |
1011 | - | let newBalances = $ | |
1012 | - | let i = $ | |
1013 | + | let newBalances = $t02333723398._1 | |
1014 | + | let i = $t02333723398._2 | |
1013 | 1015 | if (checkDAppThreshold(newBalances)) | |
1014 | 1016 | then throw() | |
1015 | 1017 | else { | |
1051 | 1053 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.originCaller, msg.payments)) | |
1052 | 1054 | else { | |
1053 | 1055 | func calcScriptActions (acc,balance) = { | |
1054 | - | let $ | |
1055 | - | let scriptActions = $ | |
1056 | - | let i = $ | |
1056 | + | let $t02468924717 = acc | |
1057 | + | let scriptActions = $t02468924717._1 | |
1058 | + | let i = $t02468924717._2 | |
1057 | 1059 | let wAmount = fraction(balance, pmtAmount, shareSupply) | |
1058 | 1060 | if (assert((wAmount >= minAmounts[i]))) | |
1059 | 1061 | then throw("Withdrawal resulted in fewer coins than expected") | |
1065 | 1067 | } | |
1066 | 1068 | } | |
1067 | 1069 | ||
1068 | - | let $ | |
1070 | + | let $t02520725275 = { | |
1069 | 1071 | let $l = _xp() | |
1070 | 1072 | let $s = size($l) | |
1071 | 1073 | let $acc0 = $Tuple2(nil, 0) | |
1079 | 1081 | ||
1080 | 1082 | $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) | |
1081 | 1083 | } | |
1082 | - | let scriptActions = $ | |
1083 | - | let i = $ | |
1084 | + | let scriptActions = $t02520725275._1 | |
1085 | + | let i = $t02520725275._2 | |
1084 | 1086 | (scriptActions ++ [Burn(shareAssetId, pmtAmount), IntegerEntry(kShareAssetSupply, (shareSupply - pmtAmount))]) | |
1085 | 1087 | } | |
1086 | 1088 | } | |
1147 | 1149 | let outIndex = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out") | |
1148 | 1150 | let tokenOutB58 = fromBase58String(tokenOut) | |
1149 | 1151 | let xp = _xp() | |
1150 | - | let $ | |
1151 | - | let dy = $ | |
1152 | - | let dy_fee = $ | |
1152 | + | let $t02730727389 = _calcWithdrawOneCoin(xp, pmtAmount, outIndex, msg.originCaller) | |
1153 | + | let dy = $t02730727389._1 | |
1154 | + | let dy_fee = $t02730727389._2 | |
1153 | 1155 | if (assert((dy >= minAmount))) | |
1154 | 1156 | then throw("Not enough coins removed") | |
1155 | 1157 | else { | |
1156 | 1158 | let governanceFees = fraction(dy_fee, feeGovernance, feeScale6) | |
1157 | 1159 | let dy_and_fee = (dy + dy_fee) | |
1158 | 1160 | func makeNewBalances (acc,tokenBalance) = { | |
1159 | - | let $ | |
1160 | - | let newBalances = $ | |
1161 | - | let i = $ | |
1161 | + | let $t02764727673 = acc | |
1162 | + | let newBalances = $t02764727673._1 | |
1163 | + | let i = $t02764727673._2 | |
1162 | 1164 | if ((i == outIndex)) | |
1163 | 1165 | then $Tuple2((newBalances :+ (tokenBalance - dy_and_fee)), (i + 1)) | |
1164 | 1166 | else $Tuple2((newBalances :+ tokenBalance), (i + 1)) | |
1165 | 1167 | } | |
1166 | 1168 | ||
1167 | - | let $ | |
1169 | + | let $t02784027901 = { | |
1168 | 1170 | let $l = xp | |
1169 | 1171 | let $s = size($l) | |
1170 | 1172 | let $acc0 = $Tuple2(nil, 0) | |
1178 | 1180 | ||
1179 | 1181 | $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) | |
1180 | 1182 | } | |
1181 | - | let newBalances = $ | |
1182 | - | let v = $ | |
1183 | + | let newBalances = $t02784027901._1 | |
1184 | + | let v = $t02784027901._2 | |
1183 | 1185 | if (checkDAppThreshold(newBalances)) | |
1184 | 1186 | then throw() | |
1185 | 1187 | else { | |
1255 | 1257 | let balances = _xp() | |
1256 | 1258 | let D0 = getDMem(balances, amp) | |
1257 | 1259 | func calcNewBalances (acc,balance) = { | |
1258 | - | let $ | |
1259 | - | let newBalances = $ | |
1260 | - | let i = $ | |
1260 | + | let $t02991829944 = acc | |
1261 | + | let newBalances = $t02991829944._1 | |
1262 | + | let i = $t02991829944._2 | |
1261 | 1263 | let newBalance = (balance + (if (deposit) | |
1262 | 1264 | then amounts[i] | |
1263 | 1265 | else -(amounts[i]))) | |
1337 | 1339 | else { | |
1338 | 1340 | let balances = _xp() | |
1339 | 1341 | func takeExtraFunds (acc,assetId) = { | |
1340 | - | let $ | |
1341 | - | let sum = $ | |
1342 | - | let i = $ | |
1342 | + | let $t03228632304 = acc | |
1343 | + | let sum = $t03228632304._1 | |
1344 | + | let i = $t03228632304._2 | |
1343 | 1345 | let tokenB58 = fromBase58String(assetId) | |
1344 | 1346 | let rBalance = (assetBalance(this, tokenB58) + stakedAmount(tokenB58)) | |
1345 | 1347 | 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 | - | let USDN = base58' | |
92 | + | let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' | |
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 $t01534915562 = if ((size(msg.payments) > nCoins)) | |
717 | + | let $t01534915604 = if (if ((lockType > 0)) | |
718 | + | then (msg.payments[(size(msg.payments) - 1)].assetId == unit) | |
719 | + | else false) | |
718 | 720 | then $Tuple2(removeByIndex(msg.payments, (size(msg.payments) - 1)), [msg.payments[(size(msg.payments) - 1)]]) | |
719 | 721 | else $Tuple2(msg.payments, nil) | |
720 | - | let payments = $ | |
721 | - | let lockFee = $ | |
722 | + | let payments = $t01534915604._1 | |
723 | + | let lockFee = $t01534915604._2 | |
722 | 724 | let paymentsSize = size(payments) | |
723 | 725 | func validPayments (n) = if ((paymentsSize > nCoins)) | |
724 | 726 | then throw(("payments size > " + toString(nCoins))) | |
725 | 727 | else if ((1 > paymentsSize)) | |
726 | 728 | then throw("payments size < 1") | |
727 | 729 | else if (if ((shareSupply == 0)) | |
728 | 730 | then (nCoins != paymentsSize) | |
729 | 731 | else false) | |
730 | 732 | then throw("initial deposit requires all coins") | |
731 | 733 | else { | |
732 | 734 | func paymantValid (acc,payment) = if (containsElement(assetIds, getStrAssetId(payment.assetId))) | |
733 | 735 | then true | |
734 | 736 | else throw("Invalid asset in payment") | |
735 | 737 | ||
736 | 738 | let $l = payments | |
737 | 739 | let $s = size($l) | |
738 | 740 | let $acc0 = false | |
739 | 741 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
740 | 742 | then $a | |
741 | 743 | else paymantValid($a, $l[$i]) | |
742 | 744 | ||
743 | 745 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
744 | 746 | then $a | |
745 | 747 | else throw("List size exceeds 10") | |
746 | 748 | ||
747 | 749 | $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) | |
748 | 750 | } | |
749 | 751 | ||
750 | 752 | if (!(validPayments(paymentsSize))) | |
751 | 753 | then throw() | |
752 | 754 | else { | |
753 | 755 | let suspicious = checkSuspicious() | |
754 | 756 | if (suspicious._1) | |
755 | 757 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, payments)) | |
756 | 758 | else { | |
757 | 759 | func parsePayments (acc,assetId) = { | |
758 | - | let $ | |
759 | - | let newBalances = $ | |
760 | - | let i = $ | |
760 | + | let $t01647416500 = acc | |
761 | + | let newBalances = $t01647416500._1 | |
762 | + | let i = $t01647416500._2 | |
761 | 763 | func parsePayment (newBalance,payment) = if ((getStrAssetId(payment.assetId) == assetId)) | |
762 | 764 | then (newBalance + payment.amount) | |
763 | 765 | else newBalance | |
764 | 766 | ||
765 | 767 | let newBalace = { | |
766 | 768 | let $l = payments | |
767 | 769 | let $s = size($l) | |
768 | 770 | let $acc0 = xp[i] | |
769 | 771 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
770 | 772 | then $a | |
771 | 773 | else parsePayment($a, $l[$i]) | |
772 | 774 | ||
773 | 775 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
774 | 776 | then $a | |
775 | 777 | else throw("List size exceeds 10") | |
776 | 778 | ||
777 | 779 | $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) | |
778 | 780 | } | |
779 | 781 | $Tuple2((newBalances :+ newBalace), (i + 1)) | |
780 | 782 | } | |
781 | 783 | ||
782 | - | let $ | |
784 | + | let $t01685016917 = { | |
783 | 785 | let $l = assetIds | |
784 | 786 | let $s = size($l) | |
785 | 787 | let $acc0 = $Tuple2(nil, 0) | |
786 | 788 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
787 | 789 | then $a | |
788 | 790 | else parsePayments($a, $l[$i]) | |
789 | 791 | ||
790 | 792 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
791 | 793 | then $a | |
792 | 794 | else throw("List size exceeds 10") | |
793 | 795 | ||
794 | 796 | $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) | |
795 | 797 | } | |
796 | - | let newBalances = $ | |
797 | - | let k = $ | |
798 | + | let newBalances = $t01685016917._1 | |
799 | + | let k = $t01685016917._2 | |
798 | 800 | if (checkDAppThreshold(newBalances)) | |
799 | 801 | then throw() | |
800 | 802 | else { | |
801 | 803 | let D1 = getDMem(newBalances, amp) | |
802 | 804 | if (assert((D1 > D0))) | |
803 | 805 | then throw("D1 > D0") | |
804 | 806 | else { | |
805 | 807 | let feeDiscount = calculateFeeDiscount(msg.caller) | |
806 | 808 | func calcScriptActions (acc,newBalance) = { | |
807 | - | let $ | |
808 | - | let invBalances = $ | |
809 | - | let scriptActions = $ | |
810 | - | let i = $ | |
809 | + | let $t01723717278 = acc | |
810 | + | let invBalances = $t01723717278._1 | |
811 | + | let scriptActions = $t01723717278._2 | |
812 | + | let i = $t01723717278._3 | |
811 | 813 | if ((shareSupply > 0)) | |
812 | 814 | then { | |
813 | 815 | let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1))) | |
814 | 816 | let fees = { | |
815 | 817 | let idealBalance = fraction(D1, xp[i], D0) | |
816 | 818 | let difference = if ((idealBalance > newBalance)) | |
817 | 819 | then (idealBalance - newBalance) | |
818 | 820 | else (newBalance - idealBalance) | |
819 | 821 | fraction(_fee, difference, feeScale6) | |
820 | 822 | } | |
821 | 823 | let governanceFees = fraction(fees, feeGovernance, feeScale6) | |
822 | 824 | let finalBalance = (newBalance - fees) | |
823 | 825 | let invariantBalance = (newBalance - fees) | |
824 | 826 | let pmt = (newBalance - xp[i]) | |
825 | 827 | let lpFees = (fees - governanceFees) | |
826 | 828 | let inv = if ((pmt > 0)) | |
827 | 829 | then stake((pmt - fees), assetIds[i]) | |
828 | 830 | else unstake(fees, assetIds[i]) | |
829 | 831 | if ((inv == inv)) | |
830 | 832 | then { | |
831 | 833 | let airdrop = if ((lpFees > 0)) | |
832 | 834 | then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(fromBase58String(assetIds[i]), lpFees)]) | |
833 | 835 | else 0 | |
834 | 836 | if ((airdrop == airdrop)) | |
835 | 837 | then $Tuple3((invBalances :+ invariantBalance), (scriptActions ++ [ScriptTransfer(moneyBoxAddress, governanceFees, fromBase58String(assetIds[i])), IntegerEntry((assetIds[i] + kAssetBalance), finalBalance)]), (i + 1)) | |
836 | 838 | else throw("Strict value is not equal to itself.") | |
837 | 839 | } | |
838 | 840 | else throw("Strict value is not equal to itself.") | |
839 | 841 | } | |
840 | 842 | else { | |
841 | 843 | let inv = stake(newBalance, assetIds[i]) | |
842 | 844 | if ((inv == inv)) | |
843 | 845 | then $Tuple3((invBalances :+ newBalance), (scriptActions :+ IntegerEntry((assetIds[i] + kAssetBalance), newBalance)), (i + 1)) | |
844 | 846 | else throw("Strict value is not equal to itself.") | |
845 | 847 | } | |
846 | 848 | } | |
847 | 849 | ||
848 | - | let $ | |
850 | + | let $t01898319071 = { | |
849 | 851 | let $l = newBalances | |
850 | 852 | let $s = size($l) | |
851 | 853 | let $acc0 = $Tuple3(nil, nil, 0) | |
852 | 854 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
853 | 855 | then $a | |
854 | 856 | else calcScriptActions($a, $l[$i]) | |
855 | 857 | ||
856 | 858 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
857 | 859 | then $a | |
858 | 860 | else throw("List size exceeds 10") | |
859 | 861 | ||
860 | 862 | $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) | |
861 | 863 | } | |
862 | - | let invBalances = $ | |
863 | - | let scriptActions = $ | |
864 | + | let invBalances = $t01898319071._1 | |
865 | + | let scriptActions = $t01898319071._2 | |
864 | 866 | let D2 = getDMem(invBalances, amp) | |
865 | 867 | let mint_amount = if ((shareSupply == 0)) | |
866 | 868 | then D1 | |
867 | 869 | else fraction(shareSupply, (D2 - D0), D0) | |
868 | 870 | if (assert((mint_amount >= minMintAmount))) | |
869 | 871 | then throw("Slippage screwed you") | |
870 | 872 | else if (stakeFarming) | |
871 | 873 | then { | |
872 | 874 | let re = invoke(this, "reissueShare", [mint_amount], nil) | |
873 | 875 | if ((re == re)) | |
874 | 876 | then { | |
875 | 877 | let s = invoke(farmingAddress, "lockShareTokens", [toString(this), lockType], ([AttachedPayment(shareAssetId, mint_amount)] ++ lockFee)) | |
876 | 878 | if ((s == s)) | |
877 | 879 | then (scriptActions :+ IntegerEntry(kShareAssetSupply, (shareSupply + mint_amount))) | |
878 | 880 | else throw("Strict value is not equal to itself.") | |
879 | 881 | } | |
880 | 882 | else throw("Strict value is not equal to itself.") | |
881 | 883 | } | |
882 | 884 | else (scriptActions ++ [Reissue(shareAssetId, mint_amount, true), ScriptTransfer(msg.caller, mint_amount, shareAssetId), IntegerEntry(kShareAssetSupply, (shareSupply + mint_amount))]) | |
883 | 885 | } | |
884 | 886 | } | |
885 | 887 | } | |
886 | 888 | } | |
887 | 889 | }) | |
888 | 890 | ||
889 | 891 | ||
890 | 892 | ||
891 | 893 | @Callable(msg) | |
892 | 894 | func calcMintAmount (newBalances,user) = { | |
893 | 895 | let amp = _A() | |
894 | 896 | let xp = _xp() | |
895 | 897 | let D1 = getDMem(newBalances, amp) | |
896 | 898 | if ((shareSupply == 0)) | |
897 | 899 | then $Tuple2(nil, D1) | |
898 | 900 | else { | |
899 | 901 | let D0 = getDMem(xp, amp) | |
900 | 902 | let feeDiscount = calculateFeeDiscount(user) | |
901 | 903 | func calcInvBalances (acc,newBalance) = { | |
902 | - | let $ | |
903 | - | let invBalances = $ | |
904 | - | let i = $ | |
904 | + | let $t02032120347 = acc | |
905 | + | let invBalances = $t02032120347._1 | |
906 | + | let i = $t02032120347._2 | |
905 | 907 | let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1))) | |
906 | 908 | let fees = { | |
907 | 909 | let idealBalance = fraction(D1, xp[i], D0) | |
908 | 910 | let difference = if ((idealBalance > newBalance)) | |
909 | 911 | then (idealBalance - newBalance) | |
910 | 912 | else (newBalance - idealBalance) | |
911 | 913 | fraction(_fee, difference, feeScale6) | |
912 | 914 | } | |
913 | 915 | let invariantBalance = (newBalance - fees) | |
914 | 916 | $Tuple2((invBalances :+ invariantBalance), (i + 1)) | |
915 | 917 | } | |
916 | 918 | ||
917 | - | let $ | |
919 | + | let $t02094921019 = { | |
918 | 920 | let $l = newBalances | |
919 | 921 | let $s = size($l) | |
920 | 922 | let $acc0 = $Tuple2(nil, 0) | |
921 | 923 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
922 | 924 | then $a | |
923 | 925 | else calcInvBalances($a, $l[$i]) | |
924 | 926 | ||
925 | 927 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
926 | 928 | then $a | |
927 | 929 | else throw("List size exceeds 10") | |
928 | 930 | ||
929 | 931 | $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) | |
930 | 932 | } | |
931 | - | let invBalances = $ | |
932 | - | let k = $ | |
933 | + | let invBalances = $t02094921019._1 | |
934 | + | let k = $t02094921019._2 | |
933 | 935 | let D2 = getDMem(invBalances, amp) | |
934 | 936 | let mintAmount = fraction(shareSupply, (D2 - D0), D0) | |
935 | 937 | $Tuple2(nil, mintAmount) | |
936 | 938 | } | |
937 | 939 | } | |
938 | 940 | ||
939 | 941 | ||
940 | 942 | ||
941 | 943 | @Callable(msg) | |
942 | 944 | func reissueShare (amount) = valueOrElse(isSelfCall(msg), [Reissue(shareAssetId, amount, true)]) | |
943 | 945 | ||
944 | 946 | ||
945 | 947 | ||
946 | 948 | @Callable(msg) | |
947 | 949 | func getDy (assetFrom,assetTo,dx,userAddress) = { | |
948 | 950 | let xp = _xp() | |
949 | 951 | let fromIndex = valueOrErrorMessage(indexOf(assetIds, assetFrom), "unknown token in") | |
950 | 952 | let toIndex = valueOrErrorMessage(indexOf(assetIds, assetTo), "unknown token out") | |
951 | 953 | let x = (xp[fromIndex] + dx) | |
952 | 954 | let y = getY(fromIndex, toIndex, x, xp) | |
953 | 955 | let dy = ((xp[toIndex] - y) - 1) | |
954 | 956 | let feeDiscount = calculateFeeDiscount(Address(fromBase58String(userAddress))) | |
955 | 957 | let _fee = fraction(fraction(fee, feeDiscount, feeScale6, CEILING), dy, feeScale6) | |
956 | 958 | $Tuple2(nil, $Tuple2((dy - _fee), _fee)) | |
957 | 959 | } | |
958 | 960 | ||
959 | 961 | ||
960 | 962 | ||
961 | 963 | @Callable(msg) | |
962 | 964 | func exchange (tokenOut,min_dy) = valueOrElse(isActive(), if ((size(msg.payments) != 1)) | |
963 | 965 | then throw("size(payments) != 1") | |
964 | 966 | else { | |
965 | 967 | let suspicious = checkSuspicious() | |
966 | 968 | if (suspicious._1) | |
967 | 969 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments)) | |
968 | 970 | else { | |
969 | 971 | let payment = msg.payments[0] | |
970 | 972 | let tokenIn = getStrAssetId(payment.assetId) | |
971 | 973 | let tokenOutB58 = fromBase58String(tokenOut) | |
972 | 974 | let dx = payment.amount | |
973 | 975 | let fromIndex = valueOrErrorMessage(indexOf(assetIds, tokenIn), "unknown token in") | |
974 | 976 | let toIndex = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out") | |
975 | 977 | let xp = _xp() | |
976 | 978 | let x = (xp[fromIndex] + dx) | |
977 | 979 | let y = getY(fromIndex, toIndex, x, xp) | |
978 | 980 | let _dy = ((xp[toIndex] - y) - 1) | |
979 | 981 | let feeDiscount = calculateFeeDiscount(msg.originCaller) | |
980 | 982 | let _fee = fraction(_dy, fraction(fee, feeDiscount, feeScale6, CEILING), feeScale6) | |
981 | 983 | let dy = (_dy - _fee) | |
982 | 984 | let governanceFees = fraction(_fee, feeGovernance, feeScale6) | |
983 | 985 | if (assert((dy >= min_dy))) | |
984 | 986 | then throw("Exchange resulted in fewer coins than expected") | |
985 | 987 | else { | |
986 | 988 | func makeNewBalances (acc,tokenBalance) = { | |
987 | - | let $ | |
988 | - | let newBalances = $ | |
989 | - | let i = $ | |
989 | + | let $t02306023086 = acc | |
990 | + | let newBalances = $t02306023086._1 | |
991 | + | let i = $t02306023086._2 | |
990 | 992 | if ((i == fromIndex)) | |
991 | 993 | then $Tuple2((newBalances :+ (tokenBalance + dx)), (i + 1)) | |
992 | 994 | else if ((i == toIndex)) | |
993 | 995 | then $Tuple2((newBalances :+ (tokenBalance - _dy)), (i + 1)) | |
994 | 996 | else $Tuple2((newBalances :+ tokenBalance), (i + 1)) | |
995 | 997 | } | |
996 | 998 | ||
997 | - | let $ | |
999 | + | let $t02333723398 = { | |
998 | 1000 | let $l = xp | |
999 | 1001 | let $s = size($l) | |
1000 | 1002 | let $acc0 = $Tuple2(nil, 0) | |
1001 | 1003 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1002 | 1004 | then $a | |
1003 | 1005 | else makeNewBalances($a, $l[$i]) | |
1004 | 1006 | ||
1005 | 1007 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1006 | 1008 | then $a | |
1007 | 1009 | else throw("List size exceeds 10") | |
1008 | 1010 | ||
1009 | 1011 | $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) | |
1010 | 1012 | } | |
1011 | - | let newBalances = $ | |
1012 | - | let i = $ | |
1013 | + | let newBalances = $t02333723398._1 | |
1014 | + | let i = $t02333723398._2 | |
1013 | 1015 | if (checkDAppThreshold(newBalances)) | |
1014 | 1016 | then throw() | |
1015 | 1017 | else { | |
1016 | 1018 | let s = stake(payment.amount, getStrAssetId(payment.assetId)) | |
1017 | 1019 | if ((s == s)) | |
1018 | 1020 | then { | |
1019 | 1021 | let us = unstake(_dy, tokenOut) | |
1020 | 1022 | if ((us == us)) | |
1021 | 1023 | then { | |
1022 | 1024 | let lpFees = (_fee - governanceFees) | |
1023 | 1025 | let airdrop = if ((lpFees > 0)) | |
1024 | 1026 | then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(tokenOutB58, lpFees)]) | |
1025 | 1027 | else 0 | |
1026 | 1028 | if ((airdrop == airdrop)) | |
1027 | 1029 | then $Tuple2([IntegerEntry((tokenIn + kAssetBalance), x), IntegerEntry((tokenOut + kAssetBalance), (xp[toIndex] - _dy)), ScriptTransfer(msg.caller, dy, tokenOutB58), ScriptTransfer(moneyBoxAddress, governanceFees, tokenOutB58)], [dy, tokenOutB58]) | |
1028 | 1030 | else throw("Strict value is not equal to itself.") | |
1029 | 1031 | } | |
1030 | 1032 | else throw("Strict value is not equal to itself.") | |
1031 | 1033 | } | |
1032 | 1034 | else throw("Strict value is not equal to itself.") | |
1033 | 1035 | } | |
1034 | 1036 | } | |
1035 | 1037 | } | |
1036 | 1038 | }) | |
1037 | 1039 | ||
1038 | 1040 | ||
1039 | 1041 | ||
1040 | 1042 | @Callable(msg) | |
1041 | 1043 | func withdraw (minAmounts) = valueOrElse(isActive(), if ((size(msg.payments) != 1)) | |
1042 | 1044 | then throw("size(payments) != 1") | |
1043 | 1045 | else { | |
1044 | 1046 | let pmtAmount = msg.payments[0].amount | |
1045 | 1047 | let pmtAssetId = msg.payments[0].assetId | |
1046 | 1048 | if ((shareAssetId != pmtAssetId)) | |
1047 | 1049 | then throw("unknown payment token") | |
1048 | 1050 | else { | |
1049 | 1051 | let suspicious = checkSuspicious() | |
1050 | 1052 | if (suspicious._1) | |
1051 | 1053 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.originCaller, msg.payments)) | |
1052 | 1054 | else { | |
1053 | 1055 | func calcScriptActions (acc,balance) = { | |
1054 | - | let $ | |
1055 | - | let scriptActions = $ | |
1056 | - | let i = $ | |
1056 | + | let $t02468924717 = acc | |
1057 | + | let scriptActions = $t02468924717._1 | |
1058 | + | let i = $t02468924717._2 | |
1057 | 1059 | let wAmount = fraction(balance, pmtAmount, shareSupply) | |
1058 | 1060 | if (assert((wAmount >= minAmounts[i]))) | |
1059 | 1061 | then throw("Withdrawal resulted in fewer coins than expected") | |
1060 | 1062 | else { | |
1061 | 1063 | let us = unstake(wAmount, assetIds[i]) | |
1062 | 1064 | if ((us == us)) | |
1063 | 1065 | then $Tuple2((scriptActions ++ [IntegerEntry((assetIds[i] + kAssetBalance), (balance - wAmount)), ScriptTransfer(msg.originCaller, wAmount, fromBase58String(assetIds[i]))]), (i + 1)) | |
1064 | 1066 | else throw("Strict value is not equal to itself.") | |
1065 | 1067 | } | |
1066 | 1068 | } | |
1067 | 1069 | ||
1068 | - | let $ | |
1070 | + | let $t02520725275 = { | |
1069 | 1071 | let $l = _xp() | |
1070 | 1072 | let $s = size($l) | |
1071 | 1073 | let $acc0 = $Tuple2(nil, 0) | |
1072 | 1074 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1073 | 1075 | then $a | |
1074 | 1076 | else calcScriptActions($a, $l[$i]) | |
1075 | 1077 | ||
1076 | 1078 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1077 | 1079 | then $a | |
1078 | 1080 | else throw("List size exceeds 10") | |
1079 | 1081 | ||
1080 | 1082 | $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) | |
1081 | 1083 | } | |
1082 | - | let scriptActions = $ | |
1083 | - | let i = $ | |
1084 | + | let scriptActions = $t02520725275._1 | |
1085 | + | let i = $t02520725275._2 | |
1084 | 1086 | (scriptActions ++ [Burn(shareAssetId, pmtAmount), IntegerEntry(kShareAssetSupply, (shareSupply - pmtAmount))]) | |
1085 | 1087 | } | |
1086 | 1088 | } | |
1087 | 1089 | }) | |
1088 | 1090 | ||
1089 | 1091 | ||
1090 | 1092 | ||
1091 | 1093 | @Callable(msg) | |
1092 | 1094 | func withdrawWithUnlock (minAmounts,unlockAmount) = valueOrElse(isActive(), if ((0 >= unlockAmount)) | |
1093 | 1095 | then throw("Unlock amount must be positive") | |
1094 | 1096 | else { | |
1095 | 1097 | let suspicious = checkSuspicious() | |
1096 | 1098 | if (suspicious._1) | |
1097 | 1099 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments)) | |
1098 | 1100 | else { | |
1099 | 1101 | let pmtAmount = if ((size(msg.payments) > 0)) | |
1100 | 1102 | then if ((size(msg.payments) != 1)) | |
1101 | 1103 | then throw("size(payments) != 1") | |
1102 | 1104 | else { | |
1103 | 1105 | let pmtAssetId = msg.payments[0].assetId | |
1104 | 1106 | if ((shareAssetId != pmtAssetId)) | |
1105 | 1107 | then throw("unknown payment token") | |
1106 | 1108 | else msg.payments[0].amount | |
1107 | 1109 | } | |
1108 | 1110 | else 0 | |
1109 | 1111 | let unlock = invoke(farmingAddress, "withdrawShareTokens", [toString(this), unlockAmount], nil) | |
1110 | 1112 | if ((unlock == unlock)) | |
1111 | 1113 | then { | |
1112 | 1114 | let withdrawAmount = (pmtAmount + unlockAmount) | |
1113 | 1115 | let inv = invoke(this, "withdraw", [minAmounts], [AttachedPayment(shareAssetId, withdrawAmount)]) | |
1114 | 1116 | if ((inv == inv)) | |
1115 | 1117 | then nil | |
1116 | 1118 | else throw("Strict value is not equal to itself.") | |
1117 | 1119 | } | |
1118 | 1120 | else throw("Strict value is not equal to itself.") | |
1119 | 1121 | } | |
1120 | 1122 | }) | |
1121 | 1123 | ||
1122 | 1124 | ||
1123 | 1125 | ||
1124 | 1126 | @Callable(msg) | |
1125 | 1127 | func calcWithdrawOneCoin (tokenAmount,tokenOut,user) = if ((0 >= tokenAmount)) | |
1126 | 1128 | then throw("Amount must be positive") | |
1127 | 1129 | else { | |
1128 | 1130 | let i = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out") | |
1129 | 1131 | $Tuple2(nil, _calcWithdrawOneCoin(_xp(), tokenAmount, i, Address(fromBase58String(user)))._1) | |
1130 | 1132 | } | |
1131 | 1133 | ||
1132 | 1134 | ||
1133 | 1135 | ||
1134 | 1136 | @Callable(msg) | |
1135 | 1137 | func withdrawOneCoin (tokenOut,minAmount) = valueOrElse(isActive(), if ((size(msg.payments) != 1)) | |
1136 | 1138 | then throw("size(payments) != 1") | |
1137 | 1139 | else { | |
1138 | 1140 | let suspicious = checkSuspicious() | |
1139 | 1141 | if (suspicious._1) | |
1140 | 1142 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.originCaller, msg.payments)) | |
1141 | 1143 | else { | |
1142 | 1144 | let pmtAmount = msg.payments[0].amount | |
1143 | 1145 | let pmtAssetId = msg.payments[0].assetId | |
1144 | 1146 | if ((pmtAssetId != shareAssetId)) | |
1145 | 1147 | then throw("unknown token") | |
1146 | 1148 | else { | |
1147 | 1149 | let outIndex = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out") | |
1148 | 1150 | let tokenOutB58 = fromBase58String(tokenOut) | |
1149 | 1151 | let xp = _xp() | |
1150 | - | let $ | |
1151 | - | let dy = $ | |
1152 | - | let dy_fee = $ | |
1152 | + | let $t02730727389 = _calcWithdrawOneCoin(xp, pmtAmount, outIndex, msg.originCaller) | |
1153 | + | let dy = $t02730727389._1 | |
1154 | + | let dy_fee = $t02730727389._2 | |
1153 | 1155 | if (assert((dy >= minAmount))) | |
1154 | 1156 | then throw("Not enough coins removed") | |
1155 | 1157 | else { | |
1156 | 1158 | let governanceFees = fraction(dy_fee, feeGovernance, feeScale6) | |
1157 | 1159 | let dy_and_fee = (dy + dy_fee) | |
1158 | 1160 | func makeNewBalances (acc,tokenBalance) = { | |
1159 | - | let $ | |
1160 | - | let newBalances = $ | |
1161 | - | let i = $ | |
1161 | + | let $t02764727673 = acc | |
1162 | + | let newBalances = $t02764727673._1 | |
1163 | + | let i = $t02764727673._2 | |
1162 | 1164 | if ((i == outIndex)) | |
1163 | 1165 | then $Tuple2((newBalances :+ (tokenBalance - dy_and_fee)), (i + 1)) | |
1164 | 1166 | else $Tuple2((newBalances :+ tokenBalance), (i + 1)) | |
1165 | 1167 | } | |
1166 | 1168 | ||
1167 | - | let $ | |
1169 | + | let $t02784027901 = { | |
1168 | 1170 | let $l = xp | |
1169 | 1171 | let $s = size($l) | |
1170 | 1172 | let $acc0 = $Tuple2(nil, 0) | |
1171 | 1173 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1172 | 1174 | then $a | |
1173 | 1175 | else makeNewBalances($a, $l[$i]) | |
1174 | 1176 | ||
1175 | 1177 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1176 | 1178 | then $a | |
1177 | 1179 | else throw("List size exceeds 10") | |
1178 | 1180 | ||
1179 | 1181 | $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) | |
1180 | 1182 | } | |
1181 | - | let newBalances = $ | |
1182 | - | let v = $ | |
1183 | + | let newBalances = $t02784027901._1 | |
1184 | + | let v = $t02784027901._2 | |
1183 | 1185 | if (checkDAppThreshold(newBalances)) | |
1184 | 1186 | then throw() | |
1185 | 1187 | else { | |
1186 | 1188 | let us = unstake(dy_and_fee, tokenOut) | |
1187 | 1189 | if ((us == us)) | |
1188 | 1190 | then { | |
1189 | 1191 | let lpFees = (dy_fee - governanceFees) | |
1190 | 1192 | let airdrop = if ((lpFees > 0)) | |
1191 | 1193 | then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(tokenOutB58, lpFees)]) | |
1192 | 1194 | else 0 | |
1193 | 1195 | if ((airdrop == airdrop)) | |
1194 | 1196 | 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))] | |
1195 | 1197 | else throw("Strict value is not equal to itself.") | |
1196 | 1198 | } | |
1197 | 1199 | else throw("Strict value is not equal to itself.") | |
1198 | 1200 | } | |
1199 | 1201 | } | |
1200 | 1202 | } | |
1201 | 1203 | } | |
1202 | 1204 | }) | |
1203 | 1205 | ||
1204 | 1206 | ||
1205 | 1207 | ||
1206 | 1208 | @Callable(msg) | |
1207 | 1209 | func withdrawOneCoinWithUnlock (tokenOut,minAmount,unlockAmount) = valueOrElse(isActive(), if ((0 >= unlockAmount)) | |
1208 | 1210 | then throw("Unlock amount must be positive") | |
1209 | 1211 | else { | |
1210 | 1212 | let suspicious = checkSuspicious() | |
1211 | 1213 | if (suspicious._1) | |
1212 | 1214 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments)) | |
1213 | 1215 | else { | |
1214 | 1216 | let pmtAmount = if ((size(msg.payments) > 0)) | |
1215 | 1217 | then if ((size(msg.payments) != 1)) | |
1216 | 1218 | then throw("size(payments) != 1") | |
1217 | 1219 | else { | |
1218 | 1220 | let pmtAssetId = msg.payments[0].assetId | |
1219 | 1221 | if ((shareAssetId != pmtAssetId)) | |
1220 | 1222 | then throw("unknown payment token") | |
1221 | 1223 | else msg.payments[0].amount | |
1222 | 1224 | } | |
1223 | 1225 | else 0 | |
1224 | 1226 | let unlock = invoke(farmingAddress, "withdrawShareTokens", [toString(this), unlockAmount], nil) | |
1225 | 1227 | if ((unlock == unlock)) | |
1226 | 1228 | then { | |
1227 | 1229 | let withdrawAmount = (pmtAmount + unlockAmount) | |
1228 | 1230 | let inv = invoke(this, "withdrawOneCoin", [tokenOut, minAmount], [AttachedPayment(shareAssetId, withdrawAmount)]) | |
1229 | 1231 | if ((inv == inv)) | |
1230 | 1232 | then nil | |
1231 | 1233 | else throw("Strict value is not equal to itself.") | |
1232 | 1234 | } | |
1233 | 1235 | else throw("Strict value is not equal to itself.") | |
1234 | 1236 | } | |
1235 | 1237 | }) | |
1236 | 1238 | ||
1237 | 1239 | ||
1238 | 1240 | ||
1239 | 1241 | @Callable(msg) | |
1240 | 1242 | func A () = $Tuple2(nil, _A()) | |
1241 | 1243 | ||
1242 | 1244 | ||
1243 | 1245 | ||
1244 | 1246 | @Callable(msg) | |
1245 | 1247 | func getVirtualPrice () = { | |
1246 | 1248 | let D = get_D(_xp(), _A()) | |
1247 | 1249 | $Tuple2(nil, fraction(D, PRECISION, shareSupply)) | |
1248 | 1250 | } | |
1249 | 1251 | ||
1250 | 1252 | ||
1251 | 1253 | ||
1252 | 1254 | @Callable(msg) | |
1253 | 1255 | func calcTokenAmount (amounts,deposit) = { | |
1254 | 1256 | let amp = _A() | |
1255 | 1257 | let balances = _xp() | |
1256 | 1258 | let D0 = getDMem(balances, amp) | |
1257 | 1259 | func calcNewBalances (acc,balance) = { | |
1258 | - | let $ | |
1259 | - | let newBalances = $ | |
1260 | - | let i = $ | |
1260 | + | let $t02991829944 = acc | |
1261 | + | let newBalances = $t02991829944._1 | |
1262 | + | let i = $t02991829944._2 | |
1261 | 1263 | let newBalance = (balance + (if (deposit) | |
1262 | 1264 | then amounts[i] | |
1263 | 1265 | else -(amounts[i]))) | |
1264 | 1266 | $Tuple2((newBalances :+ newBalance), (i + 1)) | |
1265 | 1267 | } | |
1266 | 1268 | ||
1267 | 1269 | let newBalances = ( let $l = balances | |
1268 | 1270 | let $s = size($l) | |
1269 | 1271 | let $acc0 = $Tuple2(nil, 0) | |
1270 | 1272 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1271 | 1273 | then $a | |
1272 | 1274 | else calcNewBalances($a, $l[$i]) | |
1273 | 1275 | ||
1274 | 1276 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1275 | 1277 | then $a | |
1276 | 1278 | else throw("List size exceeds 10") | |
1277 | 1279 | ||
1278 | 1280 | $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 | |
1279 | 1281 | let D1 = getDMem(newBalances, amp) | |
1280 | 1282 | let diff = if (deposit) | |
1281 | 1283 | then (D1 - D0) | |
1282 | 1284 | else (D0 - D1) | |
1283 | 1285 | $Tuple2(nil, fraction(diff, shareSupply, D0)) | |
1284 | 1286 | } | |
1285 | 1287 | ||
1286 | 1288 | ||
1287 | 1289 | ||
1288 | 1290 | @Callable(msg) | |
1289 | 1291 | func rampA (_futureA,_futureTime) = valueOrElse(isActive(), valueOrElse(isAdminCall(msg), if (assert((blockTimestamp >= (initial_A_time + MIN_RAMP_TIME)))) | |
1290 | 1292 | then throw("too often") | |
1291 | 1293 | else if (assert((_futureTime >= (blockTimestamp + MIN_RAMP_TIME)))) | |
1292 | 1294 | then throw("insufficient time") | |
1293 | 1295 | else { | |
1294 | 1296 | let _initial_A = _A() | |
1295 | 1297 | if (assert(if ((_futureA > 0)) | |
1296 | 1298 | then (MAX_A > _futureA) | |
1297 | 1299 | else false)) | |
1298 | 1300 | then throw("out of base range") | |
1299 | 1301 | else if (assert(if (if ((_futureA >= _initial_A)) | |
1300 | 1302 | then ((_initial_A * MAX_A_CHANGE) >= _futureA) | |
1301 | 1303 | else false) | |
1302 | 1304 | then true | |
1303 | 1305 | else if ((_initial_A > _futureA)) | |
1304 | 1306 | then ((_futureA * MAX_A_CHANGE) >= _initial_A) | |
1305 | 1307 | else false)) | |
1306 | 1308 | then throw("out of range") | |
1307 | 1309 | else [IntegerEntry("initial_A", _initial_A), IntegerEntry("future_A", _futureA), IntegerEntry("initial_A_time", blockTimestamp), IntegerEntry("future_A_time", _futureTime)] | |
1308 | 1310 | })) | |
1309 | 1311 | ||
1310 | 1312 | ||
1311 | 1313 | ||
1312 | 1314 | @Callable(msg) | |
1313 | 1315 | func stopRampA () = valueOrElse(isActive(), valueOrElse(isAdminCall(msg), { | |
1314 | 1316 | let currentA = _A() | |
1315 | 1317 | [IntegerEntry("initial_A", currentA), IntegerEntry("future_A", currentA), IntegerEntry("initial_A_time", blockTimestamp), IntegerEntry("future_A_time", blockTimestamp)] | |
1316 | 1318 | })) | |
1317 | 1319 | ||
1318 | 1320 | ||
1319 | 1321 | ||
1320 | 1322 | @Callable(msg) | |
1321 | 1323 | func shutdown () = valueOrElse(isAdminCall(msg), if (!(active)) | |
1322 | 1324 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified"))) | |
1323 | 1325 | else suspend("Paused by admin")) | |
1324 | 1326 | ||
1325 | 1327 | ||
1326 | 1328 | ||
1327 | 1329 | @Callable(msg) | |
1328 | 1330 | func activate () = valueOrElse(isAdminCall(msg), if (active) | |
1329 | 1331 | then throwIsActive() | |
1330 | 1332 | else [BooleanEntry(kActive, true), DeleteEntry(kCause)]) | |
1331 | 1333 | ||
1332 | 1334 | ||
1333 | 1335 | ||
1334 | 1336 | @Callable(msg) | |
1335 | 1337 | func takeIntoAccountExtraFunds () = valueOrElse(isActive(), if ((msg.caller != moneyBoxAddress)) | |
1336 | 1338 | then throw("Only the wallet can call this function") | |
1337 | 1339 | else { | |
1338 | 1340 | let balances = _xp() | |
1339 | 1341 | func takeExtraFunds (acc,assetId) = { | |
1340 | - | let $ | |
1341 | - | let sum = $ | |
1342 | - | let i = $ | |
1342 | + | let $t03228632304 = acc | |
1343 | + | let sum = $t03228632304._1 | |
1344 | + | let i = $t03228632304._2 | |
1343 | 1345 | let tokenB58 = fromBase58String(assetId) | |
1344 | 1346 | let rBalance = (assetBalance(this, tokenB58) + stakedAmount(tokenB58)) | |
1345 | 1347 | let enrollAmount = (rBalance - balances[i]) | |
1346 | 1348 | if ((0 > enrollAmount)) | |
1347 | 1349 | then suspend(("Enroll amount negative for asset" + assetId)) | |
1348 | 1350 | else { | |
1349 | 1351 | let airdrop = if ((enrollAmount > 0)) | |
1350 | 1352 | then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(tokenB58, enrollAmount)]) | |
1351 | 1353 | else 0 | |
1352 | 1354 | if ((airdrop == airdrop)) | |
1353 | 1355 | then $Tuple2((sum + enrollAmount), (i + 1)) | |
1354 | 1356 | else throw("Strict value is not equal to itself.") | |
1355 | 1357 | } | |
1356 | 1358 | } | |
1357 | 1359 | ||
1358 | 1360 | let k = { | |
1359 | 1361 | let $l = assetIds | |
1360 | 1362 | let $s = size($l) | |
1361 | 1363 | let $acc0 = $Tuple2(0, 0) | |
1362 | 1364 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1363 | 1365 | then $a | |
1364 | 1366 | else takeExtraFunds($a, $l[$i]) | |
1365 | 1367 | ||
1366 | 1368 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1367 | 1369 | then $a | |
1368 | 1370 | else throw("List size exceeds 10") | |
1369 | 1371 | ||
1370 | 1372 | $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) | |
1371 | 1373 | } | |
1372 | 1374 | if ((k._1 == 0)) | |
1373 | 1375 | then throw("No money to take") | |
1374 | 1376 | else nil | |
1375 | 1377 | }) | |
1376 | 1378 | ||
1377 | 1379 | ||
1378 | 1380 | @Verifier(tx) | |
1379 | 1381 | func verify () = { | |
1380 | 1382 | let multiSignedByAdmins = { | |
1381 | 1383 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
1382 | 1384 | then 1 | |
1383 | 1385 | else 0 | |
1384 | 1386 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
1385 | 1387 | then 1 | |
1386 | 1388 | else 0 | |
1387 | 1389 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
1388 | 1390 | then 1 | |
1389 | 1391 | else 0 | |
1390 | 1392 | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
1391 | 1393 | } | |
1392 | 1394 | match tx { | |
1393 | 1395 | case inv: InvokeScriptTransaction => | |
1394 | 1396 | let callTakeIntoAccount = if ((inv.dApp == this)) | |
1395 | 1397 | then (inv.function == "takeIntoAccountExtraFunds") | |
1396 | 1398 | else false | |
1397 | 1399 | let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
1398 | 1400 | then true | |
1399 | 1401 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2)) | |
1400 | 1402 | then true | |
1401 | 1403 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3)) | |
1402 | 1404 | then true | |
1403 | 1405 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyInvoke) | |
1404 | 1406 | if (if (callTakeIntoAccount) | |
1405 | 1407 | then signedByAdmin | |
1406 | 1408 | else false) | |
1407 | 1409 | then true | |
1408 | 1410 | else multiSignedByAdmins | |
1409 | 1411 | case _ => | |
1410 | 1412 | multiSignedByAdmins | |
1411 | 1413 | } | |
1412 | 1414 | } | |
1413 | 1415 |
github/deemru/w8io/026f985 146.96 ms ◑