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:AAIEAAAAAAAAACEIAhIDCgEIEgMKAQgSAwoBCBIDCgEIEgQKAggBEgMKAQgAAABWAAAAAAxhZG1pblB1YktleTEBAAAAIATPdeVk0MEPTme5HxNkxBoN6oQkQjF9M5BdQFgKnZNKAAAAAAxhZG1pblB1YktleTIBAAAAIATPdeVk0MEPTme5HxNkxBoN6oQkQjF9M5BdQFgKnZNKAAAAAAxhZG1pblB1YktleTMBAAAAIATPdeVk0MEPTme5HxNkxBoN6oQkQjF9M5BdQFgKnZNKAAAAABRrZXlTaGFyZVRva2Vuc0xvY2tlZAIAAAAaX3RvdGFsX3NoYXJlX3Rva2Vuc19sb2NrZWQAAAAAC2tTaGFyZUxpbWl0AgAAABxzaGFyZV9saW1pdF9vbl9maXJzdF9oYXJ2ZXN0AAAAABxrZXlSZXdhcmRQb29sRnJhY3Rpb25DdXJyZW50AgAAAB1fY3VycmVudF9wb29sX2ZyYWN0aW9uX3Jld2FyZAAAAAAda2V5UmV3YXJkUG9vbEZyYWN0aW9uUHJldmlvdXMCAAAAHl9wcmV2aW91c19wb29sX2ZyYWN0aW9uX3Jld2FyZA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2h0BQAAAAZoZWlnaHQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIFAAAABHBvb2wCAAAAAV8JAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyBQAAABBrZXlBdmFpbGFibGVTV09QAAAAAAAAAAAACQAETAAAAAIJAQAAAAdSZWlzc3VlAAAAAwUAAAAEU1dPUAUAAAANYXZhaWxhYmxlRnVuZAYJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIFAAAABHBvb2wCAAAAAV8JAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyBQAAABhrZXlVc2VyU1dPUENsYWltZWRBbW91bnQFAAAAFHVzZXJDbGFpbWVkQW1vdW50TmV3CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACBQAAAARwb29sAgAAAAFfCQAEJQAAAAEIBQAAAAFpAAAABmNhbGxlcgUAAAAca2V5VXNlclNXT1BMYXN0Q2xhaW1lZEFtb3VudAUAAAALY2xhaW1BbW91bnQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAA1hdmFpbGFibGVGdW5kBQAAAARTV09QBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXlBjZdB", "height": 1565651, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: hi7ChRYMwnJXxPhmvyeU58prNqLe6gbc3x4bHrAyFTb Next: F6qCYfVxcgkM5EBULW6mbTjMznSbvYv7wj4GLJZSWWmb Diff:
OldNewDifferences
1414 let keyRewardPoolFractionCurrent = "_current_pool_fraction_reward"
1515
1616 let keyRewardPoolFractionPrevious = "_previous_pool_fraction_reward"
17+
18+let keyHeightPoolFraction = "_pool_reward_update_height"
1719
1820 let keyTotalRewardPerBlockCurrent = "total_reward_per_block_current"
1921
6264 let keyFirstHarvestHeight = "first_harvest_height"
6365
6466 let keyfirstHarvestCpmm = "first_harvest"
67+
68+let keyTempPrevSum = "sum_reward_previous"
69+
70+let keyTempCurSum = "sum_reward_current"
6571
6672 let governanceAddress = Address(base58'3N5W8da2iiijVieA6qLGo7KzCJj8B19smWU')
6773
205211 let totalRewardPerBlockPrevious = valueOrErrorMessage(getInteger(governanceAddress, keyTotalRewardPerBlockPrevious), ((("No data on the key: " + keyTotalRewardPerBlockPrevious) + " at address ") + toString(governanceAddress)))
206212 let rewardPoolFractionCurrent = valueOrErrorMessage(getInteger(governanceAddress, (pool + keyRewardPoolFractionCurrent)), (((("No data on the key: " + pool) + keyRewardPoolFractionCurrent) + " at address ") + toString(governanceAddress)))
207213 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)
208215 let rewardPoolFractionPrevious = valueOrErrorMessage(getInteger(governanceAddress, (pool + keyRewardPoolFractionPrevious)), (((("No data on the key: " + pool) + keyRewardPoolFractionPrevious) + " at address ") + toString(governanceAddress)))
209216 let rewardPoolCurrent = fraction(totalRewardPerBlockCurrent, rewardPoolFractionCurrent, totalVoteShare)
210217 let rewardPoolPrevious = fraction(totalRewardPerBlockPrevious, rewardPoolFractionPrevious, totalVoteShare)
212219 then true
213220 else (rewardPoolPrevious > totalRewardPerBlockPrevious))
214221 then throw("rewardPoolCurrent > totalRewardPerBlockCurrent or rewardPoolPrevious > totalRewardPerBlockPrevious")
215- else $Tuple3(rewardPoolCurrent, rewardUpdateHeight, rewardPoolPrevious)
222+ else $Tuple4(rewardPoolCurrent, rewardUpdateHeight, rewardPoolPrevious, poolRewardUpdateHeight)
216223 }
217224
218225
243250 }
244251
245252
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))
247254 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)
254259 then {
255- let reward = (currentRewardPerBlock * (height - lastInterestHeight))
260+ let reward = (previousRewardPerBlock * (height - lastInterestHeight))
256261 (lastInterest + fraction(reward, scaleValue, shareTokenLocked))
257262 }
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))
263289 }
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+ }
264301
265302
266303 func claimCalc (pool,caller,pmtAmount) = {
267304 let shareAssetId = getShareAssetId(pool)
268305 let scaleValue = calcScaleValue(SWOP, shareAssetId)
269306 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)
281319 let claimAmount = fraction(userShareTokensAmount, (currentInterest - userLastInterest), scaleValue)
282320 let userNewInterest = currentInterest
283321 $Tuple4(userNewInterest, currentInterest, claimAmount, userShareTokensAmount)
285323
286324
287325 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
295334 let shareTokenLocked = getTotalShareTokenLocked(pool)
296- if ((shareTokenLocked == 0))
335+ if (if ((shareTokenLocked == 0))
336+ then (poolRewardUpdateHeight == 0)
337+ else false)
297338 then if ((rewardUpdateHeight > height))
298339 then {
299340 let reward = (previousRewardPerBlock * (height - lastInterestHeight))
309350 let reward = (currentRewardPerBlock * (height - rewardUpdateHeight))
310351 (reward + rewardAfterLastInterestBeforeReawardUpdate)
311352 }
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
313385 }
314386
315387
340412 func initPoolShareFarming (pool) = if ((i.caller != this))
341413 then throw("Only the DApp itself can call this function")
342414 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
347420 [IntegerEntry((pool + keyShareTokensLocked), 0), IntegerEntry((pool + keyLastInterest), 0), IntegerEntry((pool + keyLastInterestHeight), height)]
348421 }
349422
353426 func updatePoolInterest (pool) = if ((i.caller != wallet))
354427 then throw("Only the Admin itself can call this function")
355428 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)]
366440 }
367441
368442
369443
370444 @Callable(i)
371445 func lockShareTokens (pool) = {
372- let $t01435814433 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
373- let pmtAmount = $t01435814433._1
374- let pmtAssetId = $t01435814433._2
375- let $t01443814511 = getAssetInfo(pmtAssetId)
376- let pmtStrAssetId = $t01443814511._1
377- let pmtAssetName = $t01443814511._2
378- let pmtDecimals = $t01443814511._3
379- let $t01451614624 = claimCalc(pool, i.caller, pmtAmount)
380- let userNewInterest = $t01451614624._1
381- let currentInterest = $t01451614624._2
382- let claimAmount = $t01451614624._3
383- let userShareTokensAmount = $t01451614624._4
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
384458 let userShareAmountNew = (userShareTokensAmount + pmtAmount)
385459 let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount)
386460 let totalShareAmount = getTotalShareTokenLocked(pool)
437511 @Callable(i)
438512 func withdrawShareTokens (pool,shareTokensWithdrawAmount) = {
439513 let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id"))
440- let $t01881818918 = claimCalc(pool, i.caller, 1)
441- let userNewInterest = $t01881818918._1
442- let currentInterest = $t01881818918._2
443- let claimAmount = $t01881818918._3
444- let userShareTokensAmount = $t01881818918._4
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
445519 let userShareAmountNew = (userShareTokensAmount - shareTokensWithdrawAmount)
446520 let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount)
447521 let totalShareAmount = getTotalShareTokenLocked(pool)
458532 @Callable(i)
459533 func claim (pool) = {
460534 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
473548 let availableFund = (userAvailableSWOP(pool, i.caller) + claimAmount)
474549 let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
475550 let userClaimedAmountNew = (userClaimedAmount + claimAmount)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let adminPubKey1 = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK'
55
66 let adminPubKey2 = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK'
77
88 let adminPubKey3 = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK'
99
1010 let keyShareTokensLocked = "_total_share_tokens_locked"
1111
1212 let kShareLimit = "share_limit_on_first_harvest"
1313
1414 let keyRewardPoolFractionCurrent = "_current_pool_fraction_reward"
1515
1616 let keyRewardPoolFractionPrevious = "_previous_pool_fraction_reward"
17+
18+let keyHeightPoolFraction = "_pool_reward_update_height"
1719
1820 let keyTotalRewardPerBlockCurrent = "total_reward_per_block_current"
1921
2022 let keyTotalRewardPerBlockPrevious = "total_reward_per_block_previous"
2123
2224 let keyRewardUpdateHeight = "reward_update_height"
2325
2426 let keyLastInterest = "_last_interest"
2527
2628 let keyLastInterestHeight = "_last_interest_height"
2729
2830 let keyUserShareTokensLocked = "_share_tokens_locked"
2931
3032 let keyUserLastInterest = "_last_interest"
3133
3234 let keySWOPid = "SWOP_id"
3335
3436 let keyUserSWOPClaimedAmount = "_SWOP_claimed_amount"
3537
3638 let keyUserSWOPLastClaimedAmount = "_SWOP_last_claimed_amount"
3739
3840 let keyAvailableSWOP = "_available_SWOP"
3941
4042 let keyFarmingStartHeight = "farming_start_height"
4143
4244 let keyAPY = "apy"
4345
4446 let kPreviousTotalVoteSWOP = "previous_total_vote_SWOP"
4547
4648 let keySwopYearEmission = "swop_year_emission"
4749
4850 let keyBalancecpmmA = "A_asset_balance"
4951
5052 let keyBalancecpmmB = "B_asset_balance"
5153
5254 let kHarvestPoolActiveVoteStrucVoting = "_harvest_pool_activeVote_struc"
5355
5456 let kHarvestUserPoolActiveVoteStrucVoting = "_harvest_user_pool_activeVote_struc"
5557
5658 let keyLimitShareFirstHarvest = "share_limit_on_first_harvest"
5759
5860 let keyAssetIdA = "A_asset_id"
5961
6062 let keyAssetIdB = "B_asset_id"
6163
6264 let keyFirstHarvestHeight = "first_harvest_height"
6365
6466 let keyfirstHarvestCpmm = "first_harvest"
67+
68+let keyTempPrevSum = "sum_reward_previous"
69+
70+let keyTempCurSum = "sum_reward_current"
6571
6672 let governanceAddress = Address(base58'3N5W8da2iiijVieA6qLGo7KzCJj8B19smWU')
6773
6874 let wallet = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4')
6975
7076 let votingAddress = Address(base58'3MrJgdL1GniipErHy44YF9idzLaUL2iX5DQ')
7177
7278 let adminIncreaseInterestAddress = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4')
7379
7480 let oneWeekInBlock = 10106
7581
7682 let totalVoteShare = 10000000000
7783
7884 let scaleValue1 = 10
7985
8086 let scaleValue3 = 1000
8187
8288 let scaleValue5 = 100000
8389
8490 let scaleValue6 = 1000000
8591
8692 let scaleValue8 = 100000000
8793
8894 let scaleValue11 = 100000000000
8995
9096 func strAssetIdA (pool) = getStringValue(pool, keyAssetIdA)
9197
9298
9399 func strAssetIdB (pool) = getStringValue(pool, keyAssetIdB)
94100
95101
96102 func assetIdA (pool) = if ((strAssetIdA(pool) == "WAVES"))
97103 then unit
98104 else fromBase58String(strAssetIdA(pool))
99105
100106
101107 func assetIdB (pool) = if ((strAssetIdB(pool) == "WAVES"))
102108 then unit
103109 else fromBase58String(strAssetIdB(pool))
104110
105111
106112 let kBasePeriod = "base_period"
107113
108114 let kPeriodLength = "period_length"
109115
110116 let kStartHeight = "start_height"
111117
112118 let kFirstHarvestHeight = "first_harvest_height"
113119
114120 let kDurationFullVotePower = "duration_full_vote_power"
115121
116122 let kMinVotePower = "min_vote_power"
117123
118124 let basePeriod = valueOrErrorMessage(getInteger(votingAddress, kBasePeriod), "Empty kBasePeriod")
119125
120126 let startHeight = valueOrErrorMessage(getInteger(votingAddress, kStartHeight), "Empty kStartHeight")
121127
122128 let periodLength = valueOrErrorMessage(getInteger(votingAddress, kPeriodLength), "Empty kPeriodLength")
123129
124130 let durationFullVotePower = valueOrErrorMessage(getInteger(votingAddress, kDurationFullVotePower), "Empty kDurationFullVotePower")
125131
126132 let minVotePower = valueOrErrorMessage(getInteger(votingAddress, kMinVotePower), "Empty kMinVotePower")
127133
128134 let currPeriod = (basePeriod + ((height - startHeight) / periodLength))
129135
130136 func getLimitToken (pool) = valueOrElse(getIntegerValue(pool, keyLimitShareFirstHarvest), 0)
131137
132138
133139 let APY = getIntegerValue(this, keyAPY)
134140
135141 let SwopYearEmission = getIntegerValue(this, keySwopYearEmission)
136142
137143 func assetNameA (pool) = match assetIdA(pool) {
138144 case id: ByteVector =>
139145 value(assetInfo(id)).name
140146 case waves: Unit =>
141147 "WAVES"
142148 case _ =>
143149 throw("Match error")
144150 }
145151
146152
147153 func assetNameB (pool) = match assetIdB(pool) {
148154 case id: ByteVector =>
149155 value(assetInfo(id)).name
150156 case waves: Unit =>
151157 "WAVES"
152158 case _ =>
153159 throw("Match error")
154160 }
155161
156162
157163 let SWOP = fromBase58String(getStringValue(this, keySWOPid))
158164
159165 func isFirstHarvest (pool) = valueOrElse(getBoolean(pool, keyfirstHarvestCpmm), false)
160166
161167
162168 func getHeightFirstHarvest (pool) = valueOrElse(getInteger(pool, keyFirstHarvestHeight), 0)
163169
164170
165171 func getBalanceA (pool) = valueOrErrorMessage(getInteger(pool, keyBalancecpmmA), ("No data on the key: " + keyBalancecpmmA))
166172
167173
168174 func getBalanceB (pool) = valueOrErrorMessage(getInteger(pool, keyBalancecpmmB), ("No data on the key: " + keyBalancecpmmB))
169175
170176
171177 func getShareLimitToken (pool) = valueOrErrorMessage(getInteger(pool, kShareLimit), ("No data on the key: " + kShareLimit))
172178
173179
174180 func getTotalShareTokenLocked (pool) = valueOrErrorMessage(getInteger(this, (pool + keyShareTokensLocked)), (("No data on the key: " + pool) + keyShareTokensLocked))
175181
176182
177183 func getShareAssetId (pool) = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id"))
178184
179185
180186 func getAssetInfo (assetId) = match assetId {
181187 case id: ByteVector =>
182188 let stringId = toBase58String(id)
183189 let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist"))
184190 $Tuple3(stringId, info.name, info.decimals)
185191 case waves: Unit =>
186192 $Tuple3("WAVES", "WAVES", 8)
187193 case _ =>
188194 throw("Match error")
189195 }
190196
191197
192198 func calcScaleValue (assetId1,assetId2) = {
193199 let assetId1Decimals = value(assetInfo(assetId1)).decimals
194200 let assetId2Decimals = value(assetInfo(assetId2)).decimals
195201 let scaleDigits = ((assetId2Decimals - assetId1Decimals) + 8)
196202 pow(10, 0, scaleDigits, 0, 0, HALFDOWN)
197203 }
198204
199205
200206 func userAvailableSWOP (pool,user) = valueOrElse(getInteger(this, (((pool + "_") + toString(user)) + keyAvailableSWOP)), 0)
201207
202208
203209 func rewardInfo (pool) = {
204210 let totalRewardPerBlockCurrent = valueOrErrorMessage(getInteger(governanceAddress, keyTotalRewardPerBlockCurrent), ((("No data on the key: " + keyTotalRewardPerBlockCurrent) + " at address ") + toString(governanceAddress)))
205211 let totalRewardPerBlockPrevious = valueOrErrorMessage(getInteger(governanceAddress, keyTotalRewardPerBlockPrevious), ((("No data on the key: " + keyTotalRewardPerBlockPrevious) + " at address ") + toString(governanceAddress)))
206212 let rewardPoolFractionCurrent = valueOrErrorMessage(getInteger(governanceAddress, (pool + keyRewardPoolFractionCurrent)), (((("No data on the key: " + pool) + keyRewardPoolFractionCurrent) + " at address ") + toString(governanceAddress)))
207213 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)
208215 let rewardPoolFractionPrevious = valueOrErrorMessage(getInteger(governanceAddress, (pool + keyRewardPoolFractionPrevious)), (((("No data on the key: " + pool) + keyRewardPoolFractionPrevious) + " at address ") + toString(governanceAddress)))
209216 let rewardPoolCurrent = fraction(totalRewardPerBlockCurrent, rewardPoolFractionCurrent, totalVoteShare)
210217 let rewardPoolPrevious = fraction(totalRewardPerBlockPrevious, rewardPoolFractionPrevious, totalVoteShare)
211218 if (if ((rewardPoolCurrent > totalRewardPerBlockCurrent))
212219 then true
213220 else (rewardPoolPrevious > totalRewardPerBlockPrevious))
214221 then throw("rewardPoolCurrent > totalRewardPerBlockCurrent or rewardPoolPrevious > totalRewardPerBlockPrevious")
215- else $Tuple3(rewardPoolCurrent, rewardUpdateHeight, rewardPoolPrevious)
222+ else $Tuple4(rewardPoolCurrent, rewardUpdateHeight, rewardPoolPrevious, poolRewardUpdateHeight)
216223 }
217224
218225
219226 func getLastInterestInfo (pool) = {
220227 let lastInterest = valueOrErrorMessage(getInteger(this, (pool + keyLastInterest)), (("No data on the key: " + pool) + keyLastInterest))
221228 let lastInterestHeight = valueOrElse(getInteger(this, (pool + keyLastInterestHeight)), height)
222229 $Tuple2(lastInterestHeight, lastInterest)
223230 }
224231
225232
226233 func getUserInterestInfo (pool,userAddress) = {
227234 let userLastInterest = getInteger(this, (((pool + "_") + toString(userAddress)) + keyUserLastInterest))
228235 let userShare = getInteger(this, (((pool + "_") + toString(userAddress)) + keyUserShareTokensLocked))
229236 let lastInterest = valueOrErrorMessage(getInteger(this, (pool + keyLastInterest)), (("No data on the key: " + pool) + keyLastInterest))
230237 let userLastInterestValue = match userLastInterest {
231238 case userLastInterest: Int =>
232239 userLastInterest
233240 case _ =>
234241 lastInterest
235242 }
236243 let userShareTokensAmount = match userShare {
237244 case userShare: Int =>
238245 userShare
239246 case _ =>
240247 0
241248 }
242249 $Tuple2(userLastInterestValue, userShareTokensAmount)
243250 }
244251
245252
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))
247254 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)
254259 then {
255- let reward = (currentRewardPerBlock * (height - lastInterestHeight))
260+ let reward = (previousRewardPerBlock * (height - lastInterestHeight))
256261 (lastInterest + fraction(reward, scaleValue, shareTokenLocked))
257262 }
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))
263289 }
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+ }
264301
265302
266303 func claimCalc (pool,caller,pmtAmount) = {
267304 let shareAssetId = getShareAssetId(pool)
268305 let scaleValue = calcScaleValue(SWOP, shareAssetId)
269306 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)
281319 let claimAmount = fraction(userShareTokensAmount, (currentInterest - userLastInterest), scaleValue)
282320 let userNewInterest = currentInterest
283321 $Tuple4(userNewInterest, currentInterest, claimAmount, userShareTokensAmount)
284322 }
285323
286324
287325 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
295334 let shareTokenLocked = getTotalShareTokenLocked(pool)
296- if ((shareTokenLocked == 0))
335+ if (if ((shareTokenLocked == 0))
336+ then (poolRewardUpdateHeight == 0)
337+ else false)
297338 then if ((rewardUpdateHeight > height))
298339 then {
299340 let reward = (previousRewardPerBlock * (height - lastInterestHeight))
300341 reward
301342 }
302343 else if ((lastInterestHeight > rewardUpdateHeight))
303344 then {
304345 let reward = (currentRewardPerBlock * (height - lastInterestHeight))
305346 reward
306347 }
307348 else {
308349 let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight))
309350 let reward = (currentRewardPerBlock * (height - rewardUpdateHeight))
310351 (reward + rewardAfterLastInterestBeforeReawardUpdate)
311352 }
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
313385 }
314386
315387
316388 func checkPmtAssetIdCorrect (pool,pmtAssetId) = {
317389 let poolShareAssetId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id"))
318390 if ((pmtAssetId == poolShareAssetId))
319391 then true
320392 else false
321393 }
322394
323395
324396 func getUserSWOPClaimedAmount (pool,user) = valueOrElse(getInteger(this, (((pool + "_") + toString(user)) + keyUserSWOPClaimedAmount)), 0)
325397
326398
327399 @Callable(i)
328400 func init (earlyLP) = if (isDefined(getString(this, keySWOPid)))
329401 then throw("SWOP already initialized")
330402 else {
331403 let initAmount = 100000000000000
332404 let SWOPissue = Issue("SWOP", "SWOP protocol token", initAmount, 8, true)
333405 let SWOPid = calculateAssetId(SWOPissue)
334406 [Issue("SWOP", "SWOP protocol token", initAmount, 8, true), StringEntry(keySWOPid, toBase58String(SWOPid))]
335407 }
336408
337409
338410
339411 @Callable(i)
340412 func initPoolShareFarming (pool) = if ((i.caller != this))
341413 then throw("Only the DApp itself can call this function")
342414 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
347420 [IntegerEntry((pool + keyShareTokensLocked), 0), IntegerEntry((pool + keyLastInterest), 0), IntegerEntry((pool + keyLastInterestHeight), height)]
348421 }
349422
350423
351424
352425 @Callable(i)
353426 func updatePoolInterest (pool) = if ((i.caller != wallet))
354427 then throw("Only the Admin itself can call this function")
355428 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)]
366440 }
367441
368442
369443
370444 @Callable(i)
371445 func lockShareTokens (pool) = {
372- let $t01435814433 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
373- let pmtAmount = $t01435814433._1
374- let pmtAssetId = $t01435814433._2
375- let $t01443814511 = getAssetInfo(pmtAssetId)
376- let pmtStrAssetId = $t01443814511._1
377- let pmtAssetName = $t01443814511._2
378- let pmtDecimals = $t01443814511._3
379- let $t01451614624 = claimCalc(pool, i.caller, pmtAmount)
380- let userNewInterest = $t01451614624._1
381- let currentInterest = $t01451614624._2
382- let claimAmount = $t01451614624._3
383- let userShareTokensAmount = $t01451614624._4
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
384458 let userShareAmountNew = (userShareTokensAmount + pmtAmount)
385459 let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount)
386460 let totalShareAmount = getTotalShareTokenLocked(pool)
387461 let totalShareAmountNew = (totalShareAmount + pmtAmount)
388462 let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
389463 let userClaimedAmountNew = (userClaimedAmount + claimAmount)
390464 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)]
391465 if ((0 >= pmtAmount))
392466 then throw("You can't lock token")
393467 else if (!(checkPmtAssetIdCorrect(pool, pmtAssetId)))
394468 then throw("Incorrect pmtAssetId")
395469 else if (if (isFirstHarvest(Address(fromBase58String(pool))))
396470 then (getHeightFirstHarvest(Address(fromBase58String(pool))) > height)
397471 else false)
398472 then {
399473 let harvestPeriod = ((((getHeightFirstHarvest(Address(fromBase58String(pool))) - startHeight) + 1) / periodLength) - 1)
400474 let amountOfVoting = split(getStringValue(votingAddress, (((toString(i.caller) + "_") + pool) + "_user_pool_struc")), "_")
401475 let amountPoolStract = split(getStringValue(votingAddress, (pool + "_pool_struc")), "_")
402476 let amountActiveVoteUserPoolStract = split(valueOrElse(getString(votingAddress, (((toString(i.caller) + "_") + pool) + kHarvestUserPoolActiveVoteStrucVoting)), ""), "_")
403477 let amountPoolActiveVoteStract = split(valueOrElse(getString(votingAddress, (pool + kHarvestPoolActiveVoteStrucVoting)), ""), "_")
404478 let userShareTokenLocked = userShareTokensAmount
405479 let userPoolActiveVote = if ((toString(currPeriod) == amountOfVoting[2]))
406480 then valueOrElse(parseInt(amountActiveVoteUserPoolStract[0]), 0)
407481 else valueOrElse(parseInt(amountOfVoting[1]), 0)
408482 let poolActiveVote = if ((toString(currPeriod) == amountPoolStract[2]))
409483 then valueOrElse(parseInt(amountPoolActiveVoteStract[0]), 0)
410484 else valueOrElse(parseInt(amountPoolStract[1]), 0)
411485 let protocolReward = calculateProtocolReward(pool)
412486 if ((userPoolActiveVote != 0))
413487 then {
414488 let limitShareToken = getShareLimitToken(addressFromStringValue(pool))
415489 let shareToken = (fraction(limitShareToken, userPoolActiveVote, poolActiveVote) - userShareTokenLocked)
416490 if (if ((size(amountActiveVoteUserPoolStract) > 1))
417491 then (valueOrElse(parseInt(amountActiveVoteUserPoolStract[1]), 0) >= harvestPeriod)
418492 else false)
419493 then throw("You can't share token")
420494 else if ((pmtAmount > limitShareToken))
421495 then throw(("You can't share token more than " + toString(limitShareToken)))
422496 else if ((shareToken > 0))
423497 then if ((totalShareAmount == 0))
424498 then (baseEntry ++ [Reissue(SWOP, protocolReward, true), ScriptTransfer(wallet, protocolReward, SWOP)])
425499 else if ((shareToken >= pmtAmount))
426500 then baseEntry
427501 else throw(("Your maximum share token is " + toString(shareToken)))
428502 else throw("You can't share token")
429503 }
430504 else throw("Your amount of token less than 0")
431505 }
432506 else baseEntry
433507 }
434508
435509
436510
437511 @Callable(i)
438512 func withdrawShareTokens (pool,shareTokensWithdrawAmount) = {
439513 let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id"))
440- let $t01881818918 = claimCalc(pool, i.caller, 1)
441- let userNewInterest = $t01881818918._1
442- let currentInterest = $t01881818918._2
443- let claimAmount = $t01881818918._3
444- let userShareTokensAmount = $t01881818918._4
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
445519 let userShareAmountNew = (userShareTokensAmount - shareTokensWithdrawAmount)
446520 let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount)
447521 let totalShareAmount = getTotalShareTokenLocked(pool)
448522 let totalShareAmountNew = (totalShareAmount - shareTokensWithdrawAmount)
449523 let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
450524 let userClaimedAmountNew = (userClaimedAmount + claimAmount)
451525 if ((shareTokensWithdrawAmount > userShareTokensAmount))
452526 then throw("Withdraw amount more then user locked amount")
453527 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)]
454528 }
455529
456530
457531
458532 @Callable(i)
459533 func claim (pool) = {
460534 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
473548 let availableFund = (userAvailableSWOP(pool, i.caller) + claimAmount)
474549 let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
475550 let userClaimedAmountNew = (userClaimedAmount + claimAmount)
476551 if ((availableFund == 0))
477552 then throw("You have 0 available SWOP")
478553 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)]
479554 }
480555
481556
482557 @Verifier(tx)
483558 func verify () = match tx {
484559 case _ =>
485560 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
486561 }
487562

github/deemru/w8io/169f3d6 
72.56 ms