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