tx · 27WNbKsEw91RMVeX135KGooVQwEHcuuvTpKSht56QEFR 3Mx3ypJFGEbBTocq7n8dqnSjCXCy4xTBJAC: -0.01400000 Waves 2021.05.19 16:23 [1532611] smart account 3Mx3ypJFGEbBTocq7n8dqnSjCXCy4xTBJAC > SELF 0.00000000 Waves
{ "type": 13, "id": "27WNbKsEw91RMVeX135KGooVQwEHcuuvTpKSht56QEFR", "fee": 1400000, "feeAssetId": null, "timestamp": 1621430650761, "version": 2, "chainId": 84, "sender": "3Mx3ypJFGEbBTocq7n8dqnSjCXCy4xTBJAC", "senderPublicKey": "rei8sKn5JSSQKmaLUW5cEbrS2FKiBR1tW1xM7YEDnM5", "proofs": [ "3zRahY3b1hm5pL7HNbC3WvKScet49m93c9AS8iwhmuiQaEKs4WpEcca1FkvcPLvUFzgPU4ecjjiET8EzbzoMrjw2" ], "script": "base64:AAIEAAAAAAAAACoIAhIDCgEEEgcKBQEBCAgEEgMKAQESAwoBARIAEgMKAQESABIAEgMKAQEAAABIAAAAAAd2ZXJzaW9uAgAAAAUxLjAuMAAAAAAKa2V5VmVyc2lvbgIAAAAHdmVyc2lvbgAAAAAJa2V5QWN0aXZlAgAAAAZhY3RpdmUAAAAAC2tleUFzc2V0SWRBAgAAAApBX2Fzc2V0X2lkAAAAAAtrZXlBc3NldElkQgIAAAAKQl9hc3NldF9pZAAAAAALa2V5QmFsYW5jZUECAAAAD0FfYXNzZXRfYmFsYW5jZQAAAAALa2V5QmFsYW5jZUICAAAAD0JfYXNzZXRfYmFsYW5jZQAAAAAPa2V5QmFsYW5jZUluaXRBAgAAAAxBX2Fzc2V0X2luaXQAAAAAD2tleUJhbGFuY2VJbml0QgIAAAAMQl9hc3NldF9pbml0AAAAAA9rZXlTaGFyZUFzc2V0SWQCAAAADnNoYXJlX2Fzc2V0X2lkAAAAABNrZXlTaGFyZUFzc2V0U3VwcGx5AgAAABJzaGFyZV9hc3NldF9zdXBwbHkAAAAADWtleUNvbW1pc3Npb24CAAAACmNvb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V5MgYJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAxhZG1pblB1YktleTMGCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAASYWRtaW5QdWJLZXlTdGFraW5nAwUAAAATY2FsbFRha2VJbnRvQWNjb3VudAYFAAAAC2NhbGxTdGFraW5nCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQBYARA=", "height": 1532611, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HcoiRkHadrz76z4LQfDoHY1WbBjDcuk2u3LJhBz1Wbgj Next: none Diff:
Old | New | Differences | |
---|---|---|---|
310 | 310 | let pmtStrAssetIdB = $t01170811785._1 | |
311 | 311 | let pmtAssetNameB = $t01170811785._2 | |
312 | 312 | let pmtDecimalsB = $t01170811785._3 | |
313 | - | if (isDefined(getBoolean(this, keyActive))) | |
314 | - | then throw("DApp is already active") | |
315 | - | else if ((pmtAssetIdA == pmtAssetIdB)) | |
316 | - | then throw("Assets must be different") | |
317 | - | else { | |
318 | - | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
319 | - | let shareInitialSupply = fraction(pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, HALFDOWN), pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, HALFDOWN), pow(10, 0, shareDecimals, 0, 0, HALFDOWN)) | |
320 | - | if (!(isActive)) | |
321 | - | then throw("DApp is inactive at this moment") | |
322 | - | else if (if ((0 > slippageTolerance)) | |
323 | - | then true | |
324 | - | else (slippageTolerance > slippageToleranceDelimiter)) | |
325 | - | then throw(((("Slippage tolerance must be between 0 and " + toString(slippageToleranceDelimiter)) + " inclusively. Actual: ") + toString(slippageTolerance))) | |
326 | - | else if ((size(i.payments) != 2)) | |
327 | - | then throw("Two attached assets expected") | |
328 | - | else if (if ((pmtAssetIdA != assetIdA)) | |
329 | - | then true | |
330 | - | else (pmtAssetIdB != assetIdB)) | |
331 | - | then throw(((("Incorrect assets attached. Expected: " + strAssetIdA) + " and ") + strAssetIdB)) | |
332 | - | else if ((shareInitialSupply == 0)) | |
333 | - | then throw("Too small amount to replenish") | |
334 | - | else if (!(hasEnoughBalance)) | |
335 | - | then suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + assetNameA) + ", ") + toString(accountBalance(assetIdB))) + " ") + assetNameB)) | |
336 | - | else [Reissue(shareAssetId, shareInitialSupply, true), IntegerEntry(keyBalanceA, pmtAmountA), IntegerEntry(keyBalanceB, pmtAmountB), IntegerEntry(keyShareAssetSupply, shareInitialSupply), ScriptTransfer(i.caller, shareInitialSupply, shareAssetId)] | |
337 | - | } | |
313 | + | if ((pmtAssetIdA == pmtAssetIdB)) | |
314 | + | then throw("Assets must be different") | |
315 | + | else { | |
316 | + | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
317 | + | let shareInitialSupply = fraction(pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, HALFDOWN), pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, HALFDOWN), pow(10, 0, shareDecimals, 0, 0, HALFDOWN)) | |
318 | + | if (!(isActive)) | |
319 | + | then throw("DApp is inactive at this moment") | |
320 | + | else if (if ((0 > slippageTolerance)) | |
321 | + | then true | |
322 | + | else (slippageTolerance > slippageToleranceDelimiter)) | |
323 | + | then throw(((("Slippage tolerance must be between 0 and " + toString(slippageToleranceDelimiter)) + " inclusively. Actual: ") + toString(slippageTolerance))) | |
324 | + | else if ((size(i.payments) != 2)) | |
325 | + | then throw("Two attached assets expected") | |
326 | + | else if (if ((pmtAssetIdA != assetIdA)) | |
327 | + | then true | |
328 | + | else (pmtAssetIdB != assetIdB)) | |
329 | + | then throw(((("Incorrect assets attached. Expected: " + strAssetIdA) + " and ") + strAssetIdB)) | |
330 | + | else if ((shareInitialSupply == 0)) | |
331 | + | then throw("Too small amount to replenish") | |
332 | + | else if (!(hasEnoughBalance)) | |
333 | + | then suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + assetNameA) + ", ") + toString(accountBalance(assetIdB))) + " ") + assetNameB)) | |
334 | + | else [Reissue(shareAssetId, shareInitialSupply, true), IntegerEntry(keyBalanceA, pmtAmountA), IntegerEntry(keyBalanceB, pmtAmountB), IntegerEntry(keyShareAssetSupply, shareInitialSupply), ScriptTransfer(i.caller, shareInitialSupply, shareAssetId)] | |
335 | + | } | |
338 | 336 | } | |
339 | 337 | else { | |
340 | 338 | let tokenRatio = fraction(fraction(balanceA, scaleValue8, pmtAmountA), scaleValue3, fraction(balanceB, scaleValue8, pmtAmountB)) | |
369 | 367 | ||
370 | 368 | @Callable(i) | |
371 | 369 | func withdraw () = { | |
372 | - | let $ | |
373 | - | let pmtAmount = $ | |
374 | - | let pmtAssetId = $ | |
370 | + | let $t01592616076 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
371 | + | let pmtAmount = $t01592616076._1 | |
372 | + | let pmtAssetId = $t01592616076._2 | |
375 | 373 | let amountToPayA = deductStakingFee(fraction(pmtAmount, balanceA, shareAssetSupply), assetIdA) | |
376 | 374 | let amountToPayB = deductStakingFee(fraction(pmtAmount, balanceB, shareAssetSupply), assetIdB) | |
377 | 375 | if (!(isActive)) | |
393 | 391 | ||
394 | 392 | @Callable(i) | |
395 | 393 | func exchange (minAmountToReceive) = { | |
396 | - | let $ | |
397 | - | let pmtAmount = $ | |
398 | - | let pmtAssetId = $ | |
394 | + | let $t01746617541 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
395 | + | let pmtAmount = $t01746617541._1 | |
396 | + | let pmtAssetId = $t01746617541._2 | |
399 | 397 | func calculateFees (tokenFrom,tokenTo) = { | |
400 | 398 | let amountWithoutFee = fraction(tokenTo, pmtAmount, (pmtAmount + tokenFrom)) | |
401 | 399 | let amountWithFee = fraction(amountWithoutFee, (commissionScaleDelimiter - commission), commissionScaleDelimiter) | |
420 | 418 | else if ((pmtAssetId == assetIdA)) | |
421 | 419 | then { | |
422 | 420 | let assetIdSend = assetIdB | |
423 | - | let $ | |
424 | - | let amountWithoutFee = $ | |
425 | - | let amountWithFee = $ | |
426 | - | let governanceReward = $ | |
421 | + | let $t01900019091 = calculateFees(balanceA, balanceB) | |
422 | + | let amountWithoutFee = $t01900019091._1 | |
423 | + | let amountWithFee = $t01900019091._2 | |
424 | + | let governanceReward = $t01900019091._3 | |
427 | 425 | let newBalanceA = (balanceA + pmtAmount) | |
428 | 426 | let newBalanceB = ((balanceB - amountWithFee) - governanceReward) | |
429 | 427 | if (if (if ((assetIdA == USDN)) | |
439 | 437 | else if ((pmtAssetId == assetIdB)) | |
440 | 438 | then { | |
441 | 439 | let assetIdSend = assetIdA | |
442 | - | let $ | |
443 | - | let amountWithoutFee = $ | |
444 | - | let amountWithFee = $ | |
445 | - | let governanceReward = $ | |
440 | + | let $t01996420055 = calculateFees(balanceB, balanceA) | |
441 | + | let amountWithoutFee = $t01996420055._1 | |
442 | + | let amountWithFee = $t01996420055._2 | |
443 | + | let governanceReward = $t01996420055._3 | |
446 | 444 | let newBalanceA = ((balanceA - amountWithFee) - governanceReward) | |
447 | 445 | let newBalanceB = (balanceB + pmtAmount) | |
448 | 446 | if (if (if ((assetIdA == USDN)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let version = "1.0.0" | |
5 | 5 | ||
6 | 6 | let keyVersion = "version" | |
7 | 7 | ||
8 | 8 | let keyActive = "active" | |
9 | 9 | ||
10 | 10 | let keyAssetIdA = "A_asset_id" | |
11 | 11 | ||
12 | 12 | let keyAssetIdB = "B_asset_id" | |
13 | 13 | ||
14 | 14 | let keyBalanceA = "A_asset_balance" | |
15 | 15 | ||
16 | 16 | let keyBalanceB = "B_asset_balance" | |
17 | 17 | ||
18 | 18 | let keyBalanceInitA = "A_asset_init" | |
19 | 19 | ||
20 | 20 | let keyBalanceInitB = "B_asset_init" | |
21 | 21 | ||
22 | 22 | let keyShareAssetId = "share_asset_id" | |
23 | 23 | ||
24 | 24 | let keyShareAssetSupply = "share_asset_supply" | |
25 | 25 | ||
26 | 26 | let keyCommission = "commission" | |
27 | 27 | ||
28 | 28 | let keyCommissionScaleDelimiter = "commission_scale_delimiter" | |
29 | 29 | ||
30 | 30 | let keyCause = "shutdown_cause" | |
31 | 31 | ||
32 | 32 | let keyFirstHarvest = "first_harvest" | |
33 | 33 | ||
34 | 34 | let keyBasePeriod = "base_period" | |
35 | 35 | ||
36 | 36 | let keyPeriodLength = "period_length" | |
37 | 37 | ||
38 | 38 | let keyStartHeight = "start_height" | |
39 | 39 | ||
40 | 40 | let keyFirstHarvestHeight = "first_harvest_height" | |
41 | 41 | ||
42 | 42 | let keyDurationFullVotePower = "duration_full_vote_power" | |
43 | 43 | ||
44 | 44 | let kShareLimit = "share_limit_on_first_harvest" | |
45 | 45 | ||
46 | 46 | let keyMinVotePower = "min_vote_power" | |
47 | 47 | ||
48 | 48 | let adminPubKey1 = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
49 | 49 | ||
50 | 50 | let adminPubKey2 = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
51 | 51 | ||
52 | 52 | let adminPubKey3 = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
53 | 53 | ||
54 | 54 | let adminPubKeyStartStop = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
55 | 55 | ||
56 | 56 | let adminPubKeyStaking = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
57 | 57 | ||
58 | 58 | let adminPubKeyBackend = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
59 | 59 | ||
60 | 60 | let governanceAddress = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4') | |
61 | 61 | ||
62 | 62 | let votingAddress = Address(base58'3N6CYoCsxrcXKe75pQvvV3JqJrwJjm1t4QN') | |
63 | 63 | ||
64 | 64 | let stakingAddress = Address(base58'3N6q7sCGSSLBUXDdjBdYGTJbZGZfhhh8cNg') | |
65 | 65 | ||
66 | 66 | let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' | |
67 | 67 | ||
68 | 68 | let stakingFeeInUSDN = (9 * value(value(assetInfo(USDN)).minSponsoredFee)) | |
69 | 69 | ||
70 | 70 | let basePeriod = valueOrErrorMessage(getInteger(votingAddress, keyBasePeriod), "Empty kBasePeriod") | |
71 | 71 | ||
72 | 72 | let startHeight = valueOrErrorMessage(getInteger(votingAddress, keyStartHeight), "Empty kStartHeight") | |
73 | 73 | ||
74 | 74 | let periodLength = valueOrErrorMessage(getInteger(votingAddress, keyPeriodLength), "Empty kPeriodLength") | |
75 | 75 | ||
76 | 76 | let durationFullVotePower = valueOrErrorMessage(getInteger(votingAddress, keyDurationFullVotePower), "Empty kDurationFullVotePower") | |
77 | 77 | ||
78 | 78 | let minVotePower = valueOrErrorMessage(getInteger(votingAddress, keyMinVotePower), "Empty kMinVotePower") | |
79 | 79 | ||
80 | 80 | let currPeriod = ((basePeriod + ((height - startHeight) / periodLength)) + 2) | |
81 | 81 | ||
82 | 82 | let isActive = getBooleanValue(this, keyActive) | |
83 | 83 | ||
84 | 84 | let strAssetIdA = getStringValue(this, keyAssetIdA) | |
85 | 85 | ||
86 | 86 | let strAssetIdB = getStringValue(this, keyAssetIdB) | |
87 | 87 | ||
88 | 88 | let assetIdA = if ((strAssetIdA == "WAVES")) | |
89 | 89 | then unit | |
90 | 90 | else fromBase58String(strAssetIdA) | |
91 | 91 | ||
92 | 92 | let assetIdB = if ((strAssetIdB == "WAVES")) | |
93 | 93 | then unit | |
94 | 94 | else fromBase58String(strAssetIdB) | |
95 | 95 | ||
96 | 96 | let assetNameA = match assetIdA { | |
97 | 97 | case id: ByteVector => | |
98 | 98 | value(assetInfo(id)).name | |
99 | 99 | case waves: Unit => | |
100 | 100 | "WAVES" | |
101 | 101 | case _ => | |
102 | 102 | throw("Match error") | |
103 | 103 | } | |
104 | 104 | ||
105 | 105 | let assetNameB = match assetIdB { | |
106 | 106 | case id: ByteVector => | |
107 | 107 | value(assetInfo(id)).name | |
108 | 108 | case waves: Unit => | |
109 | 109 | "WAVES" | |
110 | 110 | case _ => | |
111 | 111 | throw("Match error") | |
112 | 112 | } | |
113 | 113 | ||
114 | 114 | let balanceA = getIntegerValue(this, keyBalanceA) | |
115 | 115 | ||
116 | 116 | let balanceB = getIntegerValue(this, keyBalanceB) | |
117 | 117 | ||
118 | 118 | let shareAssetId = fromBase58String(getStringValue(this, keyShareAssetId)) | |
119 | 119 | ||
120 | 120 | let shareAssetSupply = getIntegerValue(this, keyShareAssetSupply) | |
121 | 121 | ||
122 | 122 | let commission = 3000 | |
123 | 123 | ||
124 | 124 | let commissionGovernance = 1200 | |
125 | 125 | ||
126 | 126 | let commissionScaleDelimiter = 1000000 | |
127 | 127 | ||
128 | 128 | let scaleValue3 = 1000 | |
129 | 129 | ||
130 | 130 | let scaleValue8 = 100000000 | |
131 | 131 | ||
132 | 132 | let slippageToleranceDelimiter = 1000 | |
133 | 133 | ||
134 | 134 | let scaleValue8Digits = 8 | |
135 | 135 | ||
136 | 136 | func accountBalance (assetId) = match assetId { | |
137 | 137 | case id: ByteVector => | |
138 | 138 | assetBalance(this, id) | |
139 | 139 | case waves: Unit => | |
140 | 140 | wavesBalance(this).available | |
141 | 141 | case _ => | |
142 | 142 | throw("Match error") | |
143 | 143 | } | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | let stakedAmountUSDN = match getInteger(stakingAddress, ((("rpd_balance_" + toBase58String(USDN)) + "_") + toString(this))) { | |
147 | 147 | case staked: Int => | |
148 | 148 | staked | |
149 | 149 | case nothing: Unit => | |
150 | 150 | 0 | |
151 | 151 | case _ => | |
152 | 152 | throw("Match error") | |
153 | 153 | } | |
154 | 154 | ||
155 | 155 | let assetInitA = getIntegerValue(this, keyBalanceInitA) | |
156 | 156 | ||
157 | 157 | let assetInitB = getIntegerValue(this, keyBalanceInitB) | |
158 | 158 | ||
159 | 159 | let availableBalanceA = (balanceA - (if ((assetIdA == USDN)) | |
160 | 160 | then stakedAmountUSDN | |
161 | 161 | else 0)) | |
162 | 162 | ||
163 | 163 | let availableBalanceB = (balanceB - (if ((assetIdB == USDN)) | |
164 | 164 | then stakedAmountUSDN | |
165 | 165 | else 0)) | |
166 | 166 | ||
167 | 167 | let accountBalanceWithStakedA = (accountBalance(assetIdA) + (if ((assetIdA == USDN)) | |
168 | 168 | then stakedAmountUSDN | |
169 | 169 | else 0)) | |
170 | 170 | ||
171 | 171 | let accountBalanceWithStakedB = (accountBalance(assetIdB) + (if ((assetIdB == USDN)) | |
172 | 172 | then stakedAmountUSDN | |
173 | 173 | else 0)) | |
174 | 174 | ||
175 | 175 | let hasEnoughBalance = if ((accountBalanceWithStakedA >= balanceA)) | |
176 | 176 | then (accountBalanceWithStakedB >= balanceB) | |
177 | 177 | else false | |
178 | 178 | ||
179 | 179 | func getAssetInfo (assetId) = match assetId { | |
180 | 180 | case id: ByteVector => | |
181 | 181 | let stringId = toBase58String(id) | |
182 | 182 | let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist")) | |
183 | 183 | $Tuple3(stringId, info.name, info.decimals) | |
184 | 184 | case waves: Unit => | |
185 | 185 | $Tuple3("WAVES", "WAVES", 8) | |
186 | 186 | case _ => | |
187 | 187 | throw("Match error") | |
188 | 188 | } | |
189 | 189 | ||
190 | 190 | ||
191 | 191 | func getAssetInfoFromString (assetStr) = if ((assetStr == "WAVES")) | |
192 | 192 | then $Tuple3("WAVES", "WAVES", 8) | |
193 | 193 | else { | |
194 | 194 | let stringId = assetStr | |
195 | 195 | let id = fromBase58String(assetStr) | |
196 | 196 | let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist")) | |
197 | 197 | $Tuple3(stringId, info.name, info.decimals) | |
198 | 198 | } | |
199 | 199 | ||
200 | 200 | ||
201 | 201 | func suspend (cause) = [BooleanEntry(keyActive, false), StringEntry(keyCause, cause)] | |
202 | 202 | ||
203 | 203 | ||
204 | 204 | func deductStakingFee (amount,assetId) = if ((assetId == USDN)) | |
205 | 205 | then { | |
206 | 206 | let result = (amount - stakingFeeInUSDN) | |
207 | 207 | if ((0 >= result)) | |
208 | 208 | then throw((((("Insufficient amount " + toString(amount)) + " to deduct staking fee ") + toString(stakingFeeInUSDN)) + " USD-N")) | |
209 | 209 | else result | |
210 | 210 | } | |
211 | 211 | else amount | |
212 | 212 | ||
213 | 213 | ||
214 | 214 | func throwInsufficientAvailableBalance (amount,available,assetName) = throw((((((((("Insufficient DApp balance to pay " + toString(amount)) + " ") + assetName) + " due to staking. Available: ") + toString(available)) + " ") + assetName) + ". Please contact support in Telegram: https://t.me/swopfisupport")) | |
215 | 215 | ||
216 | 216 | ||
217 | 217 | func throwInsufficientAvailableBalances (amountA,amountB) = throw((((((((((((((((("Insufficient DApp balance to pay " + toString(amountA)) + " ") + assetNameA) + " and ") + toString(amountB)) + " ") + assetNameB) + " due to staking. Available: ") + toString(availableBalanceA)) + " ") + assetNameA) + " and ") + toString(availableBalanceB)) + " ") + assetNameB) + ". Please contact support in Telegram: https://t.me/swopfisupport")) | |
218 | 218 | ||
219 | 219 | ||
220 | 220 | @Callable(i) | |
221 | 221 | func init (firstHarvest) = { | |
222 | 222 | let $t065776654 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
223 | 223 | let pmtAmountA = $t065776654._1 | |
224 | 224 | let pmtAssetIdA = $t065776654._2 | |
225 | 225 | let $t066596736 = $Tuple2(i.payments[1].amount, i.payments[1].assetId) | |
226 | 226 | let pmtAmountB = $t066596736._1 | |
227 | 227 | let pmtAssetIdB = $t066596736._2 | |
228 | 228 | let $t067416818 = getAssetInfo(pmtAssetIdA) | |
229 | 229 | let pmtStrAssetIdA = $t067416818._1 | |
230 | 230 | let pmtAssetNameA = $t067416818._2 | |
231 | 231 | let pmtDecimalsA = $t067416818._3 | |
232 | 232 | let $t068236900 = getAssetInfo(pmtAssetIdB) | |
233 | 233 | let pmtStrAssetIdB = $t068236900._1 | |
234 | 234 | let pmtAssetNameB = $t068236900._2 | |
235 | 235 | let pmtDecimalsB = $t068236900._3 | |
236 | 236 | if (isDefined(getBoolean(this, keyActive))) | |
237 | 237 | then throw("DApp is already active") | |
238 | 238 | else if ((pmtAssetIdA == pmtAssetIdB)) | |
239 | 239 | then throw("Assets must be different") | |
240 | 240 | else { | |
241 | 241 | let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7)) | |
242 | 242 | let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this)) | |
243 | 243 | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
244 | 244 | let shareInitialSupply = fraction(pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, HALFDOWN), pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, HALFDOWN), pow(10, 0, shareDecimals, 0, 0, HALFDOWN)) | |
245 | 245 | let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true) | |
246 | 246 | let shareIssueId = calculateAssetId(shareIssue) | |
247 | 247 | let baseEntry = [StringEntry(keyVersion, version), BooleanEntry(keyActive, true), StringEntry(keyAssetIdA, pmtStrAssetIdA), StringEntry(keyAssetIdB, pmtStrAssetIdB), IntegerEntry(keyBalanceA, pmtAmountA), IntegerEntry(keyBalanceB, pmtAmountB), IntegerEntry(keyCommission, commission), IntegerEntry(keyCommissionScaleDelimiter, commissionScaleDelimiter), shareIssue, StringEntry(keyShareAssetId, toBase58String(shareIssueId)), IntegerEntry(keyShareAssetSupply, shareInitialSupply), ScriptTransfer(i.caller, shareInitialSupply, shareIssueId)] | |
248 | 248 | if (firstHarvest) | |
249 | 249 | then (baseEntry ++ [BooleanEntry(keyFirstHarvest, firstHarvest), IntegerEntry(keyFirstHarvestHeight, currPeriod)]) | |
250 | 250 | else baseEntry | |
251 | 251 | } | |
252 | 252 | } | |
253 | 253 | ||
254 | 254 | ||
255 | 255 | ||
256 | 256 | @Callable(i) | |
257 | 257 | func initWithInitRatio (amtAssetA,amtAssetB,strAssetIdA,strAssetIdB,firstHarvest) = { | |
258 | 258 | let $t089018988 = getAssetInfoFromString(strAssetIdA) | |
259 | 259 | let pmtStrAssetIdA = $t089018988._1 | |
260 | 260 | let pmtAssetNameA = $t089018988._2 | |
261 | 261 | let pmtDecimalsA = $t089018988._3 | |
262 | 262 | let $t089939080 = getAssetInfoFromString(strAssetIdB) | |
263 | 263 | let pmtStrAssetIdB = $t089939080._1 | |
264 | 264 | let pmtAssetNameB = $t089939080._2 | |
265 | 265 | let pmtDecimalsB = $t089939080._3 | |
266 | 266 | if (isDefined(getBoolean(this, keyActive))) | |
267 | 267 | then throw("DApp is already active") | |
268 | 268 | else if ((strAssetIdA == strAssetIdB)) | |
269 | 269 | then throw("Assets must be different") | |
270 | 270 | else { | |
271 | 271 | let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7)) | |
272 | 272 | let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this)) | |
273 | 273 | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
274 | 274 | let shareInitialSupply = 0 | |
275 | 275 | let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true) | |
276 | 276 | let shareIssueId = calculateAssetId(shareIssue) | |
277 | 277 | let baseEntry = [StringEntry(keyVersion, version), BooleanEntry(keyActive, true), StringEntry(keyAssetIdA, pmtStrAssetIdA), StringEntry(keyAssetIdB, pmtStrAssetIdB), IntegerEntry(keyBalanceInitA, amtAssetA), IntegerEntry(keyBalanceInitB, amtAssetB), IntegerEntry(keyBalanceA, 0), IntegerEntry(keyBalanceB, 0), IntegerEntry(keyCommission, commission), IntegerEntry(keyCommissionScaleDelimiter, commissionScaleDelimiter), shareIssue, StringEntry(keyShareAssetId, toBase58String(shareIssueId)), IntegerEntry(keyFirstHarvestHeight, currPeriod), IntegerEntry(keyShareAssetSupply, shareInitialSupply)] | |
278 | 278 | if (firstHarvest) | |
279 | 279 | then (baseEntry ++ [BooleanEntry(keyFirstHarvest, firstHarvest), IntegerEntry(keyFirstHarvestHeight, currPeriod)]) | |
280 | 280 | else baseEntry | |
281 | 281 | } | |
282 | 282 | } | |
283 | 283 | ||
284 | 284 | ||
285 | 285 | ||
286 | 286 | @Callable(i) | |
287 | 287 | func keepLimitForFirstHarvest (shareLimit) = if (!(isActive)) | |
288 | 288 | then throw("DApp is inactive at this moment") | |
289 | 289 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyBackend], i.callerPublicKey))) | |
290 | 290 | then throw("Only admin can call this function") | |
291 | 291 | else [IntegerEntry(kShareLimit, shareLimit)] | |
292 | 292 | ||
293 | 293 | ||
294 | 294 | ||
295 | 295 | @Callable(i) | |
296 | 296 | func replenishWithTwoTokens (slippageTolerance) = { | |
297 | 297 | let pmtAssetIdA = i.payments[0].assetId | |
298 | 298 | let pmtAssetIdB = i.payments[1].assetId | |
299 | 299 | let pmtAmountA = deductStakingFee(i.payments[0].amount, pmtAssetIdA) | |
300 | 300 | let pmtAmountB = deductStakingFee(i.payments[1].amount, pmtAssetIdB) | |
301 | 301 | if (if ((balanceA == 0)) | |
302 | 302 | then (balanceB == 0) | |
303 | 303 | else false) | |
304 | 304 | then { | |
305 | 305 | let $t01162211699 = getAssetInfo(pmtAssetIdA) | |
306 | 306 | let pmtStrAssetIdA = $t01162211699._1 | |
307 | 307 | let pmtAssetNameA = $t01162211699._2 | |
308 | 308 | let pmtDecimalsA = $t01162211699._3 | |
309 | 309 | let $t01170811785 = getAssetInfo(pmtAssetIdB) | |
310 | 310 | let pmtStrAssetIdB = $t01170811785._1 | |
311 | 311 | let pmtAssetNameB = $t01170811785._2 | |
312 | 312 | let pmtDecimalsB = $t01170811785._3 | |
313 | - | if (isDefined(getBoolean(this, keyActive))) | |
314 | - | then throw("DApp is already active") | |
315 | - | else if ((pmtAssetIdA == pmtAssetIdB)) | |
316 | - | then throw("Assets must be different") | |
317 | - | else { | |
318 | - | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
319 | - | let shareInitialSupply = fraction(pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, HALFDOWN), pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, HALFDOWN), pow(10, 0, shareDecimals, 0, 0, HALFDOWN)) | |
320 | - | if (!(isActive)) | |
321 | - | then throw("DApp is inactive at this moment") | |
322 | - | else if (if ((0 > slippageTolerance)) | |
323 | - | then true | |
324 | - | else (slippageTolerance > slippageToleranceDelimiter)) | |
325 | - | then throw(((("Slippage tolerance must be between 0 and " + toString(slippageToleranceDelimiter)) + " inclusively. Actual: ") + toString(slippageTolerance))) | |
326 | - | else if ((size(i.payments) != 2)) | |
327 | - | then throw("Two attached assets expected") | |
328 | - | else if (if ((pmtAssetIdA != assetIdA)) | |
329 | - | then true | |
330 | - | else (pmtAssetIdB != assetIdB)) | |
331 | - | then throw(((("Incorrect assets attached. Expected: " + strAssetIdA) + " and ") + strAssetIdB)) | |
332 | - | else if ((shareInitialSupply == 0)) | |
333 | - | then throw("Too small amount to replenish") | |
334 | - | else if (!(hasEnoughBalance)) | |
335 | - | then suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + assetNameA) + ", ") + toString(accountBalance(assetIdB))) + " ") + assetNameB)) | |
336 | - | else [Reissue(shareAssetId, shareInitialSupply, true), IntegerEntry(keyBalanceA, pmtAmountA), IntegerEntry(keyBalanceB, pmtAmountB), IntegerEntry(keyShareAssetSupply, shareInitialSupply), ScriptTransfer(i.caller, shareInitialSupply, shareAssetId)] | |
337 | - | } | |
313 | + | if ((pmtAssetIdA == pmtAssetIdB)) | |
314 | + | then throw("Assets must be different") | |
315 | + | else { | |
316 | + | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
317 | + | let shareInitialSupply = fraction(pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, HALFDOWN), pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, HALFDOWN), pow(10, 0, shareDecimals, 0, 0, HALFDOWN)) | |
318 | + | if (!(isActive)) | |
319 | + | then throw("DApp is inactive at this moment") | |
320 | + | else if (if ((0 > slippageTolerance)) | |
321 | + | then true | |
322 | + | else (slippageTolerance > slippageToleranceDelimiter)) | |
323 | + | then throw(((("Slippage tolerance must be between 0 and " + toString(slippageToleranceDelimiter)) + " inclusively. Actual: ") + toString(slippageTolerance))) | |
324 | + | else if ((size(i.payments) != 2)) | |
325 | + | then throw("Two attached assets expected") | |
326 | + | else if (if ((pmtAssetIdA != assetIdA)) | |
327 | + | then true | |
328 | + | else (pmtAssetIdB != assetIdB)) | |
329 | + | then throw(((("Incorrect assets attached. Expected: " + strAssetIdA) + " and ") + strAssetIdB)) | |
330 | + | else if ((shareInitialSupply == 0)) | |
331 | + | then throw("Too small amount to replenish") | |
332 | + | else if (!(hasEnoughBalance)) | |
333 | + | then suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + assetNameA) + ", ") + toString(accountBalance(assetIdB))) + " ") + assetNameB)) | |
334 | + | else [Reissue(shareAssetId, shareInitialSupply, true), IntegerEntry(keyBalanceA, pmtAmountA), IntegerEntry(keyBalanceB, pmtAmountB), IntegerEntry(keyShareAssetSupply, shareInitialSupply), ScriptTransfer(i.caller, shareInitialSupply, shareAssetId)] | |
335 | + | } | |
338 | 336 | } | |
339 | 337 | else { | |
340 | 338 | let tokenRatio = fraction(fraction(balanceA, scaleValue8, pmtAmountA), scaleValue3, fraction(balanceB, scaleValue8, pmtAmountB)) | |
341 | 339 | let ratioShareTokensInA = fraction(pmtAmountA, scaleValue8, balanceA) | |
342 | 340 | let ratioShareTokensInB = fraction(pmtAmountB, scaleValue8, balanceB) | |
343 | 341 | let shareTokenToPayAmount = fraction(min([ratioShareTokensInA, ratioShareTokensInB]), shareAssetSupply, scaleValue8) | |
344 | 342 | if (!(isActive)) | |
345 | 343 | then throw("DApp is inactive at this moment") | |
346 | 344 | else if (if ((0 > slippageTolerance)) | |
347 | 345 | then true | |
348 | 346 | else (slippageTolerance > slippageToleranceDelimiter)) | |
349 | 347 | then throw(((("Slippage tolerance must be between 0 and " + toString(slippageToleranceDelimiter)) + " inclusively. Actual: ") + toString(slippageTolerance))) | |
350 | 348 | else if ((size(i.payments) != 2)) | |
351 | 349 | then throw("Two attached assets expected") | |
352 | 350 | else if (if ((pmtAssetIdA != assetIdA)) | |
353 | 351 | then true | |
354 | 352 | else (pmtAssetIdB != assetIdB)) | |
355 | 353 | then throw(((("Incorrect assets attached. Expected: " + strAssetIdA) + " and ") + strAssetIdB)) | |
356 | 354 | else if (if ((((scaleValue3 * (slippageToleranceDelimiter - slippageTolerance)) / slippageToleranceDelimiter) > tokenRatio)) | |
357 | 355 | then true | |
358 | 356 | else (tokenRatio > ((scaleValue3 * (slippageToleranceDelimiter + slippageTolerance)) / slippageToleranceDelimiter))) | |
359 | 357 | then throw("Incorrect assets amount: amounts must have the contract ratio") | |
360 | 358 | else if ((shareTokenToPayAmount == 0)) | |
361 | 359 | then throw("Too small amount to replenish") | |
362 | 360 | else if (!(hasEnoughBalance)) | |
363 | 361 | then suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + assetNameA) + ", ") + toString(accountBalance(assetIdB))) + " ") + assetNameB)) | |
364 | 362 | else [IntegerEntry(keyBalanceA, (balanceA + pmtAmountA)), IntegerEntry(keyBalanceB, (balanceB + pmtAmountB)), IntegerEntry(keyShareAssetSupply, (shareAssetSupply + shareTokenToPayAmount)), Reissue(shareAssetId, shareTokenToPayAmount, true), ScriptTransfer(i.caller, shareTokenToPayAmount, shareAssetId)] | |
365 | 363 | } | |
366 | 364 | } | |
367 | 365 | ||
368 | 366 | ||
369 | 367 | ||
370 | 368 | @Callable(i) | |
371 | 369 | func withdraw () = { | |
372 | - | let $ | |
373 | - | let pmtAmount = $ | |
374 | - | let pmtAssetId = $ | |
370 | + | let $t01592616076 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
371 | + | let pmtAmount = $t01592616076._1 | |
372 | + | let pmtAssetId = $t01592616076._2 | |
375 | 373 | let amountToPayA = deductStakingFee(fraction(pmtAmount, balanceA, shareAssetSupply), assetIdA) | |
376 | 374 | let amountToPayB = deductStakingFee(fraction(pmtAmount, balanceB, shareAssetSupply), assetIdB) | |
377 | 375 | if (!(isActive)) | |
378 | 376 | then throw("DApp is inactive at this moment") | |
379 | 377 | else if ((size(i.payments) != 1)) | |
380 | 378 | then throw("One attached payment expected") | |
381 | 379 | else if ((pmtAssetId != shareAssetId)) | |
382 | 380 | then throw(("Incorrect asset attached. Expected: " + toBase58String(shareAssetId))) | |
383 | 381 | else if (!(hasEnoughBalance)) | |
384 | 382 | then suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + assetNameA) + ", ") + toString(accountBalance(assetIdB))) + " ") + assetNameB)) | |
385 | 383 | else if (if ((amountToPayA > availableBalanceA)) | |
386 | 384 | then true | |
387 | 385 | else (amountToPayB > availableBalanceB)) | |
388 | 386 | then throwInsufficientAvailableBalances(amountToPayA, amountToPayB) | |
389 | 387 | else [IntegerEntry(keyBalanceA, (balanceA - amountToPayA)), IntegerEntry(keyBalanceB, (balanceB - amountToPayB)), IntegerEntry(keyShareAssetSupply, (shareAssetSupply - pmtAmount)), Burn(shareAssetId, pmtAmount), ScriptTransfer(i.caller, amountToPayA, assetIdA), ScriptTransfer(i.caller, amountToPayB, assetIdB)] | |
390 | 388 | } | |
391 | 389 | ||
392 | 390 | ||
393 | 391 | ||
394 | 392 | @Callable(i) | |
395 | 393 | func exchange (minAmountToReceive) = { | |
396 | - | let $ | |
397 | - | let pmtAmount = $ | |
398 | - | let pmtAssetId = $ | |
394 | + | let $t01746617541 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
395 | + | let pmtAmount = $t01746617541._1 | |
396 | + | let pmtAssetId = $t01746617541._2 | |
399 | 397 | func calculateFees (tokenFrom,tokenTo) = { | |
400 | 398 | let amountWithoutFee = fraction(tokenTo, pmtAmount, (pmtAmount + tokenFrom)) | |
401 | 399 | let amountWithFee = fraction(amountWithoutFee, (commissionScaleDelimiter - commission), commissionScaleDelimiter) | |
402 | 400 | let governanceReward = fraction(amountWithoutFee, commissionGovernance, commissionScaleDelimiter) | |
403 | 401 | if ((minAmountToReceive > amountWithFee)) | |
404 | 402 | then throw(((("Calculated amount to receive " + toString(amountWithFee)) + " is less than specified minimum ") + toString(minAmountToReceive))) | |
405 | 403 | else $Tuple3(amountWithoutFee, amountWithFee, governanceReward) | |
406 | 404 | } | |
407 | 405 | ||
408 | 406 | if (!(isActive)) | |
409 | 407 | then throw("DApp is inactive at this moment") | |
410 | 408 | else if (if ((balanceA == 0)) | |
411 | 409 | then (balanceB == 0) | |
412 | 410 | else false) | |
413 | 411 | then throw("Can't exchange with zero balance") | |
414 | 412 | else if ((0 >= minAmountToReceive)) | |
415 | 413 | then throw(("Minimal amount to receive must be positive. Actual: " + toString(minAmountToReceive))) | |
416 | 414 | else if ((size(i.payments) != 1)) | |
417 | 415 | then throw("One attached payment expected") | |
418 | 416 | else if (!(hasEnoughBalance)) | |
419 | 417 | then suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + assetNameA) + ", ") + toString(accountBalance(assetIdB))) + " ") + assetNameB)) | |
420 | 418 | else if ((pmtAssetId == assetIdA)) | |
421 | 419 | then { | |
422 | 420 | let assetIdSend = assetIdB | |
423 | - | let $ | |
424 | - | let amountWithoutFee = $ | |
425 | - | let amountWithFee = $ | |
426 | - | let governanceReward = $ | |
421 | + | let $t01900019091 = calculateFees(balanceA, balanceB) | |
422 | + | let amountWithoutFee = $t01900019091._1 | |
423 | + | let amountWithFee = $t01900019091._2 | |
424 | + | let governanceReward = $t01900019091._3 | |
427 | 425 | let newBalanceA = (balanceA + pmtAmount) | |
428 | 426 | let newBalanceB = ((balanceB - amountWithFee) - governanceReward) | |
429 | 427 | if (if (if ((assetIdA == USDN)) | |
430 | 428 | then (stakedAmountUSDN >= newBalanceA) | |
431 | 429 | else false) | |
432 | 430 | then true | |
433 | 431 | else if ((assetIdB == USDN)) | |
434 | 432 | then (stakedAmountUSDN >= newBalanceB) | |
435 | 433 | else false) | |
436 | 434 | then throwInsufficientAvailableBalance(amountWithFee, availableBalanceB, assetNameB) | |
437 | 435 | else [IntegerEntry(keyBalanceA, newBalanceA), IntegerEntry(keyBalanceB, newBalanceB), ScriptTransfer(i.caller, amountWithFee, assetIdSend), ScriptTransfer(governanceAddress, governanceReward, assetIdSend)] | |
438 | 436 | } | |
439 | 437 | else if ((pmtAssetId == assetIdB)) | |
440 | 438 | then { | |
441 | 439 | let assetIdSend = assetIdA | |
442 | - | let $ | |
443 | - | let amountWithoutFee = $ | |
444 | - | let amountWithFee = $ | |
445 | - | let governanceReward = $ | |
440 | + | let $t01996420055 = calculateFees(balanceB, balanceA) | |
441 | + | let amountWithoutFee = $t01996420055._1 | |
442 | + | let amountWithFee = $t01996420055._2 | |
443 | + | let governanceReward = $t01996420055._3 | |
446 | 444 | let newBalanceA = ((balanceA - amountWithFee) - governanceReward) | |
447 | 445 | let newBalanceB = (balanceB + pmtAmount) | |
448 | 446 | if (if (if ((assetIdA == USDN)) | |
449 | 447 | then (stakedAmountUSDN >= newBalanceA) | |
450 | 448 | else false) | |
451 | 449 | then true | |
452 | 450 | else if ((assetIdB == USDN)) | |
453 | 451 | then (stakedAmountUSDN >= newBalanceB) | |
454 | 452 | else false) | |
455 | 453 | then throwInsufficientAvailableBalance(amountWithFee, availableBalanceA, assetNameA) | |
456 | 454 | else [IntegerEntry(keyBalanceA, newBalanceA), IntegerEntry(keyBalanceB, newBalanceB), ScriptTransfer(i.caller, amountWithFee, assetIdSend), ScriptTransfer(governanceAddress, governanceReward, assetIdSend)] | |
457 | 455 | } | |
458 | 456 | else throw(((("Incorrect asset attached. Expected: " + strAssetIdA) + " or ") + strAssetIdB)) | |
459 | 457 | } | |
460 | 458 | ||
461 | 459 | ||
462 | 460 | ||
463 | 461 | @Callable(i) | |
464 | 462 | func shutdown () = if (!(isActive)) | |
465 | 463 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, keyCause), "the cause wasn't specified"))) | |
466 | 464 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey))) | |
467 | 465 | then throw("Only admin can call this function") | |
468 | 466 | else suspend("Paused by admin") | |
469 | 467 | ||
470 | 468 | ||
471 | 469 | ||
472 | 470 | @Callable(i) | |
473 | 471 | func activate () = if (isActive) | |
474 | 472 | then throw("DApp is already active") | |
475 | 473 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey))) | |
476 | 474 | then throw("Only admin can call this function") | |
477 | 475 | else [BooleanEntry(keyActive, true), DeleteEntry(keyCause)] | |
478 | 476 | ||
479 | 477 | ||
480 | 478 | ||
481 | 479 | @Callable(i) | |
482 | 480 | func takeIntoAccountExtraFunds (amountLeave) = { | |
483 | 481 | let uncountableAmountEnrollAssetA = (accountBalanceWithStakedA - balanceA) | |
484 | 482 | let uncountableAmountEnrollAssetB = (accountBalanceWithStakedB - balanceB) | |
485 | 483 | let amountEnrollA = (uncountableAmountEnrollAssetA - (if ((assetIdA == USDN)) | |
486 | 484 | then amountLeave | |
487 | 485 | else 0)) | |
488 | 486 | let amountEnrollB = (uncountableAmountEnrollAssetB - (if ((assetIdB == USDN)) | |
489 | 487 | then amountLeave | |
490 | 488 | else 0)) | |
491 | 489 | if (!(isActive)) | |
492 | 490 | then throw("DApp is inactive at this moment") | |
493 | 491 | else if ((i.caller != this)) | |
494 | 492 | then throw("Only the DApp itself can call this function") | |
495 | 493 | else if ((0 > amountLeave)) | |
496 | 494 | then throw(("Argument 'amountLeave' cannot be negative. Actual: " + toString(amountLeave))) | |
497 | 495 | else if (if ((0 > uncountableAmountEnrollAssetA)) | |
498 | 496 | then true | |
499 | 497 | else (0 > uncountableAmountEnrollAssetB)) | |
500 | 498 | then suspend("Enroll amount negative") | |
501 | 499 | else if (if ((0 > amountEnrollA)) | |
502 | 500 | then true | |
503 | 501 | else (0 > amountEnrollB)) | |
504 | 502 | then throw("Too large amountLeave") | |
505 | 503 | else [IntegerEntry(keyBalanceA, (balanceA + amountEnrollA)), IntegerEntry(keyBalanceB, (balanceB + amountEnrollB)), IntegerEntry(("last_income_" + strAssetIdA), amountEnrollA), IntegerEntry(("last_income_" + strAssetIdB), amountEnrollB)] | |
506 | 504 | } | |
507 | 505 | ||
508 | 506 | ||
509 | 507 | @Verifier(tx) | |
510 | 508 | func verify () = match tx { | |
511 | 509 | case invoke: InvokeScriptTransaction => | |
512 | 510 | let callTakeIntoAccount = if ((invoke.dApp == this)) | |
513 | 511 | then (invoke.function == "takeIntoAccountExtraFunds") | |
514 | 512 | else false | |
515 | 513 | let callStaking = if ((invoke.dApp == stakingAddress)) | |
516 | 514 | then if (if (if ((invoke.function == "lockNeutrino")) | |
517 | 515 | then (size(invoke.payments) == 1) | |
518 | 516 | else false) | |
519 | 517 | then (invoke.payments[0].assetId == USDN) | |
520 | 518 | else false) | |
521 | 519 | then true | |
522 | 520 | else if ((invoke.function == "unlockNeutrino")) | |
523 | 521 | then (size(invoke.payments) == 0) | |
524 | 522 | else false | |
525 | 523 | else false | |
526 | 524 | let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
527 | 525 | then true | |
528 | 526 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2)) | |
529 | 527 | then true | |
530 | 528 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3)) | |
531 | 529 | then true | |
532 | 530 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyStaking) | |
533 | 531 | if (callTakeIntoAccount) | |
534 | 532 | then true | |
535 | 533 | else callStaking | |
536 | 534 | case _ => | |
537 | 535 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
538 | 536 | } | |
539 | 537 |
github/deemru/w8io/026f985 70.20 ms ◑