tx · 5odr5RojVKeg8AHVpJRZCS8WYLbtNsDPyu3wXUx6D1KS 3MsXpzisJAwnzUr7XrEoW1BZo4U6rw4tsYK: -0.04000000 Waves 2023.02.13 10:10 [2447513] smart account 3MsXpzisJAwnzUr7XrEoW1BZo4U6rw4tsYK > SELF 0.00000000 Waves
{ "type": 13, "id": "5odr5RojVKeg8AHVpJRZCS8WYLbtNsDPyu3wXUx6D1KS", "fee": 4000000, "feeAssetId": null, "timestamp": 1676272232068, "version": 2, "chainId": 84, "sender": "3MsXpzisJAwnzUr7XrEoW1BZo4U6rw4tsYK", "senderPublicKey": "FFdBua5rzzMkZebvsvmN7sAdU7XhFK8QNJ3hiwwxAYRA", "proofs": [ "FTgREK2BjXv6jkqRuiHfGBg8Z8ErShN9TLesvXFoCw2eUq8jYKbsxm68r19h9STPp4CXaQXeDyhcFQm2egHJWWX", "UL2KtH1wdrmhTKWKgbMRrLueHfm5y2e1yNhiHBH7QQ87yLYw8mzw2FWYh6Pw3uXKSdCpxtAsDQ7tVvEJ19BpJvr" ], "script": "base64:BgJiCAISAwoBCBIDCgEIEgMKAQgSBAoCCAESBQoDAggBEgUKAwgBARIECgIICBIECgIICBIECgIIARIFCgMCCAESAwoBCBIECgIIAhIDCgEIEgMKARgSAwoBGBIECgIICBIAEgBgAAdrQWN0aXZlAgZhY3RpdmUAC2tBY3RpdmVHbG9iAhRhY3RpdmVfYWxsX2NvbnRyYWN0cwAPa0RlcHJlY2F0ZWRQb29sAgtkZXByZWNhdGVkXwAGa0NhdXNlAg5zaHV0ZG93bl9jYXVzZQAaa1Jld2FyZFBvb2xGcmFjdGlvbkN1cnJlbnQCHV9jdXJyZW50X3Bvb2xfZnJhY3Rpb25fcmV3YXJkABtrUmV3YXJkUG9vbEZyYWN0aW9uUHJldmlvdXMCHl9wcmV2aW91c19wb29sX2ZyYWN0aW9uX3Jld2FyZAATa0hlaWdodFBvb2xGcmFjdGlvbgIaX3Bvb2xfcmV3YXJkX3VwZGF0ZV9oZW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1 Next: FWJjgiAjvvtGkdEDbmrUP5wimscknmXfxyokNbg2U7S7 Diff:
Old | New | Differences | |
---|---|---|---|
14 | 14 | let kRewardPoolFractionPrevious = "_previous_pool_fraction_reward" | |
15 | 15 | ||
16 | 16 | let kHeightPoolFraction = "_pool_reward_update_height" | |
17 | - | ||
18 | - | let kTotalRewardPerBlockCurrent = "total_reward_per_block_current" | |
19 | - | ||
20 | - | let kTotalRewardPerBlockPrevious = "total_reward_per_block_previous" | |
21 | 17 | ||
22 | 18 | let kRewardUpdateHeight = "reward_update_height" | |
23 | 19 | ||
54 | 50 | let kSWOPid = "SWOP_id" | |
55 | 51 | ||
56 | 52 | let kAvailableSWOP = "_available_SWOP" | |
57 | - | ||
58 | - | let kSwopYearEmission = "swop_year_emission" | |
59 | 53 | ||
60 | 54 | let kHarvestPoolVote = "_harvest_pool_vote_gSWOP" | |
61 | 55 | ||
105 | 99 | ||
106 | 100 | let defPoolBoostCoef = 500 | |
107 | 101 | ||
108 | - | let bStartH = 3397850 | |
102 | + | let startEmissionH = 2976848 | |
103 | + | ||
104 | + | let swopYearEmission = 100000000000000 | |
105 | + | ||
106 | + | let blocksPerYear = 526330 | |
109 | 107 | ||
110 | 108 | func getBase58FromOracle (key) = match getString(oracle, key) { | |
111 | 109 | case string: String => | |
140 | 138 | let activeGlob = valueOrElse(getBoolean(oracle, kActiveGlob), true) | |
141 | 139 | ||
142 | 140 | let SWOP = fromBase58String(getStringValue(this, kSWOPid)) | |
141 | + | ||
142 | + | func getRewardsPerBlockInfo () = { | |
143 | + | let emissionPeriods = ((height - startEmissionH) / blocksPerYear) | |
144 | + | func calcEmission (acc,i) = { | |
145 | + | let $t047464783 = acc | |
146 | + | let curEmission = $t047464783._1 | |
147 | + | let prevEmission = $t047464783._2 | |
148 | + | if ((emissionPeriods > i)) | |
149 | + | then $Tuple2(fraction(curEmission, 75, 100), curEmission) | |
150 | + | else $Tuple2(curEmission, prevEmission) | |
151 | + | } | |
152 | + | ||
153 | + | let $t049415107 = { | |
154 | + | let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] | |
155 | + | let $s = size($l) | |
156 | + | let $acc0 = $Tuple2(swopYearEmission, swopYearEmission) | |
157 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
158 | + | then $a | |
159 | + | else calcEmission($a, $l[$i]) | |
160 | + | ||
161 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
162 | + | then $a | |
163 | + | else throw("List size exceeds 20") | |
164 | + | ||
165 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
166 | + | } | |
167 | + | let curEmission = $t049415107._1 | |
168 | + | let prevEmission = $t049415107._2 | |
169 | + | $Tuple3((curEmission / blocksPerYear), (prevEmission / blocksPerYear), (startEmissionH + (blocksPerYear * emissionPeriods))) | |
170 | + | } | |
171 | + | ||
143 | 172 | ||
144 | 173 | func getHeightFirstHarvest (pool) = valueOrElse(getInteger(Address(fromBase58String(pool)), kFirstHarvestHeight), 0) | |
145 | 174 | ||
181 | 210 | ||
182 | 211 | ||
183 | 212 | func rewardInfo (pool) = { | |
184 | - | let totalRewardPerBlockCurrent = valueOrErrorMessage(getInteger(govAddress, kTotalRewardPerBlockCurrent), ((("No data on the key: " + kTotalRewardPerBlockCurrent) + " at address ") + toString(govAddress))) | |
185 | - | let totalRewardPerBlockPrevious = valueOrErrorMessage(getInteger(govAddress, kTotalRewardPerBlockPrevious), ((("No data on the key: " + kTotalRewardPerBlockPrevious) + " at address ") + toString(govAddress))) | |
213 | + | let $t069227037 = getRewardsPerBlockInfo() | |
214 | + | let totalRewardPerBlockCurrent = $t069227037._1 | |
215 | + | let totalRewardPerBlockPrevious = $t069227037._2 | |
216 | + | let lastEmissionUpdateHeight = $t069227037._3 | |
186 | 217 | let rewardPoolFractionCurrent = valueOrErrorMessage(getInteger(govAddress, (pool + kRewardPoolFractionCurrent)), (((("No data on the key: " + pool) + kRewardPoolFractionCurrent) + " at address ") + toString(govAddress))) | |
187 | 218 | let rewardUpdateHeight = valueOrErrorMessage(getInteger(govAddress, kRewardUpdateHeight), ((("No data on the key: " + kRewardUpdateHeight) + " at address ") + toString(govAddress))) | |
188 | 219 | let poolRewardUpdateHeight = valueOrElse(getInteger(govAddress, (pool + kHeightPoolFraction)), rewardUpdateHeight) | |
189 | 220 | let rewardPoolFractionPrevious = valueOrErrorMessage(getInteger(govAddress, (pool + kRewardPoolFractionPrevious)), (((("No data on the key: " + pool) + kRewardPoolFractionPrevious) + " at address ") + toString(govAddress))) | |
190 | 221 | let rewardPoolCurrent = fraction(totalRewardPerBlockCurrent, rewardPoolFractionCurrent, totalVoteShare) | |
191 | 222 | let rewardPoolPrevious = fraction(totalRewardPerBlockCurrent, rewardPoolFractionPrevious, totalVoteShare) | |
223 | + | let rewardPoolPrevCurrent = fraction(totalRewardPerBlockPrevious, rewardPoolFractionCurrent, totalVoteShare) | |
224 | + | let rewardPoolPrevPrevious = fraction(totalRewardPerBlockPrevious, rewardPoolFractionPrevious, totalVoteShare) | |
192 | 225 | if (if ((rewardPoolCurrent > totalRewardPerBlockCurrent)) | |
193 | 226 | then true | |
194 | 227 | else (rewardPoolPrevious > totalRewardPerBlockPrevious)) | |
195 | 228 | then throw("rewardPoolCurrent > totalRewardPerBlockCurrent or rewardPoolPrevious > totalRewardPerBlockPrevious") | |
196 | - | else $ | |
229 | + | else $Tuple7(rewardPoolCurrent, rewardUpdateHeight, rewardPoolPrevious, poolRewardUpdateHeight, lastEmissionUpdateHeight, rewardPoolPrevCurrent, rewardPoolPrevPrevious) | |
197 | 230 | } | |
198 | 231 | ||
199 | 232 | ||
217 | 250 | } | |
218 | 251 | ||
219 | 252 | ||
220 | - | func calcInterest (pool,lastInterestHeight,rewardUpdateHeight,poolRewardUpdateHeight,farmInterest,boostInterest,poolVoted,currentRewardPerBlock,shareTokenLocked,previousRewardPerBlock,scaleValue) = { | |
221 | - | let $ | |
253 | + | func calcInterest (pool,lastInterestHeight,rewardUpdateHeight,poolRewardUpdateHeight,farmInterest,boostInterest,poolVoted,currentRewardPerBlock,shareTokenLocked,previousRewardPerBlock,scaleValue,toHeight) = { | |
254 | + | let $t01005111236 = if (if (if ((rewardUpdateHeight > toHeight)) | |
222 | 255 | then (rewardUpdateHeight == poolRewardUpdateHeight) | |
223 | 256 | else false) | |
224 | 257 | then true | |
225 | - | else if (( | |
258 | + | else if ((toHeight > rewardUpdateHeight)) | |
226 | 259 | then (rewardUpdateHeight != poolRewardUpdateHeight) | |
227 | 260 | else false) | |
228 | 261 | then { | |
229 | - | let r = (previousRewardPerBlock * ( | |
262 | + | let r = (previousRewardPerBlock * (toHeight - lastInterestHeight)) | |
230 | 263 | $Tuple3(r, farmInterest, boostInterest) | |
231 | 264 | } | |
232 | - | else if (if (if (( | |
265 | + | else if (if (if ((toHeight > rewardUpdateHeight)) | |
233 | 266 | then (rewardUpdateHeight == poolRewardUpdateHeight) | |
234 | 267 | else false) | |
235 | 268 | then (lastInterestHeight > rewardUpdateHeight) | |
236 | 269 | else false) | |
237 | 270 | then { | |
238 | - | let r = (currentRewardPerBlock * ( | |
271 | + | let r = (currentRewardPerBlock * (toHeight - lastInterestHeight)) | |
239 | 272 | $Tuple3(r, farmInterest, boostInterest) | |
240 | 273 | } | |
241 | 274 | else { | |
244 | 277 | let bBfrUp = (boostInterest + (if ((poolVoted > 0)) | |
245 | 278 | then fraction(calcBoostRwd(pool, rwdBfrUpd), scaleValue8, poolVoted) | |
246 | 279 | else 0)) | |
247 | - | let rwd = (currentRewardPerBlock * ( | |
280 | + | let rwd = (currentRewardPerBlock * (toHeight - rewardUpdateHeight)) | |
248 | 281 | $Tuple3(rwd, fBfrUp, bBfrUp) | |
249 | 282 | } | |
250 | - | let reward = $ | |
251 | - | let farmIntrBefore = $ | |
252 | - | let boostIntrBefore = $ | |
283 | + | let reward = $t01005111236._1 | |
284 | + | let farmIntrBefore = $t01005111236._2 | |
285 | + | let boostIntrBefore = $t01005111236._3 | |
253 | 286 | let newFarmInterest = (farmIntrBefore + fraction(calcFarmRwd(pool, reward), scaleValue, shareTokenLocked)) | |
254 | 287 | let newBoostInterest = (boostIntrBefore + (if ((poolVoted > 0)) | |
255 | 288 | then fraction(calcBoostRwd(pool, reward), scaleValue8, poolVoted) | |
265 | 298 | let shareToken = getTotalShareToken(pool) | |
266 | 299 | let totalShareVirtual = valueOrElse(getInteger(this, (pool + kShareTokensVirtual)), shareToken) | |
267 | 300 | let stratBFarmInterest = valueOrElse(getInteger(this, (pool + kStratBFarmInterest)), 0) | |
268 | - | let $t01152711608 = getLastInterestInfo(pool) | |
269 | - | let lastInterestHeight = $t01152711608._1 | |
270 | - | let farmInterest = $t01152711608._2 | |
271 | - | let boostInterest = $t01152711608._3 | |
272 | - | let $t01161311727 = rewardInfo(pool) | |
273 | - | let currentRewardPerBlock = $t01161311727._1 | |
274 | - | let rewardUpdateHeight = $t01161311727._2 | |
275 | - | let previousRewardPerBlock = $t01161311727._3 | |
276 | - | let poolRewardUpdateHeight = $t01161311727._4 | |
301 | + | let $t01207412155 = getLastInterestInfo(pool) | |
302 | + | let lastInterestHeight = $t01207412155._1 | |
303 | + | let farmInterest = $t01207412155._2 | |
304 | + | let boostInterest = $t01207412155._3 | |
305 | + | let $t01216012417 = rewardInfo(pool) | |
306 | + | let currentRewardPerBlock = $t01216012417._1 | |
307 | + | let rewardUpdateHeight = $t01216012417._2 | |
308 | + | let previousRewardPerBlock = $t01216012417._3 | |
309 | + | let poolRewardUpdateHeight = $t01216012417._4 | |
310 | + | let emissionUpdateHeight = $t01216012417._5 | |
311 | + | let prevCurrentRewardPerBlock = $t01216012417._6 | |
312 | + | let prevPreviousRewardPerBlock = $t01216012417._7 | |
277 | 313 | let uFarmInterest = valueOrElse(getInteger(this, (((pool + "_") + user) + kFarmUserLastInterest)), farmInterest) | |
278 | 314 | let uBoostInterest = valueOrElse(getInteger(this, (((pool + "_") + user) + kBoostUserLastInterest)), if (if ((stratBFarmInterest > uFarmInterest)) | |
279 | 315 | then (uPoolVoted > 0) | |
284 | 320 | let uShareTokensVirt = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), uShareTokensStaked) | |
285 | 321 | if ((totalShareVirtual == 0)) | |
286 | 322 | then { | |
287 | - | let toTreasury = (currentRewardPerBlock * (height - lastInterestHeight)) | |
323 | + | let toTreasury = if ((emissionUpdateHeight > lastInterestHeight)) | |
324 | + | then ((prevCurrentRewardPerBlock * (emissionUpdateHeight - lastInterestHeight)) + (currentRewardPerBlock * (height - emissionUpdateHeight))) | |
325 | + | else (currentRewardPerBlock * (height - lastInterestHeight)) | |
288 | 326 | $Tuple4(farmInterest, boostInterest, 0, toTreasury) | |
289 | 327 | } | |
290 | 328 | else { | |
291 | - | let $t01244012832 = calcInterest(pool, lastInterestHeight, rewardUpdateHeight, poolRewardUpdateHeight, farmInterest, boostInterest, poolVoted, currentRewardPerBlock, totalShareVirtual, previousRewardPerBlock, scaleValue) | |
292 | - | let newFarmInterest = $t01244012832._1 | |
293 | - | let newBoostInterest = $t01244012832._2 | |
329 | + | let $t01337514512 = if ((emissionUpdateHeight > lastInterestHeight)) | |
330 | + | then { | |
331 | + | let $t01378814347 = calcInterest(pool, lastInterestHeight, rewardUpdateHeight, poolRewardUpdateHeight, farmInterest, boostInterest, poolVoted, prevCurrentRewardPerBlock, totalShareVirtual, prevPreviousRewardPerBlock, scaleValue, emissionUpdateHeight) | |
332 | + | let prevNewFarmInterest = $t01378814347._1 | |
333 | + | let prevNewBoostInterest = $t01378814347._2 | |
334 | + | $Tuple3(prevNewFarmInterest, prevNewBoostInterest, emissionUpdateHeight) | |
335 | + | } | |
336 | + | else $Tuple3(farmInterest, boostInterest, lastInterestHeight) | |
337 | + | let prevFarmInterest = $t01337514512._1 | |
338 | + | let prevBoostInterest = $t01337514512._2 | |
339 | + | let LIHeight = $t01337514512._3 | |
340 | + | let $t01452114944 = calcInterest(pool, LIHeight, rewardUpdateHeight, poolRewardUpdateHeight, prevFarmInterest, prevBoostInterest, poolVoted, currentRewardPerBlock, totalShareVirtual, previousRewardPerBlock, scaleValue, height) | |
341 | + | let newFarmInterest = $t01452114944._1 | |
342 | + | let newBoostInterest = $t01452114944._2 | |
294 | 343 | let farmRwd = fraction(uShareTokensVirt, (newFarmInterest - uFarmInterest), scaleValue) | |
295 | 344 | let poolBoostCoef = valueOrElse(getInteger(this, (pool + kPoolBoostCoef)), defPoolBoostCoef) | |
296 | 345 | let boostRwdMax = fraction(fraction(uShareTokensVirt, (newFarmInterest - max([uFarmInterest, stratBFarmInterest])), scaleValue), poolBoostCoef, lockBoostCoefScale) | |
306 | 355 | ||
307 | 356 | func availableClaimCalcAllByUser (pools,user) = { | |
308 | 357 | func calcAvailable (acc,pool) = { | |
309 | - | let $ | |
310 | - | let newPools = $ | |
311 | - | let amounts = $ | |
312 | - | let $ | |
313 | - | let fi = $ | |
314 | - | let bi = $ | |
315 | - | let claimAmount = $ | |
316 | - | let tt = $ | |
358 | + | let $t01581315842 = acc | |
359 | + | let newPools = $t01581315842._1 | |
360 | + | let amounts = $t01581315842._2 | |
361 | + | let $t01585115904 = claimCalc(pool, user) | |
362 | + | let fi = $t01585115904._1 | |
363 | + | let bi = $t01585115904._2 | |
364 | + | let claimAmount = $t01585115904._3 | |
365 | + | let tt = $t01585115904._4 | |
317 | 366 | let availableFund = (userAvailableSWOP(pool, user) + claimAmount) | |
318 | 367 | $Tuple2((newPools :+ pool), (amounts :+ availableFund)) | |
319 | 368 | } | |
401 | 450 | let userLockedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLocked)), 0) | |
402 | 451 | let userAmountVirtual = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), userStakedAmount) | |
403 | 452 | let totalUserShareTokens = ((userStakedAmount + userLockedAmount) + i.payments[0].amount) | |
404 | - | let $ | |
405 | - | let lockPeriod = $ | |
406 | - | let lockCoef = $ | |
453 | + | let $t01895319005 = getLockParams(lockType) | |
454 | + | let lockPeriod = $t01895319005._1 | |
455 | + | let lockCoef = $t01895319005._2 | |
407 | 456 | let lockWavesFee = getIntegerValue(this, kLockWavesFee) | |
408 | 457 | if ((i.payments[0].assetId != shareAssetId)) | |
409 | 458 | then throw("Wrong sharetoken in payment") | |
415 | 464 | let shareTokensChangeOnFH = canLockInFirstHarvest(pool, user, userStakedAmount, i.payments[0].amount, lockType) | |
416 | 465 | if ((shareTokensChangeOnFH == shareTokensChangeOnFH)) | |
417 | 466 | then { | |
418 | - | let $ | |
467 | + | let $t01943221366 = if ((lockType == 0)) | |
419 | 468 | then { | |
420 | 469 | let userAmountVirtualNew = ((userAmountVirtual + i.payments[0].amount) - shareTokensChangeOnFH) | |
421 | 470 | $Tuple2([IntegerEntry((((pool + "_") + user) + kUserShareTokensStaked), ((userStakedAmount + i.payments[0].amount) - shareTokensChangeOnFH)), IntegerEntry((((pool + "_") + user) + kUserShareTokensVirtual), userAmountVirtualNew), IntegerEntry((pool + kShareTokensVirtual), ((totalShareVirtual + i.payments[0].amount) - shareTokensChangeOnFH)), ScriptTransfer(caller, shareTokensChangeOnFH, i.payments[0].assetId)], ((totalShare + i.payments[0].amount) - shareTokensChangeOnFH)) | |
436 | 485 | let userAmountVirtualNew = (fraction(userLockedAmountNew, lockCoef, lockBoostCoefScale) + userStakedAmount) | |
437 | 486 | $Tuple2([IntegerEntry((((pool + "_") + user) + kUserShareTokensLocked), userLockedAmountNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensLockedHeight), userLockedHeigtNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensLockedType), lockType), IntegerEntry((((pool + "_") + user) + kUserShareTokensVirtual), userAmountVirtualNew), IntegerEntry((pool + kShareTokensVirtual), ((totalShareVirtual - userAmountVirtual) + userAmountVirtualNew))], (totalShare + i.payments[0].amount)) | |
438 | 487 | } | |
439 | - | let lockEntries = $ | |
440 | - | let totalShareNew = $ | |
488 | + | let lockEntries = $t01943221366._1 | |
489 | + | let totalShareNew = $t01943221366._2 | |
441 | 490 | if ((accountBalance(shareAssetId) > totalShareNew)) | |
442 | 491 | then throw("Balance of share-token is lower than totalAmount") | |
443 | 492 | else { | |
444 | - | let $ | |
445 | - | let farmInterest = $ | |
446 | - | let boostInterest = $ | |
447 | - | let claimAmount = $ | |
448 | - | let toTreasure = $ | |
493 | + | let $t02149121573 = claimCalc(pool, user) | |
494 | + | let farmInterest = $t02149121573._1 | |
495 | + | let boostInterest = $t02149121573._2 | |
496 | + | let claimAmount = $t02149121573._3 | |
497 | + | let toTreasure = $t02149121573._4 | |
449 | 498 | let availableFundsNew = (userAvailableSWOP(pool, user) + claimAmount) | |
450 | 499 | let uplp = if ((getString(Address(fromBase58String(pool)), "version") == "3.0.0")) | |
451 | 500 | then invoke(lpFarmingAddress, "updateUserInterest", [user, pool, totalUserShareTokens], nil) | |
468 | 517 | then { | |
469 | 518 | let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
470 | 519 | let user = toString(caller) | |
471 | - | let $ | |
472 | - | let farmInterest = $ | |
473 | - | let boostInterest = $ | |
474 | - | let claimAmount = $ | |
475 | - | let toTreasure = $ | |
520 | + | let $t02287022952 = claimCalc(pool, user) | |
521 | + | let farmInterest = $t02287022952._1 | |
522 | + | let boostInterest = $t02287022952._2 | |
523 | + | let claimAmount = $t02287022952._3 | |
524 | + | let toTreasure = $t02287022952._4 | |
476 | 525 | let userStakedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensStaked)), 0) | |
477 | 526 | let userLockedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLocked)), 0) | |
478 | 527 | let userAmountVirtual = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), userStakedAmount) | |
504 | 553 | let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
505 | 554 | let user = toString(caller) | |
506 | 555 | let shareTokenLocked = getTotalShareToken(pool) | |
507 | - | let $ | |
508 | - | let farmInterest = $ | |
509 | - | let boostInterest = $ | |
510 | - | let claimAmount = $ | |
511 | - | let toTreasure = $ | |
556 | + | let $t02546325545 = claimCalc(pool, user) | |
557 | + | let farmInterest = $t02546325545._1 | |
558 | + | let boostInterest = $t02546325545._2 | |
559 | + | let claimAmount = $t02546325545._3 | |
560 | + | let toTreasure = $t02546325545._4 | |
512 | 561 | let availableFund = (userAvailableSWOP(pool, user) + claimAmount) | |
513 | 562 | if ((accountBalance(shareTokensId) > shareTokenLocked)) | |
514 | 563 | then throw("Balance of share-token is lower than totalAmount") | |
527 | 576 | let userLockedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLocked)), 0) | |
528 | 577 | let userAmountVirtual = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), userStakedAmount) | |
529 | 578 | let userStakedAmountNew = (userStakedAmount + userLockedAmount) | |
530 | - | let $ | |
531 | - | let farmInterest = $ | |
532 | - | let boostInterest = $ | |
533 | - | let claimAmount = $ | |
534 | - | let toTreasure = $ | |
579 | + | let $t02694827030 = claimCalc(pool, user) | |
580 | + | let farmInterest = $t02694827030._1 | |
581 | + | let boostInterest = $t02694827030._2 | |
582 | + | let claimAmount = $t02694827030._3 | |
583 | + | let toTreasure = $t02694827030._4 | |
535 | 584 | let availableFundsNew = (userAvailableSWOP(pool, user) + claimAmount) | |
536 | 585 | [IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kUserShareTokensStaked), userStakedAmountNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensVirtual), userStakedAmountNew), IntegerEntry((pool + kShareTokensVirtual), ((totalShareVirtual - userAmountVirtual) + userStakedAmountNew)), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), DeleteEntry((((pool + "_") + user) + kUserShareTokensLocked)), DeleteEntry((((pool + "_") + user) + kUserShareTokensLockedHeight)), DeleteEntry((((pool + "_") + user) + kUserShareTokensLockedType)), Reissue(SWOP, toTreasure, true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP)] | |
537 | 586 | } | |
559 | 608 | then throw("Only Governance can call this function") | |
560 | 609 | else { | |
561 | 610 | let user = toString(addressFromPublicKey(adminInvokePubKey)) | |
562 | - | let $ | |
563 | - | let farmInterest = $ | |
564 | - | let boostInterest = $ | |
565 | - | let boostLPinterest = $ | |
611 | + | let $t02919629270 = claimCalc(pool, user) | |
612 | + | let farmInterest = $t02919629270._1 | |
613 | + | let boostInterest = $t02919629270._2 | |
614 | + | let boostLPinterest = $t02919629270._3 | |
566 | 615 | [IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height)] | |
567 | 616 | }) | |
568 | 617 | ||
589 | 638 | let userLockedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLocked)), 0) | |
590 | 639 | let userAmountVirtual = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), userStakedAmount) | |
591 | 640 | let totalUserShareTokens = (userStakedAmount + userLockedAmount) | |
592 | - | let $ | |
593 | - | let lockPeriod = $ | |
594 | - | let lockCoef = $ | |
641 | + | let $t03089930951 = getLockParams(lockType) | |
642 | + | let lockPeriod = $t03089930951._1 | |
643 | + | let lockCoef = $t03089930951._2 | |
595 | 644 | let lockWavesFee = getIntegerValue(this, kLockWavesFee) | |
596 | 645 | if ((getHeightFirstHarvest(pool) > height)) | |
597 | 646 | then throw("You can't lock shareTokens till first harvest end.") | |
622 | 671 | let userStakedAmountNew = (userStakedAmount - lockAmount) | |
623 | 672 | let userLockedHeigtNew = (height + lockPeriod) | |
624 | 673 | let userAmountVirtualNew = (fraction(userLockedAmountNew, lockCoef, lockBoostCoefScale) + userStakedAmountNew) | |
625 | - | let $ | |
626 | - | let farmInterest = $ | |
627 | - | let boostInterest = $ | |
628 | - | let claimAmount = $ | |
629 | - | let toTreasure = $ | |
674 | + | let $t03229732379 = claimCalc(pool, user) | |
675 | + | let farmInterest = $t03229732379._1 | |
676 | + | let boostInterest = $t03229732379._2 | |
677 | + | let claimAmount = $t03229732379._3 | |
678 | + | let toTreasure = $t03229732379._4 | |
630 | 679 | let availableFundsNew = (userAvailableSWOP(pool, user) + claimAmount) | |
631 | 680 | [IntegerEntry((((pool + "_") + user) + kUserShareTokensStaked), userStakedAmountNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensLocked), userLockedAmountNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensLockedHeight), userLockedHeigtNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensLockedType), lockType), IntegerEntry((((pool + "_") + user) + kUserShareTokensVirtual), userAmountVirtualNew), IntegerEntry((pool + kShareTokensVirtual), ((totalShareVirtual - userAmountVirtual) + userAmountVirtualNew)), IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, toTreasure, true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP)] | |
632 | 681 | } | |
779 | 828 | func updateUserBoostInterest (pool,user) = valueOrElse(isActive(), if ((i.caller != votingAddress)) | |
780 | 829 | then throw("Only voiting can call this function") | |
781 | 830 | else { | |
782 | - | let $ | |
783 | - | let farmInterest = $ | |
784 | - | let boostInterest = $ | |
785 | - | let claimAmount = $ | |
786 | - | let toTreasure = $ | |
831 | + | let $t03712837210 = claimCalc(pool, user) | |
832 | + | let farmInterest = $t03712837210._1 | |
833 | + | let boostInterest = $t03712837210._2 | |
834 | + | let claimAmount = $t03712837210._3 | |
835 | + | let toTreasure = $t03712837210._4 | |
787 | 836 | let availableFundsNew = (userAvailableSWOP(pool, user) + claimAmount) | |
788 | 837 | [IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, toTreasure, true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP)] | |
789 | 838 | }) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let kActive = "active" | |
5 | 5 | ||
6 | 6 | let kActiveGlob = "active_all_contracts" | |
7 | 7 | ||
8 | 8 | let kDeprecatedPool = "deprecated_" | |
9 | 9 | ||
10 | 10 | let kCause = "shutdown_cause" | |
11 | 11 | ||
12 | 12 | let kRewardPoolFractionCurrent = "_current_pool_fraction_reward" | |
13 | 13 | ||
14 | 14 | let kRewardPoolFractionPrevious = "_previous_pool_fraction_reward" | |
15 | 15 | ||
16 | 16 | let kHeightPoolFraction = "_pool_reward_update_height" | |
17 | - | ||
18 | - | let kTotalRewardPerBlockCurrent = "total_reward_per_block_current" | |
19 | - | ||
20 | - | let kTotalRewardPerBlockPrevious = "total_reward_per_block_previous" | |
21 | 17 | ||
22 | 18 | let kRewardUpdateHeight = "reward_update_height" | |
23 | 19 | ||
24 | 20 | let kUserShareTokensStaked = "_share_tokens_locked" | |
25 | 21 | ||
26 | 22 | let kUserShareTokensLocked = "_share_tokens_blocked" | |
27 | 23 | ||
28 | 24 | let kUserShareTokensLockedType = "_share_tokens_blocked_type" | |
29 | 25 | ||
30 | 26 | let kUserShareTokensLockedHeight = "_share_tokens_blocked_height" | |
31 | 27 | ||
32 | 28 | let kUserShareTokensVirtual = "_share_tokens_virtual" | |
33 | 29 | ||
34 | 30 | let kShareTotalShareTokens = "_total_share_tokens_locked" | |
35 | 31 | ||
36 | 32 | let kShareTokensVirtual = "_total_share_tokens_virtual" | |
37 | 33 | ||
38 | 34 | let kLockParams = "_lock_params" | |
39 | 35 | ||
40 | 36 | let kLockWavesFee = "lock_waves_fee" | |
41 | 37 | ||
42 | 38 | let kPoolBoostCoef = "_boost_coef" | |
43 | 39 | ||
44 | 40 | let kFarmLastInterest = "_last_interest" | |
45 | 41 | ||
46 | 42 | let kFarmUserLastInterest = "_last_interest" | |
47 | 43 | ||
48 | 44 | let kBoostLastInterest = "_last_interest_b" | |
49 | 45 | ||
50 | 46 | let kBoostUserLastInterest = "_last_interest_u_b" | |
51 | 47 | ||
52 | 48 | let kLastInterestHeight = "_last_interest_height" | |
53 | 49 | ||
54 | 50 | let kSWOPid = "SWOP_id" | |
55 | 51 | ||
56 | 52 | let kAvailableSWOP = "_available_SWOP" | |
57 | - | ||
58 | - | let kSwopYearEmission = "swop_year_emission" | |
59 | 53 | ||
60 | 54 | let kHarvestPoolVote = "_harvest_pool_vote_gSWOP" | |
61 | 55 | ||
62 | 56 | let kPoolVote = "_pool_vote_gSWOP" | |
63 | 57 | ||
64 | 58 | let kUserPoolVote = "_user_vote_gSWOP" | |
65 | 59 | ||
66 | 60 | let kPoolStruc = "_pool_struc" | |
67 | 61 | ||
68 | 62 | let kUserPoolStruc = "_user_pool_struc" | |
69 | 63 | ||
70 | 64 | let kHarvestUserPoolVote = "_harvest_user_pool_vote_gSWOP" | |
71 | 65 | ||
72 | 66 | let kFirstHarvestHeight = "first_harvest_height" | |
73 | 67 | ||
74 | 68 | let kShareLimitFH = "share_limit_on_first_harvest" | |
75 | 69 | ||
76 | 70 | let kStratBFarmInterest = "_strat_b_farm_interest" | |
77 | 71 | ||
78 | 72 | let kCpmmContract = "cpmm_contract" | |
79 | 73 | ||
80 | 74 | let kAdminPubKey1 = "admin_pub_1" | |
81 | 75 | ||
82 | 76 | let kAdminPubKey2 = "admin_pub_2" | |
83 | 77 | ||
84 | 78 | let kAdminPubKey3 = "admin_pub_3" | |
85 | 79 | ||
86 | 80 | let kAdminInvokePubKey = "admin_invoke_pub" | |
87 | 81 | ||
88 | 82 | let kMoneyBoxAddress = "money_box_address" | |
89 | 83 | ||
90 | 84 | let kVotingAddress = "voting_address" | |
91 | 85 | ||
92 | 86 | let kGovAddress = "governance_address" | |
93 | 87 | ||
94 | 88 | let kLPFarmingAddress = "lp_farming" | |
95 | 89 | ||
96 | 90 | let kFarmingTreasureAddr = "farming_treasure" | |
97 | 91 | ||
98 | 92 | let oracle = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz') | |
99 | 93 | ||
100 | 94 | let totalVoteShare = 10000000000 | |
101 | 95 | ||
102 | 96 | let scaleValue8 = 100000000 | |
103 | 97 | ||
104 | 98 | let lockBoostCoefScale = 1000 | |
105 | 99 | ||
106 | 100 | let defPoolBoostCoef = 500 | |
107 | 101 | ||
108 | - | let bStartH = 3397850 | |
102 | + | let startEmissionH = 2976848 | |
103 | + | ||
104 | + | let swopYearEmission = 100000000000000 | |
105 | + | ||
106 | + | let blocksPerYear = 526330 | |
109 | 107 | ||
110 | 108 | func getBase58FromOracle (key) = match getString(oracle, key) { | |
111 | 109 | case string: String => | |
112 | 110 | fromBase58String(string) | |
113 | 111 | case nothing => | |
114 | 112 | throw((key + "is empty")) | |
115 | 113 | } | |
116 | 114 | ||
117 | 115 | ||
118 | 116 | let adminPubKey1 = getBase58FromOracle(kAdminPubKey1) | |
119 | 117 | ||
120 | 118 | let adminPubKey2 = getBase58FromOracle(kAdminPubKey2) | |
121 | 119 | ||
122 | 120 | let adminPubKey3 = getBase58FromOracle(kAdminPubKey3) | |
123 | 121 | ||
124 | 122 | let moneyBoxAddress = Address(getBase58FromOracle(kMoneyBoxAddress)) | |
125 | 123 | ||
126 | 124 | let votingAddress = Address(getBase58FromOracle(kVotingAddress)) | |
127 | 125 | ||
128 | 126 | let govAddress = Address(getBase58FromOracle(kGovAddress)) | |
129 | 127 | ||
130 | 128 | let adminInvokePubKey = getBase58FromOracle(kAdminInvokePubKey) | |
131 | 129 | ||
132 | 130 | let lpFarmingAddress = Address(getBase58FromOracle(kLPFarmingAddress)) | |
133 | 131 | ||
134 | 132 | let farmingTreasureAddr = Address(getBase58FromOracle(kFarmingTreasureAddr)) | |
135 | 133 | ||
136 | 134 | let cpmmContract = Address(getBase58FromOracle(kCpmmContract)) | |
137 | 135 | ||
138 | 136 | let active = getBooleanValue(this, kActive) | |
139 | 137 | ||
140 | 138 | let activeGlob = valueOrElse(getBoolean(oracle, kActiveGlob), true) | |
141 | 139 | ||
142 | 140 | let SWOP = fromBase58String(getStringValue(this, kSWOPid)) | |
141 | + | ||
142 | + | func getRewardsPerBlockInfo () = { | |
143 | + | let emissionPeriods = ((height - startEmissionH) / blocksPerYear) | |
144 | + | func calcEmission (acc,i) = { | |
145 | + | let $t047464783 = acc | |
146 | + | let curEmission = $t047464783._1 | |
147 | + | let prevEmission = $t047464783._2 | |
148 | + | if ((emissionPeriods > i)) | |
149 | + | then $Tuple2(fraction(curEmission, 75, 100), curEmission) | |
150 | + | else $Tuple2(curEmission, prevEmission) | |
151 | + | } | |
152 | + | ||
153 | + | let $t049415107 = { | |
154 | + | let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] | |
155 | + | let $s = size($l) | |
156 | + | let $acc0 = $Tuple2(swopYearEmission, swopYearEmission) | |
157 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
158 | + | then $a | |
159 | + | else calcEmission($a, $l[$i]) | |
160 | + | ||
161 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
162 | + | then $a | |
163 | + | else throw("List size exceeds 20") | |
164 | + | ||
165 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
166 | + | } | |
167 | + | let curEmission = $t049415107._1 | |
168 | + | let prevEmission = $t049415107._2 | |
169 | + | $Tuple3((curEmission / blocksPerYear), (prevEmission / blocksPerYear), (startEmissionH + (blocksPerYear * emissionPeriods))) | |
170 | + | } | |
171 | + | ||
143 | 172 | ||
144 | 173 | func getHeightFirstHarvest (pool) = valueOrElse(getInteger(Address(fromBase58String(pool)), kFirstHarvestHeight), 0) | |
145 | 174 | ||
146 | 175 | ||
147 | 176 | func getFHShareLimitToken (pool) = valueOrErrorMessage(getInteger(pool, kShareLimitFH), ("No data on the key: " + kShareLimitFH)) | |
148 | 177 | ||
149 | 178 | ||
150 | 179 | func getTotalShareToken (pool) = valueOrErrorMessage(getInteger(this, (pool + kShareTotalShareTokens)), (("No data on the key: " + pool) + kShareTotalShareTokens)) | |
151 | 180 | ||
152 | 181 | ||
153 | 182 | func getPoolVoted (pool) = valueOrElse(getInteger(votingAddress, (pool + kPoolVote)), valueOrElse(parseInt(split(valueOrElse(getString(votingAddress, (pool + kPoolStruc)), ""), "_")[0]), 0)) | |
154 | 183 | ||
155 | 184 | ||
156 | 185 | func getUserPoolVoted (pool,user) = valueOrElse(getInteger(votingAddress, (((user + "_") + pool) + kUserPoolVote)), valueOrElse(parseInt(split(valueOrElse(getString(votingAddress, (((user + "_") + pool) + kUserPoolStruc)), ""), "_")[0]), 0)) | |
157 | 186 | ||
158 | 187 | ||
159 | 188 | func getShareAssetId (pool) = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
160 | 189 | ||
161 | 190 | ||
162 | 191 | func accountBalance (assetId) = match assetId { | |
163 | 192 | case id: ByteVector => | |
164 | 193 | assetBalance(this, id) | |
165 | 194 | case waves: Unit => | |
166 | 195 | wavesBalance(this).available | |
167 | 196 | case _ => | |
168 | 197 | throw("Match error") | |
169 | 198 | } | |
170 | 199 | ||
171 | 200 | ||
172 | 201 | func calcScaleValue (assetId1,assetId2) = { | |
173 | 202 | let assetId1Decimals = value(assetInfo(assetId1)).decimals | |
174 | 203 | let assetId2Decimals = value(assetInfo(assetId2)).decimals | |
175 | 204 | let scaleDigits = ((assetId2Decimals - assetId1Decimals) + 8) | |
176 | 205 | pow(10, 0, scaleDigits, 0, 0, DOWN) | |
177 | 206 | } | |
178 | 207 | ||
179 | 208 | ||
180 | 209 | func userAvailableSWOP (pool,user) = valueOrElse(getInteger(this, (((pool + "_") + user) + kAvailableSWOP)), 0) | |
181 | 210 | ||
182 | 211 | ||
183 | 212 | func rewardInfo (pool) = { | |
184 | - | let totalRewardPerBlockCurrent = valueOrErrorMessage(getInteger(govAddress, kTotalRewardPerBlockCurrent), ((("No data on the key: " + kTotalRewardPerBlockCurrent) + " at address ") + toString(govAddress))) | |
185 | - | let totalRewardPerBlockPrevious = valueOrErrorMessage(getInteger(govAddress, kTotalRewardPerBlockPrevious), ((("No data on the key: " + kTotalRewardPerBlockPrevious) + " at address ") + toString(govAddress))) | |
213 | + | let $t069227037 = getRewardsPerBlockInfo() | |
214 | + | let totalRewardPerBlockCurrent = $t069227037._1 | |
215 | + | let totalRewardPerBlockPrevious = $t069227037._2 | |
216 | + | let lastEmissionUpdateHeight = $t069227037._3 | |
186 | 217 | let rewardPoolFractionCurrent = valueOrErrorMessage(getInteger(govAddress, (pool + kRewardPoolFractionCurrent)), (((("No data on the key: " + pool) + kRewardPoolFractionCurrent) + " at address ") + toString(govAddress))) | |
187 | 218 | let rewardUpdateHeight = valueOrErrorMessage(getInteger(govAddress, kRewardUpdateHeight), ((("No data on the key: " + kRewardUpdateHeight) + " at address ") + toString(govAddress))) | |
188 | 219 | let poolRewardUpdateHeight = valueOrElse(getInteger(govAddress, (pool + kHeightPoolFraction)), rewardUpdateHeight) | |
189 | 220 | let rewardPoolFractionPrevious = valueOrErrorMessage(getInteger(govAddress, (pool + kRewardPoolFractionPrevious)), (((("No data on the key: " + pool) + kRewardPoolFractionPrevious) + " at address ") + toString(govAddress))) | |
190 | 221 | let rewardPoolCurrent = fraction(totalRewardPerBlockCurrent, rewardPoolFractionCurrent, totalVoteShare) | |
191 | 222 | let rewardPoolPrevious = fraction(totalRewardPerBlockCurrent, rewardPoolFractionPrevious, totalVoteShare) | |
223 | + | let rewardPoolPrevCurrent = fraction(totalRewardPerBlockPrevious, rewardPoolFractionCurrent, totalVoteShare) | |
224 | + | let rewardPoolPrevPrevious = fraction(totalRewardPerBlockPrevious, rewardPoolFractionPrevious, totalVoteShare) | |
192 | 225 | if (if ((rewardPoolCurrent > totalRewardPerBlockCurrent)) | |
193 | 226 | then true | |
194 | 227 | else (rewardPoolPrevious > totalRewardPerBlockPrevious)) | |
195 | 228 | then throw("rewardPoolCurrent > totalRewardPerBlockCurrent or rewardPoolPrevious > totalRewardPerBlockPrevious") | |
196 | - | else $ | |
229 | + | else $Tuple7(rewardPoolCurrent, rewardUpdateHeight, rewardPoolPrevious, poolRewardUpdateHeight, lastEmissionUpdateHeight, rewardPoolPrevCurrent, rewardPoolPrevPrevious) | |
197 | 230 | } | |
198 | 231 | ||
199 | 232 | ||
200 | 233 | func getLastInterestInfo (pool) = { | |
201 | 234 | let farmInterest = valueOrErrorMessage(getInteger(this, (pool + kFarmLastInterest)), (("No data on the key: " + pool) + kFarmLastInterest)) | |
202 | 235 | let boostInterest = valueOrElse(getInteger(this, (pool + kBoostLastInterest)), 0) | |
203 | 236 | let lastInterestHeight = valueOrElse(getInteger(this, (pool + kLastInterestHeight)), height) | |
204 | 237 | $Tuple3(lastInterestHeight, farmInterest, boostInterest) | |
205 | 238 | } | |
206 | 239 | ||
207 | 240 | ||
208 | 241 | func calcFarmRwd (pool,curTotalReward) = { | |
209 | 242 | let poolBoostCoef = valueOrElse(getInteger(this, (pool + kPoolBoostCoef)), defPoolBoostCoef) | |
210 | 243 | fraction(curTotalReward, lockBoostCoefScale, (poolBoostCoef + lockBoostCoefScale)) | |
211 | 244 | } | |
212 | 245 | ||
213 | 246 | ||
214 | 247 | func calcBoostRwd (pool,curTotalReward) = { | |
215 | 248 | let poolBoostCoef = valueOrElse(getInteger(this, (pool + kPoolBoostCoef)), defPoolBoostCoef) | |
216 | 249 | fraction(curTotalReward, poolBoostCoef, (poolBoostCoef + lockBoostCoefScale)) | |
217 | 250 | } | |
218 | 251 | ||
219 | 252 | ||
220 | - | func calcInterest (pool,lastInterestHeight,rewardUpdateHeight,poolRewardUpdateHeight,farmInterest,boostInterest,poolVoted,currentRewardPerBlock,shareTokenLocked,previousRewardPerBlock,scaleValue) = { | |
221 | - | let $ | |
253 | + | func calcInterest (pool,lastInterestHeight,rewardUpdateHeight,poolRewardUpdateHeight,farmInterest,boostInterest,poolVoted,currentRewardPerBlock,shareTokenLocked,previousRewardPerBlock,scaleValue,toHeight) = { | |
254 | + | let $t01005111236 = if (if (if ((rewardUpdateHeight > toHeight)) | |
222 | 255 | then (rewardUpdateHeight == poolRewardUpdateHeight) | |
223 | 256 | else false) | |
224 | 257 | then true | |
225 | - | else if (( | |
258 | + | else if ((toHeight > rewardUpdateHeight)) | |
226 | 259 | then (rewardUpdateHeight != poolRewardUpdateHeight) | |
227 | 260 | else false) | |
228 | 261 | then { | |
229 | - | let r = (previousRewardPerBlock * ( | |
262 | + | let r = (previousRewardPerBlock * (toHeight - lastInterestHeight)) | |
230 | 263 | $Tuple3(r, farmInterest, boostInterest) | |
231 | 264 | } | |
232 | - | else if (if (if (( | |
265 | + | else if (if (if ((toHeight > rewardUpdateHeight)) | |
233 | 266 | then (rewardUpdateHeight == poolRewardUpdateHeight) | |
234 | 267 | else false) | |
235 | 268 | then (lastInterestHeight > rewardUpdateHeight) | |
236 | 269 | else false) | |
237 | 270 | then { | |
238 | - | let r = (currentRewardPerBlock * ( | |
271 | + | let r = (currentRewardPerBlock * (toHeight - lastInterestHeight)) | |
239 | 272 | $Tuple3(r, farmInterest, boostInterest) | |
240 | 273 | } | |
241 | 274 | else { | |
242 | 275 | let rwdBfrUpd = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight)) | |
243 | 276 | let fBfrUp = (farmInterest + fraction(calcFarmRwd(pool, rwdBfrUpd), scaleValue, shareTokenLocked)) | |
244 | 277 | let bBfrUp = (boostInterest + (if ((poolVoted > 0)) | |
245 | 278 | then fraction(calcBoostRwd(pool, rwdBfrUpd), scaleValue8, poolVoted) | |
246 | 279 | else 0)) | |
247 | - | let rwd = (currentRewardPerBlock * ( | |
280 | + | let rwd = (currentRewardPerBlock * (toHeight - rewardUpdateHeight)) | |
248 | 281 | $Tuple3(rwd, fBfrUp, bBfrUp) | |
249 | 282 | } | |
250 | - | let reward = $ | |
251 | - | let farmIntrBefore = $ | |
252 | - | let boostIntrBefore = $ | |
283 | + | let reward = $t01005111236._1 | |
284 | + | let farmIntrBefore = $t01005111236._2 | |
285 | + | let boostIntrBefore = $t01005111236._3 | |
253 | 286 | let newFarmInterest = (farmIntrBefore + fraction(calcFarmRwd(pool, reward), scaleValue, shareTokenLocked)) | |
254 | 287 | let newBoostInterest = (boostIntrBefore + (if ((poolVoted > 0)) | |
255 | 288 | then fraction(calcBoostRwd(pool, reward), scaleValue8, poolVoted) | |
256 | 289 | else 0)) | |
257 | 290 | $Tuple2(newFarmInterest, newBoostInterest) | |
258 | 291 | } | |
259 | 292 | ||
260 | 293 | ||
261 | 294 | func claimCalc (pool,user) = { | |
262 | 295 | let scaleValue = calcScaleValue(SWOP, getShareAssetId(pool)) | |
263 | 296 | let poolVoted = getPoolVoted(pool) | |
264 | 297 | let uPoolVoted = getUserPoolVoted(pool, user) | |
265 | 298 | let shareToken = getTotalShareToken(pool) | |
266 | 299 | let totalShareVirtual = valueOrElse(getInteger(this, (pool + kShareTokensVirtual)), shareToken) | |
267 | 300 | let stratBFarmInterest = valueOrElse(getInteger(this, (pool + kStratBFarmInterest)), 0) | |
268 | - | let $t01152711608 = getLastInterestInfo(pool) | |
269 | - | let lastInterestHeight = $t01152711608._1 | |
270 | - | let farmInterest = $t01152711608._2 | |
271 | - | let boostInterest = $t01152711608._3 | |
272 | - | let $t01161311727 = rewardInfo(pool) | |
273 | - | let currentRewardPerBlock = $t01161311727._1 | |
274 | - | let rewardUpdateHeight = $t01161311727._2 | |
275 | - | let previousRewardPerBlock = $t01161311727._3 | |
276 | - | let poolRewardUpdateHeight = $t01161311727._4 | |
301 | + | let $t01207412155 = getLastInterestInfo(pool) | |
302 | + | let lastInterestHeight = $t01207412155._1 | |
303 | + | let farmInterest = $t01207412155._2 | |
304 | + | let boostInterest = $t01207412155._3 | |
305 | + | let $t01216012417 = rewardInfo(pool) | |
306 | + | let currentRewardPerBlock = $t01216012417._1 | |
307 | + | let rewardUpdateHeight = $t01216012417._2 | |
308 | + | let previousRewardPerBlock = $t01216012417._3 | |
309 | + | let poolRewardUpdateHeight = $t01216012417._4 | |
310 | + | let emissionUpdateHeight = $t01216012417._5 | |
311 | + | let prevCurrentRewardPerBlock = $t01216012417._6 | |
312 | + | let prevPreviousRewardPerBlock = $t01216012417._7 | |
277 | 313 | let uFarmInterest = valueOrElse(getInteger(this, (((pool + "_") + user) + kFarmUserLastInterest)), farmInterest) | |
278 | 314 | let uBoostInterest = valueOrElse(getInteger(this, (((pool + "_") + user) + kBoostUserLastInterest)), if (if ((stratBFarmInterest > uFarmInterest)) | |
279 | 315 | then (uPoolVoted > 0) | |
280 | 316 | else false) | |
281 | 317 | then 0 | |
282 | 318 | else boostInterest) | |
283 | 319 | let uShareTokensStaked = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensStaked)), 0) | |
284 | 320 | let uShareTokensVirt = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), uShareTokensStaked) | |
285 | 321 | if ((totalShareVirtual == 0)) | |
286 | 322 | then { | |
287 | - | let toTreasury = (currentRewardPerBlock * (height - lastInterestHeight)) | |
323 | + | let toTreasury = if ((emissionUpdateHeight > lastInterestHeight)) | |
324 | + | then ((prevCurrentRewardPerBlock * (emissionUpdateHeight - lastInterestHeight)) + (currentRewardPerBlock * (height - emissionUpdateHeight))) | |
325 | + | else (currentRewardPerBlock * (height - lastInterestHeight)) | |
288 | 326 | $Tuple4(farmInterest, boostInterest, 0, toTreasury) | |
289 | 327 | } | |
290 | 328 | else { | |
291 | - | let $t01244012832 = calcInterest(pool, lastInterestHeight, rewardUpdateHeight, poolRewardUpdateHeight, farmInterest, boostInterest, poolVoted, currentRewardPerBlock, totalShareVirtual, previousRewardPerBlock, scaleValue) | |
292 | - | let newFarmInterest = $t01244012832._1 | |
293 | - | let newBoostInterest = $t01244012832._2 | |
329 | + | let $t01337514512 = if ((emissionUpdateHeight > lastInterestHeight)) | |
330 | + | then { | |
331 | + | let $t01378814347 = calcInterest(pool, lastInterestHeight, rewardUpdateHeight, poolRewardUpdateHeight, farmInterest, boostInterest, poolVoted, prevCurrentRewardPerBlock, totalShareVirtual, prevPreviousRewardPerBlock, scaleValue, emissionUpdateHeight) | |
332 | + | let prevNewFarmInterest = $t01378814347._1 | |
333 | + | let prevNewBoostInterest = $t01378814347._2 | |
334 | + | $Tuple3(prevNewFarmInterest, prevNewBoostInterest, emissionUpdateHeight) | |
335 | + | } | |
336 | + | else $Tuple3(farmInterest, boostInterest, lastInterestHeight) | |
337 | + | let prevFarmInterest = $t01337514512._1 | |
338 | + | let prevBoostInterest = $t01337514512._2 | |
339 | + | let LIHeight = $t01337514512._3 | |
340 | + | let $t01452114944 = calcInterest(pool, LIHeight, rewardUpdateHeight, poolRewardUpdateHeight, prevFarmInterest, prevBoostInterest, poolVoted, currentRewardPerBlock, totalShareVirtual, previousRewardPerBlock, scaleValue, height) | |
341 | + | let newFarmInterest = $t01452114944._1 | |
342 | + | let newBoostInterest = $t01452114944._2 | |
294 | 343 | let farmRwd = fraction(uShareTokensVirt, (newFarmInterest - uFarmInterest), scaleValue) | |
295 | 344 | let poolBoostCoef = valueOrElse(getInteger(this, (pool + kPoolBoostCoef)), defPoolBoostCoef) | |
296 | 345 | let boostRwdMax = fraction(fraction(uShareTokensVirt, (newFarmInterest - max([uFarmInterest, stratBFarmInterest])), scaleValue), poolBoostCoef, lockBoostCoefScale) | |
297 | 346 | let curBoostRwd = fraction((newBoostInterest - uBoostInterest), uPoolVoted, scaleValue8) | |
298 | 347 | let boostRwd = min([boostRwdMax, curBoostRwd]) | |
299 | 348 | let toTreasury = (boostRwdMax - boostRwd) | |
300 | 349 | if ((0 > toTreasury)) | |
301 | 350 | then throw("toTreasury < 0") | |
302 | 351 | else $Tuple4(newFarmInterest, newBoostInterest, (farmRwd + boostRwd), toTreasury) | |
303 | 352 | } | |
304 | 353 | } | |
305 | 354 | ||
306 | 355 | ||
307 | 356 | func availableClaimCalcAllByUser (pools,user) = { | |
308 | 357 | func calcAvailable (acc,pool) = { | |
309 | - | let $ | |
310 | - | let newPools = $ | |
311 | - | let amounts = $ | |
312 | - | let $ | |
313 | - | let fi = $ | |
314 | - | let bi = $ | |
315 | - | let claimAmount = $ | |
316 | - | let tt = $ | |
358 | + | let $t01581315842 = acc | |
359 | + | let newPools = $t01581315842._1 | |
360 | + | let amounts = $t01581315842._2 | |
361 | + | let $t01585115904 = claimCalc(pool, user) | |
362 | + | let fi = $t01585115904._1 | |
363 | + | let bi = $t01585115904._2 | |
364 | + | let claimAmount = $t01585115904._3 | |
365 | + | let tt = $t01585115904._4 | |
317 | 366 | let availableFund = (userAvailableSWOP(pool, user) + claimAmount) | |
318 | 367 | $Tuple2((newPools :+ pool), (amounts :+ availableFund)) | |
319 | 368 | } | |
320 | 369 | ||
321 | 370 | let $l = pools | |
322 | 371 | let $s = size($l) | |
323 | 372 | let $acc0 = $Tuple2(nil, nil) | |
324 | 373 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
325 | 374 | then $a | |
326 | 375 | else calcAvailable($a, $l[$i]) | |
327 | 376 | ||
328 | 377 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
329 | 378 | then $a | |
330 | 379 | else throw("List size exceeds 60") | |
331 | 380 | ||
332 | 381 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60) | |
333 | 382 | } | |
334 | 383 | ||
335 | 384 | ||
336 | 385 | func canLockInFirstHarvest (pool,user,userShareTokensStaked,pmtAmount,lockType) = if ((getHeightFirstHarvest(pool) > height)) | |
337 | 386 | then { | |
338 | 387 | let totalVoteAmount = valueOrElse(getInteger(votingAddress, (pool + kHarvestPoolVote)), 0) | |
339 | 388 | let userVoteAmount = valueOrElse(getInteger(votingAddress, (((user + "_") + pool) + kHarvestUserPoolVote)), 0) | |
340 | 389 | let FHShareTokenLimit = getFHShareLimitToken(addressFromStringValue(pool)) | |
341 | 390 | let FHShareTokenUserLimit = (fraction(FHShareTokenLimit, userVoteAmount, totalVoteAmount) - userShareTokensStaked) | |
342 | 391 | if ((lockType > 0)) | |
343 | 392 | then throw("You can't lock shareTokens till first harvest end.") | |
344 | 393 | else if ((userVoteAmount == 0)) | |
345 | 394 | then 0 | |
346 | 395 | else if ((pmtAmount >= FHShareTokenUserLimit)) | |
347 | 396 | then (pmtAmount - FHShareTokenUserLimit) | |
348 | 397 | else 0 | |
349 | 398 | } | |
350 | 399 | else 0 | |
351 | 400 | ||
352 | 401 | ||
353 | 402 | func getLockParams (type) = { | |
354 | 403 | let lockParams = split(valueOrErrorMessage(getString(this, (toString(type) + kLockParams)), ("There are no key for lock type" + toString(type))), "_") | |
355 | 404 | $Tuple2(parseIntValue(lockParams[0]), parseIntValue(lockParams[1])) | |
356 | 405 | } | |
357 | 406 | ||
358 | 407 | ||
359 | 408 | func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)] | |
360 | 409 | ||
361 | 410 | ||
362 | 411 | func isActive () = if (if (active) | |
363 | 412 | then activeGlob | |
364 | 413 | else false) | |
365 | 414 | then unit | |
366 | 415 | else throw("DApp is inactive at this moment") | |
367 | 416 | ||
368 | 417 | ||
369 | 418 | func isAdminCall (i) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)) | |
370 | 419 | then unit | |
371 | 420 | else throw("Only admin can call this function") | |
372 | 421 | ||
373 | 422 | ||
374 | 423 | func isPoolCall (i,pool) = if (if ((toString(i.caller) == pool)) | |
375 | 424 | then true | |
376 | 425 | else (i.caller == cpmmContract)) | |
377 | 426 | then unit | |
378 | 427 | else throw("Only pool can call this function") | |
379 | 428 | ||
380 | 429 | ||
381 | 430 | func getDeprecatedPool (pool) = valueOrElse(getBoolean(oracle, (kDeprecatedPool + pool)), false) | |
382 | 431 | ||
383 | 432 | ||
384 | 433 | func isDeprecatedPool (pool) = if (!(getDeprecatedPool(pool))) | |
385 | 434 | then unit | |
386 | 435 | else throw("Pool is deprecated. Only unlock action allowed.") | |
387 | 436 | ||
388 | 437 | ||
389 | 438 | func isSelfCall (i) = if ((i.caller == this)) | |
390 | 439 | then unit | |
391 | 440 | else throw("Only contract itself can call this function") | |
392 | 441 | ||
393 | 442 | ||
394 | 443 | func calcLockShareTokens (i,caller,pool,lockType) = { | |
395 | 444 | let shareAssetId = getShareAssetId(pool) | |
396 | 445 | let user = toString(caller) | |
397 | 446 | let totalShare = getTotalShareToken(pool) | |
398 | 447 | let totalShareVirtual = valueOrElse(getInteger(this, (pool + kShareTokensVirtual)), totalShare) | |
399 | 448 | let userStakedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensStaked)), 0) | |
400 | 449 | let userLockedHeigt = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLockedHeight)), 0) | |
401 | 450 | let userLockedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLocked)), 0) | |
402 | 451 | let userAmountVirtual = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), userStakedAmount) | |
403 | 452 | let totalUserShareTokens = ((userStakedAmount + userLockedAmount) + i.payments[0].amount) | |
404 | - | let $ | |
405 | - | let lockPeriod = $ | |
406 | - | let lockCoef = $ | |
453 | + | let $t01895319005 = getLockParams(lockType) | |
454 | + | let lockPeriod = $t01895319005._1 | |
455 | + | let lockCoef = $t01895319005._2 | |
407 | 456 | let lockWavesFee = getIntegerValue(this, kLockWavesFee) | |
408 | 457 | if ((i.payments[0].assetId != shareAssetId)) | |
409 | 458 | then throw("Wrong sharetoken in payment") | |
410 | 459 | else if ((0 >= i.payments[0].amount)) | |
411 | 460 | then throw("Payment amount must be greater than 0") | |
412 | 461 | else if ((0 > lockType)) | |
413 | 462 | then throw("lockType must be >= 0") | |
414 | 463 | else { | |
415 | 464 | let shareTokensChangeOnFH = canLockInFirstHarvest(pool, user, userStakedAmount, i.payments[0].amount, lockType) | |
416 | 465 | if ((shareTokensChangeOnFH == shareTokensChangeOnFH)) | |
417 | 466 | then { | |
418 | - | let $ | |
467 | + | let $t01943221366 = if ((lockType == 0)) | |
419 | 468 | then { | |
420 | 469 | let userAmountVirtualNew = ((userAmountVirtual + i.payments[0].amount) - shareTokensChangeOnFH) | |
421 | 470 | $Tuple2([IntegerEntry((((pool + "_") + user) + kUserShareTokensStaked), ((userStakedAmount + i.payments[0].amount) - shareTokensChangeOnFH)), IntegerEntry((((pool + "_") + user) + kUserShareTokensVirtual), userAmountVirtualNew), IntegerEntry((pool + kShareTokensVirtual), ((totalShareVirtual + i.payments[0].amount) - shareTokensChangeOnFH)), ScriptTransfer(caller, shareTokensChangeOnFH, i.payments[0].assetId)], ((totalShare + i.payments[0].amount) - shareTokensChangeOnFH)) | |
422 | 471 | } | |
423 | 472 | else if (if ((userLockedHeigt == 0)) | |
424 | 473 | then if (if ((2 > size(i.payments))) | |
425 | 474 | then true | |
426 | 475 | else (i.payments[1].assetId != unit)) | |
427 | 476 | then true | |
428 | 477 | else (lockWavesFee > i.payments[1].amount) | |
429 | 478 | else false) | |
430 | 479 | then throw((("You need to pay additional waves comission " + toString(lockWavesFee)) + "WAVES")) | |
431 | 480 | else if ((userLockedHeigt > (height + lockPeriod))) | |
432 | 481 | then throw("You cannot lock sharetokens for a period less than what you have already locked") | |
433 | 482 | else { | |
434 | 483 | let userLockedAmountNew = (userLockedAmount + i.payments[0].amount) | |
435 | 484 | let userLockedHeigtNew = (height + lockPeriod) | |
436 | 485 | let userAmountVirtualNew = (fraction(userLockedAmountNew, lockCoef, lockBoostCoefScale) + userStakedAmount) | |
437 | 486 | $Tuple2([IntegerEntry((((pool + "_") + user) + kUserShareTokensLocked), userLockedAmountNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensLockedHeight), userLockedHeigtNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensLockedType), lockType), IntegerEntry((((pool + "_") + user) + kUserShareTokensVirtual), userAmountVirtualNew), IntegerEntry((pool + kShareTokensVirtual), ((totalShareVirtual - userAmountVirtual) + userAmountVirtualNew))], (totalShare + i.payments[0].amount)) | |
438 | 487 | } | |
439 | - | let lockEntries = $ | |
440 | - | let totalShareNew = $ | |
488 | + | let lockEntries = $t01943221366._1 | |
489 | + | let totalShareNew = $t01943221366._2 | |
441 | 490 | if ((accountBalance(shareAssetId) > totalShareNew)) | |
442 | 491 | then throw("Balance of share-token is lower than totalAmount") | |
443 | 492 | else { | |
444 | - | let $ | |
445 | - | let farmInterest = $ | |
446 | - | let boostInterest = $ | |
447 | - | let claimAmount = $ | |
448 | - | let toTreasure = $ | |
493 | + | let $t02149121573 = claimCalc(pool, user) | |
494 | + | let farmInterest = $t02149121573._1 | |
495 | + | let boostInterest = $t02149121573._2 | |
496 | + | let claimAmount = $t02149121573._3 | |
497 | + | let toTreasure = $t02149121573._4 | |
449 | 498 | let availableFundsNew = (userAvailableSWOP(pool, user) + claimAmount) | |
450 | 499 | let uplp = if ((getString(Address(fromBase58String(pool)), "version") == "3.0.0")) | |
451 | 500 | then invoke(lpFarmingAddress, "updateUserInterest", [user, pool, totalUserShareTokens], nil) | |
452 | 501 | else 0 | |
453 | 502 | if ((uplp == uplp)) | |
454 | 503 | then ([IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((pool + kShareTotalShareTokens), totalShareNew), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, toTreasure, true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP)] ++ lockEntries) | |
455 | 504 | else throw("Strict value is not equal to itself.") | |
456 | 505 | } | |
457 | 506 | } | |
458 | 507 | else throw("Strict value is not equal to itself.") | |
459 | 508 | } | |
460 | 509 | } | |
461 | 510 | ||
462 | 511 | ||
463 | 512 | func calcWithdrawShareTokens (i,caller,pool,shareTokensWithdrawAmount) = { | |
464 | 513 | let inv = if (getDeprecatedPool(pool)) | |
465 | 514 | then invoke(this, "unlockUserLockDeprecated", [pool, toString(caller)], nil) | |
466 | 515 | else 0 | |
467 | 516 | if ((inv == inv)) | |
468 | 517 | then { | |
469 | 518 | let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
470 | 519 | let user = toString(caller) | |
471 | - | let $ | |
472 | - | let farmInterest = $ | |
473 | - | let boostInterest = $ | |
474 | - | let claimAmount = $ | |
475 | - | let toTreasure = $ | |
520 | + | let $t02287022952 = claimCalc(pool, user) | |
521 | + | let farmInterest = $t02287022952._1 | |
522 | + | let boostInterest = $t02287022952._2 | |
523 | + | let claimAmount = $t02287022952._3 | |
524 | + | let toTreasure = $t02287022952._4 | |
476 | 525 | let userStakedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensStaked)), 0) | |
477 | 526 | let userLockedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLocked)), 0) | |
478 | 527 | let userAmountVirtual = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), userStakedAmount) | |
479 | 528 | let userStakedAmountNew = (userStakedAmount - shareTokensWithdrawAmount) | |
480 | 529 | let availableFundsNew = (userAvailableSWOP(pool, user) + claimAmount) | |
481 | 530 | let totalShareAmount = getTotalShareToken(pool) | |
482 | 531 | let totalShareVirtual = valueOrElse(getInteger(this, (pool + kShareTokensVirtual)), totalShareAmount) | |
483 | 532 | let totalShareAmountNew = (totalShareAmount - shareTokensWithdrawAmount) | |
484 | 533 | let totalShareVirtualNew = (totalShareVirtual - shareTokensWithdrawAmount) | |
485 | 534 | let userAmountVirtualNew = (userAmountVirtual - shareTokensWithdrawAmount) | |
486 | 535 | if ((shareTokensWithdrawAmount > userStakedAmount)) | |
487 | 536 | then throw("Withdraw amount more then user locked amount") | |
488 | 537 | else if ((accountBalance(shareTokensId) > totalShareAmount)) | |
489 | 538 | then throw("Balance of share-token is lower than totalAmount") | |
490 | 539 | else { | |
491 | 540 | let uplp = if ((getString(Address(fromBase58String(pool)), "version") == "3.0.0")) | |
492 | 541 | then invoke(lpFarmingAddress, "updateUserInterest", [user, pool, (userStakedAmount + userLockedAmount)], nil) | |
493 | 542 | else 0 | |
494 | 543 | if ((uplp == uplp)) | |
495 | 544 | then [IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kUserShareTokensStaked), userStakedAmountNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensVirtual), userAmountVirtualNew), IntegerEntry((pool + kShareTotalShareTokens), totalShareAmountNew), IntegerEntry((pool + kShareTokensVirtual), totalShareVirtualNew), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, toTreasure, true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP), ScriptTransfer(i.caller, shareTokensWithdrawAmount, shareTokensId)] | |
496 | 545 | else throw("Strict value is not equal to itself.") | |
497 | 546 | } | |
498 | 547 | } | |
499 | 548 | else throw("Strict value is not equal to itself.") | |
500 | 549 | } | |
501 | 550 | ||
502 | 551 | ||
503 | 552 | func calcClaim (i,pool,caller) = { | |
504 | 553 | let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
505 | 554 | let user = toString(caller) | |
506 | 555 | let shareTokenLocked = getTotalShareToken(pool) | |
507 | - | let $ | |
508 | - | let farmInterest = $ | |
509 | - | let boostInterest = $ | |
510 | - | let claimAmount = $ | |
511 | - | let toTreasure = $ | |
556 | + | let $t02546325545 = claimCalc(pool, user) | |
557 | + | let farmInterest = $t02546325545._1 | |
558 | + | let boostInterest = $t02546325545._2 | |
559 | + | let claimAmount = $t02546325545._3 | |
560 | + | let toTreasure = $t02546325545._4 | |
512 | 561 | let availableFund = (userAvailableSWOP(pool, user) + claimAmount) | |
513 | 562 | if ((accountBalance(shareTokensId) > shareTokenLocked)) | |
514 | 563 | then throw("Balance of share-token is lower than totalAmount") | |
515 | 564 | else { | |
516 | 565 | let uTrans = if ((i.caller != this)) | |
517 | 566 | then [ScriptTransfer(i.caller, availableFund, SWOP)] | |
518 | 567 | else nil | |
519 | 568 | $Tuple2(([IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), 0), Reissue(SWOP, (toTreasure + availableFund), true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP)] ++ uTrans), availableFund) | |
520 | 569 | } | |
521 | 570 | } | |
522 | 571 | ||
523 | 572 | ||
524 | 573 | func unlockUserLockCalc (i,pool,user) = { | |
525 | 574 | let totalShareVirtual = getIntegerValue(this, (pool + kShareTokensVirtual)) | |
526 | 575 | let userStakedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensStaked)), 0) | |
527 | 576 | let userLockedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLocked)), 0) | |
528 | 577 | let userAmountVirtual = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), userStakedAmount) | |
529 | 578 | let userStakedAmountNew = (userStakedAmount + userLockedAmount) | |
530 | - | let $ | |
531 | - | let farmInterest = $ | |
532 | - | let boostInterest = $ | |
533 | - | let claimAmount = $ | |
534 | - | let toTreasure = $ | |
579 | + | let $t02694827030 = claimCalc(pool, user) | |
580 | + | let farmInterest = $t02694827030._1 | |
581 | + | let boostInterest = $t02694827030._2 | |
582 | + | let claimAmount = $t02694827030._3 | |
583 | + | let toTreasure = $t02694827030._4 | |
535 | 584 | let availableFundsNew = (userAvailableSWOP(pool, user) + claimAmount) | |
536 | 585 | [IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kUserShareTokensStaked), userStakedAmountNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensVirtual), userStakedAmountNew), IntegerEntry((pool + kShareTokensVirtual), ((totalShareVirtual - userAmountVirtual) + userStakedAmountNew)), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), DeleteEntry((((pool + "_") + user) + kUserShareTokensLocked)), DeleteEntry((((pool + "_") + user) + kUserShareTokensLockedHeight)), DeleteEntry((((pool + "_") + user) + kUserShareTokensLockedType)), Reissue(SWOP, toTreasure, true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP)] | |
537 | 586 | } | |
538 | 587 | ||
539 | 588 | ||
540 | 589 | @Callable(i) | |
541 | 590 | func init (earlyLP) = if (isDefined(getString(this, kSWOPid))) | |
542 | 591 | then throw("SWOP already initialized") | |
543 | 592 | else { | |
544 | 593 | let initAmount = 100000000000000 | |
545 | 594 | let SWOPissue = Issue("SWOP", "SWOP protocol token", initAmount, 8, true) | |
546 | 595 | let SWOPid = calculateAssetId(SWOPissue) | |
547 | 596 | [BooleanEntry(kActive, true), Issue("SWOP", "SWOP protocol token", initAmount, 8, true), StringEntry(kSWOPid, toBase58String(SWOPid))] | |
548 | 597 | } | |
549 | 598 | ||
550 | 599 | ||
551 | 600 | ||
552 | 601 | @Callable(i) | |
553 | 602 | func initPoolShareFarming (pool) = valueOrElse(isAdminCall(i), [IntegerEntry((pool + kShareTotalShareTokens), 0), IntegerEntry((pool + kFarmLastInterest), 0), IntegerEntry((pool + kBoostLastInterest), 0), IntegerEntry((pool + kLastInterestHeight), height)]) | |
554 | 603 | ||
555 | 604 | ||
556 | 605 | ||
557 | 606 | @Callable(i) | |
558 | 607 | func updatePoolInterest (pool) = valueOrElse(isActive(), if ((i.caller != govAddress)) | |
559 | 608 | then throw("Only Governance can call this function") | |
560 | 609 | else { | |
561 | 610 | let user = toString(addressFromPublicKey(adminInvokePubKey)) | |
562 | - | let $ | |
563 | - | let farmInterest = $ | |
564 | - | let boostInterest = $ | |
565 | - | let boostLPinterest = $ | |
611 | + | let $t02919629270 = claimCalc(pool, user) | |
612 | + | let farmInterest = $t02919629270._1 | |
613 | + | let boostInterest = $t02919629270._2 | |
614 | + | let boostLPinterest = $t02919629270._3 | |
566 | 615 | [IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height)] | |
567 | 616 | }) | |
568 | 617 | ||
569 | 618 | ||
570 | 619 | ||
571 | 620 | @Callable(i) | |
572 | 621 | func lockShareTokens (pool,lockType) = valueOrElse(isDeprecatedPool(pool), valueOrElse(isActive(), calcLockShareTokens(i, i.caller, pool, lockType))) | |
573 | 622 | ||
574 | 623 | ||
575 | 624 | ||
576 | 625 | @Callable(i) | |
577 | 626 | func lockShareTokensFromPool (callerBytes,pool,lockType) = valueOrElse(isDeprecatedPool(pool), valueOrElse(isActive(), valueOrElse(isPoolCall(i, pool), calcLockShareTokens(i, Address(callerBytes), pool, lockType)))) | |
578 | 627 | ||
579 | 628 | ||
580 | 629 | ||
581 | 630 | @Callable(i) | |
582 | 631 | func lockStakedShareTokens (pool,lockType,lockAmount) = valueOrElse(isDeprecatedPool(pool), valueOrElse(isActive(), { | |
583 | 632 | let shareAssetId = getShareAssetId(pool) | |
584 | 633 | let user = toString(i.caller) | |
585 | 634 | let totalShare = getTotalShareToken(pool) | |
586 | 635 | let totalShareVirtual = valueOrElse(getInteger(this, (pool + kShareTokensVirtual)), totalShare) | |
587 | 636 | let userStakedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensStaked)), 0) | |
588 | 637 | let userLockedHeigt = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLockedHeight)), 0) | |
589 | 638 | let userLockedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLocked)), 0) | |
590 | 639 | let userAmountVirtual = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), userStakedAmount) | |
591 | 640 | let totalUserShareTokens = (userStakedAmount + userLockedAmount) | |
592 | - | let $ | |
593 | - | let lockPeriod = $ | |
594 | - | let lockCoef = $ | |
641 | + | let $t03089930951 = getLockParams(lockType) | |
642 | + | let lockPeriod = $t03089930951._1 | |
643 | + | let lockCoef = $t03089930951._2 | |
595 | 644 | let lockWavesFee = getIntegerValue(this, kLockWavesFee) | |
596 | 645 | if ((getHeightFirstHarvest(pool) > height)) | |
597 | 646 | then throw("You can't lock shareTokens till first harvest end.") | |
598 | 647 | else if ((0 >= lockType)) | |
599 | 648 | then throw("lockType must be > 0") | |
600 | 649 | else if ((lockAmount > userStakedAmount)) | |
601 | 650 | then throw(("You can't lock more than " + toString(userStakedAmount))) | |
602 | 651 | else if ((accountBalance(shareAssetId) > totalShare)) | |
603 | 652 | then throw("Balance of share-token is lower than totalAmount") | |
604 | 653 | else if (if ((userLockedHeigt == 0)) | |
605 | 654 | then if (if ((1 > size(i.payments))) | |
606 | 655 | then true | |
607 | 656 | else (i.payments[0].assetId != unit)) | |
608 | 657 | then true | |
609 | 658 | else (lockWavesFee > i.payments[0].amount) | |
610 | 659 | else false) | |
611 | 660 | then throw((("You need to pay additional waves comission " + toString(lockWavesFee)) + "WAVES")) | |
612 | 661 | else if (if ((userLockedHeigt == 0)) | |
613 | 662 | then (0 >= lockAmount) | |
614 | 663 | else false) | |
615 | 664 | then throw("lockAmount must be greater than 0") | |
616 | 665 | else if ((0 > lockAmount)) | |
617 | 666 | then throw("lockAmount must be positive") | |
618 | 667 | else if ((userLockedHeigt > (height + lockPeriod))) | |
619 | 668 | then throw("You cannot lock sharetokens for a period less than what you have already locked") | |
620 | 669 | else { | |
621 | 670 | let userLockedAmountNew = (userLockedAmount + lockAmount) | |
622 | 671 | let userStakedAmountNew = (userStakedAmount - lockAmount) | |
623 | 672 | let userLockedHeigtNew = (height + lockPeriod) | |
624 | 673 | let userAmountVirtualNew = (fraction(userLockedAmountNew, lockCoef, lockBoostCoefScale) + userStakedAmountNew) | |
625 | - | let $ | |
626 | - | let farmInterest = $ | |
627 | - | let boostInterest = $ | |
628 | - | let claimAmount = $ | |
629 | - | let toTreasure = $ | |
674 | + | let $t03229732379 = claimCalc(pool, user) | |
675 | + | let farmInterest = $t03229732379._1 | |
676 | + | let boostInterest = $t03229732379._2 | |
677 | + | let claimAmount = $t03229732379._3 | |
678 | + | let toTreasure = $t03229732379._4 | |
630 | 679 | let availableFundsNew = (userAvailableSWOP(pool, user) + claimAmount) | |
631 | 680 | [IntegerEntry((((pool + "_") + user) + kUserShareTokensStaked), userStakedAmountNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensLocked), userLockedAmountNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensLockedHeight), userLockedHeigtNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensLockedType), lockType), IntegerEntry((((pool + "_") + user) + kUserShareTokensVirtual), userAmountVirtualNew), IntegerEntry((pool + kShareTokensVirtual), ((totalShareVirtual - userAmountVirtual) + userAmountVirtualNew)), IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, toTreasure, true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP)] | |
632 | 681 | } | |
633 | 682 | })) | |
634 | 683 | ||
635 | 684 | ||
636 | 685 | ||
637 | 686 | @Callable(i) | |
638 | 687 | func unlockUserLock (pool,user) = valueOrElse(isActive(), { | |
639 | 688 | let userLockedHeigt = valueOrErrorMessage(getInteger(this, (((pool + "_") + user) + kUserShareTokensLockedHeight)), (((("There is no pool " + pool) + " or user ") + user) + "with lock")) | |
640 | 689 | if ((userLockedHeigt > height)) | |
641 | 690 | then throw(("You can't unlock sharetokens till " + toString(userLockedHeigt))) | |
642 | 691 | else (unlockUserLockCalc(i, pool, user) ++ [ScriptTransfer(i.caller, getIntegerValue(this, kLockWavesFee), unit)]) | |
643 | 692 | }) | |
644 | 693 | ||
645 | 694 | ||
646 | 695 | ||
647 | 696 | @Callable(i) | |
648 | 697 | func unlockUserLockDeprecated (pool,user) = valueOrElse(isActive(), valueOrElse(isSelfCall(i), if (!(getDeprecatedPool(pool))) | |
649 | 698 | then throw("Pool must be deprecated") | |
650 | 699 | else if (isDefined(getInteger(this, (((pool + "_") + user) + kUserShareTokensLockedHeight)))) | |
651 | 700 | then (unlockUserLockCalc(i, pool, user) ++ [ScriptTransfer(moneyBoxAddress, getIntegerValue(this, kLockWavesFee), unit)]) | |
652 | 701 | else nil)) | |
653 | 702 | ||
654 | 703 | ||
655 | 704 | ||
656 | 705 | @Callable(i) | |
657 | 706 | func withdrawShareTokens (pool,shareTokensWithdrawAmount) = valueOrElse(isActive(), calcWithdrawShareTokens(i, i.caller, pool, shareTokensWithdrawAmount)) | |
658 | 707 | ||
659 | 708 | ||
660 | 709 | ||
661 | 710 | @Callable(i) | |
662 | 711 | func withdrawShareTokensFromPool (callerBytes,pool,shareTokensWithdrawAmount) = valueOrElse(isActive(), valueOrElse(isPoolCall(i, pool), calcWithdrawShareTokens(i, Address(callerBytes), pool, shareTokensWithdrawAmount))) | |
663 | 712 | ||
664 | 713 | ||
665 | 714 | ||
666 | 715 | @Callable(i) | |
667 | 716 | func claim (pool) = valueOrElse(isActive(), { | |
668 | 717 | let r = calcClaim(i, pool, i.caller) | |
669 | 718 | if ((r._2 == 0)) | |
670 | 719 | then throw("You have 0 available SWOP") | |
671 | 720 | else r | |
672 | 721 | }) | |
673 | 722 | ||
674 | 723 | ||
675 | 724 | ||
676 | 725 | @Callable(i) | |
677 | 726 | func claimInternal (pool,caller) = valueOrElse(isActive(), valueOrElse(isSelfCall(i), calcClaim(i, pool, Address(caller)))) | |
678 | 727 | ||
679 | 728 | ||
680 | 729 | ||
681 | 730 | @Callable(i) | |
682 | 731 | func claimAndStake (pool) = valueOrElse(isActive(), { | |
683 | 732 | let claimAmount = { | |
684 | 733 | let @ = invoke(this, "claimInternal", [pool, i.caller.bytes], nil) | |
685 | 734 | if ($isInstanceOf(@, "Int")) | |
686 | 735 | then @ | |
687 | 736 | else throw(($getType(@) + " couldn't be cast to Int")) | |
688 | 737 | } | |
689 | 738 | if ((claimAmount == claimAmount)) | |
690 | 739 | then if ((claimAmount == 0)) | |
691 | 740 | then throw("You have 0 available SWOP") | |
692 | 741 | else { | |
693 | 742 | let stakeToGov = invoke(govAddress, "lockSWOPFromFarming", nil, [AttachedPayment(SWOP, claimAmount)]) | |
694 | 743 | if ((stakeToGov == stakeToGov)) | |
695 | 744 | then nil | |
696 | 745 | else throw("Strict value is not equal to itself.") | |
697 | 746 | } | |
698 | 747 | else throw("Strict value is not equal to itself.") | |
699 | 748 | }) | |
700 | 749 | ||
701 | 750 | ||
702 | 751 | ||
703 | 752 | @Callable(i) | |
704 | 753 | func claimAll (pools) = valueOrElse(isActive(), { | |
705 | 754 | func claimInv (claimTotal,pool) = { | |
706 | 755 | let claimAmount = { | |
707 | 756 | let @ = invoke(this, "claimInternal", [pool, i.caller.bytes], nil) | |
708 | 757 | if ($isInstanceOf(@, "Int")) | |
709 | 758 | then @ | |
710 | 759 | else throw(($getType(@) + " couldn't be cast to Int")) | |
711 | 760 | } | |
712 | 761 | if ((claimAmount == claimAmount)) | |
713 | 762 | then (claimTotal + claimAmount) | |
714 | 763 | else throw("Strict value is not equal to itself.") | |
715 | 764 | } | |
716 | 765 | ||
717 | 766 | let claimTotal = { | |
718 | 767 | let $l = pools | |
719 | 768 | let $s = size($l) | |
720 | 769 | let $acc0 = 0 | |
721 | 770 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
722 | 771 | then $a | |
723 | 772 | else claimInv($a, $l[$i]) | |
724 | 773 | ||
725 | 774 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
726 | 775 | then $a | |
727 | 776 | else throw("List size exceeds 60") | |
728 | 777 | ||
729 | 778 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60) | |
730 | 779 | } | |
731 | 780 | if ((claimTotal == 0)) | |
732 | 781 | then throw("You have 0 available SWOP") | |
733 | 782 | else [ScriptTransfer(i.caller, claimTotal, SWOP)] | |
734 | 783 | }) | |
735 | 784 | ||
736 | 785 | ||
737 | 786 | ||
738 | 787 | @Callable(i) | |
739 | 788 | func claimAllAndStake (pools) = valueOrElse(isActive(), { | |
740 | 789 | func claimInv (claimTotal,pool) = { | |
741 | 790 | let claimAmount = { | |
742 | 791 | let @ = invoke(this, "claimInternal", [pool, i.caller.bytes], nil) | |
743 | 792 | if ($isInstanceOf(@, "Int")) | |
744 | 793 | then @ | |
745 | 794 | else throw(($getType(@) + " couldn't be cast to Int")) | |
746 | 795 | } | |
747 | 796 | if ((claimAmount == claimAmount)) | |
748 | 797 | then (claimTotal + claimAmount) | |
749 | 798 | else throw("Strict value is not equal to itself.") | |
750 | 799 | } | |
751 | 800 | ||
752 | 801 | let claimTotal = { | |
753 | 802 | let $l = pools | |
754 | 803 | let $s = size($l) | |
755 | 804 | let $acc0 = 0 | |
756 | 805 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
757 | 806 | then $a | |
758 | 807 | else claimInv($a, $l[$i]) | |
759 | 808 | ||
760 | 809 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
761 | 810 | then $a | |
762 | 811 | else throw("List size exceeds 60") | |
763 | 812 | ||
764 | 813 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60) | |
765 | 814 | } | |
766 | 815 | if ((claimTotal == 0)) | |
767 | 816 | then throw("You have 0 available SWOP") | |
768 | 817 | else { | |
769 | 818 | let stakeToGov = invoke(govAddress, "lockSWOPFromFarming", nil, [AttachedPayment(SWOP, claimTotal)]) | |
770 | 819 | if ((stakeToGov == stakeToGov)) | |
771 | 820 | then nil | |
772 | 821 | else throw("Strict value is not equal to itself.") | |
773 | 822 | } | |
774 | 823 | }) | |
775 | 824 | ||
776 | 825 | ||
777 | 826 | ||
778 | 827 | @Callable(i) | |
779 | 828 | func updateUserBoostInterest (pool,user) = valueOrElse(isActive(), if ((i.caller != votingAddress)) | |
780 | 829 | then throw("Only voiting can call this function") | |
781 | 830 | else { | |
782 | - | let $ | |
783 | - | let farmInterest = $ | |
784 | - | let boostInterest = $ | |
785 | - | let claimAmount = $ | |
786 | - | let toTreasure = $ | |
831 | + | let $t03712837210 = claimCalc(pool, user) | |
832 | + | let farmInterest = $t03712837210._1 | |
833 | + | let boostInterest = $t03712837210._2 | |
834 | + | let claimAmount = $t03712837210._3 | |
835 | + | let toTreasure = $t03712837210._4 | |
787 | 836 | let availableFundsNew = (userAvailableSWOP(pool, user) + claimAmount) | |
788 | 837 | [IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, toTreasure, true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP)] | |
789 | 838 | }) | |
790 | 839 | ||
791 | 840 | ||
792 | 841 | ||
793 | 842 | @Callable(i) | |
794 | 843 | func shutdown () = valueOrElse(isAdminCall(i), if (!(active)) | |
795 | 844 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified"))) | |
796 | 845 | else suspend("Paused by admin")) | |
797 | 846 | ||
798 | 847 | ||
799 | 848 | ||
800 | 849 | @Callable(i) | |
801 | 850 | func activate () = valueOrElse(isAdminCall(i), if (active) | |
802 | 851 | then throw("DApp is already active") | |
803 | 852 | else [BooleanEntry(kActive, true), DeleteEntry(kCause)]) | |
804 | 853 | ||
805 | 854 | ||
806 | 855 | @Verifier(tx) | |
807 | 856 | func verify () = match tx { | |
808 | 857 | case _ => | |
809 | 858 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
810 | 859 | then 1 | |
811 | 860 | else 0 | |
812 | 861 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
813 | 862 | then 1 | |
814 | 863 | else 0 | |
815 | 864 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
816 | 865 | then 1 | |
817 | 866 | else 0 | |
818 | 867 | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
819 | 868 | } | |
820 | 869 |
github/deemru/w8io/169f3d6 150.31 ms ◑