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