tx · BfriY1aHoJmeqHCRgQBssfrfdtn213LV8xynCtetdqmR 3MsjAKkxKjxVU4gC1BpJ1jKmAZyRufUCErC: -0.01400000 Waves 2021.04.28 10:09 [1501984] smart account 3MsjAKkxKjxVU4gC1BpJ1jKmAZyRufUCErC > SELF 0.00000000 Waves
{ "type": 13, "id": "BfriY1aHoJmeqHCRgQBssfrfdtn213LV8xynCtetdqmR", "fee": 1400000, "feeAssetId": null, "timestamp": 1619593758553, "version": 2, "chainId": 84, "sender": "3MsjAKkxKjxVU4gC1BpJ1jKmAZyRufUCErC", "senderPublicKey": "FQ5JNhUjFS3Ty3nSykXrGWHDt4NvXJDCv4JQiJ3dXmKa", "proofs": [ "5Wqh8VcagQUugbvyN2dirbXKRbRwcJnS7dL4sL2oubHsQop8zgErRdCiB6Z1uHZDh6AvjACnmZE5dfMgJtz7y7te" ], "script": "base64:AAIEAAAAAAAAACEIAhIDCgEIEgMKAQgSAwoBCBIDCgEIEgQKAggBEgMKAQgAAABKAAAAAAxhZG1pblB1YktleTEBAAAAILoJ1zuJWaTRXaD/8bsz0KrhOWkPy+K9kdY77k9eqOATAAAAAAxhZG1pblB1YktleTIBAAAAIMKRRJmz0rC0DSKlkVi9iLyhN7sIy//djOaU71sWDn5AAAAAAAxhZG1pblB1YktleTMBAAAAII4eFy54sQc79EhOejMoYHYod/yZ5ZIwoyDCz6ir6Q5VAAAAABRrZXlTaGFyZVRva2Vuc0xvY2tlZAIAAAAaX3RvdGFsX3NoYXJlX3Rva2Vuc19sb2NrZWQAAAAAHGtleVJld2FyZFBvb2xGcmFjdGlvbkN1cnJlbnQCAAAAHV9jdXJyZW50X3Bvb2xfZnJhY3Rpb25fcmV3YXJkAAAAAB1rZXlSZXdhcmRQb29sRnJhY3Rpb25QcmV2aW91cwIAAAAeX3ByZXZpb3VzX3Bvb2xfZnJhY3Rpb25fcmV3YXJkAAAAAB1rZXlUb3RhbFJld2FyZFBlckJsb2NrQ3VycmVudAIAAAAedG90YWxfcmV3Y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sAAAAAgUAAAAEcG9vbAIAAAABXwkABCUAAAABCAUAAAABaQAAAAZjYWxsZXIFAAAAEGtleUF2YWlsYWJsZVNXT1AAAAAAAAAAAAAJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIFAAAABHBvb2wCAAAAAV8JAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyBQAAABhrZXlVc2VyU1dPUENsYWltZWRBbW91bnQFAAAAFHVzZXJDbGFpbWVkQW1vdW50TmV3CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACBQAAAARwb29sAgAAAAFfCQAEJQAAAAEIBQAAAAFpAAAABmNhbGxlcgUAAAAca2V5VXNlclNXT1BMYXN0Q2xhaW1lZEFtb3VudAUAAAALY2xhaW1BbW91bnQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAA1hdmFpbGFibGVGdW5kBQAAAARTV09QBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXm8kK9N", "height": 1501984, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3Muxo8JT5srpriJ1V38zbBEXjBym6x5WHoU8JGrZfxfX Next: DxvhVLHzdYaUYCXvd5L28WacPAnaeqFHhA1C9TDcsZa Diff:
Old | New | Differences | |
---|---|---|---|
439 | 439 | let userClaimedAmountNew = (userClaimedAmount + claimAmount) | |
440 | 440 | if ((availableFund == 0)) | |
441 | 441 | then throw("You have 0 available SWOP") | |
442 | - | else [IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry((pool + keyLastInterest), currentInterest), IntegerEntry((pool + keyLastInterestHeight), height), IntegerEntry((((pool + "_") + toString(i.caller)) + keyAvailableSWOP), 0), | |
442 | + | else [IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry((pool + keyLastInterest), currentInterest), IntegerEntry((pool + keyLastInterestHeight), height), IntegerEntry((((pool + "_") + toString(i.caller)) + keyAvailableSWOP), 0), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPClaimedAmount), userClaimedAmountNew), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPLastClaimedAmount), claimAmount), ScriptTransfer(i.caller, availableFund, SWOP)] | |
443 | 443 | } | |
444 | 444 | ||
445 | 445 |
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 = "_current_pool_fraction_reward" | |
13 | 13 | ||
14 | 14 | let keyRewardPoolFractionPrevious = "_previous_pool_fraction_reward" | |
15 | 15 | ||
16 | 16 | let keyTotalRewardPerBlockCurrent = "total_reward_per_block_current" | |
17 | 17 | ||
18 | 18 | let keyTotalRewardPerBlockPrevious = "total_reward_per_block_previous" | |
19 | 19 | ||
20 | 20 | let keyRewardUpdateHeight = "reward_update_height" | |
21 | 21 | ||
22 | 22 | let keyLastInterest = "_last_interest" | |
23 | 23 | ||
24 | 24 | let keyLastInterestHeight = "_last_interest_height" | |
25 | 25 | ||
26 | 26 | let keyUserShareTokensLocked = "_share_tokens_locked" | |
27 | 27 | ||
28 | 28 | let keyUserLastInterest = "_last_interest" | |
29 | 29 | ||
30 | 30 | let keySWOPid = "SWOP_id" | |
31 | 31 | ||
32 | 32 | let keyUserSWOPClaimedAmount = "_SWOP_claimed_amount" | |
33 | 33 | ||
34 | 34 | let keyUserSWOPLastClaimedAmount = "_SWOP_last_claimed_amount" | |
35 | 35 | ||
36 | 36 | let keyAvailableSWOP = "_available_SWOP" | |
37 | 37 | ||
38 | 38 | let keyFarmingStartHeight = "farming_start_height" | |
39 | 39 | ||
40 | 40 | let keyAPY = "apy" | |
41 | 41 | ||
42 | 42 | let kPreviousTotalVoteSWOP = "previous_total_vote_SWOP" | |
43 | 43 | ||
44 | 44 | let keySwopYearEmission = "swop_year_emission" | |
45 | 45 | ||
46 | 46 | let keyBalancecpmmA = "A_asset_balance" | |
47 | 47 | ||
48 | 48 | let keyBalancecpmmB = "B_asset_balance" | |
49 | 49 | ||
50 | 50 | let keyAssetIdA = "A_asset_id" | |
51 | 51 | ||
52 | 52 | let keyAssetIdB = "B_asset_id" | |
53 | 53 | ||
54 | 54 | let keyFirstHarvestHeight = "first_harvest_height" | |
55 | 55 | ||
56 | 56 | let keyfirstHarvestCpmm = "first_harvest" | |
57 | 57 | ||
58 | 58 | let governanceAddress = Address(base58'3MzJZEn6jzxCPaHEfkrXd7FhbjTyVjdRPLS') | |
59 | 59 | ||
60 | 60 | let wallet = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4') | |
61 | 61 | ||
62 | 62 | let votingAddress = Address(base58'3N6CYoCsxrcXKe75pQvvV3JqJrwJjm1t4QN') | |
63 | 63 | ||
64 | 64 | let swopUsdnAddress = Address(base58'3N4kooq5242vPtJzBDrmukK6ptrjRRjEBWi') | |
65 | 65 | ||
66 | 66 | let wavesUsdnAddress = Address(base58'3MxtJmAsKsfof4X28MJPBtvRUyz1PbCnbhF') | |
67 | 67 | ||
68 | 68 | let adminIncreaseInterestAddress = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4') | |
69 | 69 | ||
70 | 70 | let oneWeekInBlock = 10106 | |
71 | 71 | ||
72 | 72 | let totalVoteShare = 10000000000 | |
73 | 73 | ||
74 | 74 | let scaleValue6 = 1000000 | |
75 | 75 | ||
76 | 76 | let scaleValue8 = 100000000 | |
77 | 77 | ||
78 | 78 | func strAssetIdA (pool) = getStringValue(pool, keyAssetIdA) | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func strAssetIdB (pool) = getStringValue(pool, keyAssetIdB) | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func assetIdA (pool) = if ((strAssetIdA(pool) == "WAVES")) | |
85 | 85 | then unit | |
86 | 86 | else fromBase58String(strAssetIdA(pool)) | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func assetIdB (pool) = if ((strAssetIdB(pool) == "WAVES")) | |
90 | 90 | then unit | |
91 | 91 | else fromBase58String(strAssetIdB(pool)) | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | let kBasePeriod = "base_period" | |
95 | 95 | ||
96 | 96 | let kPeriodLength = "period_length" | |
97 | 97 | ||
98 | 98 | let kStartHeight = "start_height" | |
99 | 99 | ||
100 | 100 | let kFirstHarvestHeight = "first_harvest_height" | |
101 | 101 | ||
102 | 102 | let kDurationFullVotePower = "duration_full_vote_power" | |
103 | 103 | ||
104 | 104 | let kMinVotePower = "min_vote_power" | |
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 durationFullVotePower = valueOrErrorMessage(getInteger(votingAddress, kDurationFullVotePower), "Empty kDurationFullVotePower") | |
113 | 113 | ||
114 | 114 | let minVotePower = valueOrErrorMessage(getInteger(votingAddress, kMinVotePower), "Empty kMinVotePower") | |
115 | 115 | ||
116 | 116 | let currPeriod = (basePeriod + ((height - startHeight) / periodLength)) | |
117 | 117 | ||
118 | 118 | let APY = getIntegerValue(this, keyAPY) | |
119 | 119 | ||
120 | 120 | let SwopYearEmission = getIntegerValue(this, keySwopYearEmission) | |
121 | 121 | ||
122 | 122 | func assetNameA (pool) = match assetIdA(pool) { | |
123 | 123 | case id: ByteVector => | |
124 | 124 | value(assetInfo(id)).name | |
125 | 125 | case waves: Unit => | |
126 | 126 | "WAVES" | |
127 | 127 | case _ => | |
128 | 128 | throw("Match error") | |
129 | 129 | } | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | func assetNameB (pool) = match assetIdB(pool) { | |
133 | 133 | case id: ByteVector => | |
134 | 134 | value(assetInfo(id)).name | |
135 | 135 | case waves: Unit => | |
136 | 136 | "WAVES" | |
137 | 137 | case _ => | |
138 | 138 | throw("Match error") | |
139 | 139 | } | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | let SWOP = fromBase58String(getStringValue(this, keySWOPid)) | |
143 | 143 | ||
144 | 144 | func isFirstHarvest (pool) = valueOrElse(getBoolean(pool, keyfirstHarvestCpmm), false) | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func getHeightFirstHarvest (pool) = valueOrElse(getInteger(pool, keyFirstHarvestHeight), 0) | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func getBalanceA (pool) = valueOrErrorMessage(getInteger(pool, keyBalancecpmmA), ("No data on the key: " + keyBalancecpmmA)) | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func getBalanceB (pool) = valueOrErrorMessage(getInteger(pool, keyBalancecpmmB), ("No data on the key: " + keyBalancecpmmB)) | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | func getTotalShareTokenLocked (pool) = valueOrErrorMessage(getInteger(this, (pool + keyShareTokensLocked)), (("No data on the key: " + pool) + keyShareTokensLocked)) | |
157 | 157 | ||
158 | 158 | ||
159 | 159 | func getShareAssetId (pool) = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func calcScaleValue (assetId1,assetId2) = { | |
163 | 163 | let assetId1Decimals = value(assetInfo(assetId1)).decimals | |
164 | 164 | let assetId2Decimals = value(assetInfo(assetId2)).decimals | |
165 | 165 | let scaleDigits = ((assetId2Decimals - assetId1Decimals) + 8) | |
166 | 166 | pow(10, 0, scaleDigits, 0, 0, HALFDOWN) | |
167 | 167 | } | |
168 | 168 | ||
169 | 169 | ||
170 | 170 | func userAvailableSWOP (pool,user) = valueOrElse(getInteger(this, (((pool + "_") + toString(user)) + keyAvailableSWOP)), 0) | |
171 | 171 | ||
172 | 172 | ||
173 | 173 | func rewardInfo (pool) = { | |
174 | 174 | let totalRewardPerBlockCurrent = valueOrErrorMessage(getInteger(governanceAddress, keyTotalRewardPerBlockCurrent), ((("No data on the key: " + keyTotalRewardPerBlockCurrent) + " at address ") + toString(governanceAddress))) | |
175 | 175 | let totalRewardPerBlockPrevious = valueOrErrorMessage(getInteger(governanceAddress, keyTotalRewardPerBlockPrevious), ((("No data on the key: " + keyTotalRewardPerBlockPrevious) + " at address ") + toString(governanceAddress))) | |
176 | 176 | let rewardPoolFractionCurrent = valueOrErrorMessage(getInteger(governanceAddress, (pool + keyRewardPoolFractionCurrent)), (((("No data on the key: " + pool) + keyRewardPoolFractionCurrent) + " at address ") + toString(governanceAddress))) | |
177 | 177 | let rewardUpdateHeight = valueOrErrorMessage(getInteger(governanceAddress, keyRewardUpdateHeight), ((("No data on the key: " + keyRewardUpdateHeight) + " at address ") + toString(governanceAddress))) | |
178 | 178 | let rewardPoolFractionPrevious = valueOrErrorMessage(getInteger(governanceAddress, (pool + keyRewardPoolFractionPrevious)), (((("No data on the key: " + pool) + keyRewardPoolFractionPrevious) + " at address ") + toString(governanceAddress))) | |
179 | 179 | let rewardPoolCurrent = fraction(totalRewardPerBlockCurrent, rewardPoolFractionCurrent, totalVoteShare) | |
180 | 180 | let rewardPoolPrevious = fraction(totalRewardPerBlockPrevious, rewardPoolFractionPrevious, totalVoteShare) | |
181 | 181 | if (if ((rewardPoolCurrent > totalRewardPerBlockCurrent)) | |
182 | 182 | then true | |
183 | 183 | else (rewardPoolPrevious > totalRewardPerBlockPrevious)) | |
184 | 184 | then throw("rewardPoolCurrent > totalRewardPerBlockCurrent or rewardPoolPrevious > totalRewardPerBlockPrevious") | |
185 | 185 | else $Tuple3(rewardPoolCurrent, rewardUpdateHeight, rewardPoolPrevious) | |
186 | 186 | } | |
187 | 187 | ||
188 | 188 | ||
189 | 189 | func getLastInterestInfo (pool) = { | |
190 | 190 | let lastInterest = valueOrErrorMessage(getInteger(this, (pool + keyLastInterest)), (("No data on the key: " + pool) + keyLastInterest)) | |
191 | 191 | let lastInterestHeight = valueOrElse(getInteger(this, (pool + keyLastInterestHeight)), height) | |
192 | 192 | $Tuple2(lastInterestHeight, lastInterest) | |
193 | 193 | } | |
194 | 194 | ||
195 | 195 | ||
196 | 196 | func getUserInterestInfo (pool,userAddress) = { | |
197 | 197 | let userLastInterest = getInteger(this, (((pool + "_") + toString(userAddress)) + keyUserLastInterest)) | |
198 | 198 | let userShare = getInteger(this, (((pool + "_") + toString(userAddress)) + keyUserShareTokensLocked)) | |
199 | 199 | let lastInterest = valueOrErrorMessage(getInteger(this, (pool + keyLastInterest)), (("No data on the key: " + pool) + keyLastInterest)) | |
200 | 200 | let userLastInterestValue = match userLastInterest { | |
201 | 201 | case userLastInterest: Int => | |
202 | 202 | userLastInterest | |
203 | 203 | case _ => | |
204 | 204 | lastInterest | |
205 | 205 | } | |
206 | 206 | let userShareTokensAmount = match userShare { | |
207 | 207 | case userShare: Int => | |
208 | 208 | userShare | |
209 | 209 | case _ => | |
210 | 210 | 0 | |
211 | 211 | } | |
212 | 212 | $Tuple2(userLastInterestValue, userShareTokensAmount) | |
213 | 213 | } | |
214 | 214 | ||
215 | 215 | ||
216 | 216 | func calcInterest (lastInterestHeight,rewardUpdateHeight,lastInterest,currentRewardPerBlock,shareTokenLocked,previousRewardPerBlock,shareAssetId,scaleValue,pmtAmount) = if ((shareTokenLocked == 0)) | |
217 | 217 | then 0 | |
218 | 218 | else if ((rewardUpdateHeight > height)) | |
219 | 219 | then { | |
220 | 220 | let reward = (previousRewardPerBlock * (height - lastInterestHeight)) | |
221 | 221 | (lastInterest + fraction(reward, scaleValue, shareTokenLocked)) | |
222 | 222 | } | |
223 | 223 | else if ((lastInterestHeight > rewardUpdateHeight)) | |
224 | 224 | then { | |
225 | 225 | let reward = (currentRewardPerBlock * (height - lastInterestHeight)) | |
226 | 226 | (lastInterest + fraction(reward, scaleValue, shareTokenLocked)) | |
227 | 227 | } | |
228 | 228 | else { | |
229 | 229 | let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight)) | |
230 | 230 | let interestAfterUpdate = (lastInterest + fraction(rewardAfterLastInterestBeforeReawardUpdate, scaleValue, shareTokenLocked)) | |
231 | 231 | let reward = (currentRewardPerBlock * (height - rewardUpdateHeight)) | |
232 | 232 | (interestAfterUpdate + fraction(reward, scaleValue, shareTokenLocked)) | |
233 | 233 | } | |
234 | 234 | ||
235 | 235 | ||
236 | 236 | func claimCalc (pool,caller,pmtAmount) = { | |
237 | 237 | let shareAssetId = getShareAssetId(pool) | |
238 | 238 | let scaleValue = calcScaleValue(SWOP, shareAssetId) | |
239 | 239 | let shareTokenLocked = getTotalShareTokenLocked(pool) | |
240 | 240 | let $t01012510190 = getLastInterestInfo(pool) | |
241 | 241 | let lastInterestHeight = $t01012510190._1 | |
242 | 242 | let lastInterest = $t01012510190._2 | |
243 | 243 | let $t01019510283 = rewardInfo(pool) | |
244 | 244 | let currentRewardPerBlock = $t01019510283._1 | |
245 | 245 | let rewardUpdateHeight = $t01019510283._2 | |
246 | 246 | let previousRewardPerBlock = $t01019510283._3 | |
247 | 247 | let $t01028810367 = getUserInterestInfo(pool, caller) | |
248 | 248 | let userLastInterest = $t01028810367._1 | |
249 | 249 | let userShareTokensAmount = $t01028810367._2 | |
250 | 250 | let currentInterest = calcInterest(lastInterestHeight, rewardUpdateHeight, lastInterest, currentRewardPerBlock, shareTokenLocked, previousRewardPerBlock, shareAssetId, scaleValue, pmtAmount) | |
251 | 251 | let claimAmount = fraction(userShareTokensAmount, (currentInterest - userLastInterest), scaleValue) | |
252 | 252 | let userNewInterest = currentInterest | |
253 | 253 | $Tuple4(userNewInterest, currentInterest, claimAmount, userShareTokensAmount) | |
254 | 254 | } | |
255 | 255 | ||
256 | 256 | ||
257 | 257 | func calculateProtocolReward (pool) = { | |
258 | 258 | let $t01084110906 = getLastInterestInfo(pool) | |
259 | 259 | let lastInterestHeight = $t01084110906._1 | |
260 | 260 | let lastInterest = $t01084110906._2 | |
261 | 261 | let $t01091211000 = rewardInfo(pool) | |
262 | 262 | let currentRewardPerBlock = $t01091211000._1 | |
263 | 263 | let rewardUpdateHeight = $t01091211000._2 | |
264 | 264 | let previousRewardPerBlock = $t01091211000._3 | |
265 | 265 | let shareTokenLocked = getTotalShareTokenLocked(pool) | |
266 | 266 | if ((shareTokenLocked == 0)) | |
267 | 267 | then 0 | |
268 | 268 | else if ((rewardUpdateHeight > height)) | |
269 | 269 | then { | |
270 | 270 | let reward = (previousRewardPerBlock * (height - lastInterestHeight)) | |
271 | 271 | reward | |
272 | 272 | } | |
273 | 273 | else if ((lastInterestHeight > rewardUpdateHeight)) | |
274 | 274 | then { | |
275 | 275 | let reward = (currentRewardPerBlock * (height - lastInterestHeight)) | |
276 | 276 | reward | |
277 | 277 | } | |
278 | 278 | else { | |
279 | 279 | let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight)) | |
280 | 280 | let reward = (currentRewardPerBlock * (height - rewardUpdateHeight)) | |
281 | 281 | (reward + rewardAfterLastInterestBeforeReawardUpdate) | |
282 | 282 | } | |
283 | 283 | } | |
284 | 284 | ||
285 | 285 | ||
286 | 286 | func checkPmtAssetIdCorrect (pool,pmtAssetId) = { | |
287 | 287 | let poolShareAssetId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
288 | 288 | if ((pmtAssetId == poolShareAssetId)) | |
289 | 289 | then true | |
290 | 290 | else false | |
291 | 291 | } | |
292 | 292 | ||
293 | 293 | ||
294 | 294 | func getUserSWOPClaimedAmount (pool,user) = valueOrElse(getInteger(this, (((pool + "_") + toString(user)) + keyUserSWOPClaimedAmount)), 0) | |
295 | 295 | ||
296 | 296 | ||
297 | 297 | @Callable(i) | |
298 | 298 | func init (earlyLP) = if (isDefined(getString(this, "keySWOPid"))) | |
299 | 299 | then throw("SWOP already initialized") | |
300 | 300 | else { | |
301 | 301 | let initAmount = 100000000000000 | |
302 | 302 | let SWOPissue = Issue("SWOP", "SWOP protocol token", initAmount, 8, true) | |
303 | 303 | let SWOPid = calculateAssetId(SWOPissue) | |
304 | 304 | [Issue("SWOP", "SWOP protocol token", initAmount, 8, true), StringEntry(keySWOPid, toBase58String(SWOPid))] | |
305 | 305 | } | |
306 | 306 | ||
307 | 307 | ||
308 | 308 | ||
309 | 309 | @Callable(i) | |
310 | 310 | func initPoolShareFarming (pool) = if ((i.caller != this)) | |
311 | 311 | then throw("Only the DApp itself can call this function") | |
312 | 312 | else { | |
313 | 313 | let $t01293513015 = rewardInfo(pool) | |
314 | 314 | let currentReward = $t01293513015._1 | |
315 | 315 | let rewardUpdateHeight = $t01293513015._2 | |
316 | 316 | let previousRewardPerBlock = $t01293513015._3 | |
317 | 317 | [IntegerEntry((pool + keyShareTokensLocked), 0), IntegerEntry((pool + keyLastInterest), 0), IntegerEntry((pool + keyLastInterestHeight), height)] | |
318 | 318 | } | |
319 | 319 | ||
320 | 320 | ||
321 | 321 | ||
322 | 322 | @Callable(i) | |
323 | 323 | func updatePoolInterest (pool) = if ((i.caller != wallet)) | |
324 | 324 | then throw("Only the Admin itself can call this function") | |
325 | 325 | else { | |
326 | 326 | let $t01336413484 = claimCalc(pool, adminIncreaseInterestAddress, 0) | |
327 | 327 | let userNewInterest = $t01336413484._1 | |
328 | 328 | let currentInterest = $t01336413484._2 | |
329 | 329 | let claimAmount = $t01336413484._3 | |
330 | 330 | let userShareTokensAmount = $t01336413484._4 | |
331 | 331 | [IntegerEntry((pool + keyLastInterest), userNewInterest)] | |
332 | 332 | } | |
333 | 333 | ||
334 | 334 | ||
335 | 335 | ||
336 | 336 | @Callable(i) | |
337 | 337 | func lockShareTokens (pool) = { | |
338 | 338 | let $t01361713692 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
339 | 339 | let pmtAmount = $t01361713692._1 | |
340 | 340 | let pmtAssetId = $t01361713692._2 | |
341 | 341 | let $t01369713805 = claimCalc(pool, i.caller, pmtAmount) | |
342 | 342 | let userNewInterest = $t01369713805._1 | |
343 | 343 | let currentInterest = $t01369713805._2 | |
344 | 344 | let claimAmount = $t01369713805._3 | |
345 | 345 | let userShareTokensAmount = $t01369713805._4 | |
346 | 346 | let userShareAmountNew = (userShareTokensAmount + pmtAmount) | |
347 | 347 | let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount) | |
348 | 348 | let totalShareAmount = getTotalShareTokenLocked(pool) | |
349 | 349 | let totalShareAmountNew = (totalShareAmount + pmtAmount) | |
350 | 350 | let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller) | |
351 | 351 | let userClaimedAmountNew = (userClaimedAmount + claimAmount) | |
352 | 352 | 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)] | |
353 | 353 | if (!(checkPmtAssetIdCorrect(pool, pmtAssetId))) | |
354 | 354 | then throw("Incorrect pmtAssetId") | |
355 | 355 | else if (if (isFirstHarvest(Address(fromBase58String(pool)))) | |
356 | 356 | then (height > (getHeightFirstHarvest(Address(fromBase58String(pool))) * periodLength)) | |
357 | 357 | else false) | |
358 | 358 | then { | |
359 | 359 | let amountOfVoting = split(getStringValue(votingAddress, (((toString(this) + "_") + pool) + "_user_pool_struc")), "_") | |
360 | 360 | let previosTotalVoting = split(getStringValue(votingAddress, kPreviousTotalVoteSWOP), "_") | |
361 | 361 | let assetbalanceswopusdnA = valueOrElse(getIntegerValue(swopUsdnAddress, keyBalancecpmmA), 0) | |
362 | 362 | let assetbalanceswopusdnB = valueOrElse(getIntegerValue(swopUsdnAddress, keyBalancecpmmB), 0) | |
363 | 363 | let assetbalancewavesusdnA = valueOrElse(getIntegerValue(wavesUsdnAddress, keyBalancecpmmA), 0) | |
364 | 364 | let assetbalancewavesusdnB = valueOrElse(getIntegerValue(wavesUsdnAddress, keyBalancecpmmB), 0) | |
365 | 365 | let totalPeriod = previosTotalVoting[1] | |
366 | 366 | let previosTotal = previosTotalVoting[0] | |
367 | 367 | let userShareTokenLocked = userShareTokensAmount | |
368 | 368 | let userSwopVote = if ((toString(currPeriod) == amountOfVoting[2])) | |
369 | 369 | then valueOrElse(parseInt(amountOfVoting[1]), 0) | |
370 | 370 | else valueOrElse(parseInt(amountOfVoting[0]), 0) | |
371 | 371 | let swopRate = ((assetbalanceswopusdnA / scaleValue8) / (assetbalanceswopusdnB / scaleValue6)) | |
372 | 372 | let votingTotal = if ((currPeriod == valueOrElse(parseInt(totalPeriod), -1))) | |
373 | 373 | then valueOrElse(parseInt(previosTotal), 0) | |
374 | 374 | else valueOrElse(parseInt(totalPeriod), 0) | |
375 | 375 | let harvestPower = ((SwopYearEmission / votingTotal) / APY) | |
376 | 376 | let protocolReward = calculateProtocolReward(pool) | |
377 | 377 | if ((parseInt(amountOfVoting[1]) != 0)) | |
378 | 378 | then { | |
379 | 379 | let assetBalanceB = getBalanceB(Address(fromBase58String(pool))) | |
380 | 380 | let shareTokenRate = if ((assetNameB(Address(fromBase58String(pool))) == "USDN")) | |
381 | 381 | then ((2 * assetBalanceB) / totalShareAmount) | |
382 | 382 | else if ((assetNameA(Address(fromBase58String(pool))) == "SWOP")) | |
383 | 383 | then (((2 * assetBalanceB) * ((assetbalanceswopusdnB / scaleValue8) / (assetbalanceswopusdnA / scaleValue6))) / totalShareAmount) | |
384 | 384 | else if ((assetNameA(Address(fromBase58String(pool))) == "WAVES")) | |
385 | 385 | then (((2 * assetBalanceB) * ((assetbalancewavesusdnB / scaleValue8) / (assetbalancewavesusdnA / scaleValue6))) / totalShareAmount) | |
386 | 386 | else 0 | |
387 | 387 | let shareToken = ((((userSwopVote * swopRate) * harvestPower) / shareTokenRate) - userShareTokenLocked) | |
388 | 388 | if ((shareToken > 0)) | |
389 | 389 | then if ((totalShareAmountNew >= shareToken)) | |
390 | 390 | then (baseEntry ++ [ScriptTransfer(wallet, protocolReward, SWOP)]) | |
391 | 391 | else throw(("You maximum share token is " + toString(shareToken))) | |
392 | 392 | else throw("You can't share token") | |
393 | 393 | } | |
394 | 394 | else throw("Your amount of token less than 0") | |
395 | 395 | } | |
396 | 396 | else baseEntry | |
397 | 397 | } | |
398 | 398 | ||
399 | 399 | ||
400 | 400 | ||
401 | 401 | @Callable(i) | |
402 | 402 | func withdrawShareTokens (pool,shareTokensWithdrawAmount) = { | |
403 | 403 | let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
404 | 404 | let $t01832118421 = claimCalc(pool, i.caller, 1) | |
405 | 405 | let userNewInterest = $t01832118421._1 | |
406 | 406 | let currentInterest = $t01832118421._2 | |
407 | 407 | let claimAmount = $t01832118421._3 | |
408 | 408 | let userShareTokensAmount = $t01832118421._4 | |
409 | 409 | let userShareAmountNew = (userShareTokensAmount - shareTokensWithdrawAmount) | |
410 | 410 | let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount) | |
411 | 411 | let totalShareAmount = getTotalShareTokenLocked(pool) | |
412 | 412 | let totalShareAmountNew = (totalShareAmount - shareTokensWithdrawAmount) | |
413 | 413 | let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller) | |
414 | 414 | let userClaimedAmountNew = (userClaimedAmount + claimAmount) | |
415 | 415 | if ((shareTokensWithdrawAmount > userShareTokensAmount)) | |
416 | 416 | then throw("Withdraw amount more then user locked amount") | |
417 | 417 | 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)] | |
418 | 418 | } | |
419 | 419 | ||
420 | 420 | ||
421 | 421 | ||
422 | 422 | @Callable(i) | |
423 | 423 | func claim (pool) = { | |
424 | 424 | let shareTokenLocked = getTotalShareTokenLocked(pool) | |
425 | 425 | let $t01991419979 = getLastInterestInfo(pool) | |
426 | 426 | let lastInterestHeight = $t01991419979._1 | |
427 | 427 | let lastInterest = $t01991419979._2 | |
428 | 428 | let $t01998420073 = rewardInfo(pool) | |
429 | 429 | let currentRewardPerBlock = $t01998420073._1 | |
430 | 430 | let rewardUpdateHeight = $t01998420073._2 | |
431 | 431 | let previousRewardPerBlock = $t01998420073._3 | |
432 | 432 | let $t02007820178 = claimCalc(pool, i.caller, 1) | |
433 | 433 | let userNewInterest = $t02007820178._1 | |
434 | 434 | let currentInterest = $t02007820178._2 | |
435 | 435 | let claimAmount = $t02007820178._3 | |
436 | 436 | let userShareTokensAmount = $t02007820178._4 | |
437 | 437 | let availableFund = (userAvailableSWOP(pool, i.caller) + claimAmount) | |
438 | 438 | let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller) | |
439 | 439 | let userClaimedAmountNew = (userClaimedAmount + claimAmount) | |
440 | 440 | if ((availableFund == 0)) | |
441 | 441 | then throw("You have 0 available SWOP") | |
442 | - | else [IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry((pool + keyLastInterest), currentInterest), IntegerEntry((pool + keyLastInterestHeight), height), IntegerEntry((((pool + "_") + toString(i.caller)) + keyAvailableSWOP), 0), | |
442 | + | else [IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry((pool + keyLastInterest), currentInterest), IntegerEntry((pool + keyLastInterestHeight), height), IntegerEntry((((pool + "_") + toString(i.caller)) + keyAvailableSWOP), 0), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPClaimedAmount), userClaimedAmountNew), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPLastClaimedAmount), claimAmount), ScriptTransfer(i.caller, availableFund, SWOP)] | |
443 | 443 | } | |
444 | 444 | ||
445 | 445 | ||
446 | 446 | @Verifier(tx) | |
447 | 447 | func verify () = match tx { | |
448 | 448 | case _ => | |
449 | 449 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
450 | 450 | } | |
451 | 451 |
github/deemru/w8io/026f985 52.02 ms ◑