tx · BQz3tLGq2n2M4ZiThgF7FEiuBnXn49B2Cgt7yB6YoSQU 3NC3pe5guZwaXSwZmcQkqdrw5aANrzUADCu: -0.14000000 Waves 2022.06.02 14:53 [2078671] smart account 3NC3pe5guZwaXSwZmcQkqdrw5aANrzUADCu > SELF 0.00000000 Waves
{ "type": 13, "id": "BQz3tLGq2n2M4ZiThgF7FEiuBnXn49B2Cgt7yB6YoSQU", "fee": 14000000, "feeAssetId": null, "timestamp": 1654170780364, "version": 2, "chainId": 84, "sender": "3NC3pe5guZwaXSwZmcQkqdrw5aANrzUADCu", "senderPublicKey": "CYkP3NAVc3bauSStLmpVTGNDejvs6xdV5LA2XXmFc6gv", "proofs": [ "5RVcB6nZ1Un7e1euUGXZyzpdavTccd9QPNbrrF2qBYcT3KPjEBM249fW7zYTvPX1UHqTEVhvQrvd88UEwZLQi9Mh", "3mbUu3zB3CdaRvq8k1nf1dpTF11796jtZ3HYJFCKDmbG8aqsKe2n1E4ab99mMcBjeUw6ABQ1ZHYVYvZdcgV83DyZ" ], "script": "base64:AAIFAAAAAAAAADAIAhIDCgEEEgcKBQEBCAgEEgMKAQESAwoBARIAEgMKAQESABIAEgASBQoDBAEIEgAAAABaAAAAAAd2ZXJzaW9uAgAAAAUxLjAuMAAAAAAIa1ZlcnNpb24CAAAAB3ZlcnNpb24AAAAAB2tBY3RpdmUCAAAABmFjdGl2ZQAAAAAJa0Fzc2V0SWRBAgAAAApBX2Fzc2V0X2lkAAAAAAlrQXNzZXRJZEICAAAACkJfYXNzZXRfaWQAAAAACWtCYWxhbmNlQQIAAAAPQV9hc3NldF9iYWxhbmNlAAAAAAlrQmFsYW5jZUICAAAAD0JfYXNzZXRfYmFsYW5jZQAAAAANa0JhbGFuY2VJbml0QQIAAAAMQV9hc3NldF9pbml0AAAAAA1rQmFsYW5jZUluaXRCAgAAAAxCX2Fzc2V0X2luaXQAAAAADWtTaGFyZUFzc2V0SWQCAAAADnNoYXJlX2Fzc2V0X2lkAAAAABFrU2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AAAARkQXBwBQAAAAR0aGlzCQAAAAAAAAIIBQAAAANpbnYAAAAIZnVuY3Rpb24CAAAAGXRha2VJbnRvQWNjb3VudEV4dHJhRnVuZHMHBAAAAA1zaWduZWRCeUFkbWluAwMDCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAMYWRtaW5QdWJLZXkxBgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAADGFkbWluUHViS2V5MgYJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAxhZG1pblB1YktleTMGCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAARYWRtaW5JbnZva2VQdWJLZXkDAwUAAAATY2FsbFRha2VJbnRvQWNjb3VudAUAAAANc2lnbmVkQnlBZG1pbgcGBQAAABNtdWx0aVNpZ25lZEJ5QWRtaW5zBQAAABNtdWx0aVNpZ25lZEJ5QWRtaW5zgPebQQ==", "height": 2078671, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 74vwvkxox3BENfxgh263iFykP4XPRHatoRbWazMnKCvN Next: none Diff:
Old | New | Differences | |
---|---|---|---|
273 | 273 | if (if ((swopAmount >= parseIntValue(discountValues[0]))) | |
274 | 274 | then (parseIntValue(discountValues[1]) > swopAmount) | |
275 | 275 | else false) | |
276 | - | then ( | |
276 | + | then (feeScale6 - parseIntValue(discounts[0])) | |
277 | 277 | else if (if ((swopAmount >= parseIntValue(discountValues[1]))) | |
278 | 278 | then (parseIntValue(discountValues[2]) > swopAmount) | |
279 | 279 | else false) | |
280 | - | then ( | |
280 | + | then (feeScale6 - parseIntValue(discounts[1])) | |
281 | 281 | else if (if ((swopAmount >= parseIntValue(discountValues[2]))) | |
282 | 282 | then (parseIntValue(discountValues[3]) > swopAmount) | |
283 | 283 | else false) | |
284 | - | then ( | |
284 | + | then (feeScale6 - parseIntValue(discounts[2])) | |
285 | 285 | else if (if ((swopAmount >= parseIntValue(discountValues[3]))) | |
286 | 286 | then (parseIntValue(discountValues[4]) > swopAmount) | |
287 | 287 | else false) | |
288 | - | then ( | |
288 | + | then (feeScale6 - parseIntValue(discounts[3])) | |
289 | 289 | else if ((swopAmount >= parseIntValue(discountValues[4]))) | |
290 | - | then ( | |
291 | - | else | |
290 | + | then (feeScale6 - parseIntValue(discounts[4])) | |
291 | + | else feeScale6 | |
292 | 292 | } | |
293 | 293 | ||
294 | 294 | ||
295 | 295 | func calculateFees (pmtAmount,minAmountToReceive,tokenFrom,tokenTo,caller) = { | |
296 | 296 | let amountWithoutFee = fraction(tokenTo, pmtAmount, (pmtAmount + tokenFrom)) | |
297 | 297 | let feeDiscount = calculateFeeDiscount(caller) | |
298 | - | let amountWithFee = fraction(amountWithoutFee, (feeScale6 - fraction(fee, feeDiscount, | |
299 | - | let governanceReward = fraction(amountWithoutFee, fraction(feeGovernance, feeDiscount, | |
298 | + | let amountWithFee = fraction(amountWithoutFee, (feeScale6 - fraction(fee, feeDiscount, feeScale6, CEILING)), feeScale6) | |
299 | + | let governanceReward = fraction(amountWithoutFee, fraction(feeGovernance, feeDiscount, feeScale6, CEILING), feeScale6) | |
300 | 300 | if ((minAmountToReceive > amountWithFee)) | |
301 | 301 | then throw(((("Calculated amount to receive " + toString(amountWithFee)) + " is less than specified minimum ") + toString(minAmountToReceive))) | |
302 | 302 | else $Tuple3(amountWithoutFee, amountWithFee, governanceReward) | |
313 | 313 | ||
314 | 314 | @Callable(i) | |
315 | 315 | func init (firstHarvest) = { | |
316 | - | let $ | |
317 | - | let pmtAmountA = $ | |
318 | - | let pmtAssetIdA = $ | |
319 | - | let $ | |
320 | - | let pmtAmountB = $ | |
321 | - | let pmtAssetIdB = $ | |
322 | - | let $ | |
323 | - | let pmtStrAssetIdA = $ | |
324 | - | let pmtAssetNameA = $ | |
325 | - | let pmtDecimalsA = $ | |
326 | - | let $ | |
327 | - | let pmtStrAssetIdB = $ | |
328 | - | let pmtAssetNameB = $ | |
329 | - | let pmtDecimalsB = $ | |
316 | + | let $t088358912 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
317 | + | let pmtAmountA = $t088358912._1 | |
318 | + | let pmtAssetIdA = $t088358912._2 | |
319 | + | let $t089178994 = $Tuple2(i.payments[1].amount, i.payments[1].assetId) | |
320 | + | let pmtAmountB = $t089178994._1 | |
321 | + | let pmtAssetIdB = $t089178994._2 | |
322 | + | let $t089999076 = getAssetInfo(pmtAssetIdA) | |
323 | + | let pmtStrAssetIdA = $t089999076._1 | |
324 | + | let pmtAssetNameA = $t089999076._2 | |
325 | + | let pmtDecimalsA = $t089999076._3 | |
326 | + | let $t090819158 = getAssetInfo(pmtAssetIdB) | |
327 | + | let pmtStrAssetIdB = $t090819158._1 | |
328 | + | let pmtAssetNameB = $t090819158._2 | |
329 | + | let pmtDecimalsB = $t090819158._3 | |
330 | 330 | if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminInvokePubKey], i.callerPublicKey))) | |
331 | 331 | then throw("Only admin can call this function") | |
332 | 332 | else if (isDefined(getBoolean(this, kActive))) | |
368 | 368 | ||
369 | 369 | @Callable(i) | |
370 | 370 | func initWithInitRatio (amtAssetA,amtAssetB,strAssetIdA,strAssetIdB,firstHarvest) = { | |
371 | - | let $ | |
372 | - | let pmtStrAssetIdA = $ | |
373 | - | let pmtAssetNameA = $ | |
374 | - | let pmtDecimalsA = $ | |
375 | - | let $ | |
376 | - | let pmtStrAssetIdB = $ | |
377 | - | let pmtAssetNameB = $ | |
378 | - | let pmtDecimalsB = $ | |
371 | + | let $t01166311750 = getAssetInfoFromString(strAssetIdA) | |
372 | + | let pmtStrAssetIdA = $t01166311750._1 | |
373 | + | let pmtAssetNameA = $t01166311750._2 | |
374 | + | let pmtDecimalsA = $t01166311750._3 | |
375 | + | let $t01175511842 = getAssetInfoFromString(strAssetIdB) | |
376 | + | let pmtStrAssetIdB = $t01175511842._1 | |
377 | + | let pmtAssetNameB = $t01175511842._2 | |
378 | + | let pmtDecimalsB = $t01175511842._3 | |
379 | 379 | if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminInvokePubKey], i.callerPublicKey))) | |
380 | 380 | then throw("Only admin can call this function") | |
381 | 381 | else if (isDefined(getBoolean(this, kActive))) | |
411 | 411 | let pmtAssetIdB = i.payments[1].assetId | |
412 | 412 | let pmtAmountA = i.payments[0].amount | |
413 | 413 | let pmtAmountB = i.payments[1].amount | |
414 | - | let $ | |
415 | - | let pmtStrAssetIdA = $ | |
416 | - | let pmtAssetNameA = $ | |
417 | - | let pmtDecimalsA = $ | |
418 | - | let $ | |
419 | - | let pmtStrAssetIdB = $ | |
420 | - | let pmtAssetNameB = $ | |
421 | - | let pmtDecimalsB = $ | |
414 | + | let $t01422114298 = getAssetInfo(pmtAssetIdA) | |
415 | + | let pmtStrAssetIdA = $t01422114298._1 | |
416 | + | let pmtAssetNameA = $t01422114298._2 | |
417 | + | let pmtDecimalsA = $t01422114298._3 | |
418 | + | let $t01430314380 = getAssetInfo(pmtAssetIdB) | |
419 | + | let pmtStrAssetIdB = $t01430314380._1 | |
420 | + | let pmtAssetNameB = $t01430314380._2 | |
421 | + | let pmtDecimalsB = $t01430314380._3 | |
422 | 422 | let inital = if (if ((balanceA == 0)) | |
423 | 423 | then (balanceB == 0) | |
424 | 424 | else false) | |
470 | 470 | ||
471 | 471 | @Callable(i) | |
472 | 472 | func withdraw () = valueOrElse(isActive(), { | |
473 | - | let $ | |
474 | - | let pmtAmount = $ | |
475 | - | let pmtAssetId = $ | |
473 | + | let $t01718017255 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
474 | + | let pmtAmount = $t01718017255._1 | |
475 | + | let pmtAssetId = $t01718017255._2 | |
476 | 476 | let amountToPayA = fraction(pmtAmount, balanceA, shareAssetSupply) | |
477 | 477 | let amountToPayB = fraction(pmtAmount, balanceB, shareAssetSupply) | |
478 | 478 | if ((size(i.payments) != 1)) | |
502 | 502 | ||
503 | 503 | @Callable(i) | |
504 | 504 | func exchange (minAmountToReceive) = valueOrElse(isActive(), { | |
505 | - | let $ | |
506 | - | let pmtAmount = $ | |
507 | - | let pmtAssetId = $ | |
505 | + | let $t01855418629 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
506 | + | let pmtAmount = $t01855418629._1 | |
507 | + | let pmtAssetId = $t01855418629._2 | |
508 | 508 | if (if ((balanceA == 0)) | |
509 | 509 | then true | |
510 | 510 | else (balanceB == 0)) | |
518 | 518 | else if ((pmtAssetId == assetIdA)) | |
519 | 519 | then { | |
520 | 520 | let assetIdSend = assetIdB | |
521 | - | let $ | |
522 | - | let amountWithoutFee = $ | |
523 | - | let amountWithFee = $ | |
524 | - | let governanceReward = $ | |
521 | + | let $t01918019318 = calculateFees(pmtAmount, minAmountToReceive, balanceA, balanceB, i.originCaller) | |
522 | + | let amountWithoutFee = $t01918019318._1 | |
523 | + | let amountWithFee = $t01918019318._2 | |
524 | + | let governanceReward = $t01918019318._3 | |
525 | 525 | let newBalanceA = (balanceA + pmtAmount) | |
526 | 526 | let newBalanceB = ((balanceB - amountWithFee) - governanceReward) | |
527 | 527 | let stake1 = if (containsElement(stakingAssets, strAssetIdA)) | |
541 | 541 | else if ((pmtAssetId == assetIdB)) | |
542 | 542 | then { | |
543 | 543 | let assetIdSend = assetIdA | |
544 | - | let $ | |
545 | - | let amountWithoutFee = $ | |
546 | - | let amountWithFee = $ | |
547 | - | let governanceReward = $ | |
544 | + | let $t02031020448 = calculateFees(pmtAmount, minAmountToReceive, balanceB, balanceA, i.originCaller) | |
545 | + | let amountWithoutFee = $t02031020448._1 | |
546 | + | let amountWithFee = $t02031020448._2 | |
547 | + | let governanceReward = $t02031020448._3 | |
548 | 548 | let newBalanceA = ((balanceA - amountWithFee) - governanceReward) | |
549 | 549 | let newBalanceB = (balanceB + pmtAmount) | |
550 | 550 | let stake1 = if (containsElement(stakingAssets, strAssetIdA)) | |
639 | 639 | } | |
640 | 640 | } | |
641 | 641 | else { | |
642 | - | let $ | |
643 | - | let call = $ | |
644 | - | let addr = $ | |
645 | - | let params = $ | |
646 | - | let payments = $ | |
642 | + | let $t02420224305 = calcStakingParams(stake, amount, fromBase58String(assetIdString)) | |
643 | + | let call = $t02420224305._1 | |
644 | + | let addr = $t02420224305._2 | |
645 | + | let params = $t02420224305._3 | |
646 | + | let payments = $t02420224305._4 | |
647 | 647 | let inv = invoke(addr, call, params, payments) | |
648 | 648 | if ((inv == inv)) | |
649 | 649 | 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 kVersion = "version" | |
7 | 7 | ||
8 | 8 | let kActive = "active" | |
9 | 9 | ||
10 | 10 | let kAssetIdA = "A_asset_id" | |
11 | 11 | ||
12 | 12 | let kAssetIdB = "B_asset_id" | |
13 | 13 | ||
14 | 14 | let kBalanceA = "A_asset_balance" | |
15 | 15 | ||
16 | 16 | let kBalanceB = "B_asset_balance" | |
17 | 17 | ||
18 | 18 | let kBalanceInitA = "A_asset_init" | |
19 | 19 | ||
20 | 20 | let kBalanceInitB = "B_asset_init" | |
21 | 21 | ||
22 | 22 | let kShareAssetId = "share_asset_id" | |
23 | 23 | ||
24 | 24 | let kShareAssetSupply = "share_asset_supply" | |
25 | 25 | ||
26 | 26 | let kFee = "commission" | |
27 | 27 | ||
28 | 28 | let kCause = "shutdown_cause" | |
29 | 29 | ||
30 | 30 | let kFirstHarvest = "first_harvest" | |
31 | 31 | ||
32 | 32 | let kFirstHarvestHeight = "first_harvest_height" | |
33 | 33 | ||
34 | 34 | let kShareLimit = "share_limit_on_first_harvest" | |
35 | 35 | ||
36 | 36 | let kBasePeriod = "base_period" | |
37 | 37 | ||
38 | 38 | let kPeriodLength = "period_length" | |
39 | 39 | ||
40 | 40 | let kStartHeight = "start_height" | |
41 | 41 | ||
42 | 42 | let kUSDNAddress = "staking_usdnnsbt_address" | |
43 | 43 | ||
44 | 44 | let kEURNAddress = "staking_eurn_address" | |
45 | 45 | ||
46 | 46 | let kLeasingPool = "leasing_address" | |
47 | 47 | ||
48 | 48 | let kLeasingAmount = "leasing_amount" | |
49 | 49 | ||
50 | 50 | let kLeasingId = "leasing_id" | |
51 | 51 | ||
52 | 52 | let kDiscounts = "discounts" | |
53 | 53 | ||
54 | 54 | let kDiscountValues = "discount_values" | |
55 | 55 | ||
56 | 56 | let kUserSwopInGov = "_SWOP_amount" | |
57 | 57 | ||
58 | 58 | let kAdminPubKey1 = "admin_pub_1" | |
59 | 59 | ||
60 | 60 | let kAdminPubKey2 = "admin_pub_2" | |
61 | 61 | ||
62 | 62 | let kAdminPubKey3 = "admin_pub_3" | |
63 | 63 | ||
64 | 64 | let kAdminInvokePubKey = "admin_invoke_pub" | |
65 | 65 | ||
66 | 66 | let kMoneyBoxAddress = "money_box_address" | |
67 | 67 | ||
68 | 68 | let kGovAddress = "governance_address" | |
69 | 69 | ||
70 | 70 | let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9') | |
71 | 71 | ||
72 | 72 | func getBase58FromOracle (key) = match getString(oracle, key) { | |
73 | 73 | case string: String => | |
74 | 74 | fromBase58String(string) | |
75 | 75 | case nothing => | |
76 | 76 | throw((key + "is empty")) | |
77 | 77 | } | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | let adminPubKey1 = getBase58FromOracle(kAdminPubKey1) | |
81 | 81 | ||
82 | 82 | let adminPubKey2 = getBase58FromOracle(kAdminPubKey2) | |
83 | 83 | ||
84 | 84 | let adminPubKey3 = getBase58FromOracle(kAdminPubKey3) | |
85 | 85 | ||
86 | 86 | let adminInvokePubKey = getBase58FromOracle(kAdminInvokePubKey) | |
87 | 87 | ||
88 | 88 | let moneyBoxAddress = Address(getBase58FromOracle(kMoneyBoxAddress)) | |
89 | 89 | ||
90 | 90 | let govAddress = Address(getBase58FromOracle(kGovAddress)) | |
91 | 91 | ||
92 | 92 | let votingAddress = Address(base58'3MrJgdL1GniipErHy44YF9idzLaUL2iX5DQ') | |
93 | 93 | ||
94 | 94 | let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' | |
95 | 95 | ||
96 | 96 | let SWOP = base58'2HAJrwa8q4SxBx9cHYaBTQdBjdk5wwqdof7ccpAx2uhZ' | |
97 | 97 | ||
98 | 98 | let EURN = base58'ECBCkHS68DckpBrzLeoRgYbFg7sCVqR176mPqbXsj9pA' | |
99 | 99 | ||
100 | 100 | let stakingAssets = ["WAVES", toBase58String(USDN), toBase58String(EURN)] | |
101 | 101 | ||
102 | 102 | let stakingUSDNAddress = Address(getBase58FromOracle(kUSDNAddress)) | |
103 | 103 | ||
104 | 104 | let stakingEURNAddress = Address(getBase58FromOracle(kEURNAddress)) | |
105 | 105 | ||
106 | 106 | let basePeriod = valueOrErrorMessage(getInteger(votingAddress, kBasePeriod), "Empty kBasePeriod") | |
107 | 107 | ||
108 | 108 | let startHeight = valueOrErrorMessage(getInteger(votingAddress, kStartHeight), "Empty kStartHeight") | |
109 | 109 | ||
110 | 110 | let periodLength = valueOrErrorMessage(getInteger(votingAddress, kPeriodLength), "Empty kPeriodLength") | |
111 | 111 | ||
112 | 112 | let firstHarvestEndPeriod = ((basePeriod + ((height - startHeight) / periodLength)) + 3) | |
113 | 113 | ||
114 | 114 | let active = getBooleanValue(this, kActive) | |
115 | 115 | ||
116 | 116 | let strAssetIdA = getStringValue(this, kAssetIdA) | |
117 | 117 | ||
118 | 118 | let strAssetIdB = getStringValue(this, kAssetIdB) | |
119 | 119 | ||
120 | 120 | let assetIdA = if ((strAssetIdA == "WAVES")) | |
121 | 121 | then unit | |
122 | 122 | else fromBase58String(strAssetIdA) | |
123 | 123 | ||
124 | 124 | let assetIdB = if ((strAssetIdB == "WAVES")) | |
125 | 125 | then unit | |
126 | 126 | else fromBase58String(strAssetIdB) | |
127 | 127 | ||
128 | 128 | let assetNameA = match assetIdA { | |
129 | 129 | case id: ByteVector => | |
130 | 130 | value(assetInfo(id)).name | |
131 | 131 | case waves: Unit => | |
132 | 132 | "WAVES" | |
133 | 133 | case _ => | |
134 | 134 | throw("Match error") | |
135 | 135 | } | |
136 | 136 | ||
137 | 137 | let assetNameB = match assetIdB { | |
138 | 138 | case id: ByteVector => | |
139 | 139 | value(assetInfo(id)).name | |
140 | 140 | case waves: Unit => | |
141 | 141 | "WAVES" | |
142 | 142 | case _ => | |
143 | 143 | throw("Match error") | |
144 | 144 | } | |
145 | 145 | ||
146 | 146 | let balanceA = getIntegerValue(this, kBalanceA) | |
147 | 147 | ||
148 | 148 | let balanceB = getIntegerValue(this, kBalanceB) | |
149 | 149 | ||
150 | 150 | let shareAssetId = fromBase58String(getStringValue(this, kShareAssetId)) | |
151 | 151 | ||
152 | 152 | let shareAssetSupply = getIntegerValue(this, kShareAssetSupply) | |
153 | 153 | ||
154 | 154 | let fee = getIntegerValue(this, kFee) | |
155 | 155 | ||
156 | 156 | let feeGovernance = fraction(fee, 40, 100) | |
157 | 157 | ||
158 | 158 | let feeScale6 = 1000000 | |
159 | 159 | ||
160 | 160 | let scaleValue3 = 1000 | |
161 | 161 | ||
162 | 162 | let scaleValue8 = 100000000 | |
163 | 163 | ||
164 | 164 | let slippageToleranceDelimiter = 1000 | |
165 | 165 | ||
166 | 166 | let scaleValue8Digits = 8 | |
167 | 167 | ||
168 | 168 | func accountBalance (assetId) = match assetId { | |
169 | 169 | case id: ByteVector => | |
170 | 170 | assetBalance(this, id) | |
171 | 171 | case waves: Unit => | |
172 | 172 | wavesBalance(this).available | |
173 | 173 | case _ => | |
174 | 174 | throw("Match error") | |
175 | 175 | } | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func stakedAmount (assetId) = { | |
179 | 179 | let stakedAmountCalculated = match assetId { | |
180 | 180 | case aId: ByteVector => | |
181 | 181 | if ((aId == USDN)) | |
182 | 182 | then getInteger(stakingUSDNAddress, ((("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, kLeasingAmount), 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, kBalanceInitA) | |
205 | 205 | ||
206 | 206 | let assetInitB = getIntegerValue(this, kBalanceInitB) | |
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(kActive, false), StringEntry(kCause, cause)] | |
243 | 243 | ||
244 | 244 | ||
245 | 245 | func calcStakingFuncAndAddres (stake,assetId) = if (stake) | |
246 | 246 | then if ((assetId == USDN)) | |
247 | 247 | then $Tuple2("lockNeutrino", stakingUSDNAddress) | |
248 | 248 | else $Tuple2("startStaking", stakingEURNAddress) | |
249 | 249 | else if ((assetId == USDN)) | |
250 | 250 | then $Tuple2("unlockNeutrino", stakingUSDNAddress) | |
251 | 251 | else $Tuple2("stopStaking", stakingEURNAddress) | |
252 | 252 | ||
253 | 253 | ||
254 | 254 | func calcStakingParams (stake,amount,assetId) = if (stake) | |
255 | 255 | then { | |
256 | 256 | let $t062906356 = calcStakingFuncAndAddres(stake, assetId) | |
257 | 257 | let call = $t062906356._1 | |
258 | 258 | let stakingAddr = $t062906356._2 | |
259 | 259 | $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)]) | |
260 | 260 | } | |
261 | 261 | else { | |
262 | 262 | let $t064426508 = calcStakingFuncAndAddres(stake, assetId) | |
263 | 263 | let call = $t064426508._1 | |
264 | 264 | let stakingAddr = $t064426508._2 | |
265 | 265 | $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil) | |
266 | 266 | } | |
267 | 267 | ||
268 | 268 | ||
269 | 269 | func calculateFeeDiscount (userAddr) = { | |
270 | 270 | let swopAmount = valueOrElse(getInteger(govAddress, (toString(userAddr) + kUserSwopInGov)), 0) | |
271 | 271 | let discountValues = split(getStringValue(oracle, kDiscountValues), ",") | |
272 | 272 | let discounts = split(getStringValue(oracle, kDiscounts), ",") | |
273 | 273 | if (if ((swopAmount >= parseIntValue(discountValues[0]))) | |
274 | 274 | then (parseIntValue(discountValues[1]) > swopAmount) | |
275 | 275 | else false) | |
276 | - | then ( | |
276 | + | then (feeScale6 - parseIntValue(discounts[0])) | |
277 | 277 | else if (if ((swopAmount >= parseIntValue(discountValues[1]))) | |
278 | 278 | then (parseIntValue(discountValues[2]) > swopAmount) | |
279 | 279 | else false) | |
280 | - | then ( | |
280 | + | then (feeScale6 - parseIntValue(discounts[1])) | |
281 | 281 | else if (if ((swopAmount >= parseIntValue(discountValues[2]))) | |
282 | 282 | then (parseIntValue(discountValues[3]) > swopAmount) | |
283 | 283 | else false) | |
284 | - | then ( | |
284 | + | then (feeScale6 - parseIntValue(discounts[2])) | |
285 | 285 | else if (if ((swopAmount >= parseIntValue(discountValues[3]))) | |
286 | 286 | then (parseIntValue(discountValues[4]) > swopAmount) | |
287 | 287 | else false) | |
288 | - | then ( | |
288 | + | then (feeScale6 - parseIntValue(discounts[3])) | |
289 | 289 | else if ((swopAmount >= parseIntValue(discountValues[4]))) | |
290 | - | then ( | |
291 | - | else | |
290 | + | then (feeScale6 - parseIntValue(discounts[4])) | |
291 | + | else feeScale6 | |
292 | 292 | } | |
293 | 293 | ||
294 | 294 | ||
295 | 295 | func calculateFees (pmtAmount,minAmountToReceive,tokenFrom,tokenTo,caller) = { | |
296 | 296 | let amountWithoutFee = fraction(tokenTo, pmtAmount, (pmtAmount + tokenFrom)) | |
297 | 297 | let feeDiscount = calculateFeeDiscount(caller) | |
298 | - | let amountWithFee = fraction(amountWithoutFee, (feeScale6 - fraction(fee, feeDiscount, | |
299 | - | let governanceReward = fraction(amountWithoutFee, fraction(feeGovernance, feeDiscount, | |
298 | + | let amountWithFee = fraction(amountWithoutFee, (feeScale6 - fraction(fee, feeDiscount, feeScale6, CEILING)), feeScale6) | |
299 | + | let governanceReward = fraction(amountWithoutFee, fraction(feeGovernance, feeDiscount, feeScale6, CEILING), feeScale6) | |
300 | 300 | if ((minAmountToReceive > amountWithFee)) | |
301 | 301 | then throw(((("Calculated amount to receive " + toString(amountWithFee)) + " is less than specified minimum ") + toString(minAmountToReceive))) | |
302 | 302 | else $Tuple3(amountWithoutFee, amountWithFee, governanceReward) | |
303 | 303 | } | |
304 | 304 | ||
305 | 305 | ||
306 | 306 | func suspendSuspicious () = suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(accountBalanceWithStakedA)) + " ") + assetNameA) + ", ") + toString(accountBalanceWithStakedB)) + " ") + assetNameB) + ". State: ") + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB)) | |
307 | 307 | ||
308 | 308 | ||
309 | 309 | func isActive () = if (active) | |
310 | 310 | then unit | |
311 | 311 | else throw("DApp is inactive at this moment") | |
312 | 312 | ||
313 | 313 | ||
314 | 314 | @Callable(i) | |
315 | 315 | func init (firstHarvest) = { | |
316 | - | let $ | |
317 | - | let pmtAmountA = $ | |
318 | - | let pmtAssetIdA = $ | |
319 | - | let $ | |
320 | - | let pmtAmountB = $ | |
321 | - | let pmtAssetIdB = $ | |
322 | - | let $ | |
323 | - | let pmtStrAssetIdA = $ | |
324 | - | let pmtAssetNameA = $ | |
325 | - | let pmtDecimalsA = $ | |
326 | - | let $ | |
327 | - | let pmtStrAssetIdB = $ | |
328 | - | let pmtAssetNameB = $ | |
329 | - | let pmtDecimalsB = $ | |
316 | + | let $t088358912 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
317 | + | let pmtAmountA = $t088358912._1 | |
318 | + | let pmtAssetIdA = $t088358912._2 | |
319 | + | let $t089178994 = $Tuple2(i.payments[1].amount, i.payments[1].assetId) | |
320 | + | let pmtAmountB = $t089178994._1 | |
321 | + | let pmtAssetIdB = $t089178994._2 | |
322 | + | let $t089999076 = getAssetInfo(pmtAssetIdA) | |
323 | + | let pmtStrAssetIdA = $t089999076._1 | |
324 | + | let pmtAssetNameA = $t089999076._2 | |
325 | + | let pmtDecimalsA = $t089999076._3 | |
326 | + | let $t090819158 = getAssetInfo(pmtAssetIdB) | |
327 | + | let pmtStrAssetIdB = $t090819158._1 | |
328 | + | let pmtAssetNameB = $t090819158._2 | |
329 | + | let pmtDecimalsB = $t090819158._3 | |
330 | 330 | if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminInvokePubKey], i.callerPublicKey))) | |
331 | 331 | then throw("Only admin can call this function") | |
332 | 332 | else if (isDefined(getBoolean(this, kActive))) | |
333 | 333 | then throw("DApp is already active") | |
334 | 334 | else if ((pmtAssetIdA == pmtAssetIdB)) | |
335 | 335 | then throw("Assets must be different") | |
336 | 336 | else { | |
337 | 337 | let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7)) | |
338 | 338 | let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this)) | |
339 | 339 | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
340 | 340 | let arg1 = pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, DOWN) | |
341 | 341 | let arg2 = pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, DOWN) | |
342 | 342 | let arg3 = pow(10, 0, shareDecimals, 0, 0, DOWN) | |
343 | 343 | let shareInitialSupply = fraction(arg1, arg2, arg3) | |
344 | 344 | let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true) | |
345 | 345 | let shareIssueId = calculateAssetId(shareIssue) | |
346 | 346 | let stake1 = if (containsElement(stakingAssets, pmtStrAssetIdA)) | |
347 | 347 | then invoke(this, "stakeUnstake", [true, pmtAmountA, pmtStrAssetIdA], nil) | |
348 | 348 | else 0 | |
349 | 349 | if ((stake1 == stake1)) | |
350 | 350 | then { | |
351 | 351 | let stake2 = if (containsElement(stakingAssets, pmtStrAssetIdB)) | |
352 | 352 | then invoke(this, "stakeUnstake", [true, pmtAmountB, pmtStrAssetIdB], nil) | |
353 | 353 | else 0 | |
354 | 354 | if ((stake2 == stake2)) | |
355 | 355 | then { | |
356 | 356 | let baseEntry = [StringEntry(kVersion, version), BooleanEntry(kActive, true), StringEntry(kAssetIdA, pmtStrAssetIdA), StringEntry(kAssetIdB, pmtStrAssetIdB), IntegerEntry(kBalanceA, pmtAmountA), IntegerEntry(kBalanceB, pmtAmountB), IntegerEntry(kFee, getIntegerValue(oracle, "base_fee_cpmm")), shareIssue, StringEntry(kShareAssetId, toBase58String(shareIssueId)), IntegerEntry(kShareAssetSupply, shareInitialSupply), ScriptTransfer(i.caller, shareInitialSupply, shareIssueId)] | |
357 | 357 | if (firstHarvest) | |
358 | 358 | then (baseEntry ++ [BooleanEntry(kFirstHarvest, firstHarvest), IntegerEntry(kFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))]) | |
359 | 359 | else baseEntry | |
360 | 360 | } | |
361 | 361 | else throw("Strict value is not equal to itself.") | |
362 | 362 | } | |
363 | 363 | else throw("Strict value is not equal to itself.") | |
364 | 364 | } | |
365 | 365 | } | |
366 | 366 | ||
367 | 367 | ||
368 | 368 | ||
369 | 369 | @Callable(i) | |
370 | 370 | func initWithInitRatio (amtAssetA,amtAssetB,strAssetIdA,strAssetIdB,firstHarvest) = { | |
371 | - | let $ | |
372 | - | let pmtStrAssetIdA = $ | |
373 | - | let pmtAssetNameA = $ | |
374 | - | let pmtDecimalsA = $ | |
375 | - | let $ | |
376 | - | let pmtStrAssetIdB = $ | |
377 | - | let pmtAssetNameB = $ | |
378 | - | let pmtDecimalsB = $ | |
371 | + | let $t01166311750 = getAssetInfoFromString(strAssetIdA) | |
372 | + | let pmtStrAssetIdA = $t01166311750._1 | |
373 | + | let pmtAssetNameA = $t01166311750._2 | |
374 | + | let pmtDecimalsA = $t01166311750._3 | |
375 | + | let $t01175511842 = getAssetInfoFromString(strAssetIdB) | |
376 | + | let pmtStrAssetIdB = $t01175511842._1 | |
377 | + | let pmtAssetNameB = $t01175511842._2 | |
378 | + | let pmtDecimalsB = $t01175511842._3 | |
379 | 379 | if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminInvokePubKey], i.callerPublicKey))) | |
380 | 380 | then throw("Only admin can call this function") | |
381 | 381 | else if (isDefined(getBoolean(this, kActive))) | |
382 | 382 | then throw("DApp is already active") | |
383 | 383 | else if ((strAssetIdA == strAssetIdB)) | |
384 | 384 | then throw("Assets must be different") | |
385 | 385 | else { | |
386 | 386 | let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7)) | |
387 | 387 | let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this)) | |
388 | 388 | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
389 | 389 | let shareInitialSupply = 0 | |
390 | 390 | let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true) | |
391 | 391 | let shareIssueId = calculateAssetId(shareIssue) | |
392 | 392 | let baseEntry = [StringEntry(kVersion, version), BooleanEntry(kActive, true), StringEntry(kAssetIdA, pmtStrAssetIdA), StringEntry(kAssetIdB, pmtStrAssetIdB), IntegerEntry(kBalanceInitA, amtAssetA), IntegerEntry(kBalanceInitB, amtAssetB), IntegerEntry(kBalanceA, 0), IntegerEntry(kBalanceB, 0), IntegerEntry(kFee, getIntegerValue(oracle, "base_fee_cpmm")), shareIssue, StringEntry(kShareAssetId, toBase58String(shareIssueId)), IntegerEntry(kShareAssetSupply, shareInitialSupply)] | |
393 | 393 | if (firstHarvest) | |
394 | 394 | then (baseEntry ++ [BooleanEntry(kFirstHarvest, firstHarvest), IntegerEntry(kFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))]) | |
395 | 395 | else baseEntry | |
396 | 396 | } | |
397 | 397 | } | |
398 | 398 | ||
399 | 399 | ||
400 | 400 | ||
401 | 401 | @Callable(i) | |
402 | 402 | func keepLimitForFirstHarvest (shareLimit) = valueOrElse(isActive(), if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminInvokePubKey], i.callerPublicKey))) | |
403 | 403 | then throw("Only admin can call this function") | |
404 | 404 | else [IntegerEntry(kShareLimit, shareLimit)]) | |
405 | 405 | ||
406 | 406 | ||
407 | 407 | ||
408 | 408 | @Callable(i) | |
409 | 409 | func replenishWithTwoTokens (slippageTolerance) = valueOrElse(isActive(), { | |
410 | 410 | let pmtAssetIdA = i.payments[0].assetId | |
411 | 411 | let pmtAssetIdB = i.payments[1].assetId | |
412 | 412 | let pmtAmountA = i.payments[0].amount | |
413 | 413 | let pmtAmountB = i.payments[1].amount | |
414 | - | let $ | |
415 | - | let pmtStrAssetIdA = $ | |
416 | - | let pmtAssetNameA = $ | |
417 | - | let pmtDecimalsA = $ | |
418 | - | let $ | |
419 | - | let pmtStrAssetIdB = $ | |
420 | - | let pmtAssetNameB = $ | |
421 | - | let pmtDecimalsB = $ | |
414 | + | let $t01422114298 = getAssetInfo(pmtAssetIdA) | |
415 | + | let pmtStrAssetIdA = $t01422114298._1 | |
416 | + | let pmtAssetNameA = $t01422114298._2 | |
417 | + | let pmtDecimalsA = $t01422114298._3 | |
418 | + | let $t01430314380 = getAssetInfo(pmtAssetIdB) | |
419 | + | let pmtStrAssetIdB = $t01430314380._1 | |
420 | + | let pmtAssetNameB = $t01430314380._2 | |
421 | + | let pmtDecimalsB = $t01430314380._3 | |
422 | 422 | let inital = if (if ((balanceA == 0)) | |
423 | 423 | then (balanceB == 0) | |
424 | 424 | else false) | |
425 | 425 | then true | |
426 | 426 | else false | |
427 | 427 | let tokenRatio = if (inital) | |
428 | 428 | then fraction(fraction(assetInitA, scaleValue8, pmtAmountA), scaleValue3, fraction(assetInitB, scaleValue8, pmtAmountB)) | |
429 | 429 | else fraction(fraction(balanceA, scaleValue8, pmtAmountA), scaleValue3, fraction(balanceB, scaleValue8, pmtAmountB)) | |
430 | 430 | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
431 | 431 | let shareTokenToPayAmount = if (inital) | |
432 | 432 | then fraction(pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, DOWN), pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, DOWN), pow(10, 0, shareDecimals, 0, 0, DOWN)) | |
433 | 433 | else fraction(min([fraction(pmtAmountA, scaleValue8, balanceA), fraction(pmtAmountB, scaleValue8, balanceB)]), shareAssetSupply, scaleValue8) | |
434 | 434 | if (if ((0 > slippageTolerance)) | |
435 | 435 | then true | |
436 | 436 | else (slippageTolerance > slippageToleranceDelimiter)) | |
437 | 437 | then throw(((("Slippage tolerance must be between 0 and " + toString(slippageToleranceDelimiter)) + " inclusively. Actual: ") + toString(slippageTolerance))) | |
438 | 438 | else if ((size(i.payments) != 2)) | |
439 | 439 | then throw("Two attached assets expected") | |
440 | 440 | else if (if ((pmtAssetIdA != assetIdA)) | |
441 | 441 | then true | |
442 | 442 | else (pmtAssetIdB != assetIdB)) | |
443 | 443 | then throw(((("Incorrect assets attached. Expected: " + strAssetIdA) + " and ") + strAssetIdB)) | |
444 | 444 | else if (if ((((scaleValue3 * (slippageToleranceDelimiter - slippageTolerance)) / slippageToleranceDelimiter) > tokenRatio)) | |
445 | 445 | then true | |
446 | 446 | else (tokenRatio > ((scaleValue3 * (slippageToleranceDelimiter + slippageTolerance)) / slippageToleranceDelimiter))) | |
447 | 447 | then throw("Incorrect assets amount: amounts must have the contract ratio") | |
448 | 448 | else if ((shareTokenToPayAmount == 0)) | |
449 | 449 | then throw("Too small amount to replenish") | |
450 | 450 | else if (!(hasEnoughBalance)) | |
451 | 451 | then ([ScriptTransfer(i.caller, pmtAmountA, pmtAssetIdA), ScriptTransfer(i.caller, pmtAmountB, pmtAssetIdB)] ++ suspendSuspicious()) | |
452 | 452 | else { | |
453 | 453 | let stake1 = if (containsElement(stakingAssets, pmtStrAssetIdA)) | |
454 | 454 | then invoke(this, "stakeUnstake", [true, pmtAmountA, pmtStrAssetIdA], nil) | |
455 | 455 | else 0 | |
456 | 456 | if ((stake1 == stake1)) | |
457 | 457 | then { | |
458 | 458 | let stake2 = if (containsElement(stakingAssets, pmtStrAssetIdB)) | |
459 | 459 | then invoke(this, "stakeUnstake", [true, pmtAmountB, pmtStrAssetIdB], nil) | |
460 | 460 | else 0 | |
461 | 461 | if ((stake2 == stake2)) | |
462 | 462 | then [Reissue(shareAssetId, shareTokenToPayAmount, true), IntegerEntry(kBalanceA, (balanceA + pmtAmountA)), IntegerEntry(kBalanceB, (balanceB + pmtAmountB)), IntegerEntry(kShareAssetSupply, (shareAssetSupply + shareTokenToPayAmount)), ScriptTransfer(i.caller, shareTokenToPayAmount, shareAssetId)] | |
463 | 463 | else throw("Strict value is not equal to itself.") | |
464 | 464 | } | |
465 | 465 | else throw("Strict value is not equal to itself.") | |
466 | 466 | } | |
467 | 467 | }) | |
468 | 468 | ||
469 | 469 | ||
470 | 470 | ||
471 | 471 | @Callable(i) | |
472 | 472 | func withdraw () = valueOrElse(isActive(), { | |
473 | - | let $ | |
474 | - | let pmtAmount = $ | |
475 | - | let pmtAssetId = $ | |
473 | + | let $t01718017255 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
474 | + | let pmtAmount = $t01718017255._1 | |
475 | + | let pmtAssetId = $t01718017255._2 | |
476 | 476 | let amountToPayA = fraction(pmtAmount, balanceA, shareAssetSupply) | |
477 | 477 | let amountToPayB = fraction(pmtAmount, balanceB, shareAssetSupply) | |
478 | 478 | if ((size(i.payments) != 1)) | |
479 | 479 | then throw("One attached payment expected") | |
480 | 480 | else if ((pmtAssetId != shareAssetId)) | |
481 | 481 | then throw(("Incorrect asset attached. Expected: " + toBase58String(shareAssetId))) | |
482 | 482 | else if (!(hasEnoughBalance)) | |
483 | 483 | then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious()) | |
484 | 484 | else { | |
485 | 485 | let stake1 = if (containsElement(stakingAssets, strAssetIdA)) | |
486 | 486 | then invoke(this, "stakeUnstake", [false, amountToPayA, strAssetIdA], nil) | |
487 | 487 | else 0 | |
488 | 488 | if ((stake1 == stake1)) | |
489 | 489 | then { | |
490 | 490 | let stake2 = if (containsElement(stakingAssets, strAssetIdB)) | |
491 | 491 | then invoke(this, "stakeUnstake", [false, amountToPayB, strAssetIdB], nil) | |
492 | 492 | else 0 | |
493 | 493 | if ((stake2 == stake2)) | |
494 | 494 | then [IntegerEntry(kBalanceA, (balanceA - amountToPayA)), IntegerEntry(kBalanceB, (balanceB - amountToPayB)), IntegerEntry(kShareAssetSupply, (shareAssetSupply - pmtAmount)), Burn(shareAssetId, pmtAmount), ScriptTransfer(i.caller, amountToPayA, assetIdA), ScriptTransfer(i.caller, amountToPayB, assetIdB)] | |
495 | 495 | else throw("Strict value is not equal to itself.") | |
496 | 496 | } | |
497 | 497 | else throw("Strict value is not equal to itself.") | |
498 | 498 | } | |
499 | 499 | }) | |
500 | 500 | ||
501 | 501 | ||
502 | 502 | ||
503 | 503 | @Callable(i) | |
504 | 504 | func exchange (minAmountToReceive) = valueOrElse(isActive(), { | |
505 | - | let $ | |
506 | - | let pmtAmount = $ | |
507 | - | let pmtAssetId = $ | |
505 | + | let $t01855418629 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
506 | + | let pmtAmount = $t01855418629._1 | |
507 | + | let pmtAssetId = $t01855418629._2 | |
508 | 508 | if (if ((balanceA == 0)) | |
509 | 509 | then true | |
510 | 510 | else (balanceB == 0)) | |
511 | 511 | then throw("Can't exchange with zero balance") | |
512 | 512 | else if ((0 >= minAmountToReceive)) | |
513 | 513 | then throw(("Minimal amount to receive must be positive. Actual: " + toString(minAmountToReceive))) | |
514 | 514 | else if ((size(i.payments) != 1)) | |
515 | 515 | then throw("One attached payment expected") | |
516 | 516 | else if (!(hasEnoughBalance)) | |
517 | 517 | then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious()) | |
518 | 518 | else if ((pmtAssetId == assetIdA)) | |
519 | 519 | then { | |
520 | 520 | let assetIdSend = assetIdB | |
521 | - | let $ | |
522 | - | let amountWithoutFee = $ | |
523 | - | let amountWithFee = $ | |
524 | - | let governanceReward = $ | |
521 | + | let $t01918019318 = calculateFees(pmtAmount, minAmountToReceive, balanceA, balanceB, i.originCaller) | |
522 | + | let amountWithoutFee = $t01918019318._1 | |
523 | + | let amountWithFee = $t01918019318._2 | |
524 | + | let governanceReward = $t01918019318._3 | |
525 | 525 | let newBalanceA = (balanceA + pmtAmount) | |
526 | 526 | let newBalanceB = ((balanceB - amountWithFee) - governanceReward) | |
527 | 527 | let stake1 = if (containsElement(stakingAssets, strAssetIdA)) | |
528 | 528 | then invoke(this, "stakeUnstake", [true, pmtAmount, strAssetIdA], nil) | |
529 | 529 | else 0 | |
530 | 530 | if ((stake1 == stake1)) | |
531 | 531 | then { | |
532 | 532 | let stake2 = if (containsElement(stakingAssets, strAssetIdB)) | |
533 | 533 | then invoke(this, "stakeUnstake", [false, (amountWithFee + governanceReward), strAssetIdB], nil) | |
534 | 534 | else 0 | |
535 | 535 | if ((stake2 == stake2)) | |
536 | 536 | then $Tuple2([IntegerEntry(kBalanceA, newBalanceA), IntegerEntry(kBalanceB, newBalanceB), ScriptTransfer(i.caller, amountWithFee, assetIdSend), ScriptTransfer(moneyBoxAddress, governanceReward, assetIdSend)], $Tuple2(amountWithFee, assetIdSend)) | |
537 | 537 | else throw("Strict value is not equal to itself.") | |
538 | 538 | } | |
539 | 539 | else throw("Strict value is not equal to itself.") | |
540 | 540 | } | |
541 | 541 | else if ((pmtAssetId == assetIdB)) | |
542 | 542 | then { | |
543 | 543 | let assetIdSend = assetIdA | |
544 | - | let $ | |
545 | - | let amountWithoutFee = $ | |
546 | - | let amountWithFee = $ | |
547 | - | let governanceReward = $ | |
544 | + | let $t02031020448 = calculateFees(pmtAmount, minAmountToReceive, balanceB, balanceA, i.originCaller) | |
545 | + | let amountWithoutFee = $t02031020448._1 | |
546 | + | let amountWithFee = $t02031020448._2 | |
547 | + | let governanceReward = $t02031020448._3 | |
548 | 548 | let newBalanceA = ((balanceA - amountWithFee) - governanceReward) | |
549 | 549 | let newBalanceB = (balanceB + pmtAmount) | |
550 | 550 | let stake1 = if (containsElement(stakingAssets, strAssetIdA)) | |
551 | 551 | then invoke(this, "stakeUnstake", [false, (amountWithFee + governanceReward), strAssetIdA], nil) | |
552 | 552 | else 0 | |
553 | 553 | if ((stake1 == stake1)) | |
554 | 554 | then { | |
555 | 555 | let stake2 = if (containsElement(stakingAssets, strAssetIdB)) | |
556 | 556 | then invoke(this, "stakeUnstake", [true, pmtAmount, strAssetIdB], nil) | |
557 | 557 | else 0 | |
558 | 558 | if ((stake2 == stake2)) | |
559 | 559 | then $Tuple2([IntegerEntry(kBalanceA, newBalanceA), IntegerEntry(kBalanceB, newBalanceB), ScriptTransfer(i.caller, amountWithFee, assetIdSend), ScriptTransfer(moneyBoxAddress, governanceReward, assetIdSend)], $Tuple2(amountWithFee, assetIdSend)) | |
560 | 560 | else throw("Strict value is not equal to itself.") | |
561 | 561 | } | |
562 | 562 | else throw("Strict value is not equal to itself.") | |
563 | 563 | } | |
564 | 564 | else throw(((("Incorrect asset attached. Expected: " + strAssetIdA) + " or ") + strAssetIdB)) | |
565 | 565 | }) | |
566 | 566 | ||
567 | 567 | ||
568 | 568 | ||
569 | 569 | @Callable(i) | |
570 | 570 | func shutdown () = if (!(active)) | |
571 | 571 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified"))) | |
572 | 572 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
573 | 573 | then throw("Only admin can call this function") | |
574 | 574 | else suspend("Paused by admin") | |
575 | 575 | ||
576 | 576 | ||
577 | 577 | ||
578 | 578 | @Callable(i) | |
579 | 579 | func activate () = if (active) | |
580 | 580 | then throw("DApp is already active") | |
581 | 581 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
582 | 582 | then throw("Only admin can call this function") | |
583 | 583 | else [BooleanEntry(kActive, true), DeleteEntry(kCause)] | |
584 | 584 | ||
585 | 585 | ||
586 | 586 | ||
587 | 587 | @Callable(i) | |
588 | 588 | func takeIntoAccountExtraFunds () = valueOrElse(isActive(), { | |
589 | 589 | let amountEnrollA = (accountBalanceWithStakedA - balanceA) | |
590 | 590 | let amountEnrollB = (accountBalanceWithStakedB - balanceB) | |
591 | 591 | if ((i.caller != moneyBoxAddress)) | |
592 | 592 | then throw("Only the wallet can call this function") | |
593 | 593 | else if (if ((0 > amountEnrollA)) | |
594 | 594 | then true | |
595 | 595 | else (0 > amountEnrollB)) | |
596 | 596 | then suspend("Enroll amount negative") | |
597 | 597 | else if (if ((amountEnrollA == 0)) | |
598 | 598 | then (amountEnrollB == 0) | |
599 | 599 | else false) | |
600 | 600 | then throw("No money to take") | |
601 | 601 | else { | |
602 | 602 | let stake1 = if (containsElement(stakingAssets, strAssetIdA)) | |
603 | 603 | then invoke(this, "stakeUnstake", [true, amountEnrollA, strAssetIdA], nil) | |
604 | 604 | else 0 | |
605 | 605 | if ((stake1 == stake1)) | |
606 | 606 | then { | |
607 | 607 | let stake2 = if (containsElement(stakingAssets, strAssetIdB)) | |
608 | 608 | then invoke(this, "stakeUnstake", [true, amountEnrollB, strAssetIdB], nil) | |
609 | 609 | else 0 | |
610 | 610 | if ((stake2 == stake2)) | |
611 | 611 | then [IntegerEntry(kBalanceA, (balanceA + amountEnrollA)), IntegerEntry(kBalanceB, (balanceB + amountEnrollB)), IntegerEntry(("last_income_" + strAssetIdA), amountEnrollA), IntegerEntry(("last_income_" + strAssetIdB), amountEnrollB)] | |
612 | 612 | else throw("Strict value is not equal to itself.") | |
613 | 613 | } | |
614 | 614 | else throw("Strict value is not equal to itself.") | |
615 | 615 | } | |
616 | 616 | }) | |
617 | 617 | ||
618 | 618 | ||
619 | 619 | ||
620 | 620 | @Callable(i) | |
621 | 621 | func stakeUnstake (stake,amount,assetIdString) = if ((i.caller != this)) | |
622 | 622 | then throw("Only contract itself can invoke this function") | |
623 | 623 | else if ((assetIdString == "WAVES")) | |
624 | 624 | then { | |
625 | 625 | let pool = addressFromStringValue(valueOrErrorMessage(getString(oracle, kLeasingPool), "No leasing pool in oracle")) | |
626 | 626 | let leasingId = getBinary(this, kLeasingId) | |
627 | 627 | let leasingAmount = valueOrElse(getInteger(this, kLeasingAmount), 0) | |
628 | 628 | let newLeaseAmount = if (stake) | |
629 | 629 | then (leasingAmount + amount) | |
630 | 630 | else (leasingAmount - amount) | |
631 | 631 | let newLease = Lease(pool, newLeaseAmount) | |
632 | 632 | let newLeaseId = calculateLeaseId(newLease) | |
633 | 633 | let baseEtry = [newLease, BinaryEntry(kLeasingId, newLeaseId), IntegerEntry(kLeasingAmount, newLeaseAmount)] | |
634 | 634 | match leasingId { | |
635 | 635 | case lId: ByteVector => | |
636 | 636 | ([LeaseCancel(lId)] ++ baseEtry) | |
637 | 637 | case _ => | |
638 | 638 | baseEtry | |
639 | 639 | } | |
640 | 640 | } | |
641 | 641 | else { | |
642 | - | let $ | |
643 | - | let call = $ | |
644 | - | let addr = $ | |
645 | - | let params = $ | |
646 | - | let payments = $ | |
642 | + | let $t02420224305 = calcStakingParams(stake, amount, fromBase58String(assetIdString)) | |
643 | + | let call = $t02420224305._1 | |
644 | + | let addr = $t02420224305._2 | |
645 | + | let params = $t02420224305._3 | |
646 | + | let payments = $t02420224305._4 | |
647 | 647 | let inv = invoke(addr, call, params, payments) | |
648 | 648 | if ((inv == inv)) | |
649 | 649 | then nil | |
650 | 650 | else throw("Strict value is not equal to itself.") | |
651 | 651 | } | |
652 | 652 | ||
653 | 653 | ||
654 | 654 | ||
655 | 655 | @Callable(i) | |
656 | 656 | func stakeAll () = valueOrElse(isActive(), if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
657 | 657 | then throw("Only admin can call this function") | |
658 | 658 | else { | |
659 | 659 | let stake1 = if (containsElement(stakingAssets, strAssetIdA)) | |
660 | 660 | then { | |
661 | 661 | let amountA = (balanceA - stakedAmountA) | |
662 | 662 | if ((amountA > 0)) | |
663 | 663 | then invoke(this, "stakeUnstake", [true, amountA, strAssetIdA], nil) | |
664 | 664 | else 0 | |
665 | 665 | } | |
666 | 666 | else 0 | |
667 | 667 | if ((stake1 == stake1)) | |
668 | 668 | then { | |
669 | 669 | let stake2 = if (containsElement(stakingAssets, strAssetIdB)) | |
670 | 670 | then { | |
671 | 671 | let amountB = (balanceB - stakedAmountB) | |
672 | 672 | if ((amountB > 0)) | |
673 | 673 | then invoke(this, "stakeUnstake", [true, amountB, strAssetIdB], nil) | |
674 | 674 | else 0 | |
675 | 675 | } | |
676 | 676 | else 0 | |
677 | 677 | if ((stake2 == stake2)) | |
678 | 678 | then nil | |
679 | 679 | else throw("Strict value is not equal to itself.") | |
680 | 680 | } | |
681 | 681 | else throw("Strict value is not equal to itself.") | |
682 | 682 | }) | |
683 | 683 | ||
684 | 684 | ||
685 | 685 | @Verifier(tx) | |
686 | 686 | func verify () = { | |
687 | 687 | let multiSignedByAdmins = { | |
688 | 688 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
689 | 689 | then 1 | |
690 | 690 | else 0 | |
691 | 691 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
692 | 692 | then 1 | |
693 | 693 | else 0 | |
694 | 694 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
695 | 695 | then 1 | |
696 | 696 | else 0 | |
697 | 697 | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
698 | 698 | } | |
699 | 699 | match tx { | |
700 | 700 | case inv: InvokeScriptTransaction => | |
701 | 701 | let callTakeIntoAccount = if ((inv.dApp == this)) | |
702 | 702 | then (inv.function == "takeIntoAccountExtraFunds") | |
703 | 703 | else false | |
704 | 704 | let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
705 | 705 | then true | |
706 | 706 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2)) | |
707 | 707 | then true | |
708 | 708 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3)) | |
709 | 709 | then true | |
710 | 710 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminInvokePubKey) | |
711 | 711 | if (if (callTakeIntoAccount) | |
712 | 712 | then signedByAdmin | |
713 | 713 | else false) | |
714 | 714 | then true | |
715 | 715 | else multiSignedByAdmins | |
716 | 716 | case _ => | |
717 | 717 | multiSignedByAdmins | |
718 | 718 | } | |
719 | 719 | } | |
720 | 720 |
github/deemru/w8io/169f3d6 128.71 ms ◑