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