tx · GtPPpj9uqMYgi57c6QfvDQnyV8yS2u4CnSFZSLrfYW4g 3MsxHxruYWoddB4HRiPBYAWtMXMtCF1V9XT: -0.03200000 Waves 2022.06.28 18:23 [2116461] smart account 3MsxHxruYWoddB4HRiPBYAWtMXMtCF1V9XT > SELF 0.00000000 Waves
{ "type": 13, "id": "GtPPpj9uqMYgi57c6QfvDQnyV8yS2u4CnSFZSLrfYW4g", "fee": 3200000, "feeAssetId": null, "timestamp": 1656429789870, "version": 2, "chainId": 84, "sender": "3MsxHxruYWoddB4HRiPBYAWtMXMtCF1V9XT", "senderPublicKey": "3ijdmxaYrpDFsKVbQH2kvB7i6JzHj9bep9bGWiQPra2D", "proofs": [ "4s1G2TPjhc6LUSgFhgDVZsZngc2oTLCueuvENB8JVoAJddhWbWVR9N5NDQCpKoqK2Wz3acX4y4Kc5aQcoXVCf6vt", "2Sssqi9afHfFougM77yKPsdzzd3ir9Y3ys7EbMkJr4tnCWJi3Ev1FhUn6KC5RfFKjxaxvejGcfudeYntQTvhHNgU" ], "script": "base64:AAIEAAAAAAAAACUIAhIDCgEIEgMKAQgSAwoBCBIDCgEIEgQKAggBEgMKAQgSABIAAAAAWwAAAAAMYWRtaW5QdWJLZXkxAQAAACDip4xAO4bNF+a0S4fb5aGDrK4qoew3Ll5lBRPytezvBAAAAAAMYWRtaW5QdWJLZXkyAQAAACDqOKy5AbWIPHKjnig9gdQaImURE43fjoONfP1X8ZsRWQAAAAAMYWRtaW5QdWJLZXkzAQAAACCnNJaCsKPJx10yYgF/O0UnTzPqvzbEAc8Qt3RwqifMbgAAAAAUa2V5U2hhcmVUb2tlbnNMb2NrZWQCAAAAGl90b3RhbF9zaGFyZV90b2tlbnNfbG9ja2VkAAAAAAtrU2hhcmVMaW1pdAIAAAAcc2hhcmVfbGltaXRfb25fZmlyc3RfaGFydmVzdAAAAAAJa2V5QWN0aXZlAgAAAAZhY3RpdmUAAAAACGtleUNhdXNlAgAAAA5zaHV0ZG93bl9jYXVzZQA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, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EKqVxeQk3PTQKgAdf9TtdpCDTKfhPibt8QEHapJaPWHi Next: 6qrvDNhEuVsToo6PAahMEfyniiTG32cFtvZYqeopzLYf Diff:
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let adminPubKey1 = base58'GFmKZ2naZFRoCvNbwKAQVGmLb1uBeWGDgFabdGBuZiuy' | |
215 | 215 | let assetId1Decimals = value(assetInfo(assetId1)).decimals | |
216 | 216 | let assetId2Decimals = value(assetInfo(assetId2)).decimals | |
217 | 217 | let scaleDigits = ((assetId2Decimals - assetId1Decimals) + 8) | |
218 | - | pow(10, 0, scaleDigits, 0, 0, | |
218 | + | pow(10, 0, scaleDigits, 0, 0, HALFDOWN) | |
219 | 219 | } | |
220 | 220 | ||
221 | 221 | ||
320 | 320 | let shareAssetId = getShareAssetId(pool) | |
321 | 321 | let scaleValue = calcScaleValue(SWOP, shareAssetId) | |
322 | 322 | let shareTokenLocked = getTotalShareTokenLocked(pool) | |
323 | - | let $ | |
324 | - | let lastInterestHeight = $ | |
325 | - | let lastInterest = $ | |
326 | - | let $ | |
327 | - | let currentRewardPerBlock = $ | |
328 | - | let rewardUpdateHeight = $ | |
329 | - | let previousRewardPerBlock = $ | |
330 | - | let poolRewardUpdateHeight = $ | |
331 | - | let $ | |
332 | - | let userLastInterest = $ | |
333 | - | let userShareTokensAmount = $ | |
323 | + | let $t01309513160 = getLastInterestInfo(pool) | |
324 | + | let lastInterestHeight = $t01309513160._1 | |
325 | + | let lastInterest = $t01309513160._2 | |
326 | + | let $t01316513277 = rewardInfo(pool) | |
327 | + | let currentRewardPerBlock = $t01316513277._1 | |
328 | + | let rewardUpdateHeight = $t01316513277._2 | |
329 | + | let previousRewardPerBlock = $t01316513277._3 | |
330 | + | let poolRewardUpdateHeight = $t01316513277._4 | |
331 | + | let $t01328213361 = getUserInterestInfo(pool, caller) | |
332 | + | let userLastInterest = $t01328213361._1 | |
333 | + | let userShareTokensAmount = $t01328213361._2 | |
334 | 334 | let currentInterest = calcInterest(lastInterestHeight, rewardUpdateHeight, poolRewardUpdateHeight, lastInterest, currentRewardPerBlock, shareTokenLocked, previousRewardPerBlock, shareAssetId, scaleValue, pmtAmount) | |
335 | 335 | let claimAmount = fraction(userShareTokensAmount, (currentInterest - userLastInterest), scaleValue) | |
336 | 336 | let userNewInterest = currentInterest | |
339 | 339 | ||
340 | 340 | ||
341 | 341 | func calculateProtocolReward (pool) = { | |
342 | - | let $ | |
343 | - | let lastInterestHeight = $ | |
344 | - | let lastInterest = $ | |
345 | - | let $ | |
346 | - | let currentRewardPerBlock = $ | |
347 | - | let rewardUpdateHeight = $ | |
348 | - | let previousRewardPerBlock = $ | |
349 | - | let poolRewardUpdateHeight = $ | |
342 | + | let $t01387913944 = getLastInterestInfo(pool) | |
343 | + | let lastInterestHeight = $t01387913944._1 | |
344 | + | let lastInterest = $t01387913944._2 | |
345 | + | let $t01394914060 = rewardInfo(pool) | |
346 | + | let currentRewardPerBlock = $t01394914060._1 | |
347 | + | let rewardUpdateHeight = $t01394914060._2 | |
348 | + | let previousRewardPerBlock = $t01394914060._3 | |
349 | + | let poolRewardUpdateHeight = $t01394914060._4 | |
350 | 350 | let shareTokenLocked = getTotalShareTokenLocked(pool) | |
351 | 351 | if (if ((shareTokenLocked == 0)) | |
352 | 352 | then (poolRewardUpdateHeight == 0) | |
431 | 431 | func initPoolShareFarming (pool) = if ((i.caller != this)) | |
432 | 432 | then throw("Only the DApp itself can call this function") | |
433 | 433 | else { | |
434 | - | let $ | |
435 | - | let currentReward = $ | |
436 | - | let rewardUpdateHeight = $ | |
437 | - | let previousRewardPerBlock = $ | |
438 | - | let poolRewardUpdateHeight = $ | |
434 | + | let $t01704217145 = rewardInfo(pool) | |
435 | + | let currentReward = $t01704217145._1 | |
436 | + | let rewardUpdateHeight = $t01704217145._2 | |
437 | + | let previousRewardPerBlock = $t01704217145._3 | |
438 | + | let poolRewardUpdateHeight = $t01704217145._4 | |
439 | 439 | [IntegerEntry((pool + keyShareTokensLocked), 0), IntegerEntry((pool + keyLastInterest), 0), IntegerEntry((pool + keyLastInterestHeight), height)] | |
440 | 440 | } | |
441 | 441 | ||
447 | 447 | else if (!(isActive)) | |
448 | 448 | then throw("DApp is inactive at this moment") | |
449 | 449 | else { | |
450 | - | let $ | |
451 | - | let userNewInterest = $ | |
452 | - | let currentInterest = $ | |
453 | - | let claimAmount = $ | |
454 | - | let userShareTokensAmount = $ | |
455 | - | let $ | |
456 | - | let currentReward = $ | |
457 | - | let rewardUpdateHeight = $ | |
458 | - | let previousRewardPerBlock = $ | |
459 | - | let poolRewardUpdateHeight = $ | |
450 | + | let $t01755417674 = claimCalc(pool, adminIncreaseInterestAddress, 0) | |
451 | + | let userNewInterest = $t01755417674._1 | |
452 | + | let currentInterest = $t01755417674._2 | |
453 | + | let claimAmount = $t01755417674._3 | |
454 | + | let userShareTokensAmount = $t01755417674._4 | |
455 | + | let $t01767917782 = rewardInfo(pool) | |
456 | + | let currentReward = $t01767917782._1 | |
457 | + | let rewardUpdateHeight = $t01767917782._2 | |
458 | + | let previousRewardPerBlock = $t01767917782._3 | |
459 | + | let poolRewardUpdateHeight = $t01767917782._4 | |
460 | 460 | [IntegerEntry((pool + keyLastInterest), userNewInterest), IntegerEntry((pool + keyLastInterestHeight), height)] | |
461 | 461 | } | |
462 | 462 | ||
464 | 464 | ||
465 | 465 | @Callable(i) | |
466 | 466 | func lockShareTokens (pool) = { | |
467 | - | let $ | |
468 | - | let pmtAmount = $ | |
469 | - | let pmtAssetId = $ | |
470 | - | let $ | |
471 | - | let pmtStrAssetId = $ | |
472 | - | let pmtAssetName = $ | |
473 | - | let pmtDecimals = $ | |
474 | - | let $ | |
475 | - | let userNewInterest = $ | |
476 | - | let currentInterest = $ | |
477 | - | let claimAmount = $ | |
478 | - | let userShareTokensAmount = $ | |
467 | + | let $t01797418049 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
468 | + | let pmtAmount = $t01797418049._1 | |
469 | + | let pmtAssetId = $t01797418049._2 | |
470 | + | let $t01805418127 = getAssetInfo(pmtAssetId) | |
471 | + | let pmtStrAssetId = $t01805418127._1 | |
472 | + | let pmtAssetName = $t01805418127._2 | |
473 | + | let pmtDecimals = $t01805418127._3 | |
474 | + | let $t01813218240 = claimCalc(pool, i.caller, pmtAmount) | |
475 | + | let userNewInterest = $t01813218240._1 | |
476 | + | let currentInterest = $t01813218240._2 | |
477 | + | let claimAmount = $t01813218240._3 | |
478 | + | let userShareTokensAmount = $t01813218240._4 | |
479 | 479 | let userShareAmountNew = (userShareTokensAmount + pmtAmount) | |
480 | 480 | let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount) | |
481 | 481 | let totalShareAmount = getTotalShareTokenLocked(pool) | |
508 | 508 | @Callable(i) | |
509 | 509 | func withdrawShareTokens (pool,shareTokensWithdrawAmount) = { | |
510 | 510 | let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
511 | - | let $ | |
512 | - | let userNewInterest = $ | |
513 | - | let currentInterest = $ | |
514 | - | let claimAmount = $ | |
515 | - | let userShareTokensAmount = $ | |
511 | + | let $t02123421334 = claimCalc(pool, i.caller, 1) | |
512 | + | let userNewInterest = $t02123421334._1 | |
513 | + | let currentInterest = $t02123421334._2 | |
514 | + | let claimAmount = $t02123421334._3 | |
515 | + | let userShareTokensAmount = $t02123421334._4 | |
516 | 516 | let userShareAmountNew = (userShareTokensAmount - shareTokensWithdrawAmount) | |
517 | 517 | let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount) | |
518 | 518 | let totalShareAmount = getTotalShareTokenLocked(pool) | |
536 | 536 | func claim (pool) = { | |
537 | 537 | let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
538 | 538 | let shareTokenLocked = getTotalShareTokenLocked(pool) | |
539 | - | let $ | |
540 | - | let lastInterestHeight = $ | |
541 | - | let lastInterest = $ | |
542 | - | let $ | |
543 | - | let currentRewardPerBlock = $ | |
544 | - | let rewardUpdateHeight = $ | |
545 | - | let previousRewardPerBlock = $ | |
546 | - | let poolRewardUpdateHeight = $ | |
547 | - | let $ | |
548 | - | let userNewInterest = $ | |
549 | - | let currentInterest = $ | |
550 | - | let claimAmount = $ | |
551 | - | let userShareTokensAmount = $ | |
539 | + | let $t02334123406 = getLastInterestInfo(pool) | |
540 | + | let lastInterestHeight = $t02334123406._1 | |
541 | + | let lastInterest = $t02334123406._2 | |
542 | + | let $t02341123523 = rewardInfo(pool) | |
543 | + | let currentRewardPerBlock = $t02341123523._1 | |
544 | + | let rewardUpdateHeight = $t02341123523._2 | |
545 | + | let previousRewardPerBlock = $t02341123523._3 | |
546 | + | let poolRewardUpdateHeight = $t02341123523._4 | |
547 | + | let $t02352823628 = claimCalc(pool, i.caller, 1) | |
548 | + | let userNewInterest = $t02352823628._1 | |
549 | + | let currentInterest = $t02352823628._2 | |
550 | + | let claimAmount = $t02352823628._3 | |
551 | + | let userShareTokensAmount = $t02352823628._4 | |
552 | 552 | let availableFund = (userAvailableSWOP(pool, i.caller) + claimAmount) | |
553 | 553 | let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller) | |
554 | 554 | let userClaimedAmountNew = (userClaimedAmount + claimAmount) |
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let adminPubKey1 = base58'GFmKZ2naZFRoCvNbwKAQVGmLb1uBeWGDgFabdGBuZiuy' | |
5 | 5 | ||
6 | 6 | let adminPubKey2 = base58'GmJXRyhRA79g8yUGgKBAVdnFfQFDMjQG98b1MmLDh5kk' | |
7 | 7 | ||
8 | 8 | let adminPubKey3 = base58'CFhbV6h41hVjbGHudGtS3fYUv7QAKRxFQzKNtx4B5PqP' | |
9 | 9 | ||
10 | 10 | let keyShareTokensLocked = "_total_share_tokens_locked" | |
11 | 11 | ||
12 | 12 | let kShareLimit = "share_limit_on_first_harvest" | |
13 | 13 | ||
14 | 14 | let keyActive = "active" | |
15 | 15 | ||
16 | 16 | let keyCause = "shutdown_cause" | |
17 | 17 | ||
18 | 18 | let keyRewardPoolFractionCurrent = "_current_pool_fraction_reward" | |
19 | 19 | ||
20 | 20 | let keyRewardPoolFractionPrevious = "_previous_pool_fraction_reward" | |
21 | 21 | ||
22 | 22 | let keyHeightPoolFraction = "_pool_reward_update_height" | |
23 | 23 | ||
24 | 24 | let keyTotalRewardPerBlockCurrent = "total_reward_per_block_current" | |
25 | 25 | ||
26 | 26 | let keyTotalRewardPerBlockPrevious = "total_reward_per_block_previous" | |
27 | 27 | ||
28 | 28 | let keyRewardUpdateHeight = "reward_update_height" | |
29 | 29 | ||
30 | 30 | let keyLastInterest = "_last_interest" | |
31 | 31 | ||
32 | 32 | let keyLastInterestHeight = "_last_interest_height" | |
33 | 33 | ||
34 | 34 | let keyUserShareTokensLocked = "_share_tokens_locked" | |
35 | 35 | ||
36 | 36 | let keyUserLastInterest = "_last_interest" | |
37 | 37 | ||
38 | 38 | let keySWOPid = "SWOP_id" | |
39 | 39 | ||
40 | 40 | let keyUserSWOPClaimedAmount = "_SWOP_claimed_amount" | |
41 | 41 | ||
42 | 42 | let keyUserSWOPLastClaimedAmount = "_SWOP_last_claimed_amount" | |
43 | 43 | ||
44 | 44 | let keyAvailableSWOP = "_available_SWOP" | |
45 | 45 | ||
46 | 46 | let keyFarmingStartHeight = "farming_start_height" | |
47 | 47 | ||
48 | 48 | let keyAPY = "apy" | |
49 | 49 | ||
50 | 50 | let kPreviousTotalVoteSWOP = "previous_total_vote_SWOP" | |
51 | 51 | ||
52 | 52 | let keySwopYearEmission = "swop_year_emission" | |
53 | 53 | ||
54 | 54 | let keyBalancecpmmA = "A_asset_balance" | |
55 | 55 | ||
56 | 56 | let keyBalancecpmmB = "B_asset_balance" | |
57 | 57 | ||
58 | 58 | let kHarvestPoolActiveVoteStrucVoting = "_harvest_pool_activeVote_struc" | |
59 | 59 | ||
60 | 60 | let kHarvestUserPoolActiveVoteStrucVoting = "_harvest_user_pool_activeVote_struc" | |
61 | 61 | ||
62 | 62 | let keyLimitShareFirstHarvest = "share_limit_on_first_harvest" | |
63 | 63 | ||
64 | 64 | let keyAssetIdA = "A_asset_id" | |
65 | 65 | ||
66 | 66 | let keyAssetIdB = "B_asset_id" | |
67 | 67 | ||
68 | 68 | let keyFirstHarvestHeight = "first_harvest_height" | |
69 | 69 | ||
70 | 70 | let keyfirstHarvestCpmm = "first_harvest" | |
71 | 71 | ||
72 | 72 | let keyTempPrevSum = "sum_reward_previous" | |
73 | 73 | ||
74 | 74 | let keyTempCurSum = "sum_reward_current" | |
75 | 75 | ||
76 | 76 | let governanceAddress = Address(base58'3N5W8da2iiijVieA6qLGo7KzCJj8B19smWU') | |
77 | 77 | ||
78 | 78 | let wallet = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4') | |
79 | 79 | ||
80 | 80 | let votingAddress = Address(base58'3MrJgdL1GniipErHy44YF9idzLaUL2iX5DQ') | |
81 | 81 | ||
82 | 82 | let adminIncreaseInterestAddress = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4') | |
83 | 83 | ||
84 | 84 | let oneWeekInBlock = 10106 | |
85 | 85 | ||
86 | 86 | let totalVoteShare = 10000000000 | |
87 | 87 | ||
88 | 88 | let scaleValue1 = 10 | |
89 | 89 | ||
90 | 90 | let scaleValue3 = 1000 | |
91 | 91 | ||
92 | 92 | let scaleValue5 = 100000 | |
93 | 93 | ||
94 | 94 | let scaleValue6 = 1000000 | |
95 | 95 | ||
96 | 96 | let scaleValue8 = 100000000 | |
97 | 97 | ||
98 | 98 | let scaleValue11 = 100000000000 | |
99 | 99 | ||
100 | 100 | func strAssetIdA (pool) = getStringValue(pool, keyAssetIdA) | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func strAssetIdB (pool) = getStringValue(pool, keyAssetIdB) | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func assetIdA (pool) = if ((strAssetIdA(pool) == "WAVES")) | |
107 | 107 | then unit | |
108 | 108 | else fromBase58String(strAssetIdA(pool)) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func assetIdB (pool) = if ((strAssetIdB(pool) == "WAVES")) | |
112 | 112 | then unit | |
113 | 113 | else fromBase58String(strAssetIdB(pool)) | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | let kBasePeriod = "base_period" | |
117 | 117 | ||
118 | 118 | let kPeriodLength = "period_length" | |
119 | 119 | ||
120 | 120 | let kStartHeight = "start_height" | |
121 | 121 | ||
122 | 122 | let kFirstHarvestHeight = "first_harvest_height" | |
123 | 123 | ||
124 | 124 | let kDurationFullVotePower = "duration_full_vote_power" | |
125 | 125 | ||
126 | 126 | let kMinVotePower = "min_vote_power" | |
127 | 127 | ||
128 | 128 | let basePeriod = valueOrErrorMessage(getInteger(votingAddress, kBasePeriod), "Empty kBasePeriod") | |
129 | 129 | ||
130 | 130 | let startHeight = valueOrErrorMessage(getInteger(votingAddress, kStartHeight), "Empty kStartHeight") | |
131 | 131 | ||
132 | 132 | let periodLength = valueOrErrorMessage(getInteger(votingAddress, kPeriodLength), "Empty kPeriodLength") | |
133 | 133 | ||
134 | 134 | let durationFullVotePower = valueOrErrorMessage(getInteger(votingAddress, kDurationFullVotePower), "Empty kDurationFullVotePower") | |
135 | 135 | ||
136 | 136 | let minVotePower = valueOrErrorMessage(getInteger(votingAddress, kMinVotePower), "Empty kMinVotePower") | |
137 | 137 | ||
138 | 138 | let isActive = getBooleanValue(this, keyActive) | |
139 | 139 | ||
140 | 140 | let currPeriod = (basePeriod + ((height - startHeight) / periodLength)) | |
141 | 141 | ||
142 | 142 | func getLimitToken (pool) = valueOrElse(getIntegerValue(pool, keyLimitShareFirstHarvest), 0) | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | let APY = getIntegerValue(this, keyAPY) | |
146 | 146 | ||
147 | 147 | let SwopYearEmission = getIntegerValue(this, keySwopYearEmission) | |
148 | 148 | ||
149 | 149 | func assetNameA (pool) = match assetIdA(pool) { | |
150 | 150 | case id: ByteVector => | |
151 | 151 | value(assetInfo(id)).name | |
152 | 152 | case waves: Unit => | |
153 | 153 | "WAVES" | |
154 | 154 | case _ => | |
155 | 155 | throw("Match error") | |
156 | 156 | } | |
157 | 157 | ||
158 | 158 | ||
159 | 159 | func assetNameB (pool) = match assetIdB(pool) { | |
160 | 160 | case id: ByteVector => | |
161 | 161 | value(assetInfo(id)).name | |
162 | 162 | case waves: Unit => | |
163 | 163 | "WAVES" | |
164 | 164 | case _ => | |
165 | 165 | throw("Match error") | |
166 | 166 | } | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | let SWOP = fromBase58String(getStringValue(this, keySWOPid)) | |
170 | 170 | ||
171 | 171 | func isFirstHarvest (pool) = valueOrElse(getBoolean(pool, keyfirstHarvestCpmm), false) | |
172 | 172 | ||
173 | 173 | ||
174 | 174 | func getHeightFirstHarvest (pool) = valueOrElse(getInteger(pool, keyFirstHarvestHeight), 0) | |
175 | 175 | ||
176 | 176 | ||
177 | 177 | func getBalanceA (pool) = valueOrErrorMessage(getInteger(pool, keyBalancecpmmA), ("No data on the key: " + keyBalancecpmmA)) | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | func getBalanceB (pool) = valueOrErrorMessage(getInteger(pool, keyBalancecpmmB), ("No data on the key: " + keyBalancecpmmB)) | |
181 | 181 | ||
182 | 182 | ||
183 | 183 | func getShareLimitToken (pool) = valueOrErrorMessage(getInteger(pool, kShareLimit), ("No data on the key: " + kShareLimit)) | |
184 | 184 | ||
185 | 185 | ||
186 | 186 | func getTotalShareTokenLocked (pool) = valueOrErrorMessage(getInteger(this, (pool + keyShareTokensLocked)), (("No data on the key: " + pool) + keyShareTokensLocked)) | |
187 | 187 | ||
188 | 188 | ||
189 | 189 | func getShareAssetId (pool) = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
190 | 190 | ||
191 | 191 | ||
192 | 192 | func accountBalance (assetId) = match assetId { | |
193 | 193 | case id: ByteVector => | |
194 | 194 | assetBalance(this, id) | |
195 | 195 | case waves: Unit => | |
196 | 196 | wavesBalance(this).available | |
197 | 197 | case _ => | |
198 | 198 | throw("Match error") | |
199 | 199 | } | |
200 | 200 | ||
201 | 201 | ||
202 | 202 | func getAssetInfo (assetId) = match assetId { | |
203 | 203 | case id: ByteVector => | |
204 | 204 | let stringId = toBase58String(id) | |
205 | 205 | let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist")) | |
206 | 206 | $Tuple3(stringId, info.name, info.decimals) | |
207 | 207 | case waves: Unit => | |
208 | 208 | $Tuple3("WAVES", "WAVES", 8) | |
209 | 209 | case _ => | |
210 | 210 | throw("Match error") | |
211 | 211 | } | |
212 | 212 | ||
213 | 213 | ||
214 | 214 | func calcScaleValue (assetId1,assetId2) = { | |
215 | 215 | let assetId1Decimals = value(assetInfo(assetId1)).decimals | |
216 | 216 | let assetId2Decimals = value(assetInfo(assetId2)).decimals | |
217 | 217 | let scaleDigits = ((assetId2Decimals - assetId1Decimals) + 8) | |
218 | - | pow(10, 0, scaleDigits, 0, 0, | |
218 | + | pow(10, 0, scaleDigits, 0, 0, HALFDOWN) | |
219 | 219 | } | |
220 | 220 | ||
221 | 221 | ||
222 | 222 | func userAvailableSWOP (pool,user) = valueOrElse(getInteger(this, (((pool + "_") + toString(user)) + keyAvailableSWOP)), 0) | |
223 | 223 | ||
224 | 224 | ||
225 | 225 | func rewardInfo (pool) = { | |
226 | 226 | let totalRewardPerBlockCurrent = valueOrErrorMessage(getInteger(governanceAddress, keyTotalRewardPerBlockCurrent), ((("No data on the key: " + keyTotalRewardPerBlockCurrent) + " at address ") + toString(governanceAddress))) | |
227 | 227 | let totalRewardPerBlockPrevious = valueOrErrorMessage(getInteger(governanceAddress, keyTotalRewardPerBlockPrevious), ((("No data on the key: " + keyTotalRewardPerBlockPrevious) + " at address ") + toString(governanceAddress))) | |
228 | 228 | let rewardPoolFractionCurrent = valueOrErrorMessage(getInteger(governanceAddress, (pool + keyRewardPoolFractionCurrent)), (((("No data on the key: " + pool) + keyRewardPoolFractionCurrent) + " at address ") + toString(governanceAddress))) | |
229 | 229 | let rewardUpdateHeight = valueOrErrorMessage(getInteger(governanceAddress, keyRewardUpdateHeight), ((("No data on the key: " + keyRewardUpdateHeight) + " at address ") + toString(governanceAddress))) | |
230 | 230 | let poolRewardUpdateHeight = valueOrElse(getInteger(governanceAddress, (pool + keyHeightPoolFraction)), 0) | |
231 | 231 | let rewardPoolFractionPrevious = valueOrErrorMessage(getInteger(governanceAddress, (pool + keyRewardPoolFractionPrevious)), (((("No data on the key: " + pool) + keyRewardPoolFractionPrevious) + " at address ") + toString(governanceAddress))) | |
232 | 232 | let rewardPoolCurrent = fraction(totalRewardPerBlockCurrent, rewardPoolFractionCurrent, totalVoteShare) | |
233 | 233 | let rewardPoolPrevious = fraction(totalRewardPerBlockPrevious, rewardPoolFractionPrevious, totalVoteShare) | |
234 | 234 | if (if ((rewardPoolCurrent > totalRewardPerBlockCurrent)) | |
235 | 235 | then true | |
236 | 236 | else (rewardPoolPrevious > totalRewardPerBlockPrevious)) | |
237 | 237 | then throw("rewardPoolCurrent > totalRewardPerBlockCurrent or rewardPoolPrevious > totalRewardPerBlockPrevious") | |
238 | 238 | else $Tuple4(rewardPoolCurrent, rewardUpdateHeight, rewardPoolPrevious, poolRewardUpdateHeight) | |
239 | 239 | } | |
240 | 240 | ||
241 | 241 | ||
242 | 242 | func getLastInterestInfo (pool) = { | |
243 | 243 | let lastInterest = valueOrErrorMessage(getInteger(this, (pool + keyLastInterest)), (("No data on the key: " + pool) + keyLastInterest)) | |
244 | 244 | let lastInterestHeight = valueOrElse(getInteger(this, (pool + keyLastInterestHeight)), height) | |
245 | 245 | $Tuple2(lastInterestHeight, lastInterest) | |
246 | 246 | } | |
247 | 247 | ||
248 | 248 | ||
249 | 249 | func getUserInterestInfo (pool,userAddress) = { | |
250 | 250 | let userLastInterest = getInteger(this, (((pool + "_") + toString(userAddress)) + keyUserLastInterest)) | |
251 | 251 | let userShare = getInteger(this, (((pool + "_") + toString(userAddress)) + keyUserShareTokensLocked)) | |
252 | 252 | let lastInterest = valueOrErrorMessage(getInteger(this, (pool + keyLastInterest)), (("No data on the key: " + pool) + keyLastInterest)) | |
253 | 253 | let userLastInterestValue = match userLastInterest { | |
254 | 254 | case userLastInterest: Int => | |
255 | 255 | userLastInterest | |
256 | 256 | case _ => | |
257 | 257 | lastInterest | |
258 | 258 | } | |
259 | 259 | let userShareTokensAmount = match userShare { | |
260 | 260 | case userShare: Int => | |
261 | 261 | userShare | |
262 | 262 | case _ => | |
263 | 263 | 0 | |
264 | 264 | } | |
265 | 265 | $Tuple2(userLastInterestValue, userShareTokensAmount) | |
266 | 266 | } | |
267 | 267 | ||
268 | 268 | ||
269 | 269 | func calcInterest (lastInterestHeight,rewardUpdateHeight,poolRewardUpdateHeight,lastInterest,currentRewardPerBlock,shareTokenLocked,previousRewardPerBlock,shareAssetId,scaleValue,pmtAmount) = if ((shareTokenLocked == 0)) | |
270 | 270 | then 0 | |
271 | 271 | else if ((poolRewardUpdateHeight != 0)) | |
272 | 272 | then if (if ((rewardUpdateHeight > height)) | |
273 | 273 | then (rewardUpdateHeight == poolRewardUpdateHeight) | |
274 | 274 | else false) | |
275 | 275 | then { | |
276 | 276 | let reward = (previousRewardPerBlock * (height - lastInterestHeight)) | |
277 | 277 | (lastInterest + fraction(reward, scaleValue, shareTokenLocked)) | |
278 | 278 | } | |
279 | 279 | else if (if ((height > rewardUpdateHeight)) | |
280 | 280 | then (rewardUpdateHeight != poolRewardUpdateHeight) | |
281 | 281 | else false) | |
282 | 282 | then { | |
283 | 283 | let reward = (previousRewardPerBlock * (height - lastInterestHeight)) | |
284 | 284 | (lastInterest + fraction(reward, scaleValue, shareTokenLocked)) | |
285 | 285 | } | |
286 | 286 | else if (if (if ((height > rewardUpdateHeight)) | |
287 | 287 | then (rewardUpdateHeight == poolRewardUpdateHeight) | |
288 | 288 | else false) | |
289 | 289 | then (lastInterestHeight > rewardUpdateHeight) | |
290 | 290 | else false) | |
291 | 291 | then { | |
292 | 292 | let reward = (currentRewardPerBlock * (height - lastInterestHeight)) | |
293 | 293 | (lastInterest + fraction(reward, scaleValue, shareTokenLocked)) | |
294 | 294 | } | |
295 | 295 | else { | |
296 | 296 | let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight)) | |
297 | 297 | let interestAfterUpdate = (lastInterest + fraction(rewardAfterLastInterestBeforeReawardUpdate, scaleValue, shareTokenLocked)) | |
298 | 298 | let reward = (currentRewardPerBlock * (height - rewardUpdateHeight)) | |
299 | 299 | (interestAfterUpdate + fraction(reward, scaleValue, shareTokenLocked)) | |
300 | 300 | } | |
301 | 301 | else if ((rewardUpdateHeight > height)) | |
302 | 302 | then { | |
303 | 303 | let reward = (previousRewardPerBlock * (height - lastInterestHeight)) | |
304 | 304 | (lastInterest + fraction(reward, scaleValue, shareTokenLocked)) | |
305 | 305 | } | |
306 | 306 | else if ((lastInterestHeight > rewardUpdateHeight)) | |
307 | 307 | then { | |
308 | 308 | let reward = (currentRewardPerBlock * (height - lastInterestHeight)) | |
309 | 309 | (lastInterest + fraction(reward, scaleValue, shareTokenLocked)) | |
310 | 310 | } | |
311 | 311 | else { | |
312 | 312 | let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight)) | |
313 | 313 | let interestAfterUpdate = (lastInterest + fraction(rewardAfterLastInterestBeforeReawardUpdate, scaleValue, shareTokenLocked)) | |
314 | 314 | let reward = (currentRewardPerBlock * (height - rewardUpdateHeight)) | |
315 | 315 | (interestAfterUpdate + fraction(reward, scaleValue, shareTokenLocked)) | |
316 | 316 | } | |
317 | 317 | ||
318 | 318 | ||
319 | 319 | func claimCalc (pool,caller,pmtAmount) = { | |
320 | 320 | let shareAssetId = getShareAssetId(pool) | |
321 | 321 | let scaleValue = calcScaleValue(SWOP, shareAssetId) | |
322 | 322 | let shareTokenLocked = getTotalShareTokenLocked(pool) | |
323 | - | let $ | |
324 | - | let lastInterestHeight = $ | |
325 | - | let lastInterest = $ | |
326 | - | let $ | |
327 | - | let currentRewardPerBlock = $ | |
328 | - | let rewardUpdateHeight = $ | |
329 | - | let previousRewardPerBlock = $ | |
330 | - | let poolRewardUpdateHeight = $ | |
331 | - | let $ | |
332 | - | let userLastInterest = $ | |
333 | - | let userShareTokensAmount = $ | |
323 | + | let $t01309513160 = getLastInterestInfo(pool) | |
324 | + | let lastInterestHeight = $t01309513160._1 | |
325 | + | let lastInterest = $t01309513160._2 | |
326 | + | let $t01316513277 = rewardInfo(pool) | |
327 | + | let currentRewardPerBlock = $t01316513277._1 | |
328 | + | let rewardUpdateHeight = $t01316513277._2 | |
329 | + | let previousRewardPerBlock = $t01316513277._3 | |
330 | + | let poolRewardUpdateHeight = $t01316513277._4 | |
331 | + | let $t01328213361 = getUserInterestInfo(pool, caller) | |
332 | + | let userLastInterest = $t01328213361._1 | |
333 | + | let userShareTokensAmount = $t01328213361._2 | |
334 | 334 | let currentInterest = calcInterest(lastInterestHeight, rewardUpdateHeight, poolRewardUpdateHeight, lastInterest, currentRewardPerBlock, shareTokenLocked, previousRewardPerBlock, shareAssetId, scaleValue, pmtAmount) | |
335 | 335 | let claimAmount = fraction(userShareTokensAmount, (currentInterest - userLastInterest), scaleValue) | |
336 | 336 | let userNewInterest = currentInterest | |
337 | 337 | $Tuple4(userNewInterest, currentInterest, claimAmount, userShareTokensAmount) | |
338 | 338 | } | |
339 | 339 | ||
340 | 340 | ||
341 | 341 | func calculateProtocolReward (pool) = { | |
342 | - | let $ | |
343 | - | let lastInterestHeight = $ | |
344 | - | let lastInterest = $ | |
345 | - | let $ | |
346 | - | let currentRewardPerBlock = $ | |
347 | - | let rewardUpdateHeight = $ | |
348 | - | let previousRewardPerBlock = $ | |
349 | - | let poolRewardUpdateHeight = $ | |
342 | + | let $t01387913944 = getLastInterestInfo(pool) | |
343 | + | let lastInterestHeight = $t01387913944._1 | |
344 | + | let lastInterest = $t01387913944._2 | |
345 | + | let $t01394914060 = rewardInfo(pool) | |
346 | + | let currentRewardPerBlock = $t01394914060._1 | |
347 | + | let rewardUpdateHeight = $t01394914060._2 | |
348 | + | let previousRewardPerBlock = $t01394914060._3 | |
349 | + | let poolRewardUpdateHeight = $t01394914060._4 | |
350 | 350 | let shareTokenLocked = getTotalShareTokenLocked(pool) | |
351 | 351 | if (if ((shareTokenLocked == 0)) | |
352 | 352 | then (poolRewardUpdateHeight == 0) | |
353 | 353 | else false) | |
354 | 354 | then if ((rewardUpdateHeight > height)) | |
355 | 355 | then { | |
356 | 356 | let reward = (previousRewardPerBlock * (height - lastInterestHeight)) | |
357 | 357 | reward | |
358 | 358 | } | |
359 | 359 | else if ((lastInterestHeight > rewardUpdateHeight)) | |
360 | 360 | then { | |
361 | 361 | let reward = (currentRewardPerBlock * (height - lastInterestHeight)) | |
362 | 362 | reward | |
363 | 363 | } | |
364 | 364 | else { | |
365 | 365 | let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight)) | |
366 | 366 | let reward = (currentRewardPerBlock * (height - rewardUpdateHeight)) | |
367 | 367 | (reward + rewardAfterLastInterestBeforeReawardUpdate) | |
368 | 368 | } | |
369 | 369 | else if (if ((shareTokenLocked == 0)) | |
370 | 370 | then (poolRewardUpdateHeight != 0) | |
371 | 371 | else false) | |
372 | 372 | then if (if ((rewardUpdateHeight > height)) | |
373 | 373 | then (rewardUpdateHeight == poolRewardUpdateHeight) | |
374 | 374 | else false) | |
375 | 375 | then { | |
376 | 376 | let reward = (previousRewardPerBlock * (height - lastInterestHeight)) | |
377 | 377 | reward | |
378 | 378 | } | |
379 | 379 | else if (if ((height > rewardUpdateHeight)) | |
380 | 380 | then (rewardUpdateHeight != poolRewardUpdateHeight) | |
381 | 381 | else false) | |
382 | 382 | then { | |
383 | 383 | let reward = (previousRewardPerBlock * (height - lastInterestHeight)) | |
384 | 384 | reward | |
385 | 385 | } | |
386 | 386 | else if (if (if ((height > rewardUpdateHeight)) | |
387 | 387 | then (rewardUpdateHeight == poolRewardUpdateHeight) | |
388 | 388 | else false) | |
389 | 389 | then (lastInterestHeight > rewardUpdateHeight) | |
390 | 390 | else false) | |
391 | 391 | then { | |
392 | 392 | let reward = (currentRewardPerBlock * (height - lastInterestHeight)) | |
393 | 393 | reward | |
394 | 394 | } | |
395 | 395 | else { | |
396 | 396 | let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight)) | |
397 | 397 | let reward = (currentRewardPerBlock * (height - rewardUpdateHeight)) | |
398 | 398 | (reward + rewardAfterLastInterestBeforeReawardUpdate) | |
399 | 399 | } | |
400 | 400 | else 0 | |
401 | 401 | } | |
402 | 402 | ||
403 | 403 | ||
404 | 404 | func checkPmtAssetIdCorrect (pool,pmtAssetId) = { | |
405 | 405 | let poolShareAssetId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
406 | 406 | if ((pmtAssetId == poolShareAssetId)) | |
407 | 407 | then true | |
408 | 408 | else false | |
409 | 409 | } | |
410 | 410 | ||
411 | 411 | ||
412 | 412 | func getUserSWOPClaimedAmount (pool,user) = valueOrElse(getInteger(this, (((pool + "_") + toString(user)) + keyUserSWOPClaimedAmount)), 0) | |
413 | 413 | ||
414 | 414 | ||
415 | 415 | func suspend (cause) = [BooleanEntry(keyActive, false), StringEntry(keyCause, cause)] | |
416 | 416 | ||
417 | 417 | ||
418 | 418 | @Callable(i) | |
419 | 419 | func init (earlyLP) = if (isDefined(getString(this, keySWOPid))) | |
420 | 420 | then throw("SWOP already initialized") | |
421 | 421 | else { | |
422 | 422 | let initAmount = 100000000000000 | |
423 | 423 | let SWOPissue = Issue("SWOP", "SWOP protocol token", initAmount, 8, true) | |
424 | 424 | let SWOPid = calculateAssetId(SWOPissue) | |
425 | 425 | [BooleanEntry(keyActive, true), Issue("SWOP", "SWOP protocol token", initAmount, 8, true), StringEntry(keySWOPid, toBase58String(SWOPid))] | |
426 | 426 | } | |
427 | 427 | ||
428 | 428 | ||
429 | 429 | ||
430 | 430 | @Callable(i) | |
431 | 431 | func initPoolShareFarming (pool) = if ((i.caller != this)) | |
432 | 432 | then throw("Only the DApp itself can call this function") | |
433 | 433 | else { | |
434 | - | let $ | |
435 | - | let currentReward = $ | |
436 | - | let rewardUpdateHeight = $ | |
437 | - | let previousRewardPerBlock = $ | |
438 | - | let poolRewardUpdateHeight = $ | |
434 | + | let $t01704217145 = rewardInfo(pool) | |
435 | + | let currentReward = $t01704217145._1 | |
436 | + | let rewardUpdateHeight = $t01704217145._2 | |
437 | + | let previousRewardPerBlock = $t01704217145._3 | |
438 | + | let poolRewardUpdateHeight = $t01704217145._4 | |
439 | 439 | [IntegerEntry((pool + keyShareTokensLocked), 0), IntegerEntry((pool + keyLastInterest), 0), IntegerEntry((pool + keyLastInterestHeight), height)] | |
440 | 440 | } | |
441 | 441 | ||
442 | 442 | ||
443 | 443 | ||
444 | 444 | @Callable(i) | |
445 | 445 | func updatePoolInterest (pool) = if ((i.caller != wallet)) | |
446 | 446 | then throw("Only the Admin itself can call this function") | |
447 | 447 | else if (!(isActive)) | |
448 | 448 | then throw("DApp is inactive at this moment") | |
449 | 449 | else { | |
450 | - | let $ | |
451 | - | let userNewInterest = $ | |
452 | - | let currentInterest = $ | |
453 | - | let claimAmount = $ | |
454 | - | let userShareTokensAmount = $ | |
455 | - | let $ | |
456 | - | let currentReward = $ | |
457 | - | let rewardUpdateHeight = $ | |
458 | - | let previousRewardPerBlock = $ | |
459 | - | let poolRewardUpdateHeight = $ | |
450 | + | let $t01755417674 = claimCalc(pool, adminIncreaseInterestAddress, 0) | |
451 | + | let userNewInterest = $t01755417674._1 | |
452 | + | let currentInterest = $t01755417674._2 | |
453 | + | let claimAmount = $t01755417674._3 | |
454 | + | let userShareTokensAmount = $t01755417674._4 | |
455 | + | let $t01767917782 = rewardInfo(pool) | |
456 | + | let currentReward = $t01767917782._1 | |
457 | + | let rewardUpdateHeight = $t01767917782._2 | |
458 | + | let previousRewardPerBlock = $t01767917782._3 | |
459 | + | let poolRewardUpdateHeight = $t01767917782._4 | |
460 | 460 | [IntegerEntry((pool + keyLastInterest), userNewInterest), IntegerEntry((pool + keyLastInterestHeight), height)] | |
461 | 461 | } | |
462 | 462 | ||
463 | 463 | ||
464 | 464 | ||
465 | 465 | @Callable(i) | |
466 | 466 | func lockShareTokens (pool) = { | |
467 | - | let $ | |
468 | - | let pmtAmount = $ | |
469 | - | let pmtAssetId = $ | |
470 | - | let $ | |
471 | - | let pmtStrAssetId = $ | |
472 | - | let pmtAssetName = $ | |
473 | - | let pmtDecimals = $ | |
474 | - | let $ | |
475 | - | let userNewInterest = $ | |
476 | - | let currentInterest = $ | |
477 | - | let claimAmount = $ | |
478 | - | let userShareTokensAmount = $ | |
467 | + | let $t01797418049 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
468 | + | let pmtAmount = $t01797418049._1 | |
469 | + | let pmtAssetId = $t01797418049._2 | |
470 | + | let $t01805418127 = getAssetInfo(pmtAssetId) | |
471 | + | let pmtStrAssetId = $t01805418127._1 | |
472 | + | let pmtAssetName = $t01805418127._2 | |
473 | + | let pmtDecimals = $t01805418127._3 | |
474 | + | let $t01813218240 = claimCalc(pool, i.caller, pmtAmount) | |
475 | + | let userNewInterest = $t01813218240._1 | |
476 | + | let currentInterest = $t01813218240._2 | |
477 | + | let claimAmount = $t01813218240._3 | |
478 | + | let userShareTokensAmount = $t01813218240._4 | |
479 | 479 | let userShareAmountNew = (userShareTokensAmount + pmtAmount) | |
480 | 480 | let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount) | |
481 | 481 | let totalShareAmount = getTotalShareTokenLocked(pool) | |
482 | 482 | let totalShareAmountNew = (totalShareAmount + pmtAmount) | |
483 | 483 | let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller) | |
484 | 484 | let userClaimedAmountNew = (userClaimedAmount + claimAmount) | |
485 | 485 | let baseEntry = [IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserShareTokensLocked), userShareAmountNew), IntegerEntry((pool + keyShareTokensLocked), totalShareAmountNew), IntegerEntry((pool + keyLastInterest), currentInterest), IntegerEntry((pool + keyLastInterestHeight), height), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPClaimedAmount), userClaimedAmountNew), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPLastClaimedAmount), claimAmount), IntegerEntry((((pool + "_") + toString(i.caller)) + keyAvailableSWOP), availableFundsNew)] | |
486 | 486 | let harvestPeriod = ((((getHeightFirstHarvest(Address(fromBase58String(pool))) - startHeight) + 1) / periodLength) - 1) | |
487 | 487 | let amountOfVoting = split(getStringValue(votingAddress, (((toString(i.caller) + "_") + pool) + "_user_pool_struc")), "_") | |
488 | 488 | let amountPoolStract = split(getStringValue(votingAddress, (pool + "_pool_struc")), "_") | |
489 | 489 | let amountActiveVoteUserPoolStract = split(valueOrElse(getString(votingAddress, (((toString(i.caller) + "_") + pool) + kHarvestUserPoolActiveVoteStrucVoting)), ""), "_") | |
490 | 490 | let amountPoolActiveVoteStract = split(valueOrElse(getString(votingAddress, (pool + kHarvestPoolActiveVoteStrucVoting)), ""), "_") | |
491 | 491 | let userShareTokenLocked = userShareTokensAmount | |
492 | 492 | let userPoolActiveVote = if ((toString(currPeriod) == amountOfVoting[2])) | |
493 | 493 | then valueOrElse(parseInt(amountActiveVoteUserPoolStract[0]), 0) | |
494 | 494 | else valueOrElse(parseInt(amountOfVoting[1]), 0) | |
495 | 495 | let poolActiveVote = if ((toString(currPeriod) == amountPoolStract[2])) | |
496 | 496 | then valueOrElse(parseInt(amountPoolActiveVoteStract[0]), 0) | |
497 | 497 | else valueOrElse(parseInt(amountPoolStract[1]), 0) | |
498 | 498 | let protocolReward = calculateProtocolReward(pool) | |
499 | 499 | let limitShareToken = getShareLimitToken(addressFromStringValue(pool)) | |
500 | 500 | let shareToken = (fraction(limitShareToken, userPoolActiveVote, poolActiveVote) - userShareTokenLocked) | |
501 | 501 | if ((fraction(99, (accountBalance(pmtAssetId) + pmtAmount), 100) > totalShareAmountNew)) | |
502 | 502 | then throw("Balance of share-token is greater than totalAmount") | |
503 | 503 | else throw("test error") | |
504 | 504 | } | |
505 | 505 | ||
506 | 506 | ||
507 | 507 | ||
508 | 508 | @Callable(i) | |
509 | 509 | func withdrawShareTokens (pool,shareTokensWithdrawAmount) = { | |
510 | 510 | let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
511 | - | let $ | |
512 | - | let userNewInterest = $ | |
513 | - | let currentInterest = $ | |
514 | - | let claimAmount = $ | |
515 | - | let userShareTokensAmount = $ | |
511 | + | let $t02123421334 = claimCalc(pool, i.caller, 1) | |
512 | + | let userNewInterest = $t02123421334._1 | |
513 | + | let currentInterest = $t02123421334._2 | |
514 | + | let claimAmount = $t02123421334._3 | |
515 | + | let userShareTokensAmount = $t02123421334._4 | |
516 | 516 | let userShareAmountNew = (userShareTokensAmount - shareTokensWithdrawAmount) | |
517 | 517 | let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount) | |
518 | 518 | let totalShareAmount = getTotalShareTokenLocked(pool) | |
519 | 519 | let totalShareAmountNew = (totalShareAmount - shareTokensWithdrawAmount) | |
520 | 520 | let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller) | |
521 | 521 | let userClaimedAmountNew = (userClaimedAmount + claimAmount) | |
522 | 522 | if ((shareTokensWithdrawAmount > userShareTokensAmount)) | |
523 | 523 | then throw("Withdraw amount more then user locked amount") | |
524 | 524 | else if (!(isActive)) | |
525 | 525 | then throw("DApp is inactive at this moment") | |
526 | 526 | else if ((shareTokensWithdrawAmount > userShareTokensAmount)) | |
527 | 527 | then throw("Withdraw amount more then user locked amount") | |
528 | 528 | else if ((fraction(99, (accountBalance(shareTokensId) - shareTokensWithdrawAmount), 100) > totalShareAmountNew)) | |
529 | 529 | then throw("Balance of share-token is greater than totalAmount") | |
530 | 530 | else [IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserShareTokensLocked), userShareAmountNew), IntegerEntry((pool + keyLastInterest), currentInterest), IntegerEntry((pool + keyLastInterestHeight), height), IntegerEntry((pool + keyShareTokensLocked), totalShareAmountNew), IntegerEntry((((pool + "_") + toString(i.caller)) + keyAvailableSWOP), availableFundsNew), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPClaimedAmount), userClaimedAmountNew), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPLastClaimedAmount), claimAmount), ScriptTransfer(i.caller, shareTokensWithdrawAmount, shareTokensId)] | |
531 | 531 | } | |
532 | 532 | ||
533 | 533 | ||
534 | 534 | ||
535 | 535 | @Callable(i) | |
536 | 536 | func claim (pool) = { | |
537 | 537 | let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
538 | 538 | let shareTokenLocked = getTotalShareTokenLocked(pool) | |
539 | - | let $ | |
540 | - | let lastInterestHeight = $ | |
541 | - | let lastInterest = $ | |
542 | - | let $ | |
543 | - | let currentRewardPerBlock = $ | |
544 | - | let rewardUpdateHeight = $ | |
545 | - | let previousRewardPerBlock = $ | |
546 | - | let poolRewardUpdateHeight = $ | |
547 | - | let $ | |
548 | - | let userNewInterest = $ | |
549 | - | let currentInterest = $ | |
550 | - | let claimAmount = $ | |
551 | - | let userShareTokensAmount = $ | |
539 | + | let $t02334123406 = getLastInterestInfo(pool) | |
540 | + | let lastInterestHeight = $t02334123406._1 | |
541 | + | let lastInterest = $t02334123406._2 | |
542 | + | let $t02341123523 = rewardInfo(pool) | |
543 | + | let currentRewardPerBlock = $t02341123523._1 | |
544 | + | let rewardUpdateHeight = $t02341123523._2 | |
545 | + | let previousRewardPerBlock = $t02341123523._3 | |
546 | + | let poolRewardUpdateHeight = $t02341123523._4 | |
547 | + | let $t02352823628 = claimCalc(pool, i.caller, 1) | |
548 | + | let userNewInterest = $t02352823628._1 | |
549 | + | let currentInterest = $t02352823628._2 | |
550 | + | let claimAmount = $t02352823628._3 | |
551 | + | let userShareTokensAmount = $t02352823628._4 | |
552 | 552 | let availableFund = (userAvailableSWOP(pool, i.caller) + claimAmount) | |
553 | 553 | let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller) | |
554 | 554 | let userClaimedAmountNew = (userClaimedAmount + claimAmount) | |
555 | 555 | if ((availableFund == 0)) | |
556 | 556 | then throw("You have 0 available SWOP") | |
557 | 557 | else if (!(isActive)) | |
558 | 558 | then throw("DApp is inactive at this moment") | |
559 | 559 | else if ((availableFund == 0)) | |
560 | 560 | then throw("You have 0 available SWOP") | |
561 | 561 | else if ((fraction(99, accountBalance(shareTokensId), 100) > shareTokenLocked)) | |
562 | 562 | then throw("Balance of share-token is greater than totalAmount") | |
563 | 563 | else [IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry((pool + keyLastInterest), currentInterest), IntegerEntry((pool + keyLastInterestHeight), height), IntegerEntry((((pool + "_") + toString(i.caller)) + keyAvailableSWOP), 0), Reissue(SWOP, availableFund, true), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPClaimedAmount), userClaimedAmountNew), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPLastClaimedAmount), claimAmount), ScriptTransfer(i.caller, availableFund, SWOP)] | |
564 | 564 | } | |
565 | 565 | ||
566 | 566 | ||
567 | 567 | ||
568 | 568 | @Callable(i) | |
569 | 569 | func shutdown () = if (!(isActive)) | |
570 | 570 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, keyCause), "the cause wasn't specified"))) | |
571 | 571 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
572 | 572 | then throw("Only admin can call this function") | |
573 | 573 | else suspend("Paused by admin") | |
574 | 574 | ||
575 | 575 | ||
576 | 576 | ||
577 | 577 | @Callable(i) | |
578 | 578 | func activate () = if (isActive) | |
579 | 579 | then throw("DApp is already active") | |
580 | 580 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
581 | 581 | then throw("Only admin can call this function") | |
582 | 582 | else [BooleanEntry(keyActive, true), DeleteEntry(keyCause)] | |
583 | 583 | ||
584 | 584 | ||
585 | 585 | @Verifier(tx) | |
586 | 586 | func verify () = match tx { | |
587 | 587 | case _ => | |
588 | 588 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
589 | 589 | then 1 | |
590 | 590 | else 0 | |
591 | 591 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
592 | 592 | then 1 | |
593 | 593 | else 0 | |
594 | 594 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
595 | 595 | then 1 | |
596 | 596 | else 0 | |
597 | 597 | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
598 | 598 | } | |
599 | 599 |
github/deemru/w8io/026f985 79.82 ms ◑