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