tx · 3RohkzdFAr8vMGFcNWgmXdQa4A8v3dQFsJqi1dSxVkir 3Mq63YubY7UKJEobhDuXfsnXaPDJZT1fDhx: -0.01400000 Waves 2021.12.29 19:59 [1855777] smart account 3Mq63YubY7UKJEobhDuXfsnXaPDJZT1fDhx > SELF 0.00000000 Waves
{ "type": 13, "id": "3RohkzdFAr8vMGFcNWgmXdQa4A8v3dQFsJqi1dSxVkir", "fee": 1400000, "feeAssetId": null, "timestamp": 1640797230833, "version": 2, "chainId": 84, "sender": "3Mq63YubY7UKJEobhDuXfsnXaPDJZT1fDhx", "senderPublicKey": "HXfVyeXgXUtHD3uSP6yjsk6JQcTwmU9qQTvhXzFpPw2T", "proofs": [ "56mBWRkVWLErmQ9eEGG8391cFXtXVSz5PHDv5hCnkoi5riib33bwoZwAh15GrrwmjResY16zrxbgJkp94ThB4bRw", "5dq77WyyeSjtd8SKKT3oCU6V6DXKfRcX6yD5vCh136exf4mHKwfC2V38b17Vt17L4HRta265R64cz71c3heZZsNP" ], "script": "base64:AAIFAAAAAAAAADMIAhIDCgEEEgcKBQEBCAgEEgMKAQESAwoBARIAEgMKAQESABIAEgMKAQESBQoDBAEIEgAAAABYAAAAAAd2ZXJzaW9uAgAAAAUxLjAuMAAAAAAKa2V5VmVyc2lvbgIAAAAHdmVyc2lvbgAAAAAJa2V5QWN0aXZlAgAAAAZhY3RpdmUAAAAAC2tleUFzc2V0SWRBAgAAAApBX2Fzc2V0X2lkAAAAAAtrZXlBc3NldElkQgIAAAAKQl9hc3NldF9pZAAAAAALa2V5QmFsYW5jZUECAAAAD0FfYXNzZXRfYmFsYW5jZQAAAAALa2V5QmFsYW5jZUICAAAAD0JfYXNzZXRfYmFsYW5jZQAAAAAPa2V5QmFsYW5jZUluaXRBAgAAAAxBX2Fzc2V0X2luaXQAAAAAD2tleUJhbGFuY2VJbml0QgIAAAAMQl9hc3NldF9pbml0AAAAAA9rZXlTaGFyZUFzc2V0SWQCAAAADnNoYXJlX2Fzc2V0X2l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WVudHMAAAAAAAAAAAEHCQAAAAAAAAIICQABkQAAAAIIBQAAAANpbnYAAAAIcGF5bWVudHMAAAAAAAAAAAAAAAAHYXNzZXRJZAUAAAAEVVNETgcEAAAADXNpZ25lZEJ5QWRtaW4DAwMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAxhZG1pblB1YktleTEGCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAMYWRtaW5QdWJLZXkyBgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAADGFkbWluUHViS2V5MwYJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAABJhZG1pblB1YktleVN0YWtpbmcDAwMDBQAAABNjYWxsVGFrZUludG9BY2NvdW50BgUAAAAPZXhjaGFuZ2VUb1dhdmVzBgUAAAAPZXhjaGFuZ2VUb05TQlRzBQAAAA1zaWduZWRCeUFkbWluBwYFAAAAE211bHRpU2lnbmVkQnlBZG1pbnMFAAAAE211bHRpU2lnbmVkQnlBZG1pbnO6pua+", "height": 1855777, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2VVe3JYquT2gW3tbyiMscaMkEbg4KAbn5P5aonaHxeAG Next: 9N9ZqKs5z1unpKR3LC1mX1czcDNU8jCeD4BAX568wHXn Diff:
Old | New | Differences | |
---|---|---|---|
257 | 257 | ||
258 | 258 | func calcStakingParams (stake,amount,assetId) = if (stake) | |
259 | 259 | then { | |
260 | - | let $ | |
261 | - | let call = $ | |
262 | - | let stakingAddr = $ | |
260 | + | let $t069216987 = calcStakingFuncAndAddres(stake, assetId) | |
261 | + | let call = $t069216987._1 | |
262 | + | let stakingAddr = $t069216987._2 | |
263 | 263 | $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)]) | |
264 | 264 | } | |
265 | 265 | else { | |
266 | - | let $ | |
267 | - | let call = $ | |
268 | - | let stakingAddr = $ | |
266 | + | let $t070737139 = calcStakingFuncAndAddres(stake, assetId) | |
267 | + | let call = $t070737139._1 | |
268 | + | let stakingAddr = $t070737139._2 | |
269 | 269 | $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil) | |
270 | 270 | } | |
271 | + | ||
272 | + | ||
273 | + | func calculateFees (pmtAmount,minAmountToReceive,tokenFrom,tokenTo) = { | |
274 | + | let amountWithoutFee = fraction(tokenTo, pmtAmount, (pmtAmount + tokenFrom)) | |
275 | + | let amountWithFee = fraction(amountWithoutFee, (commissionScaleDelimiter - commission), commissionScaleDelimiter) | |
276 | + | let governanceReward = fraction(amountWithoutFee, commissionGovernance, commissionScaleDelimiter) | |
277 | + | if ((minAmountToReceive > amountWithFee)) | |
278 | + | then throw(((("Calculated amount to receive " + toString(amountWithFee)) + " is less than specified minimum ") + toString(minAmountToReceive))) | |
279 | + | else $Tuple3(amountWithoutFee, amountWithFee, governanceReward) | |
280 | + | } | |
271 | 281 | ||
272 | 282 | ||
273 | 283 | func suspendSuspicious () = suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(accountBalanceWithStakedA)) + " ") + assetNameA) + ", ") + toString(accountBalanceWithStakedB)) + " ") + assetNameB) + ". State: ") + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB)) | |
280 | 290 | ||
281 | 291 | @Callable(i) | |
282 | 292 | func init (firstHarvest) = { | |
283 | - | let $ | |
284 | - | let pmtAmountA = $ | |
285 | - | let pmtAssetIdA = $ | |
286 | - | let $ | |
287 | - | let pmtAmountB = $ | |
288 | - | let pmtAssetIdB = $ | |
289 | - | let $ | |
290 | - | let pmtStrAssetIdA = $ | |
291 | - | let pmtAssetNameA = $ | |
292 | - | let pmtDecimalsA = $ | |
293 | - | let $ | |
294 | - | let pmtStrAssetIdB = $ | |
295 | - | let pmtAssetNameB = $ | |
296 | - | let pmtDecimalsB = $ | |
293 | + | let $t083098386 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
294 | + | let pmtAmountA = $t083098386._1 | |
295 | + | let pmtAssetIdA = $t083098386._2 | |
296 | + | let $t083918468 = $Tuple2(i.payments[1].amount, i.payments[1].assetId) | |
297 | + | let pmtAmountB = $t083918468._1 | |
298 | + | let pmtAssetIdB = $t083918468._2 | |
299 | + | let $t084738550 = getAssetInfo(pmtAssetIdA) | |
300 | + | let pmtStrAssetIdA = $t084738550._1 | |
301 | + | let pmtAssetNameA = $t084738550._2 | |
302 | + | let pmtDecimalsA = $t084738550._3 | |
303 | + | let $t085558632 = getAssetInfo(pmtAssetIdB) | |
304 | + | let pmtStrAssetIdB = $t085558632._1 | |
305 | + | let pmtAssetNameB = $t085558632._2 | |
306 | + | let pmtDecimalsB = $t085558632._3 | |
297 | 307 | if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStaking], i.callerPublicKey))) | |
298 | 308 | then throw("Only admin can call this function") | |
299 | 309 | else if (isDefined(getBoolean(this, keyActive))) | |
335 | 345 | ||
336 | 346 | @Callable(i) | |
337 | 347 | func initWithInitRatio (amtAssetA,amtAssetB,strAssetIdA,strAssetIdB,firstHarvest) = { | |
338 | - | let $ | |
339 | - | let pmtStrAssetIdA = $ | |
340 | - | let pmtAssetNameA = $ | |
341 | - | let pmtDecimalsA = $ | |
342 | - | let $ | |
343 | - | let pmtStrAssetIdB = $ | |
344 | - | let pmtAssetNameB = $ | |
345 | - | let pmtDecimalsB = $ | |
348 | + | let $t01122111308 = getAssetInfoFromString(strAssetIdA) | |
349 | + | let pmtStrAssetIdA = $t01122111308._1 | |
350 | + | let pmtAssetNameA = $t01122111308._2 | |
351 | + | let pmtDecimalsA = $t01122111308._3 | |
352 | + | let $t01131311400 = getAssetInfoFromString(strAssetIdB) | |
353 | + | let pmtStrAssetIdB = $t01131311400._1 | |
354 | + | let pmtAssetNameB = $t01131311400._2 | |
355 | + | let pmtDecimalsB = $t01131311400._3 | |
346 | 356 | if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStaking], i.callerPublicKey))) | |
347 | 357 | then throw("Only admin can call this function") | |
348 | 358 | else if (isDefined(getBoolean(this, keyActive))) | |
378 | 388 | let pmtAssetIdB = i.payments[1].assetId | |
379 | 389 | let pmtAmountA = i.payments[0].amount | |
380 | 390 | let pmtAmountB = i.payments[1].amount | |
381 | - | let $ | |
382 | - | let pmtStrAssetIdA = $ | |
383 | - | let pmtAssetNameA = $ | |
384 | - | let pmtDecimalsA = $ | |
385 | - | let $ | |
386 | - | let pmtStrAssetIdB = $ | |
387 | - | let pmtAssetNameB = $ | |
388 | - | let pmtDecimalsB = $ | |
391 | + | let $t01386813945 = getAssetInfo(pmtAssetIdA) | |
392 | + | let pmtStrAssetIdA = $t01386813945._1 | |
393 | + | let pmtAssetNameA = $t01386813945._2 | |
394 | + | let pmtDecimalsA = $t01386813945._3 | |
395 | + | let $t01395014027 = getAssetInfo(pmtAssetIdB) | |
396 | + | let pmtStrAssetIdB = $t01395014027._1 | |
397 | + | let pmtAssetNameB = $t01395014027._2 | |
398 | + | let pmtDecimalsB = $t01395014027._3 | |
389 | 399 | let inital = if (if ((balanceA == 0)) | |
390 | 400 | then (balanceB == 0) | |
391 | 401 | else false) | |
437 | 447 | ||
438 | 448 | @Callable(i) | |
439 | 449 | func withdraw () = valueOrElse(isActive(), { | |
440 | - | let $ | |
441 | - | let pmtAmount = $ | |
442 | - | let pmtAssetId = $ | |
450 | + | let $t01679316868 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
451 | + | let pmtAmount = $t01679316868._1 | |
452 | + | let pmtAssetId = $t01679316868._2 | |
443 | 453 | let amountToPayA = fraction(pmtAmount, balanceA, shareAssetSupply) | |
444 | 454 | let amountToPayB = fraction(pmtAmount, balanceB, shareAssetSupply) | |
445 | 455 | if ((size(i.payments) != 1)) | |
469 | 479 | ||
470 | 480 | @Callable(i) | |
471 | 481 | func exchange (minAmountToReceive) = valueOrElse(isActive(), { | |
472 | - | let $t01752717602 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
473 | - | let pmtAmount = $t01752717602._1 | |
474 | - | let pmtAssetId = $t01752717602._2 | |
475 | - | func calculateFees (tokenFrom,tokenTo) = { | |
476 | - | let amountWithoutFee = fraction(tokenTo, pmtAmount, (pmtAmount + tokenFrom)) | |
477 | - | let amountWithFee = fraction(amountWithoutFee, (commissionScaleDelimiter - commission), commissionScaleDelimiter) | |
478 | - | let governanceReward = fraction(amountWithoutFee, commissionGovernance, commissionScaleDelimiter) | |
479 | - | if ((minAmountToReceive > amountWithFee)) | |
480 | - | then throw(((("Calculated amount to receive " + toString(amountWithFee)) + " is less than specified minimum ") + toString(minAmountToReceive))) | |
481 | - | else $Tuple3(amountWithoutFee, amountWithFee, governanceReward) | |
482 | - | } | |
483 | - | ||
482 | + | let $t01817418249 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
483 | + | let pmtAmount = $t01817418249._1 | |
484 | + | let pmtAssetId = $t01817418249._2 | |
484 | 485 | if (if ((balanceA == 0)) | |
485 | 486 | then true | |
486 | 487 | else (balanceB == 0)) | |
494 | 495 | else if ((pmtAssetId == assetIdA)) | |
495 | 496 | then { | |
496 | 497 | let assetIdSend = assetIdB | |
497 | - | let $ | |
498 | - | let amountWithoutFee = $ | |
499 | - | let amountWithFee = $ | |
500 | - | let governanceReward = $ | |
498 | + | let $t01880418926 = calculateFees(pmtAmount, minAmountToReceive, balanceA, balanceB) | |
499 | + | let amountWithoutFee = $t01880418926._1 | |
500 | + | let amountWithFee = $t01880418926._2 | |
501 | + | let governanceReward = $t01880418926._3 | |
501 | 502 | let newBalanceA = (balanceA + pmtAmount) | |
502 | 503 | let newBalanceB = ((balanceB - amountWithFee) - governanceReward) | |
503 | 504 | let stake1 = if (containsElement(stakingAssets, strAssetIdA)) | |
517 | 518 | else if ((pmtAssetId == assetIdB)) | |
518 | 519 | then { | |
519 | 520 | let assetIdSend = assetIdA | |
520 | - | let $ | |
521 | - | let amountWithoutFee = $ | |
522 | - | let amountWithFee = $ | |
523 | - | let governanceReward = $ | |
521 | + | let $t01988120003 = calculateFees(pmtAmount, minAmountToReceive, balanceB, balanceA) | |
522 | + | let amountWithoutFee = $t01988120003._1 | |
523 | + | let amountWithFee = $t01988120003._2 | |
524 | + | let governanceReward = $t01988120003._3 | |
524 | 525 | let newBalanceA = ((balanceA - amountWithFee) - governanceReward) | |
525 | 526 | let newBalanceB = (balanceB + pmtAmount) | |
526 | 527 | let stake1 = if (containsElement(stakingAssets, strAssetIdA)) | |
625 | 626 | } | |
626 | 627 | } | |
627 | 628 | else { | |
628 | - | let $ | |
629 | - | let call = $ | |
630 | - | let addr = $ | |
631 | - | let params = $ | |
632 | - | let payments = $ | |
629 | + | let $t02415124254 = calcStakingParams(stake, amount, fromBase58String(assetIdString)) | |
630 | + | let call = $t02415124254._1 | |
631 | + | let addr = $t02415124254._2 | |
632 | + | let params = $t02415124254._3 | |
633 | + | let payments = $t02415124254._4 | |
633 | 634 | let inv = invoke(addr, call, params, payments) | |
634 | 635 | if ((inv == inv)) | |
635 | 636 | then nil |
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 keyUSDNNSBTAddress = "staking_usdnnsbt_address" | |
47 | 47 | ||
48 | 48 | let keyEURNAddress = "staking_eurn_address" | |
49 | 49 | ||
50 | 50 | let keyLeasingPool = "leasing_address" | |
51 | 51 | ||
52 | 52 | let keyLeasingAmount = "leasing_amount" | |
53 | 53 | ||
54 | 54 | let keyLeasingId = "leasing_id" | |
55 | 55 | ||
56 | 56 | let keyAdminPubKey1 = "admin_pub_1" | |
57 | 57 | ||
58 | 58 | let keyAdminPubKey2 = "admin_pub_2" | |
59 | 59 | ||
60 | 60 | let keyAdminPubKey3 = "admin_pub_3" | |
61 | 61 | ||
62 | 62 | let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9') | |
63 | 63 | ||
64 | 64 | func getAdminPub (keyAdminPub) = match getString(oracle, keyAdminPub) { | |
65 | 65 | case string: String => | |
66 | 66 | fromBase58String(string) | |
67 | 67 | case nothing => | |
68 | 68 | throw("Admin public key is empty") | |
69 | 69 | } | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | let adminPubKey1 = getAdminPub(keyAdminPubKey1) | |
73 | 73 | ||
74 | 74 | let adminPubKey2 = getAdminPub(keyAdminPubKey2) | |
75 | 75 | ||
76 | 76 | let adminPubKey3 = getAdminPub(keyAdminPubKey3) | |
77 | 77 | ||
78 | 78 | let adminPubKeyStartStop = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
79 | 79 | ||
80 | 80 | let adminPubKeyStaking = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
81 | 81 | ||
82 | 82 | let walletAddress = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4') | |
83 | 83 | ||
84 | 84 | let votingAddress = Address(base58'3MrJgdL1GniipErHy44YF9idzLaUL2iX5DQ') | |
85 | 85 | ||
86 | 86 | let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' | |
87 | 87 | ||
88 | 88 | let NSBT = base58'36mg8NZTaFRDygiVwb8uBnLR51hetJruUCZcxhaVcHj9' | |
89 | 89 | ||
90 | 90 | let SWOP = base58'2HAJrwa8q4SxBx9cHYaBTQdBjdk5wwqdof7ccpAx2uhZ' | |
91 | 91 | ||
92 | 92 | let EURN = base58'ECBCkHS68DckpBrzLeoRgYbFg7sCVqR176mPqbXsj9pA' | |
93 | 93 | ||
94 | 94 | let stakingAssets = ["WAVES", toBase58String(USDN), toBase58String(NSBT), toBase58String(EURN)] | |
95 | 95 | ||
96 | 96 | let stakingUSDNNSBTAddress = Address(fromBase58String(valueOrErrorMessage(getString(oracle, keyUSDNNSBTAddress), "no usdn staking address"))) | |
97 | 97 | ||
98 | 98 | let stakingEURNAddress = Address(fromBase58String(valueOrErrorMessage(getString(oracle, keyEURNAddress), "no usdn staking address"))) | |
99 | 99 | ||
100 | 100 | let USDNToWavesExchanger = Address(base58'3N8PGkzXhbtTvEwEQTtE2xiTJmsDEQ9XfoZ') | |
101 | 101 | ||
102 | 102 | let USDNToNSBTExchanger = Address(base58'3MqW1t2cxdYy2emEMk3YtZkRwQPhHaTfWRe') | |
103 | 103 | ||
104 | 104 | let basePeriod = valueOrErrorMessage(getInteger(votingAddress, kBasePeriod), "Empty kBasePeriod") | |
105 | 105 | ||
106 | 106 | let startHeight = valueOrErrorMessage(getInteger(votingAddress, kStartHeight), "Empty kStartHeight") | |
107 | 107 | ||
108 | 108 | let periodLength = valueOrErrorMessage(getInteger(votingAddress, kPeriodLength), "Empty kPeriodLength") | |
109 | 109 | ||
110 | 110 | let firstHarvestEndPeriod = ((basePeriod + ((height - startHeight) / periodLength)) + 3) | |
111 | 111 | ||
112 | 112 | let active = getBooleanValue(this, keyActive) | |
113 | 113 | ||
114 | 114 | let strAssetIdA = getStringValue(this, keyAssetIdA) | |
115 | 115 | ||
116 | 116 | let strAssetIdB = getStringValue(this, keyAssetIdB) | |
117 | 117 | ||
118 | 118 | let assetIdA = if ((strAssetIdA == "WAVES")) | |
119 | 119 | then unit | |
120 | 120 | else fromBase58String(strAssetIdA) | |
121 | 121 | ||
122 | 122 | let assetIdB = if ((strAssetIdB == "WAVES")) | |
123 | 123 | then unit | |
124 | 124 | else fromBase58String(strAssetIdB) | |
125 | 125 | ||
126 | 126 | let assetNameA = match assetIdA { | |
127 | 127 | case id: ByteVector => | |
128 | 128 | value(assetInfo(id)).name | |
129 | 129 | case waves: Unit => | |
130 | 130 | "WAVES" | |
131 | 131 | case _ => | |
132 | 132 | throw("Match error") | |
133 | 133 | } | |
134 | 134 | ||
135 | 135 | let assetNameB = match assetIdB { | |
136 | 136 | case id: ByteVector => | |
137 | 137 | value(assetInfo(id)).name | |
138 | 138 | case waves: Unit => | |
139 | 139 | "WAVES" | |
140 | 140 | case _ => | |
141 | 141 | throw("Match error") | |
142 | 142 | } | |
143 | 143 | ||
144 | 144 | let balanceA = getIntegerValue(this, keyBalanceA) | |
145 | 145 | ||
146 | 146 | let balanceB = getIntegerValue(this, keyBalanceB) | |
147 | 147 | ||
148 | 148 | let shareAssetId = fromBase58String(getStringValue(this, keyShareAssetId)) | |
149 | 149 | ||
150 | 150 | let shareAssetSupply = getIntegerValue(this, keyShareAssetSupply) | |
151 | 151 | ||
152 | 152 | let commission = 3000 | |
153 | 153 | ||
154 | 154 | let commissionGovernance = 1200 | |
155 | 155 | ||
156 | 156 | let commissionScaleDelimiter = 1000000 | |
157 | 157 | ||
158 | 158 | let scaleValue3 = 1000 | |
159 | 159 | ||
160 | 160 | let scaleValue8 = 100000000 | |
161 | 161 | ||
162 | 162 | let slippageToleranceDelimiter = 1000 | |
163 | 163 | ||
164 | 164 | let scaleValue8Digits = 8 | |
165 | 165 | ||
166 | 166 | func accountBalance (assetId) = match assetId { | |
167 | 167 | case id: ByteVector => | |
168 | 168 | assetBalance(this, id) | |
169 | 169 | case waves: Unit => | |
170 | 170 | wavesBalance(this).available | |
171 | 171 | case _ => | |
172 | 172 | throw("Match error") | |
173 | 173 | } | |
174 | 174 | ||
175 | 175 | ||
176 | 176 | func stakedAmount (assetId) = { | |
177 | 177 | let stakedAmountCalculated = match assetId { | |
178 | 178 | case aId: ByteVector => | |
179 | 179 | if (if ((aId == USDN)) | |
180 | 180 | then true | |
181 | 181 | else (aId == NSBT)) | |
182 | 182 | then getInteger(stakingUSDNNSBTAddress, ((("rpd_balance_" + toBase58String(aId)) + "_") + toString(this))) | |
183 | 183 | else if ((aId == EURN)) | |
184 | 184 | then getInteger(stakingEURNAddress, ((("%s%s%s__stakingBalance__" + toBase58String(aId)) + "__") + toString(this))) | |
185 | 185 | else 0 | |
186 | 186 | case _: Unit => | |
187 | 187 | valueOrElse(getInteger(this, keyLeasingAmount), 0) | |
188 | 188 | case _ => | |
189 | 189 | throw("Match error") | |
190 | 190 | } | |
191 | 191 | match stakedAmountCalculated { | |
192 | 192 | case i: Int => | |
193 | 193 | i | |
194 | 194 | case _ => | |
195 | 195 | 0 | |
196 | 196 | } | |
197 | 197 | } | |
198 | 198 | ||
199 | 199 | ||
200 | 200 | let stakedAmountA = stakedAmount(assetIdA) | |
201 | 201 | ||
202 | 202 | let stakedAmountB = stakedAmount(assetIdB) | |
203 | 203 | ||
204 | 204 | let assetInitA = getIntegerValue(this, keyBalanceInitA) | |
205 | 205 | ||
206 | 206 | let assetInitB = getIntegerValue(this, keyBalanceInitB) | |
207 | 207 | ||
208 | 208 | let availableBalanceA = (balanceA - stakedAmountA) | |
209 | 209 | ||
210 | 210 | let availableBalanceB = (balanceB - stakedAmountB) | |
211 | 211 | ||
212 | 212 | let accountBalanceWithStakedA = (accountBalance(assetIdA) + stakedAmountA) | |
213 | 213 | ||
214 | 214 | let accountBalanceWithStakedB = (accountBalance(assetIdB) + stakedAmountB) | |
215 | 215 | ||
216 | 216 | let hasEnoughBalance = if ((accountBalanceWithStakedA >= balanceA)) | |
217 | 217 | then (accountBalanceWithStakedB >= balanceB) | |
218 | 218 | else false | |
219 | 219 | ||
220 | 220 | func getAssetInfo (assetId) = match assetId { | |
221 | 221 | case id: ByteVector => | |
222 | 222 | let stringId = toBase58String(id) | |
223 | 223 | let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist")) | |
224 | 224 | $Tuple3(stringId, info.name, info.decimals) | |
225 | 225 | case waves: Unit => | |
226 | 226 | $Tuple3("WAVES", "WAVES", 8) | |
227 | 227 | case _ => | |
228 | 228 | throw("Match error") | |
229 | 229 | } | |
230 | 230 | ||
231 | 231 | ||
232 | 232 | func getAssetInfoFromString (assetStr) = if ((assetStr == "WAVES")) | |
233 | 233 | then $Tuple3("WAVES", "WAVES", 8) | |
234 | 234 | else { | |
235 | 235 | let stringId = assetStr | |
236 | 236 | let id = fromBase58String(assetStr) | |
237 | 237 | let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist")) | |
238 | 238 | $Tuple3(stringId, info.name, info.decimals) | |
239 | 239 | } | |
240 | 240 | ||
241 | 241 | ||
242 | 242 | func suspend (cause) = [BooleanEntry(keyActive, false), StringEntry(keyCause, cause)] | |
243 | 243 | ||
244 | 244 | ||
245 | 245 | func calcStakingFuncAndAddres (stake,assetId) = if (stake) | |
246 | 246 | then if ((assetId == USDN)) | |
247 | 247 | then $Tuple2("lockNeutrino", stakingUSDNNSBTAddress) | |
248 | 248 | else if ((assetId == NSBT)) | |
249 | 249 | then $Tuple2("lockNsbt", stakingUSDNNSBTAddress) | |
250 | 250 | else $Tuple2("startStaking", stakingEURNAddress) | |
251 | 251 | else if ((assetId == USDN)) | |
252 | 252 | then $Tuple2("unlockNeutrino", stakingUSDNNSBTAddress) | |
253 | 253 | else if ((assetId == NSBT)) | |
254 | 254 | then $Tuple2("unlockNsbt", stakingUSDNNSBTAddress) | |
255 | 255 | else $Tuple2("stopStaking", stakingEURNAddress) | |
256 | 256 | ||
257 | 257 | ||
258 | 258 | func calcStakingParams (stake,amount,assetId) = if (stake) | |
259 | 259 | then { | |
260 | - | let $ | |
261 | - | let call = $ | |
262 | - | let stakingAddr = $ | |
260 | + | let $t069216987 = calcStakingFuncAndAddres(stake, assetId) | |
261 | + | let call = $t069216987._1 | |
262 | + | let stakingAddr = $t069216987._2 | |
263 | 263 | $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)]) | |
264 | 264 | } | |
265 | 265 | else { | |
266 | - | let $ | |
267 | - | let call = $ | |
268 | - | let stakingAddr = $ | |
266 | + | let $t070737139 = calcStakingFuncAndAddres(stake, assetId) | |
267 | + | let call = $t070737139._1 | |
268 | + | let stakingAddr = $t070737139._2 | |
269 | 269 | $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil) | |
270 | 270 | } | |
271 | + | ||
272 | + | ||
273 | + | func calculateFees (pmtAmount,minAmountToReceive,tokenFrom,tokenTo) = { | |
274 | + | let amountWithoutFee = fraction(tokenTo, pmtAmount, (pmtAmount + tokenFrom)) | |
275 | + | let amountWithFee = fraction(amountWithoutFee, (commissionScaleDelimiter - commission), commissionScaleDelimiter) | |
276 | + | let governanceReward = fraction(amountWithoutFee, commissionGovernance, commissionScaleDelimiter) | |
277 | + | if ((minAmountToReceive > amountWithFee)) | |
278 | + | then throw(((("Calculated amount to receive " + toString(amountWithFee)) + " is less than specified minimum ") + toString(minAmountToReceive))) | |
279 | + | else $Tuple3(amountWithoutFee, amountWithFee, governanceReward) | |
280 | + | } | |
271 | 281 | ||
272 | 282 | ||
273 | 283 | func suspendSuspicious () = suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(accountBalanceWithStakedA)) + " ") + assetNameA) + ", ") + toString(accountBalanceWithStakedB)) + " ") + assetNameB) + ". State: ") + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB)) | |
274 | 284 | ||
275 | 285 | ||
276 | 286 | func isActive () = if (active) | |
277 | 287 | then unit | |
278 | 288 | else throw("DApp is inactive at this moment") | |
279 | 289 | ||
280 | 290 | ||
281 | 291 | @Callable(i) | |
282 | 292 | func init (firstHarvest) = { | |
283 | - | let $ | |
284 | - | let pmtAmountA = $ | |
285 | - | let pmtAssetIdA = $ | |
286 | - | let $ | |
287 | - | let pmtAmountB = $ | |
288 | - | let pmtAssetIdB = $ | |
289 | - | let $ | |
290 | - | let pmtStrAssetIdA = $ | |
291 | - | let pmtAssetNameA = $ | |
292 | - | let pmtDecimalsA = $ | |
293 | - | let $ | |
294 | - | let pmtStrAssetIdB = $ | |
295 | - | let pmtAssetNameB = $ | |
296 | - | let pmtDecimalsB = $ | |
293 | + | let $t083098386 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
294 | + | let pmtAmountA = $t083098386._1 | |
295 | + | let pmtAssetIdA = $t083098386._2 | |
296 | + | let $t083918468 = $Tuple2(i.payments[1].amount, i.payments[1].assetId) | |
297 | + | let pmtAmountB = $t083918468._1 | |
298 | + | let pmtAssetIdB = $t083918468._2 | |
299 | + | let $t084738550 = getAssetInfo(pmtAssetIdA) | |
300 | + | let pmtStrAssetIdA = $t084738550._1 | |
301 | + | let pmtAssetNameA = $t084738550._2 | |
302 | + | let pmtDecimalsA = $t084738550._3 | |
303 | + | let $t085558632 = getAssetInfo(pmtAssetIdB) | |
304 | + | let pmtStrAssetIdB = $t085558632._1 | |
305 | + | let pmtAssetNameB = $t085558632._2 | |
306 | + | let pmtDecimalsB = $t085558632._3 | |
297 | 307 | if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStaking], i.callerPublicKey))) | |
298 | 308 | then throw("Only admin can call this function") | |
299 | 309 | else if (isDefined(getBoolean(this, keyActive))) | |
300 | 310 | then throw("DApp is already active") | |
301 | 311 | else if ((pmtAssetIdA == pmtAssetIdB)) | |
302 | 312 | then throw("Assets must be different") | |
303 | 313 | else { | |
304 | 314 | let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7)) | |
305 | 315 | let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this)) | |
306 | 316 | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
307 | 317 | let arg1 = pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, DOWN) | |
308 | 318 | let arg2 = pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, DOWN) | |
309 | 319 | let arg3 = pow(10, 0, shareDecimals, 0, 0, DOWN) | |
310 | 320 | let shareInitialSupply = fraction(arg1, arg2, arg3) | |
311 | 321 | let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true) | |
312 | 322 | let shareIssueId = calculateAssetId(shareIssue) | |
313 | 323 | let stake1 = if (containsElement(stakingAssets, pmtStrAssetIdA)) | |
314 | 324 | then invoke(this, "stakeUnstake", [true, pmtAmountA, pmtStrAssetIdA], nil) | |
315 | 325 | else 0 | |
316 | 326 | if ((stake1 == stake1)) | |
317 | 327 | then { | |
318 | 328 | let stake2 = if (containsElement(stakingAssets, pmtStrAssetIdB)) | |
319 | 329 | then invoke(this, "stakeUnstake", [true, pmtAmountB, pmtStrAssetIdB], nil) | |
320 | 330 | else 0 | |
321 | 331 | if ((stake2 == stake2)) | |
322 | 332 | then { | |
323 | 333 | 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)] | |
324 | 334 | if (firstHarvest) | |
325 | 335 | then (baseEntry ++ [BooleanEntry(keyFirstHarvest, firstHarvest), IntegerEntry(keyFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))]) | |
326 | 336 | else baseEntry | |
327 | 337 | } | |
328 | 338 | else throw("Strict value is not equal to itself.") | |
329 | 339 | } | |
330 | 340 | else throw("Strict value is not equal to itself.") | |
331 | 341 | } | |
332 | 342 | } | |
333 | 343 | ||
334 | 344 | ||
335 | 345 | ||
336 | 346 | @Callable(i) | |
337 | 347 | func initWithInitRatio (amtAssetA,amtAssetB,strAssetIdA,strAssetIdB,firstHarvest) = { | |
338 | - | let $ | |
339 | - | let pmtStrAssetIdA = $ | |
340 | - | let pmtAssetNameA = $ | |
341 | - | let pmtDecimalsA = $ | |
342 | - | let $ | |
343 | - | let pmtStrAssetIdB = $ | |
344 | - | let pmtAssetNameB = $ | |
345 | - | let pmtDecimalsB = $ | |
348 | + | let $t01122111308 = getAssetInfoFromString(strAssetIdA) | |
349 | + | let pmtStrAssetIdA = $t01122111308._1 | |
350 | + | let pmtAssetNameA = $t01122111308._2 | |
351 | + | let pmtDecimalsA = $t01122111308._3 | |
352 | + | let $t01131311400 = getAssetInfoFromString(strAssetIdB) | |
353 | + | let pmtStrAssetIdB = $t01131311400._1 | |
354 | + | let pmtAssetNameB = $t01131311400._2 | |
355 | + | let pmtDecimalsB = $t01131311400._3 | |
346 | 356 | if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStaking], i.callerPublicKey))) | |
347 | 357 | then throw("Only admin can call this function") | |
348 | 358 | else if (isDefined(getBoolean(this, keyActive))) | |
349 | 359 | then throw("DApp is already active") | |
350 | 360 | else if ((strAssetIdA == strAssetIdB)) | |
351 | 361 | then throw("Assets must be different") | |
352 | 362 | else { | |
353 | 363 | let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7)) | |
354 | 364 | let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this)) | |
355 | 365 | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
356 | 366 | let shareInitialSupply = 0 | |
357 | 367 | let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true) | |
358 | 368 | let shareIssueId = calculateAssetId(shareIssue) | |
359 | 369 | 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)] | |
360 | 370 | if (firstHarvest) | |
361 | 371 | then (baseEntry ++ [BooleanEntry(keyFirstHarvest, firstHarvest), IntegerEntry(keyFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))]) | |
362 | 372 | else baseEntry | |
363 | 373 | } | |
364 | 374 | } | |
365 | 375 | ||
366 | 376 | ||
367 | 377 | ||
368 | 378 | @Callable(i) | |
369 | 379 | func keepLimitForFirstHarvest (shareLimit) = valueOrElse(isActive(), if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStaking], i.callerPublicKey))) | |
370 | 380 | then throw("Only admin can call this function") | |
371 | 381 | else [IntegerEntry(kShareLimit, shareLimit)]) | |
372 | 382 | ||
373 | 383 | ||
374 | 384 | ||
375 | 385 | @Callable(i) | |
376 | 386 | func replenishWithTwoTokens (slippageTolerance) = valueOrElse(isActive(), { | |
377 | 387 | let pmtAssetIdA = i.payments[0].assetId | |
378 | 388 | let pmtAssetIdB = i.payments[1].assetId | |
379 | 389 | let pmtAmountA = i.payments[0].amount | |
380 | 390 | let pmtAmountB = i.payments[1].amount | |
381 | - | let $ | |
382 | - | let pmtStrAssetIdA = $ | |
383 | - | let pmtAssetNameA = $ | |
384 | - | let pmtDecimalsA = $ | |
385 | - | let $ | |
386 | - | let pmtStrAssetIdB = $ | |
387 | - | let pmtAssetNameB = $ | |
388 | - | let pmtDecimalsB = $ | |
391 | + | let $t01386813945 = getAssetInfo(pmtAssetIdA) | |
392 | + | let pmtStrAssetIdA = $t01386813945._1 | |
393 | + | let pmtAssetNameA = $t01386813945._2 | |
394 | + | let pmtDecimalsA = $t01386813945._3 | |
395 | + | let $t01395014027 = getAssetInfo(pmtAssetIdB) | |
396 | + | let pmtStrAssetIdB = $t01395014027._1 | |
397 | + | let pmtAssetNameB = $t01395014027._2 | |
398 | + | let pmtDecimalsB = $t01395014027._3 | |
389 | 399 | let inital = if (if ((balanceA == 0)) | |
390 | 400 | then (balanceB == 0) | |
391 | 401 | else false) | |
392 | 402 | then true | |
393 | 403 | else false | |
394 | 404 | let tokenRatio = if (inital) | |
395 | 405 | then fraction(fraction(assetInitA, scaleValue8, pmtAmountA), scaleValue3, fraction(assetInitB, scaleValue8, pmtAmountB)) | |
396 | 406 | else fraction(fraction(balanceA, scaleValue8, pmtAmountA), scaleValue3, fraction(balanceB, scaleValue8, pmtAmountB)) | |
397 | 407 | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
398 | 408 | let shareTokenToPayAmount = if (inital) | |
399 | 409 | then fraction(pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, DOWN), pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, DOWN), pow(10, 0, shareDecimals, 0, 0, DOWN)) | |
400 | 410 | else fraction(min([fraction(pmtAmountA, scaleValue8, balanceA), fraction(pmtAmountB, scaleValue8, balanceB)]), shareAssetSupply, scaleValue8) | |
401 | 411 | if (if ((0 > slippageTolerance)) | |
402 | 412 | then true | |
403 | 413 | else (slippageTolerance > slippageToleranceDelimiter)) | |
404 | 414 | then throw(((("Slippage tolerance must be between 0 and " + toString(slippageToleranceDelimiter)) + " inclusively. Actual: ") + toString(slippageTolerance))) | |
405 | 415 | else if ((size(i.payments) != 2)) | |
406 | 416 | then throw("Two attached assets expected") | |
407 | 417 | else if (if ((pmtAssetIdA != assetIdA)) | |
408 | 418 | then true | |
409 | 419 | else (pmtAssetIdB != assetIdB)) | |
410 | 420 | then throw(((("Incorrect assets attached. Expected: " + strAssetIdA) + " and ") + strAssetIdB)) | |
411 | 421 | else if (if ((((scaleValue3 * (slippageToleranceDelimiter - slippageTolerance)) / slippageToleranceDelimiter) > tokenRatio)) | |
412 | 422 | then true | |
413 | 423 | else (tokenRatio > ((scaleValue3 * (slippageToleranceDelimiter + slippageTolerance)) / slippageToleranceDelimiter))) | |
414 | 424 | then throw("Incorrect assets amount: amounts must have the contract ratio") | |
415 | 425 | else if ((shareTokenToPayAmount == 0)) | |
416 | 426 | then throw("Too small amount to replenish") | |
417 | 427 | else if (!(hasEnoughBalance)) | |
418 | 428 | then ([ScriptTransfer(i.caller, pmtAmountA, pmtAssetIdA), ScriptTransfer(i.caller, pmtAmountB, pmtAssetIdB)] ++ suspendSuspicious()) | |
419 | 429 | else { | |
420 | 430 | let stake1 = if (containsElement(stakingAssets, pmtStrAssetIdA)) | |
421 | 431 | then invoke(this, "stakeUnstake", [true, pmtAmountA, pmtStrAssetIdA], nil) | |
422 | 432 | else 0 | |
423 | 433 | if ((stake1 == stake1)) | |
424 | 434 | then { | |
425 | 435 | let stake2 = if (containsElement(stakingAssets, pmtStrAssetIdB)) | |
426 | 436 | then invoke(this, "stakeUnstake", [true, pmtAmountB, pmtStrAssetIdB], nil) | |
427 | 437 | else 0 | |
428 | 438 | if ((stake2 == stake2)) | |
429 | 439 | then [Reissue(shareAssetId, shareTokenToPayAmount, true), IntegerEntry(keyBalanceA, pmtAmountA), IntegerEntry(keyBalanceB, pmtAmountB), IntegerEntry(keyShareAssetSupply, shareTokenToPayAmount), ScriptTransfer(i.caller, shareTokenToPayAmount, shareAssetId)] | |
430 | 440 | else throw("Strict value is not equal to itself.") | |
431 | 441 | } | |
432 | 442 | else throw("Strict value is not equal to itself.") | |
433 | 443 | } | |
434 | 444 | }) | |
435 | 445 | ||
436 | 446 | ||
437 | 447 | ||
438 | 448 | @Callable(i) | |
439 | 449 | func withdraw () = valueOrElse(isActive(), { | |
440 | - | let $ | |
441 | - | let pmtAmount = $ | |
442 | - | let pmtAssetId = $ | |
450 | + | let $t01679316868 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
451 | + | let pmtAmount = $t01679316868._1 | |
452 | + | let pmtAssetId = $t01679316868._2 | |
443 | 453 | let amountToPayA = fraction(pmtAmount, balanceA, shareAssetSupply) | |
444 | 454 | let amountToPayB = fraction(pmtAmount, balanceB, shareAssetSupply) | |
445 | 455 | if ((size(i.payments) != 1)) | |
446 | 456 | then throw("One attached payment expected") | |
447 | 457 | else if ((pmtAssetId != shareAssetId)) | |
448 | 458 | then throw(("Incorrect asset attached. Expected: " + toBase58String(shareAssetId))) | |
449 | 459 | else if (!(hasEnoughBalance)) | |
450 | 460 | then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious()) | |
451 | 461 | else { | |
452 | 462 | let stake1 = if (containsElement(stakingAssets, strAssetIdA)) | |
453 | 463 | then invoke(this, "stakeUnstake", [false, amountToPayA, strAssetIdA], nil) | |
454 | 464 | else 0 | |
455 | 465 | if ((stake1 == stake1)) | |
456 | 466 | then { | |
457 | 467 | let stake2 = if (containsElement(stakingAssets, strAssetIdB)) | |
458 | 468 | then invoke(this, "stakeUnstake", [false, amountToPayB, strAssetIdB], nil) | |
459 | 469 | else 0 | |
460 | 470 | if ((stake2 == stake2)) | |
461 | 471 | then [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)] | |
462 | 472 | else throw("Strict value is not equal to itself.") | |
463 | 473 | } | |
464 | 474 | else throw("Strict value is not equal to itself.") | |
465 | 475 | } | |
466 | 476 | }) | |
467 | 477 | ||
468 | 478 | ||
469 | 479 | ||
470 | 480 | @Callable(i) | |
471 | 481 | func exchange (minAmountToReceive) = valueOrElse(isActive(), { | |
472 | - | let $t01752717602 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
473 | - | let pmtAmount = $t01752717602._1 | |
474 | - | let pmtAssetId = $t01752717602._2 | |
475 | - | func calculateFees (tokenFrom,tokenTo) = { | |
476 | - | let amountWithoutFee = fraction(tokenTo, pmtAmount, (pmtAmount + tokenFrom)) | |
477 | - | let amountWithFee = fraction(amountWithoutFee, (commissionScaleDelimiter - commission), commissionScaleDelimiter) | |
478 | - | let governanceReward = fraction(amountWithoutFee, commissionGovernance, commissionScaleDelimiter) | |
479 | - | if ((minAmountToReceive > amountWithFee)) | |
480 | - | then throw(((("Calculated amount to receive " + toString(amountWithFee)) + " is less than specified minimum ") + toString(minAmountToReceive))) | |
481 | - | else $Tuple3(amountWithoutFee, amountWithFee, governanceReward) | |
482 | - | } | |
483 | - | ||
482 | + | let $t01817418249 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
483 | + | let pmtAmount = $t01817418249._1 | |
484 | + | let pmtAssetId = $t01817418249._2 | |
484 | 485 | if (if ((balanceA == 0)) | |
485 | 486 | then true | |
486 | 487 | else (balanceB == 0)) | |
487 | 488 | then throw("Can't exchange with zero balance") | |
488 | 489 | else if ((0 >= minAmountToReceive)) | |
489 | 490 | then throw(("Minimal amount to receive must be positive. Actual: " + toString(minAmountToReceive))) | |
490 | 491 | else if ((size(i.payments) != 1)) | |
491 | 492 | then throw("One attached payment expected") | |
492 | 493 | else if (!(hasEnoughBalance)) | |
493 | 494 | then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious()) | |
494 | 495 | else if ((pmtAssetId == assetIdA)) | |
495 | 496 | then { | |
496 | 497 | let assetIdSend = assetIdB | |
497 | - | let $ | |
498 | - | let amountWithoutFee = $ | |
499 | - | let amountWithFee = $ | |
500 | - | let governanceReward = $ | |
498 | + | let $t01880418926 = calculateFees(pmtAmount, minAmountToReceive, balanceA, balanceB) | |
499 | + | let amountWithoutFee = $t01880418926._1 | |
500 | + | let amountWithFee = $t01880418926._2 | |
501 | + | let governanceReward = $t01880418926._3 | |
501 | 502 | let newBalanceA = (balanceA + pmtAmount) | |
502 | 503 | let newBalanceB = ((balanceB - amountWithFee) - governanceReward) | |
503 | 504 | let stake1 = if (containsElement(stakingAssets, strAssetIdA)) | |
504 | 505 | then invoke(this, "stakeUnstake", [true, pmtAmount, strAssetIdA], nil) | |
505 | 506 | else 0 | |
506 | 507 | if ((stake1 == stake1)) | |
507 | 508 | then { | |
508 | 509 | let stake2 = if (containsElement(stakingAssets, strAssetIdB)) | |
509 | 510 | then invoke(this, "stakeUnstake", [false, (amountWithFee + governanceReward), strAssetIdB], nil) | |
510 | 511 | else 0 | |
511 | 512 | if ((stake2 == stake2)) | |
512 | 513 | then [IntegerEntry(keyBalanceA, newBalanceA), IntegerEntry(keyBalanceB, newBalanceB), ScriptTransfer(i.caller, amountWithFee, assetIdSend), ScriptTransfer(walletAddress, governanceReward, assetIdSend)] | |
513 | 514 | else throw("Strict value is not equal to itself.") | |
514 | 515 | } | |
515 | 516 | else throw("Strict value is not equal to itself.") | |
516 | 517 | } | |
517 | 518 | else if ((pmtAssetId == assetIdB)) | |
518 | 519 | then { | |
519 | 520 | let assetIdSend = assetIdA | |
520 | - | let $ | |
521 | - | let amountWithoutFee = $ | |
522 | - | let amountWithFee = $ | |
523 | - | let governanceReward = $ | |
521 | + | let $t01988120003 = calculateFees(pmtAmount, minAmountToReceive, balanceB, balanceA) | |
522 | + | let amountWithoutFee = $t01988120003._1 | |
523 | + | let amountWithFee = $t01988120003._2 | |
524 | + | let governanceReward = $t01988120003._3 | |
524 | 525 | let newBalanceA = ((balanceA - amountWithFee) - governanceReward) | |
525 | 526 | let newBalanceB = (balanceB + pmtAmount) | |
526 | 527 | let stake1 = if (containsElement(stakingAssets, strAssetIdA)) | |
527 | 528 | then invoke(this, "stakeUnstake", [false, (amountWithFee + governanceReward), strAssetIdA], nil) | |
528 | 529 | else 0 | |
529 | 530 | if ((stake1 == stake1)) | |
530 | 531 | then { | |
531 | 532 | let stake2 = if (containsElement(stakingAssets, strAssetIdB)) | |
532 | 533 | then invoke(this, "stakeUnstake", [true, pmtAmount, strAssetIdB], nil) | |
533 | 534 | else 0 | |
534 | 535 | if ((stake2 == stake2)) | |
535 | 536 | then [IntegerEntry(keyBalanceA, newBalanceA), IntegerEntry(keyBalanceB, newBalanceB), ScriptTransfer(i.caller, amountWithFee, assetIdSend), ScriptTransfer(walletAddress, governanceReward, assetIdSend)] | |
536 | 537 | else throw("Strict value is not equal to itself.") | |
537 | 538 | } | |
538 | 539 | else throw("Strict value is not equal to itself.") | |
539 | 540 | } | |
540 | 541 | else throw(((("Incorrect asset attached. Expected: " + strAssetIdA) + " or ") + strAssetIdB)) | |
541 | 542 | }) | |
542 | 543 | ||
543 | 544 | ||
544 | 545 | ||
545 | 546 | @Callable(i) | |
546 | 547 | func shutdown () = if (!(active)) | |
547 | 548 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, keyCause), "the cause wasn't specified"))) | |
548 | 549 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey))) | |
549 | 550 | then throw("Only admin can call this function") | |
550 | 551 | else suspend("Paused by admin") | |
551 | 552 | ||
552 | 553 | ||
553 | 554 | ||
554 | 555 | @Callable(i) | |
555 | 556 | func activate () = valueOrElse(isActive(), if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey))) | |
556 | 557 | then throw("Only admin can call this function") | |
557 | 558 | else [BooleanEntry(keyActive, true), DeleteEntry(keyCause)]) | |
558 | 559 | ||
559 | 560 | ||
560 | 561 | ||
561 | 562 | @Callable(i) | |
562 | 563 | func takeIntoAccountExtraFunds (amountLeave) = valueOrElse(isActive(), { | |
563 | 564 | let uncountableAmountEnrollAssetA = (accountBalanceWithStakedA - balanceA) | |
564 | 565 | let uncountableAmountEnrollAssetB = (accountBalanceWithStakedB - balanceB) | |
565 | 566 | let amountEnrollA = (uncountableAmountEnrollAssetA - (if ((assetIdA == unit)) | |
566 | 567 | then amountLeave | |
567 | 568 | else 0)) | |
568 | 569 | let amountEnrollB = (uncountableAmountEnrollAssetB - (if ((assetIdB == unit)) | |
569 | 570 | then amountLeave | |
570 | 571 | else 0)) | |
571 | 572 | if ((i.caller != this)) | |
572 | 573 | then throw("Only the DApp itself can call this function") | |
573 | 574 | else if ((0 > amountLeave)) | |
574 | 575 | then throw(("Argument 'amountLeave' cannot be negative. Actual: " + toString(amountLeave))) | |
575 | 576 | else if (if ((0 > uncountableAmountEnrollAssetA)) | |
576 | 577 | then true | |
577 | 578 | else (0 > uncountableAmountEnrollAssetB)) | |
578 | 579 | then suspend("Enroll amount negative") | |
579 | 580 | else if (if ((0 > amountEnrollA)) | |
580 | 581 | then true | |
581 | 582 | else (0 > amountEnrollB)) | |
582 | 583 | then throw("Too large amountLeave") | |
583 | 584 | else { | |
584 | 585 | let stake1 = if (if (containsElement(stakingAssets, strAssetIdA)) | |
585 | 586 | then (amountEnrollA > 0) | |
586 | 587 | else false) | |
587 | 588 | then invoke(this, "stakeUnstake", [true, amountEnrollA, strAssetIdA], nil) | |
588 | 589 | else 0 | |
589 | 590 | if ((stake1 == stake1)) | |
590 | 591 | then { | |
591 | 592 | let stake2 = if (if (containsElement(stakingAssets, strAssetIdB)) | |
592 | 593 | then (amountEnrollB > 0) | |
593 | 594 | else false) | |
594 | 595 | then invoke(this, "stakeUnstake", [true, amountEnrollB, strAssetIdB], nil) | |
595 | 596 | else 0 | |
596 | 597 | if ((stake2 == stake2)) | |
597 | 598 | then [IntegerEntry(keyBalanceA, (balanceA + amountEnrollA)), IntegerEntry(keyBalanceB, (balanceB + amountEnrollB)), IntegerEntry(("last_income_" + strAssetIdA), amountEnrollA), IntegerEntry(("last_income_" + strAssetIdB), amountEnrollB)] | |
598 | 599 | else throw("Strict value is not equal to itself.") | |
599 | 600 | } | |
600 | 601 | else throw("Strict value is not equal to itself.") | |
601 | 602 | } | |
602 | 603 | }) | |
603 | 604 | ||
604 | 605 | ||
605 | 606 | ||
606 | 607 | @Callable(i) | |
607 | 608 | func stakeUnstake (stake,amount,assetIdString) = if ((i.caller != this)) | |
608 | 609 | then throw("Only contract itself can invoke this function") | |
609 | 610 | else if ((assetIdString == "WAVES")) | |
610 | 611 | then { | |
611 | 612 | let pool = addressFromStringValue(valueOrErrorMessage(getString(oracle, keyLeasingPool), "No leasing pool in oracle")) | |
612 | 613 | let leasingId = getBinary(this, keyLeasingId) | |
613 | 614 | let leasingAmount = valueOrElse(getInteger(this, keyLeasingAmount), 0) | |
614 | 615 | let newLeaseAmount = if (stake) | |
615 | 616 | then (leasingAmount + amount) | |
616 | 617 | else (leasingAmount - amount) | |
617 | 618 | let newLease = Lease(pool, newLeaseAmount) | |
618 | 619 | let newLeaseId = calculateLeaseId(newLease) | |
619 | 620 | let baseEtry = [newLease, BinaryEntry(keyLeasingId, newLeaseId), IntegerEntry(keyLeasingAmount, newLeaseAmount)] | |
620 | 621 | match leasingId { | |
621 | 622 | case lId: ByteVector => | |
622 | 623 | ([LeaseCancel(lId)] ++ baseEtry) | |
623 | 624 | case _ => | |
624 | 625 | baseEtry | |
625 | 626 | } | |
626 | 627 | } | |
627 | 628 | else { | |
628 | - | let $ | |
629 | - | let call = $ | |
630 | - | let addr = $ | |
631 | - | let params = $ | |
632 | - | let payments = $ | |
629 | + | let $t02415124254 = calcStakingParams(stake, amount, fromBase58String(assetIdString)) | |
630 | + | let call = $t02415124254._1 | |
631 | + | let addr = $t02415124254._2 | |
632 | + | let params = $t02415124254._3 | |
633 | + | let payments = $t02415124254._4 | |
633 | 634 | let inv = invoke(addr, call, params, payments) | |
634 | 635 | if ((inv == inv)) | |
635 | 636 | then nil | |
636 | 637 | else throw("Strict value is not equal to itself.") | |
637 | 638 | } | |
638 | 639 | ||
639 | 640 | ||
640 | 641 | ||
641 | 642 | @Callable(i) | |
642 | 643 | func stakeAll () = valueOrElse(isActive(), if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey))) | |
643 | 644 | then throw("Only admin can call this function") | |
644 | 645 | else { | |
645 | 646 | let stake1 = if (containsElement(stakingAssets, strAssetIdA)) | |
646 | 647 | then { | |
647 | 648 | let amountA = (balanceA - stakedAmountA) | |
648 | 649 | if ((amountA > 0)) | |
649 | 650 | then invoke(this, "stakeUnstake", [true, amountA, strAssetIdA], nil) | |
650 | 651 | else 0 | |
651 | 652 | } | |
652 | 653 | else 0 | |
653 | 654 | if ((stake1 == stake1)) | |
654 | 655 | then { | |
655 | 656 | let stake2 = if (containsElement(stakingAssets, strAssetIdB)) | |
656 | 657 | then { | |
657 | 658 | let amountB = (balanceB - stakedAmountB) | |
658 | 659 | if ((amountB > 0)) | |
659 | 660 | then invoke(this, "stakeUnstake", [true, amountB, strAssetIdB], nil) | |
660 | 661 | else 0 | |
661 | 662 | } | |
662 | 663 | else 0 | |
663 | 664 | if ((stake2 == stake2)) | |
664 | 665 | then nil | |
665 | 666 | else throw("Strict value is not equal to itself.") | |
666 | 667 | } | |
667 | 668 | else throw("Strict value is not equal to itself.") | |
668 | 669 | }) | |
669 | 670 | ||
670 | 671 | ||
671 | 672 | @Verifier(tx) | |
672 | 673 | func verify () = { | |
673 | 674 | let multiSignedByAdmins = { | |
674 | 675 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
675 | 676 | then 1 | |
676 | 677 | else 0 | |
677 | 678 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
678 | 679 | then 1 | |
679 | 680 | else 0 | |
680 | 681 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
681 | 682 | then 1 | |
682 | 683 | else 0 | |
683 | 684 | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
684 | 685 | } | |
685 | 686 | match tx { | |
686 | 687 | case inv: InvokeScriptTransaction => | |
687 | 688 | let callTakeIntoAccount = if ((inv.dApp == this)) | |
688 | 689 | then (inv.function == "takeIntoAccountExtraFunds") | |
689 | 690 | else false | |
690 | 691 | let exchangeToWaves = if (if (if ((inv.dApp == USDNToWavesExchanger)) | |
691 | 692 | then (inv.function == "exchange") | |
692 | 693 | else false) | |
693 | 694 | then (assetIdA == USDN) | |
694 | 695 | else false) | |
695 | 696 | then true | |
696 | 697 | else if (if ((assetIdB == USDN)) | |
697 | 698 | then (size(inv.payments) == 1) | |
698 | 699 | else false) | |
699 | 700 | then (inv.payments[0].assetId == USDN) | |
700 | 701 | else false | |
701 | 702 | let exchangeToNSBTs = if (if (if ((inv.dApp == USDNToNSBTExchanger)) | |
702 | 703 | then (inv.function == "exchange") | |
703 | 704 | else false) | |
704 | 705 | then (assetIdA == NSBT) | |
705 | 706 | else false) | |
706 | 707 | then true | |
707 | 708 | else if (if ((assetIdB == NSBT)) | |
708 | 709 | then (size(inv.payments) == 1) | |
709 | 710 | else false) | |
710 | 711 | then (inv.payments[0].assetId == USDN) | |
711 | 712 | else false | |
712 | 713 | let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
713 | 714 | then true | |
714 | 715 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2)) | |
715 | 716 | then true | |
716 | 717 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3)) | |
717 | 718 | then true | |
718 | 719 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyStaking) | |
719 | 720 | if (if (if (if (callTakeIntoAccount) | |
720 | 721 | then true | |
721 | 722 | else exchangeToWaves) | |
722 | 723 | then true | |
723 | 724 | else exchangeToNSBTs) | |
724 | 725 | then signedByAdmin | |
725 | 726 | else false) | |
726 | 727 | then true | |
727 | 728 | else multiSignedByAdmins | |
728 | 729 | case _ => | |
729 | 730 | multiSignedByAdmins | |
730 | 731 | } | |
731 | 732 | } | |
732 | 733 |
github/deemru/w8io/169f3d6 98.50 ms ◑