tx · HbXLRV7N1AzeRxxZ2yH7TUvEYWm9q23k3t3SPyzsfxLV 3N7NyhNuAsjhx5uFqDqt4Y51hK4FBVi4MHn: -0.01400000 Waves 2021.03.08 01:09 [1427853] smart account 3N7NyhNuAsjhx5uFqDqt4Y51hK4FBVi4MHn > SELF 0.00000000 Waves
{ "type": 13, "id": "HbXLRV7N1AzeRxxZ2yH7TUvEYWm9q23k3t3SPyzsfxLV", "fee": 1400000, "feeAssetId": null, "timestamp": 1615155009985, "version": 1, "sender": "3N7NyhNuAsjhx5uFqDqt4Y51hK4FBVi4MHn", "senderPublicKey": "79j6PNv9aCQZpss88M5Y7J41MDsKbMrG2Lf69wQ6R6Rd", "proofs": [ "5GDQx6sYbbxBAQdz4KnkmodS3BZwBeqBGMt5MEojDxxjxjLtMXP5AH4rvi6jyfpeAHHaApzv3DVumAhxPYoUqkBG" ], "script": "base64:AAIEAAAAAAAAABwIAhIDCgEIEgMKAQgSAwoBCBIECgIIARIDCgEIAAAAIgAAAAAMYWRtaW5QdWJLZXkxAQAAACC6Cdc7iVmk0V2g//G7M9Cq4TlpD8vivZHWO+5PXqjgEwAAAAAMYWRtaW5QdWJLZXkyAQAAACDCkUSZs9KwtA0ipZFYvYi8oTe7CMv/3YzmlO9bFg5+QAAAAAAMYWRtaW5QdWJLZXkzAQAAACCOHhcueLEHO/RITnozKGB2KHf8meWSMKMgws+oq+kOVQAAAAAUa2V5U2hhcmVUb2tlbnNMb2NrZWQCAAAAGl90b3RhbF9zaGFyZV90b2tlbnNfbG9ja2VkAAAAABxrZXlSZXdhcmRQb29sRnJhY3Rpb25DdXJyZW50AgAAAB1fcG9vbF9mcmFjdGlvbl9yZXdhcmRfY3VycmVudAAAAAAda2V5UmV3YXJkUG9vbEZyYWN0aW9uUHJldmlvdXMCAAAAHl9wb29sX2ZyYWN0aW9uX3Jld2FyZF9wcmV2aW91cwAAAAAWa2V5VG90YWxSZXdhcmRQZXJCbG9jawIAAAAWdG90YWxfcmV3YXJkX3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VzdEhlaWdodAUAAAAGaGVpZ2h0CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACBQAAAARwb29sAgAAAAFfCQAEJQAAAAEIBQAAAAFpAAAABmNhbGxlcgUAAAAQa2V5QXZhaWxhYmxlU1dPUAAAAAAAAAAAAAkABEwAAAACCQEAAAAHUmVpc3N1ZQAAAAMFAAAABFNXT1AFAAAADWF2YWlsYWJsZUZ1bmQGCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACBQAAAARwb29sAgAAAAFfCQAEJQAAAAEIBQAAAAFpAAAABmNhbGxlcgUAAAAYa2V5VXNlclNXT1BDbGFpbWVkQW1vdW50BQAAABR1c2VyQ2xhaW1lZEFtb3VudE5ldwkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgUAAAAEcG9vbAIAAAABXwkABCUAAAABCAUAAAABaQAAAAZjYWxsZXIFAAAAHGtleVVzZXJTV09QTGFzdENsYWltZWRBbW91bnQFAAAAC2NsYWltQW1vdW50CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAANYXZhaWxhYmxlRnVuZAUAAAAEU1dPUAUAAAADbmlsAAAAAPRpI+Y=", "chainId": 84, "height": 1427853, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GR31h5royhWJ3Ussi4ZbJiKcCVVgbmJ6BWLiikqoGjr4 Next: AyqFReN9qX5mGqgp2xSdyBbjMQ8ZWmX9eNL5Zz2LRHNk Diff:
Old | New | Differences | |
---|---|---|---|
13 | 13 | ||
14 | 14 | let keyRewardPoolFractionPrevious = "_pool_fraction_reward_previous" | |
15 | 15 | ||
16 | - | let keyTotalRewardPerBlockCurrent = "total_reward_per_block_current" | |
17 | - | ||
18 | - | let keyTotalRewardPerBlockPrevious = "total_reward_per_block_previous" | |
16 | + | let keyTotalRewardPerBlock = "total_reward_per_block" | |
19 | 17 | ||
20 | 18 | let keyRewardUpdateHeight = "_reward_update_height" | |
21 | 19 | ||
67 | 65 | ||
68 | 66 | ||
69 | 67 | func rewardInfo (pool) = { | |
70 | - | let totalRewardPerBlockCurrent = valueOrErrorMessage(getInteger(votingAddress, keyTotalRewardPerBlockCurrent), ((("No data on the key: " + keyTotalRewardPerBlockCurrent) + " at address ") + toString(votingAddress))) | |
71 | - | let totalRewardPerBlockPrevious = valueOrErrorMessage(getInteger(votingAddress, keyTotalRewardPerBlockPrevious), ((("No data on the key: " + keyTotalRewardPerBlockPrevious) + " at address ") + toString(votingAddress))) | |
68 | + | let totalRewardPerBlock = valueOrErrorMessage(getInteger(votingAddress, keyTotalRewardPerBlock), ((("No data on the key: " + keyTotalRewardPerBlock) + " at address ") + toString(votingAddress))) | |
72 | 69 | let rewardPoolFractionCurrent = valueOrErrorMessage(getInteger(votingAddress, (pool + keyRewardPoolFractionCurrent)), (((("No data on the key: " + pool) + keyRewardPoolFractionCurrent) + " at address ") + toString(votingAddress))) | |
73 | 70 | let rewardUpdateHeight = valueOrErrorMessage(getInteger(votingAddress, (pool + keyRewardUpdateHeight)), (((("No data on the key: " + pool) + keyRewardUpdateHeight) + " at address ") + toString(votingAddress))) | |
74 | 71 | let rewardPoolFractionPrevious = valueOrErrorMessage(getInteger(votingAddress, (pool + keyRewardPoolFractionPrevious)), (((("No data on the key: " + pool) + keyRewardPoolFractionPrevious) + " at address ") + toString(votingAddress))) | |
75 | - | let rewardPoolCurrent = fraction( | |
76 | - | let rewardPoolPrevious = fraction( | |
77 | - | if (if ((rewardPoolCurrent > | |
72 | + | let rewardPoolCurrent = fraction(totalRewardPerBlock, rewardPoolFractionCurrent, totalVoteShare) | |
73 | + | let rewardPoolPrevious = fraction(totalRewardPerBlock, rewardPoolFractionPrevious, totalVoteShare) | |
74 | + | if (if ((rewardPoolCurrent > totalRewardPerBlock)) | |
78 | 75 | then true | |
79 | - | else (rewardPoolPrevious > | |
76 | + | else (rewardPoolPrevious > totalRewardPerBlock)) | |
80 | 77 | then throw("rewardPoolCurrent > totalRewardPerBlockCurrent or rewardPoolPrevious > totalRewardPerBlockPrevious") | |
81 | 78 | else $Tuple3(rewardPoolCurrent, rewardUpdateHeight, rewardPoolPrevious) | |
82 | 79 | } | |
133 | 130 | let shareAssetId = getShareAssetId(pool) | |
134 | 131 | let scaleValue = calcScaleValue(SWOP, shareAssetId) | |
135 | 132 | let shareTokenLocked = getTotalShareTokenLocked(pool) | |
136 | - | let $ | |
137 | - | let lastInterestHeight = $ | |
138 | - | let lastInterest = $ | |
139 | - | let $ | |
140 | - | let currentRewardPerBlock = $ | |
141 | - | let rewardUpdateHeight = $ | |
142 | - | let previousRewardPerBlock = $ | |
143 | - | let $ | |
144 | - | let userLastInterest = $ | |
145 | - | let userShareTokensAmount = $ | |
133 | + | let $t067766841 = getLastInterestInfo(pool) | |
134 | + | let lastInterestHeight = $t067766841._1 | |
135 | + | let lastInterest = $t067766841._2 | |
136 | + | let $t068466934 = rewardInfo(pool) | |
137 | + | let currentRewardPerBlock = $t068466934._1 | |
138 | + | let rewardUpdateHeight = $t068466934._2 | |
139 | + | let previousRewardPerBlock = $t068466934._3 | |
140 | + | let $t069397018 = getUserInterestInfo(pool, caller) | |
141 | + | let userLastInterest = $t069397018._1 | |
142 | + | let userShareTokensAmount = $t069397018._2 | |
146 | 143 | let currentInterest = calcInterest(lastInterestHeight, rewardUpdateHeight, lastInterest, currentRewardPerBlock, shareTokenLocked, previousRewardPerBlock, shareAssetId, scaleValue, pmtAmount) | |
147 | 144 | let claimAmount = fraction(userShareTokensAmount, (currentInterest - userLastInterest), scaleValue) | |
148 | 145 | let userNewInterest = currentInterest | |
175 | 172 | ||
176 | 173 | @Callable(i) | |
177 | 174 | func initPoolShareFarming (pool) = { | |
178 | - | let $ | |
179 | - | let currentReward = $ | |
180 | - | let rewardUpdateHeight = $ | |
181 | - | let previousRewardPerBlock = $ | |
175 | + | let $t085568636 = rewardInfo(pool) | |
176 | + | let currentReward = $t085568636._1 | |
177 | + | let rewardUpdateHeight = $t085568636._2 | |
178 | + | let previousRewardPerBlock = $t085568636._3 | |
182 | 179 | [IntegerEntry((pool + keyShareTokensLocked), 0), IntegerEntry((pool + keyLastInterest), 0), IntegerEntry((pool + keyRewardPoolFractionCurrent), currentReward), IntegerEntry((pool + keyRewardUpdateHeight), rewardUpdateHeight), IntegerEntry((pool + keyRewardPoolFractionPrevious), previousRewardPerBlock)] | |
183 | 180 | } | |
184 | 181 | ||
186 | 183 | ||
187 | 184 | @Callable(i) | |
188 | 185 | func lockShareTokens (pool) = { | |
189 | - | let $ | |
190 | - | let pmtAmount = $ | |
191 | - | let pmtAssetId = $ | |
186 | + | let $t090399114 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
187 | + | let pmtAmount = $t090399114._1 | |
188 | + | let pmtAssetId = $t090399114._2 | |
192 | 189 | if ((farmingStartHeight > height)) | |
193 | 190 | then if (!(checkPmtAssetIdCorrect(pool, pmtAssetId))) | |
194 | 191 | then throw("Incorrect pmtAssetId") | |
203 | 200 | else if (!(checkPmtAssetIdCorrect(pool, pmtAssetId))) | |
204 | 201 | then throw("Incorrect pmtAssetId") | |
205 | 202 | else { | |
206 | - | let $ | |
207 | - | let userNewInterest = $ | |
208 | - | let currentInterest = $ | |
209 | - | let claimAmount = $ | |
210 | - | let userShareTokensAmount = $ | |
203 | + | let $t01014110249 = claimCalc(pool, i.caller, pmtAmount) | |
204 | + | let userNewInterest = $t01014110249._1 | |
205 | + | let currentInterest = $t01014110249._2 | |
206 | + | let claimAmount = $t01014110249._3 | |
207 | + | let userShareTokensAmount = $t01014110249._4 | |
211 | 208 | let userShareAmountNew = (userShareTokensAmount + pmtAmount) | |
212 | 209 | let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount) | |
213 | 210 | let totalShareAmount = getTotalShareTokenLocked(pool) | |
237 | 234 | } | |
238 | 235 | } | |
239 | 236 | else { | |
240 | - | let $ | |
241 | - | let userNewInterest = $ | |
242 | - | let currentInterest = $ | |
243 | - | let claimAmount = $ | |
244 | - | let userShareTokensAmount = $ | |
237 | + | let $t01267512775 = claimCalc(pool, i.caller, 1) | |
238 | + | let userNewInterest = $t01267512775._1 | |
239 | + | let currentInterest = $t01267512775._2 | |
240 | + | let claimAmount = $t01267512775._3 | |
241 | + | let userShareTokensAmount = $t01267512775._4 | |
245 | 242 | if ((shareTokensWithdrawAmount > userShareTokensAmount)) | |
246 | 243 | then throw("Withdraw amount more then user locked amount") | |
247 | 244 | else { | |
263 | 260 | then throw((("This method will be active after " + toString(farmingStartHeight)) + " height")) | |
264 | 261 | else { | |
265 | 262 | let shareTokenLocked = getTotalShareTokenLocked(pool) | |
266 | - | let $ | |
267 | - | let lastInterestHeight = $ | |
268 | - | let lastInterest = $ | |
269 | - | let $ | |
270 | - | let currentRewardPerBlock = $ | |
271 | - | let rewardUpdateHeight = $ | |
272 | - | let previousRewardPerBlock = $ | |
273 | - | let $ | |
274 | - | let userNewInterest = $ | |
275 | - | let currentInterest = $ | |
276 | - | let claimAmount = $ | |
277 | - | let userShareTokensAmount = $ | |
263 | + | let $t01439914464 = getLastInterestInfo(pool) | |
264 | + | let lastInterestHeight = $t01439914464._1 | |
265 | + | let lastInterest = $t01439914464._2 | |
266 | + | let $t01446914558 = rewardInfo(pool) | |
267 | + | let currentRewardPerBlock = $t01446914558._1 | |
268 | + | let rewardUpdateHeight = $t01446914558._2 | |
269 | + | let previousRewardPerBlock = $t01446914558._3 | |
270 | + | let $t01456314663 = claimCalc(pool, i.caller, 1) | |
271 | + | let userNewInterest = $t01456314663._1 | |
272 | + | let currentInterest = $t01456314663._2 | |
273 | + | let claimAmount = $t01456314663._3 | |
274 | + | let userShareTokensAmount = $t01456314663._4 | |
278 | 275 | let availableFund = (userAvailableSWOP(pool, i.caller) + claimAmount) | |
279 | 276 | let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller) | |
280 | 277 | let userClaimedAmountNew = (userClaimedAmount + claimAmount) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let adminPubKey1 = base58'DXDY2itiEcYBtGkVLnkpHtDFyWQUkoLJz79uJ7ECbMrA' | |
5 | 5 | ||
6 | 6 | let adminPubKey2 = base58'E6Wa1SGoktYcjHjsKrvjMiqJY3SWmGKcD8Q5L8kxSPS7' | |
7 | 7 | ||
8 | 8 | let adminPubKey3 = base58'AZmWJtuy4GeVrMmJH4hfFBRApe1StvhJSk4jcbT6bArQ' | |
9 | 9 | ||
10 | 10 | let keyShareTokensLocked = "_total_share_tokens_locked" | |
11 | 11 | ||
12 | 12 | let keyRewardPoolFractionCurrent = "_pool_fraction_reward_current" | |
13 | 13 | ||
14 | 14 | let keyRewardPoolFractionPrevious = "_pool_fraction_reward_previous" | |
15 | 15 | ||
16 | - | let keyTotalRewardPerBlockCurrent = "total_reward_per_block_current" | |
17 | - | ||
18 | - | let keyTotalRewardPerBlockPrevious = "total_reward_per_block_previous" | |
16 | + | let keyTotalRewardPerBlock = "total_reward_per_block" | |
19 | 17 | ||
20 | 18 | let keyRewardUpdateHeight = "_reward_update_height" | |
21 | 19 | ||
22 | 20 | let keyLastInterest = "_last_interest" | |
23 | 21 | ||
24 | 22 | let keyLastInterestHeight = "_last_interest_height" | |
25 | 23 | ||
26 | 24 | let keyUserShareTokensLocked = "_share_tokens_locked" | |
27 | 25 | ||
28 | 26 | let keyUserLastInterest = "_last_interest" | |
29 | 27 | ||
30 | 28 | let keySWOPid = "SWOP_id" | |
31 | 29 | ||
32 | 30 | let keyUserSWOPClaimedAmount = "_SWOP_claimed_amount" | |
33 | 31 | ||
34 | 32 | let keyUserSWOPLastClaimedAmount = "_SWOP_last_claimed_amount" | |
35 | 33 | ||
36 | 34 | let keyAvailableSWOP = "_available_SWOP" | |
37 | 35 | ||
38 | 36 | let keyFarmingStartHeight = "farming_start_height" | |
39 | 37 | ||
40 | 38 | let votingAddress = Address(base58'3MqhxbxHEMtp2Rwy1gUb6cPSJHQepdap1Yp') | |
41 | 39 | ||
42 | 40 | let oneWeekInBlock = 10106 | |
43 | 41 | ||
44 | 42 | let totalVoteShare = 10000000000 | |
45 | 43 | ||
46 | 44 | let SWOP = fromBase58String(getStringValue(this, keySWOPid)) | |
47 | 45 | ||
48 | 46 | let farmingStartHeight = valueOrErrorMessage(getInteger(this, keyFarmingStartHeight), ("No data on the key: " + keyFarmingStartHeight)) | |
49 | 47 | ||
50 | 48 | let farmingPreStartHeight = (farmingStartHeight - oneWeekInBlock) | |
51 | 49 | ||
52 | 50 | func getTotalShareTokenLocked (pool) = valueOrErrorMessage(getInteger(this, (pool + keyShareTokensLocked)), (("No data on the key: " + pool) + keyShareTokensLocked)) | |
53 | 51 | ||
54 | 52 | ||
55 | 53 | func getShareAssetId (pool) = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
56 | 54 | ||
57 | 55 | ||
58 | 56 | func calcScaleValue (assetId1,assetId2) = { | |
59 | 57 | let assetId1Decimals = value(assetInfo(assetId1)).decimals | |
60 | 58 | let assetId2Decimals = value(assetInfo(assetId2)).decimals | |
61 | 59 | let scaleDigits = ((assetId2Decimals - assetId1Decimals) + 8) | |
62 | 60 | pow(10, 0, scaleDigits, 0, 0, HALFDOWN) | |
63 | 61 | } | |
64 | 62 | ||
65 | 63 | ||
66 | 64 | func userAvailableSWOP (pool,user) = valueOrElse(getInteger(this, (((pool + "_") + toString(user)) + keyAvailableSWOP)), 0) | |
67 | 65 | ||
68 | 66 | ||
69 | 67 | func rewardInfo (pool) = { | |
70 | - | let totalRewardPerBlockCurrent = valueOrErrorMessage(getInteger(votingAddress, keyTotalRewardPerBlockCurrent), ((("No data on the key: " + keyTotalRewardPerBlockCurrent) + " at address ") + toString(votingAddress))) | |
71 | - | let totalRewardPerBlockPrevious = valueOrErrorMessage(getInteger(votingAddress, keyTotalRewardPerBlockPrevious), ((("No data on the key: " + keyTotalRewardPerBlockPrevious) + " at address ") + toString(votingAddress))) | |
68 | + | let totalRewardPerBlock = valueOrErrorMessage(getInteger(votingAddress, keyTotalRewardPerBlock), ((("No data on the key: " + keyTotalRewardPerBlock) + " at address ") + toString(votingAddress))) | |
72 | 69 | let rewardPoolFractionCurrent = valueOrErrorMessage(getInteger(votingAddress, (pool + keyRewardPoolFractionCurrent)), (((("No data on the key: " + pool) + keyRewardPoolFractionCurrent) + " at address ") + toString(votingAddress))) | |
73 | 70 | let rewardUpdateHeight = valueOrErrorMessage(getInteger(votingAddress, (pool + keyRewardUpdateHeight)), (((("No data on the key: " + pool) + keyRewardUpdateHeight) + " at address ") + toString(votingAddress))) | |
74 | 71 | let rewardPoolFractionPrevious = valueOrErrorMessage(getInteger(votingAddress, (pool + keyRewardPoolFractionPrevious)), (((("No data on the key: " + pool) + keyRewardPoolFractionPrevious) + " at address ") + toString(votingAddress))) | |
75 | - | let rewardPoolCurrent = fraction( | |
76 | - | let rewardPoolPrevious = fraction( | |
77 | - | if (if ((rewardPoolCurrent > | |
72 | + | let rewardPoolCurrent = fraction(totalRewardPerBlock, rewardPoolFractionCurrent, totalVoteShare) | |
73 | + | let rewardPoolPrevious = fraction(totalRewardPerBlock, rewardPoolFractionPrevious, totalVoteShare) | |
74 | + | if (if ((rewardPoolCurrent > totalRewardPerBlock)) | |
78 | 75 | then true | |
79 | - | else (rewardPoolPrevious > | |
76 | + | else (rewardPoolPrevious > totalRewardPerBlock)) | |
80 | 77 | then throw("rewardPoolCurrent > totalRewardPerBlockCurrent or rewardPoolPrevious > totalRewardPerBlockPrevious") | |
81 | 78 | else $Tuple3(rewardPoolCurrent, rewardUpdateHeight, rewardPoolPrevious) | |
82 | 79 | } | |
83 | 80 | ||
84 | 81 | ||
85 | 82 | func getLastInterestInfo (pool) = { | |
86 | 83 | let lastInterest = valueOrErrorMessage(getInteger(this, (pool + keyLastInterest)), (("No data on the key: " + pool) + keyLastInterest)) | |
87 | 84 | let lastInterestHeight = valueOrElse(getInteger(this, (pool + keyLastInterestHeight)), farmingPreStartHeight) | |
88 | 85 | $Tuple2(lastInterestHeight, lastInterest) | |
89 | 86 | } | |
90 | 87 | ||
91 | 88 | ||
92 | 89 | func getUserInterestInfo (pool,userAddress) = { | |
93 | 90 | let userLastInterest = getInteger(this, (((pool + "_") + toString(userAddress)) + keyUserLastInterest)) | |
94 | 91 | let userShare = getInteger(this, (((pool + "_") + toString(userAddress)) + keyUserShareTokensLocked)) | |
95 | 92 | let lastInterest = valueOrErrorMessage(getInteger(this, (pool + keyLastInterest)), (("No data on the key: " + pool) + keyLastInterest)) | |
96 | 93 | let userLastInterestValue = match userLastInterest { | |
97 | 94 | case userLastInterest: Int => | |
98 | 95 | userLastInterest | |
99 | 96 | case _ => | |
100 | 97 | lastInterest | |
101 | 98 | } | |
102 | 99 | let userShareTokensAmount = match userShare { | |
103 | 100 | case userShare: Int => | |
104 | 101 | userShare | |
105 | 102 | case _ => | |
106 | 103 | 0 | |
107 | 104 | } | |
108 | 105 | $Tuple2(userLastInterestValue, userShareTokensAmount) | |
109 | 106 | } | |
110 | 107 | ||
111 | 108 | ||
112 | 109 | func calcInterest (lastInterestHeight,rewardUpdateHeight,lastInterest,currentRewardPerBlock,shareTokenLocked,previousRewardPerBlock,shareAssetId,scaleValue,pmtAmount) = if ((shareTokenLocked == 0)) | |
113 | 110 | then 0 | |
114 | 111 | else if ((rewardUpdateHeight > height)) | |
115 | 112 | then { | |
116 | 113 | let reward = (previousRewardPerBlock * (height - lastInterestHeight)) | |
117 | 114 | (lastInterest + fraction(reward, scaleValue, shareTokenLocked)) | |
118 | 115 | } | |
119 | 116 | else if ((lastInterestHeight > rewardUpdateHeight)) | |
120 | 117 | then { | |
121 | 118 | let reward = (currentRewardPerBlock * (height - lastInterestHeight)) | |
122 | 119 | (lastInterest + fraction(reward, scaleValue, shareTokenLocked)) | |
123 | 120 | } | |
124 | 121 | else { | |
125 | 122 | let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight)) | |
126 | 123 | let interestAfterUpdate = (lastInterest + fraction(rewardAfterLastInterestBeforeReawardUpdate, scaleValue, shareTokenLocked)) | |
127 | 124 | let reward = (currentRewardPerBlock * (height - rewardUpdateHeight)) | |
128 | 125 | (interestAfterUpdate + fraction(reward, scaleValue, shareTokenLocked)) | |
129 | 126 | } | |
130 | 127 | ||
131 | 128 | ||
132 | 129 | func claimCalc (pool,caller,pmtAmount) = { | |
133 | 130 | let shareAssetId = getShareAssetId(pool) | |
134 | 131 | let scaleValue = calcScaleValue(SWOP, shareAssetId) | |
135 | 132 | let shareTokenLocked = getTotalShareTokenLocked(pool) | |
136 | - | let $ | |
137 | - | let lastInterestHeight = $ | |
138 | - | let lastInterest = $ | |
139 | - | let $ | |
140 | - | let currentRewardPerBlock = $ | |
141 | - | let rewardUpdateHeight = $ | |
142 | - | let previousRewardPerBlock = $ | |
143 | - | let $ | |
144 | - | let userLastInterest = $ | |
145 | - | let userShareTokensAmount = $ | |
133 | + | let $t067766841 = getLastInterestInfo(pool) | |
134 | + | let lastInterestHeight = $t067766841._1 | |
135 | + | let lastInterest = $t067766841._2 | |
136 | + | let $t068466934 = rewardInfo(pool) | |
137 | + | let currentRewardPerBlock = $t068466934._1 | |
138 | + | let rewardUpdateHeight = $t068466934._2 | |
139 | + | let previousRewardPerBlock = $t068466934._3 | |
140 | + | let $t069397018 = getUserInterestInfo(pool, caller) | |
141 | + | let userLastInterest = $t069397018._1 | |
142 | + | let userShareTokensAmount = $t069397018._2 | |
146 | 143 | let currentInterest = calcInterest(lastInterestHeight, rewardUpdateHeight, lastInterest, currentRewardPerBlock, shareTokenLocked, previousRewardPerBlock, shareAssetId, scaleValue, pmtAmount) | |
147 | 144 | let claimAmount = fraction(userShareTokensAmount, (currentInterest - userLastInterest), scaleValue) | |
148 | 145 | let userNewInterest = currentInterest | |
149 | 146 | $Tuple4(userNewInterest, currentInterest, claimAmount, userShareTokensAmount) | |
150 | 147 | } | |
151 | 148 | ||
152 | 149 | ||
153 | 150 | func checkPmtAssetIdCorrect (pool,pmtAssetId) = { | |
154 | 151 | let poolShareAssetId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
155 | 152 | if ((pmtAssetId == poolShareAssetId)) | |
156 | 153 | then true | |
157 | 154 | else false | |
158 | 155 | } | |
159 | 156 | ||
160 | 157 | ||
161 | 158 | func getUserSWOPClaimedAmount (pool,user) = valueOrElse(getInteger(this, (((pool + "_") + toString(user)) + keyUserSWOPClaimedAmount)), 0) | |
162 | 159 | ||
163 | 160 | ||
164 | 161 | @Callable(i) | |
165 | 162 | func init (earlyLP) = if (isDefined(getString(this, "keySWOPid"))) | |
166 | 163 | then throw("SWOP already initialized") | |
167 | 164 | else { | |
168 | 165 | let initAmount = 100000000000000 | |
169 | 166 | let SWOPissue = Issue("SWOP", "SWOP protocol token", initAmount, 8, true) | |
170 | 167 | let SWOPid = calculateAssetId(SWOPissue) | |
171 | 168 | nil | |
172 | 169 | } | |
173 | 170 | ||
174 | 171 | ||
175 | 172 | ||
176 | 173 | @Callable(i) | |
177 | 174 | func initPoolShareFarming (pool) = { | |
178 | - | let $ | |
179 | - | let currentReward = $ | |
180 | - | let rewardUpdateHeight = $ | |
181 | - | let previousRewardPerBlock = $ | |
175 | + | let $t085568636 = rewardInfo(pool) | |
176 | + | let currentReward = $t085568636._1 | |
177 | + | let rewardUpdateHeight = $t085568636._2 | |
178 | + | let previousRewardPerBlock = $t085568636._3 | |
182 | 179 | [IntegerEntry((pool + keyShareTokensLocked), 0), IntegerEntry((pool + keyLastInterest), 0), IntegerEntry((pool + keyRewardPoolFractionCurrent), currentReward), IntegerEntry((pool + keyRewardUpdateHeight), rewardUpdateHeight), IntegerEntry((pool + keyRewardPoolFractionPrevious), previousRewardPerBlock)] | |
183 | 180 | } | |
184 | 181 | ||
185 | 182 | ||
186 | 183 | ||
187 | 184 | @Callable(i) | |
188 | 185 | func lockShareTokens (pool) = { | |
189 | - | let $ | |
190 | - | let pmtAmount = $ | |
191 | - | let pmtAssetId = $ | |
186 | + | let $t090399114 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
187 | + | let pmtAmount = $t090399114._1 | |
188 | + | let pmtAssetId = $t090399114._2 | |
192 | 189 | if ((farmingStartHeight > height)) | |
193 | 190 | then if (!(checkPmtAssetIdCorrect(pool, pmtAssetId))) | |
194 | 191 | then throw("Incorrect pmtAssetId") | |
195 | 192 | else { | |
196 | 193 | let userShareTokensAmount = valueOrElse(getInteger(this, (((pool + "_") + toString(i.caller)) + keyUserShareTokensLocked)), 0) | |
197 | 194 | let userNewInterest = 0 | |
198 | 195 | let userShareAmountNew = (userShareTokensAmount + pmtAmount) | |
199 | 196 | let totalShareAmount = getTotalShareTokenLocked(pool) | |
200 | 197 | let totalShareAmountNew = (totalShareAmount + pmtAmount) | |
201 | 198 | [IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserShareTokensLocked), userShareAmountNew), IntegerEntry((pool + keyLastInterest), 0), IntegerEntry((pool + keyShareTokensLocked), totalShareAmountNew), IntegerEntry((((pool + "_") + toString(i.caller)) + keyAvailableSWOP), 0)] | |
202 | 199 | } | |
203 | 200 | else if (!(checkPmtAssetIdCorrect(pool, pmtAssetId))) | |
204 | 201 | then throw("Incorrect pmtAssetId") | |
205 | 202 | else { | |
206 | - | let $ | |
207 | - | let userNewInterest = $ | |
208 | - | let currentInterest = $ | |
209 | - | let claimAmount = $ | |
210 | - | let userShareTokensAmount = $ | |
203 | + | let $t01014110249 = claimCalc(pool, i.caller, pmtAmount) | |
204 | + | let userNewInterest = $t01014110249._1 | |
205 | + | let currentInterest = $t01014110249._2 | |
206 | + | let claimAmount = $t01014110249._3 | |
207 | + | let userShareTokensAmount = $t01014110249._4 | |
211 | 208 | let userShareAmountNew = (userShareTokensAmount + pmtAmount) | |
212 | 209 | let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount) | |
213 | 210 | let totalShareAmount = getTotalShareTokenLocked(pool) | |
214 | 211 | let totalShareAmountNew = (totalShareAmount + pmtAmount) | |
215 | 212 | let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller) | |
216 | 213 | let userClaimedAmountNew = (userClaimedAmount + claimAmount) | |
217 | 214 | [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)) + keyUserSWOPClaimedAmount), userClaimedAmountNew), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPLastClaimedAmount), claimAmount), IntegerEntry((((pool + "_") + toString(i.caller)) + keyAvailableSWOP), availableFundsNew)] | |
218 | 215 | } | |
219 | 216 | } | |
220 | 217 | ||
221 | 218 | ||
222 | 219 | ||
223 | 220 | @Callable(i) | |
224 | 221 | func withdrawShareTokens (pool,shareTokensWithdrawAmount) = { | |
225 | 222 | let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
226 | 223 | if ((farmingStartHeight > height)) | |
227 | 224 | then { | |
228 | 225 | let userShareTokensAmount = valueOrElse(getInteger(this, (((pool + "_") + toString(i.caller)) + keyUserShareTokensLocked)), 0) | |
229 | 226 | if ((shareTokensWithdrawAmount > userShareTokensAmount)) | |
230 | 227 | then throw("Withdraw amount more then user locked amount") | |
231 | 228 | else { | |
232 | 229 | let userNewInterest = 0 | |
233 | 230 | let userShareAmountNew = (userShareTokensAmount - shareTokensWithdrawAmount) | |
234 | 231 | let totalShareAmount = getTotalShareTokenLocked(pool) | |
235 | 232 | let totalShareAmountNew = (totalShareAmount - shareTokensWithdrawAmount) | |
236 | 233 | [IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserShareTokensLocked), userShareAmountNew), IntegerEntry((pool + keyLastInterest), 0), IntegerEntry((pool + keyShareTokensLocked), totalShareAmountNew), IntegerEntry((((pool + "_") + toString(i.caller)) + keyAvailableSWOP), 0), ScriptTransfer(i.caller, shareTokensWithdrawAmount, shareTokensId)] | |
237 | 234 | } | |
238 | 235 | } | |
239 | 236 | else { | |
240 | - | let $ | |
241 | - | let userNewInterest = $ | |
242 | - | let currentInterest = $ | |
243 | - | let claimAmount = $ | |
244 | - | let userShareTokensAmount = $ | |
237 | + | let $t01267512775 = claimCalc(pool, i.caller, 1) | |
238 | + | let userNewInterest = $t01267512775._1 | |
239 | + | let currentInterest = $t01267512775._2 | |
240 | + | let claimAmount = $t01267512775._3 | |
241 | + | let userShareTokensAmount = $t01267512775._4 | |
245 | 242 | if ((shareTokensWithdrawAmount > userShareTokensAmount)) | |
246 | 243 | then throw("Withdraw amount more then user locked amount") | |
247 | 244 | else { | |
248 | 245 | let userShareAmountNew = (userShareTokensAmount - shareTokensWithdrawAmount) | |
249 | 246 | let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount) | |
250 | 247 | let totalShareAmount = getTotalShareTokenLocked(pool) | |
251 | 248 | let totalShareAmountNew = (totalShareAmount - shareTokensWithdrawAmount) | |
252 | 249 | let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller) | |
253 | 250 | let userClaimedAmountNew = (userClaimedAmount + claimAmount) | |
254 | 251 | [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)] | |
255 | 252 | } | |
256 | 253 | } | |
257 | 254 | } | |
258 | 255 | ||
259 | 256 | ||
260 | 257 | ||
261 | 258 | @Callable(i) | |
262 | 259 | func claim (pool) = if ((farmingStartHeight > height)) | |
263 | 260 | then throw((("This method will be active after " + toString(farmingStartHeight)) + " height")) | |
264 | 261 | else { | |
265 | 262 | let shareTokenLocked = getTotalShareTokenLocked(pool) | |
266 | - | let $ | |
267 | - | let lastInterestHeight = $ | |
268 | - | let lastInterest = $ | |
269 | - | let $ | |
270 | - | let currentRewardPerBlock = $ | |
271 | - | let rewardUpdateHeight = $ | |
272 | - | let previousRewardPerBlock = $ | |
273 | - | let $ | |
274 | - | let userNewInterest = $ | |
275 | - | let currentInterest = $ | |
276 | - | let claimAmount = $ | |
277 | - | let userShareTokensAmount = $ | |
263 | + | let $t01439914464 = getLastInterestInfo(pool) | |
264 | + | let lastInterestHeight = $t01439914464._1 | |
265 | + | let lastInterest = $t01439914464._2 | |
266 | + | let $t01446914558 = rewardInfo(pool) | |
267 | + | let currentRewardPerBlock = $t01446914558._1 | |
268 | + | let rewardUpdateHeight = $t01446914558._2 | |
269 | + | let previousRewardPerBlock = $t01446914558._3 | |
270 | + | let $t01456314663 = claimCalc(pool, i.caller, 1) | |
271 | + | let userNewInterest = $t01456314663._1 | |
272 | + | let currentInterest = $t01456314663._2 | |
273 | + | let claimAmount = $t01456314663._3 | |
274 | + | let userShareTokensAmount = $t01456314663._4 | |
278 | 275 | let availableFund = (userAvailableSWOP(pool, i.caller) + claimAmount) | |
279 | 276 | let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller) | |
280 | 277 | let userClaimedAmountNew = (userClaimedAmount + claimAmount) | |
281 | 278 | if ((availableFund == 0)) | |
282 | 279 | then throw("You have 0 available SWOP") | |
283 | 280 | 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)] | |
284 | 281 | } | |
285 | 282 | ||
286 | 283 |
github/deemru/w8io/169f3d6 64.49 ms ◑