tx · 4ZzKWWxeVCpKBDFrfkRRmziHWh5aGSzhY2D3sXNst7B6

3MsxHxruYWoddB4HRiPBYAWtMXMtCF1V9XT:  -0.01400000 Waves

2021.06.08 13:34 [1561266] smart account 3MsxHxruYWoddB4HRiPBYAWtMXMtCF1V9XT > SELF 0.00000000 Waves

{ "type": 13, "id": "4ZzKWWxeVCpKBDFrfkRRmziHWh5aGSzhY2D3sXNst7B6", "fee": 1400000, "feeAssetId": null, "timestamp": 1623148505865, "version": 2, "chainId": 84, "sender": "3MsxHxruYWoddB4HRiPBYAWtMXMtCF1V9XT", "senderPublicKey": "3ijdmxaYrpDFsKVbQH2kvB7i6JzHj9bep9bGWiQPra2D", "proofs": [ "3zjrCxqGpcEchkTDUQPaZmVcPnt1AHCmxQn8PNYMWbu6YMwmc24dyhJhTDeGA1euPEVEv88UHGucouAj5WotkEBA" ], "script": "base64:AAIEAAAAAAAAACEIAhIDCgEIEgMKAQgSAwoBCBIDCgEIEgQKAggBEgMKAQgAAABUAAAAAAxhZG1pblB1YktleTEBAAAAIATPdeVk0MEPTme5HxNkxBoN6oQkQjF9M5BdQFgKnZNKAAAAAAxhZG1pblB1YktleTIBAAAAIATPdeVk0MEPTme5HxNkxBoN6oQkQjF9M5BdQFgKnZNKAAAAAAxhZG1pblB1YktleTMBAAAAIATPdeVk0MEPTme5HxNkxBoN6oQkQjF9M5BdQFgKnZNKAAAAABRrZXlTaGFyZVRva2Vuc0xvY2tlZAIAAAAaX3RvdGFsX3NoYXJlX3Rva2Vuc19sb2NrZWQAAAAAC2tTaGFyZUxpbWl0AgAAABxzaGFyZV9saW1pdF9vbl9maXJzdF9oYXJ2ZXN0AAAAABxrZXlSZXdhcmRQb29sRnJhY3Rpb25DdXJyZW50AgAAAB1fY3VycmVudF9wb29sX2ZyYWN0aW9uX3Jld2FyZAAAAAAda2V5UmV3YXJkUG9vbEZyYWN0aW9uUHJldmlvdXMCAAAAHl9wcmV2aW91c19wb29sX2ZyYWN0aW9uX3Jld2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AABHBvb2wCAAAAAV8JAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyBQAAABhrZXlVc2VyU1dPUENsYWltZWRBbW91bnQFAAAAFHVzZXJDbGFpbWVkQW1vdW50TmV3CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACBQAAAARwb29sAgAAAAFfCQAEJQAAAAEIBQAAAAFpAAAABmNhbGxlcgUAAAAca2V5VXNlclNXT1BMYXN0Q2xhaW1lZEFtb3VudAUAAAALY2xhaW1BbW91bnQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAA1hdmFpbGFibGVGdW5kBQAAAARTV09QBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXm45ANF", "height": 1561266, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: D1KSoMS8xTczkowcuS4f3nwAtd3weNs2GevxnBKRU9h8 Next: 4TuVx77Gw9N4vsNGS4WkvzxxuBPMPnHnT2qiAcnwdaYZ Diff:
OldNewDifferences
1414 let keyRewardPoolFractionCurrent = "_current_pool_fraction_reward"
1515
1616 let keyRewardPoolFractionPrevious = "_previous_pool_fraction_reward"
17+
18+let keyHeightPoolFraction = "_reward_update_height"
1719
1820 let keyTotalRewardPerBlockCurrent = "total_reward_per_block_current"
1921
200202 func userAvailableSWOP (pool,user) = valueOrElse(getInteger(this, (((pool + "_") + toString(user)) + keyAvailableSWOP)), 0)
201203
202204
203-func isPoolUnderway (pool) = if ((pool == "3PCdNCULgjM9ZMLEt61M45qxV26ro6o48Jj"))
204- then true
205- else (pool == "3PMcDUBDyjNB1fkRGeLGpsz1ZQPfcmyp4r5")
206-
207-
208205 func rewardInfo (pool) = {
209206 let totalRewardPerBlockCurrent = valueOrErrorMessage(getInteger(governanceAddress, keyTotalRewardPerBlockCurrent), ((("No data on the key: " + keyTotalRewardPerBlockCurrent) + " at address ") + toString(governanceAddress)))
210207 let totalRewardPerBlockPrevious = valueOrErrorMessage(getInteger(governanceAddress, keyTotalRewardPerBlockPrevious), ((("No data on the key: " + keyTotalRewardPerBlockPrevious) + " at address ") + toString(governanceAddress)))
211208 let rewardPoolFractionCurrent = valueOrErrorMessage(getInteger(governanceAddress, (pool + keyRewardPoolFractionCurrent)), (((("No data on the key: " + pool) + keyRewardPoolFractionCurrent) + " at address ") + toString(governanceAddress)))
212209 let rewardUpdateHeight = valueOrErrorMessage(getInteger(governanceAddress, keyRewardUpdateHeight), ((("No data on the key: " + keyRewardUpdateHeight) + " at address ") + toString(governanceAddress)))
210+ let poolRewardUpdateHeight = valueOrErrorMessage(getInteger(governanceAddress, (pool + keyHeightPoolFraction)), (((("No data on the key: " + pool) + keyHeightPoolFraction) + " at address ") + toString(governanceAddress)))
213211 let rewardPoolFractionPrevious = valueOrErrorMessage(getInteger(governanceAddress, (pool + keyRewardPoolFractionPrevious)), (((("No data on the key: " + pool) + keyRewardPoolFractionPrevious) + " at address ") + toString(governanceAddress)))
214212 let rewardPoolCurrent = fraction(totalRewardPerBlockCurrent, rewardPoolFractionCurrent, totalVoteShare)
215213 let rewardPoolPrevious = fraction(totalRewardPerBlockPrevious, rewardPoolFractionPrevious, totalVoteShare)
217215 then true
218216 else (rewardPoolPrevious > totalRewardPerBlockPrevious))
219217 then throw("rewardPoolCurrent > totalRewardPerBlockCurrent or rewardPoolPrevious > totalRewardPerBlockPrevious")
220- else $Tuple3(rewardPoolCurrent, rewardUpdateHeight, rewardPoolPrevious)
218+ else $Tuple4(rewardPoolCurrent, rewardUpdateHeight, rewardPoolPrevious, poolRewardUpdateHeight)
221219 }
222220
223221
248246 }
249247
250248
251-func calcInterest (lastInterestHeight,rewardUpdateHeight,lastInterest,currentRewardPerBlock,shareTokenLocked,previousRewardPerBlock,shareAssetId,scaleValue,pmtAmount) = if ((shareTokenLocked == 0))
249+func calcInterest (lastInterestHeight,rewardUpdateHeight,poolRewardUpdateHeight,lastInterest,currentRewardPerBlock,shareTokenLocked,previousRewardPerBlock,shareAssetId,scaleValue,pmtAmount) = if ((shareTokenLocked == 0))
252250 then 0
253- else if ((rewardUpdateHeight > height))
251+ else if (if ((rewardUpdateHeight >= height))
252+ then (rewardUpdateHeight == poolRewardUpdateHeight)
253+ else false)
254254 then {
255- let reward = (previousRewardPerBlock * (height - lastInterestHeight))
255+ let reward = (currentRewardPerBlock * (height - lastInterestHeight))
256256 (lastInterest + fraction(reward, scaleValue, shareTokenLocked))
257257 }
258- else if ((lastInterestHeight > rewardUpdateHeight))
258+ else if (if ((height > rewardUpdateHeight))
259+ then (rewardUpdateHeight == poolRewardUpdateHeight)
260+ else false)
259261 then {
260262 let reward = (currentRewardPerBlock * (height - lastInterestHeight))
261263 (lastInterest + fraction(reward, scaleValue, shareTokenLocked))
262264 }
263- else {
264- let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight))
265- let interestAfterUpdate = (lastInterest + fraction(rewardAfterLastInterestBeforeReawardUpdate, scaleValue, shareTokenLocked))
266- let reward = (currentRewardPerBlock * (height - rewardUpdateHeight))
267- (interestAfterUpdate + fraction(reward, scaleValue, shareTokenLocked))
268- }
265+ else if (if ((height > rewardUpdateHeight))
266+ then (rewardUpdateHeight != poolRewardUpdateHeight)
267+ else false)
268+ then {
269+ let reward = (previousRewardPerBlock * (height - lastInterestHeight))
270+ (lastInterest + fraction(reward, scaleValue, shareTokenLocked))
271+ }
272+ else if ((lastInterestHeight > rewardUpdateHeight))
273+ then {
274+ let reward = (currentRewardPerBlock * (height - lastInterestHeight))
275+ (lastInterest + fraction(reward, scaleValue, shareTokenLocked))
276+ }
277+ else {
278+ let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight))
279+ let interestAfterUpdate = (lastInterest + fraction(rewardAfterLastInterestBeforeReawardUpdate, scaleValue, shareTokenLocked))
280+ let reward = (currentRewardPerBlock * (height - rewardUpdateHeight))
281+ (interestAfterUpdate + fraction(reward, scaleValue, shareTokenLocked))
282+ }
269283
270284
271285 func claimCalc (pool,caller,pmtAmount) = {
272286 let shareAssetId = getShareAssetId(pool)
273287 let scaleValue = calcScaleValue(SWOP, shareAssetId)
274288 let shareTokenLocked = getTotalShareTokenLocked(pool)
275- let $t01099411059 = getLastInterestInfo(pool)
276- let lastInterestHeight = $t01099411059._1
277- let lastInterest = $t01099411059._2
278- let $t01106411152 = rewardInfo(pool)
279- let currentRewardPerBlock = $t01106411152._1
280- let rewardUpdateHeight = $t01106411152._2
281- let previousRewardPerBlock = $t01106411152._3
282- let $t01115711236 = getUserInterestInfo(pool, caller)
283- let userLastInterest = $t01115711236._1
284- let userShareTokensAmount = $t01115711236._2
285- let currentInterest = calcInterest(lastInterestHeight, rewardUpdateHeight, lastInterest, currentRewardPerBlock, shareTokenLocked, previousRewardPerBlock, shareAssetId, scaleValue, pmtAmount)
289+ let $t01185711922 = getLastInterestInfo(pool)
290+ let lastInterestHeight = $t01185711922._1
291+ let lastInterest = $t01185711922._2
292+ let $t01192712039 = rewardInfo(pool)
293+ let currentRewardPerBlock = $t01192712039._1
294+ let rewardUpdateHeight = $t01192712039._2
295+ let previousRewardPerBlock = $t01192712039._3
296+ let poolRewardUpdateHeight = $t01192712039._4
297+ let $t01204412123 = getUserInterestInfo(pool, caller)
298+ let userLastInterest = $t01204412123._1
299+ let userShareTokensAmount = $t01204412123._2
300+ let currentInterest = calcInterest(lastInterestHeight, rewardUpdateHeight, poolRewardUpdateHeight, lastInterest, currentRewardPerBlock, shareTokenLocked, previousRewardPerBlock, shareAssetId, scaleValue, pmtAmount)
286301 let claimAmount = fraction(userShareTokensAmount, (currentInterest - userLastInterest), scaleValue)
287302 let userNewInterest = currentInterest
288303 $Tuple4(userNewInterest, currentInterest, claimAmount, userShareTokensAmount)
290305
291306
292307 func calculateProtocolReward (pool) = {
293- let $t01170911774 = getLastInterestInfo(pool)
294- let lastInterestHeight = $t01170911774._1
295- let lastInterest = $t01170911774._2
296- let $t01177911867 = rewardInfo(pool)
297- let currentRewardPerBlock = $t01177911867._1
298- let rewardUpdateHeight = $t01177911867._2
299- let previousRewardPerBlock = $t01177911867._3
308+ let $t01261912684 = getLastInterestInfo(pool)
309+ let lastInterestHeight = $t01261912684._1
310+ let lastInterest = $t01261912684._2
311+ let $t01268912800 = rewardInfo(pool)
312+ let currentRewardPerBlock = $t01268912800._1
313+ let rewardUpdateHeight = $t01268912800._2
314+ let previousRewardPerBlock = $t01268912800._3
315+ let poolRewardUpdateHeight = $t01268912800._4
300316 let shareTokenLocked = getTotalShareTokenLocked(pool)
301317 if ((shareTokenLocked == 0))
302318 then if ((rewardUpdateHeight > height))
342358
343359
344360 @Callable(i)
345-func initPoolShareFarming (pool) = if (isPoolUnderway(pool))
346- then throw("Work is currently underway")
347- else if ((i.caller != this))
348- then throw("Only the DApp itself can call this function")
349- else {
350- let $t01372613806 = rewardInfo(pool)
351- let currentReward = $t01372613806._1
352- let rewardUpdateHeight = $t01372613806._2
353- let previousRewardPerBlock = $t01372613806._3
361+func initPoolShareFarming (pool) = if ((i.caller != this))
362+ then throw("Only the DApp itself can call this function")
363+ else {
364+ let $t01455014653 = rewardInfo(pool)
365+ let currentReward = $t01455014653._1
366+ let rewardUpdateHeight = $t01455014653._2
367+ let previousRewardPerBlock = $t01455014653._3
368+ let poolRewardUpdateHeight = $t01455014653._4
354369 [IntegerEntry((pool + keyShareTokensLocked), 0), IntegerEntry((pool + keyLastInterest), 0), IntegerEntry((pool + keyLastInterestHeight), height)]
355- }
356-
357-
358-
359-@Callable(i)
360-func lockShareTokens (pool) = if (isPoolUnderway(pool))
361- then throw("Work is currently underway")
362- else {
363- let $t01483214907 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
364- let pmtAmount = $t01483214907._1
365- let pmtAssetId = $t01483214907._2
366- let $t01491614989 = getAssetInfo(pmtAssetId)
367- let pmtStrAssetId = $t01491614989._1
368- let pmtAssetName = $t01491614989._2
369- let pmtDecimals = $t01491614989._3
370- let $t01499815106 = claimCalc(pool, i.caller, pmtAmount)
371- let userNewInterest = $t01499815106._1
372- let currentInterest = $t01499815106._2
373- let claimAmount = $t01499815106._3
374- let userShareTokensAmount = $t01499815106._4
375- let userShareAmountNew = (userShareTokensAmount + pmtAmount)
376- let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount)
377- let totalShareAmount = getTotalShareTokenLocked(pool)
378- let totalShareAmountNew = (totalShareAmount + pmtAmount)
379- let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
380- let userClaimedAmountNew = (userClaimedAmount + claimAmount)
381- 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)]
382- if ((0 >= pmtAmount))
383- then throw("You can't lock token")
384- else if (!(checkPmtAssetIdCorrect(pool, pmtAssetId)))
385- then throw("Incorrect pmtAssetId")
386- else if (if (isFirstHarvest(Address(fromBase58String(pool))))
387- then (getHeightFirstHarvest(Address(fromBase58String(pool))) > height)
388- else false)
389- then {
390- let harvestPeriod = ((((getHeightFirstHarvest(Address(fromBase58String(pool))) - startHeight) + 1) / periodLength) - 1)
391- let amountOfVoting = split(getStringValue(votingAddress, (((toString(i.caller) + "_") + pool) + "_user_pool_struc")), "_")
392- let amountPoolStract = split(getStringValue(votingAddress, (pool + "_pool_struc")), "_")
393- let amountActiveVoteUserPoolStract = split(valueOrElse(getString(votingAddress, (((toString(i.caller) + "_") + pool) + kHarvestUserPoolActiveVoteStrucVoting)), ""), "_")
394- let amountPoolActiveVoteStract = split(valueOrElse(getString(votingAddress, (pool + kHarvestPoolActiveVoteStrucVoting)), ""), "_")
395- let userShareTokenLocked = userShareTokensAmount
396- let userPoolActiveVote = if ((toString(currPeriod) == amountOfVoting[2]))
397- then valueOrElse(parseInt(amountActiveVoteUserPoolStract[0]), 0)
398- else valueOrElse(parseInt(amountOfVoting[1]), 0)
399- let poolActiveVote = if ((toString(currPeriod) == amountPoolStract[2]))
400- then valueOrElse(parseInt(amountPoolActiveVoteStract[0]), 0)
401- else valueOrElse(parseInt(amountPoolStract[1]), 0)
402- let protocolReward = calculateProtocolReward(pool)
403- if ((userPoolActiveVote != 0))
404- then {
405- let limitShareToken = getShareLimitToken(addressFromStringValue(pool))
406- let shareToken = (fraction(limitShareToken, userPoolActiveVote, poolActiveVote) - userShareTokenLocked)
407- if (if ((size(amountActiveVoteUserPoolStract) > 1))
408- then (valueOrElse(parseInt(amountActiveVoteUserPoolStract[1]), 0) >= harvestPeriod)
409- else false)
410- then throw("You can't share token")
411- else if ((pmtAmount > limitShareToken))
412- then throw(("You can't share token more than " + toString(limitShareToken)))
413- else if ((shareToken > 0))
414- then if ((totalShareAmount == 0))
415- then (baseEntry ++ [ScriptTransfer(wallet, protocolReward, SWOP)])
416- else if ((shareToken >= pmtAmount))
417- then baseEntry
418- else throw(("Your maximum share token is " + toString(shareToken)))
419- else throw("You can't share token")
420- }
421- else throw("Your amount of token less than 0")
422- }
423- else baseEntry
424370 }
425371
426372
427373
428374 @Callable(i)
429-func withdrawShareTokens (pool,shareTokensWithdrawAmount) = if (isPoolUnderway(pool))
430- then throw("Work is currently underway")
375+func updatePoolInterest (pool) = if ((i.caller != wallet))
376+ then throw("Only the Admin itself can call this function")
431377 else {
432- let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id"))
433- let $t01971519815 = claimCalc(pool, i.caller, 1)
434- let userNewInterest = $t01971519815._1
435- let currentInterest = $t01971519815._2
436- let claimAmount = $t01971519815._3
437- let userShareTokensAmount = $t01971519815._4
438- let userShareAmountNew = (userShareTokensAmount - shareTokensWithdrawAmount)
439- let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount)
440- let totalShareAmount = getTotalShareTokenLocked(pool)
441- let totalShareAmountNew = (totalShareAmount - shareTokensWithdrawAmount)
442- let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
443- let userClaimedAmountNew = (userClaimedAmount + claimAmount)
444- if ((shareTokensWithdrawAmount > userShareTokensAmount))
445- then throw("Withdraw amount more then user locked amount")
446- 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)]
378+ let $t01499115111 = claimCalc(pool, adminIncreaseInterestAddress, 0)
379+ let userNewInterest = $t01499115111._1
380+ let currentInterest = $t01499115111._2
381+ let claimAmount = $t01499115111._3
382+ let userShareTokensAmount = $t01499115111._4
383+ let $t01511615219 = rewardInfo(pool)
384+ let currentReward = $t01511615219._1
385+ let rewardUpdateHeight = $t01511615219._2
386+ let previousRewardPerBlock = $t01511615219._3
387+ let poolRewardUpdateHeight = $t01511615219._4
388+[IntegerEntry((pool + keyShareTokensLocked), 0), IntegerEntry((pool + keyLastInterest), userNewInterest), IntegerEntry((pool + keyLastInterestHeight), height)]
447389 }
448390
449391
450392
451393 @Callable(i)
452-func claim (pool) = if (isPoolUnderway(pool))
453- then throw("Work is currently underway")
454- else {
455- let shareTokenLocked = getTotalShareTokenLocked(pool)
456- let $t02143121496 = getLastInterestInfo(pool)
457- let lastInterestHeight = $t02143121496._1
458- let lastInterest = $t02143121496._2
459- let $t02150521594 = rewardInfo(pool)
460- let currentRewardPerBlock = $t02150521594._1
461- let rewardUpdateHeight = $t02150521594._2
462- let previousRewardPerBlock = $t02150521594._3
463- let $t02160321703 = claimCalc(pool, i.caller, 1)
464- let userNewInterest = $t02160321703._1
465- let currentInterest = $t02160321703._2
466- let claimAmount = $t02160321703._3
467- let userShareTokensAmount = $t02160321703._4
468- let availableFund = (userAvailableSWOP(pool, i.caller) + claimAmount)
469- let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
470- let userClaimedAmountNew = (userClaimedAmount + claimAmount)
471- if ((availableFund == 0))
472- then throw("You have 0 available SWOP")
473- else [IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry((pool + keyLastInterest), currentInterest), IntegerEntry((pool + keyLastInterestHeight), height), IntegerEntry((((pool + "_") + toString(i.caller)) + keyAvailableSWOP), 0), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPClaimedAmount), userClaimedAmountNew), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPLastClaimedAmount), claimAmount), ScriptTransfer(i.caller, availableFund, SWOP)]
474- }
394+func lockShareTokens (pool) = {
395+ let $t01546515540 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
396+ let pmtAmount = $t01546515540._1
397+ let pmtAssetId = $t01546515540._2
398+ let $t01554515618 = getAssetInfo(pmtAssetId)
399+ let pmtStrAssetId = $t01554515618._1
400+ let pmtAssetName = $t01554515618._2
401+ let pmtDecimals = $t01554515618._3
402+ let $t01562315731 = claimCalc(pool, i.caller, pmtAmount)
403+ let userNewInterest = $t01562315731._1
404+ let currentInterest = $t01562315731._2
405+ let claimAmount = $t01562315731._3
406+ let userShareTokensAmount = $t01562315731._4
407+ let userShareAmountNew = (userShareTokensAmount + pmtAmount)
408+ let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount)
409+ let totalShareAmount = getTotalShareTokenLocked(pool)
410+ let totalShareAmountNew = (totalShareAmount + pmtAmount)
411+ let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
412+ let userClaimedAmountNew = (userClaimedAmount + claimAmount)
413+ 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)]
414+ if ((0 >= pmtAmount))
415+ then throw("You can't lock token")
416+ else if (!(checkPmtAssetIdCorrect(pool, pmtAssetId)))
417+ then throw("Incorrect pmtAssetId")
418+ else if (if (isFirstHarvest(Address(fromBase58String(pool))))
419+ then (getHeightFirstHarvest(Address(fromBase58String(pool))) > height)
420+ else false)
421+ then {
422+ let harvestPeriod = ((((getHeightFirstHarvest(Address(fromBase58String(pool))) - startHeight) + 1) / periodLength) - 1)
423+ let amountOfVoting = split(getStringValue(votingAddress, (((toString(i.caller) + "_") + pool) + "_user_pool_struc")), "_")
424+ let amountPoolStract = split(getStringValue(votingAddress, (pool + "_pool_struc")), "_")
425+ let amountActiveVoteUserPoolStract = split(valueOrElse(getString(votingAddress, (((toString(i.caller) + "_") + pool) + kHarvestUserPoolActiveVoteStrucVoting)), ""), "_")
426+ let amountPoolActiveVoteStract = split(valueOrElse(getString(votingAddress, (pool + kHarvestPoolActiveVoteStrucVoting)), ""), "_")
427+ let userShareTokenLocked = userShareTokensAmount
428+ let userPoolActiveVote = if ((toString(currPeriod) == amountOfVoting[2]))
429+ then valueOrElse(parseInt(amountActiveVoteUserPoolStract[0]), 0)
430+ else valueOrElse(parseInt(amountOfVoting[1]), 0)
431+ let poolActiveVote = if ((toString(currPeriod) == amountPoolStract[2]))
432+ then valueOrElse(parseInt(amountPoolActiveVoteStract[0]), 0)
433+ else valueOrElse(parseInt(amountPoolStract[1]), 0)
434+ let protocolReward = calculateProtocolReward(pool)
435+ if ((userPoolActiveVote != 0))
436+ then {
437+ let limitShareToken = getShareLimitToken(addressFromStringValue(pool))
438+ let shareToken = (fraction(limitShareToken, userPoolActiveVote, poolActiveVote) - userShareTokenLocked)
439+ if (if ((size(amountActiveVoteUserPoolStract) > 1))
440+ then (valueOrElse(parseInt(amountActiveVoteUserPoolStract[1]), 0) >= harvestPeriod)
441+ else false)
442+ then throw("You can't share token")
443+ else if ((pmtAmount > limitShareToken))
444+ then throw(("You can't share token more than " + toString(limitShareToken)))
445+ else if ((shareToken > 0))
446+ then if ((totalShareAmount == 0))
447+ then (baseEntry ++ [ScriptTransfer(wallet, protocolReward, SWOP)])
448+ else if ((shareToken >= pmtAmount))
449+ then baseEntry
450+ else throw(("Your maximum share token is " + toString(shareToken)))
451+ else throw("You can't share token")
452+ }
453+ else throw("Your amount of token less than 0")
454+ }
455+ else baseEntry
456+ }
457+
458+
459+
460+@Callable(i)
461+func withdrawShareTokens (pool,shareTokensWithdrawAmount) = {
462+ let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id"))
463+ let $t02002620126 = claimCalc(pool, i.caller, 1)
464+ let userNewInterest = $t02002620126._1
465+ let currentInterest = $t02002620126._2
466+ let claimAmount = $t02002620126._3
467+ let userShareTokensAmount = $t02002620126._4
468+ let userShareAmountNew = (userShareTokensAmount - shareTokensWithdrawAmount)
469+ let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount)
470+ let totalShareAmount = getTotalShareTokenLocked(pool)
471+ let totalShareAmountNew = (totalShareAmount - shareTokensWithdrawAmount)
472+ let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
473+ let userClaimedAmountNew = (userClaimedAmount + claimAmount)
474+ if ((shareTokensWithdrawAmount > userShareTokensAmount))
475+ then throw("Withdraw amount more then user locked amount")
476+ 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)]
477+ }
478+
479+
480+
481+@Callable(i)
482+func claim (pool) = {
483+ let shareTokenLocked = getTotalShareTokenLocked(pool)
484+ let $t02163921704 = getLastInterestInfo(pool)
485+ let lastInterestHeight = $t02163921704._1
486+ let lastInterest = $t02163921704._2
487+ let $t02170921821 = rewardInfo(pool)
488+ let currentRewardPerBlock = $t02170921821._1
489+ let rewardUpdateHeight = $t02170921821._2
490+ let previousRewardPerBlock = $t02170921821._3
491+ let poolRewardUpdateHeight = $t02170921821._4
492+ let $t02182621926 = claimCalc(pool, i.caller, 1)
493+ let userNewInterest = $t02182621926._1
494+ let currentInterest = $t02182621926._2
495+ let claimAmount = $t02182621926._3
496+ let userShareTokensAmount = $t02182621926._4
497+ let availableFund = (userAvailableSWOP(pool, i.caller) + claimAmount)
498+ let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
499+ let userClaimedAmountNew = (userClaimedAmount + claimAmount)
500+ if ((availableFund == 0))
501+ then throw("You have 0 available SWOP")
502+ else [IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry((pool + keyLastInterest), currentInterest), IntegerEntry((pool + keyLastInterestHeight), height), IntegerEntry((((pool + "_") + toString(i.caller)) + keyAvailableSWOP), 0), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPClaimedAmount), userClaimedAmountNew), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPLastClaimedAmount), claimAmount), ScriptTransfer(i.caller, availableFund, SWOP)]
503+ }
475504
476505
477506 @Verifier(tx)
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 = "_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"
6567
6668 let governanceAddress = Address(base58'3N5W8da2iiijVieA6qLGo7KzCJj8B19smWU')
6769
6870 let wallet = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4')
6971
7072 let votingAddress = Address(base58'3MrJgdL1GniipErHy44YF9idzLaUL2iX5DQ')
7173
7274 let adminIncreaseInterestAddress = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4')
7375
7476 let oneWeekInBlock = 10106
7577
7678 let totalVoteShare = 10000000000
7779
7880 let scaleValue1 = 10
7981
8082 let scaleValue3 = 1000
8183
8284 let scaleValue5 = 100000
8385
8486 let scaleValue6 = 1000000
8587
8688 let scaleValue8 = 100000000
8789
8890 let scaleValue11 = 100000000000
8991
9092 func strAssetIdA (pool) = getStringValue(pool, keyAssetIdA)
9193
9294
9395 func strAssetIdB (pool) = getStringValue(pool, keyAssetIdB)
9496
9597
9698 func assetIdA (pool) = if ((strAssetIdA(pool) == "WAVES"))
9799 then unit
98100 else fromBase58String(strAssetIdA(pool))
99101
100102
101103 func assetIdB (pool) = if ((strAssetIdB(pool) == "WAVES"))
102104 then unit
103105 else fromBase58String(strAssetIdB(pool))
104106
105107
106108 let kBasePeriod = "base_period"
107109
108110 let kPeriodLength = "period_length"
109111
110112 let kStartHeight = "start_height"
111113
112114 let kFirstHarvestHeight = "first_harvest_height"
113115
114116 let kDurationFullVotePower = "duration_full_vote_power"
115117
116118 let kMinVotePower = "min_vote_power"
117119
118120 let basePeriod = valueOrErrorMessage(getInteger(votingAddress, kBasePeriod), "Empty kBasePeriod")
119121
120122 let startHeight = valueOrErrorMessage(getInteger(votingAddress, kStartHeight), "Empty kStartHeight")
121123
122124 let periodLength = valueOrErrorMessage(getInteger(votingAddress, kPeriodLength), "Empty kPeriodLength")
123125
124126 let durationFullVotePower = valueOrErrorMessage(getInteger(votingAddress, kDurationFullVotePower), "Empty kDurationFullVotePower")
125127
126128 let minVotePower = valueOrErrorMessage(getInteger(votingAddress, kMinVotePower), "Empty kMinVotePower")
127129
128130 let currPeriod = (basePeriod + ((height - startHeight) / periodLength))
129131
130132 func getLimitToken (pool) = valueOrElse(getIntegerValue(pool, keyLimitShareFirstHarvest), 0)
131133
132134
133135 let APY = getIntegerValue(this, keyAPY)
134136
135137 let SwopYearEmission = getIntegerValue(this, keySwopYearEmission)
136138
137139 func assetNameA (pool) = match assetIdA(pool) {
138140 case id: ByteVector =>
139141 value(assetInfo(id)).name
140142 case waves: Unit =>
141143 "WAVES"
142144 case _ =>
143145 throw("Match error")
144146 }
145147
146148
147149 func assetNameB (pool) = match assetIdB(pool) {
148150 case id: ByteVector =>
149151 value(assetInfo(id)).name
150152 case waves: Unit =>
151153 "WAVES"
152154 case _ =>
153155 throw("Match error")
154156 }
155157
156158
157159 let SWOP = fromBase58String(getStringValue(this, keySWOPid))
158160
159161 func isFirstHarvest (pool) = valueOrElse(getBoolean(pool, keyfirstHarvestCpmm), false)
160162
161163
162164 func getHeightFirstHarvest (pool) = valueOrElse(getInteger(pool, keyFirstHarvestHeight), 0)
163165
164166
165167 func getBalanceA (pool) = valueOrErrorMessage(getInteger(pool, keyBalancecpmmA), ("No data on the key: " + keyBalancecpmmA))
166168
167169
168170 func getBalanceB (pool) = valueOrErrorMessage(getInteger(pool, keyBalancecpmmB), ("No data on the key: " + keyBalancecpmmB))
169171
170172
171173 func getShareLimitToken (pool) = valueOrErrorMessage(getInteger(pool, kShareLimit), ("No data on the key: " + kShareLimit))
172174
173175
174176 func getTotalShareTokenLocked (pool) = valueOrErrorMessage(getInteger(this, (pool + keyShareTokensLocked)), (("No data on the key: " + pool) + keyShareTokensLocked))
175177
176178
177179 func getShareAssetId (pool) = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id"))
178180
179181
180182 func getAssetInfo (assetId) = match assetId {
181183 case id: ByteVector =>
182184 let stringId = toBase58String(id)
183185 let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist"))
184186 $Tuple3(stringId, info.name, info.decimals)
185187 case waves: Unit =>
186188 $Tuple3("WAVES", "WAVES", 8)
187189 case _ =>
188190 throw("Match error")
189191 }
190192
191193
192194 func calcScaleValue (assetId1,assetId2) = {
193195 let assetId1Decimals = value(assetInfo(assetId1)).decimals
194196 let assetId2Decimals = value(assetInfo(assetId2)).decimals
195197 let scaleDigits = ((assetId2Decimals - assetId1Decimals) + 8)
196198 pow(10, 0, scaleDigits, 0, 0, HALFDOWN)
197199 }
198200
199201
200202 func userAvailableSWOP (pool,user) = valueOrElse(getInteger(this, (((pool + "_") + toString(user)) + keyAvailableSWOP)), 0)
201203
202204
203-func isPoolUnderway (pool) = if ((pool == "3PCdNCULgjM9ZMLEt61M45qxV26ro6o48Jj"))
204- then true
205- else (pool == "3PMcDUBDyjNB1fkRGeLGpsz1ZQPfcmyp4r5")
206-
207-
208205 func rewardInfo (pool) = {
209206 let totalRewardPerBlockCurrent = valueOrErrorMessage(getInteger(governanceAddress, keyTotalRewardPerBlockCurrent), ((("No data on the key: " + keyTotalRewardPerBlockCurrent) + " at address ") + toString(governanceAddress)))
210207 let totalRewardPerBlockPrevious = valueOrErrorMessage(getInteger(governanceAddress, keyTotalRewardPerBlockPrevious), ((("No data on the key: " + keyTotalRewardPerBlockPrevious) + " at address ") + toString(governanceAddress)))
211208 let rewardPoolFractionCurrent = valueOrErrorMessage(getInteger(governanceAddress, (pool + keyRewardPoolFractionCurrent)), (((("No data on the key: " + pool) + keyRewardPoolFractionCurrent) + " at address ") + toString(governanceAddress)))
212209 let rewardUpdateHeight = valueOrErrorMessage(getInteger(governanceAddress, keyRewardUpdateHeight), ((("No data on the key: " + keyRewardUpdateHeight) + " at address ") + toString(governanceAddress)))
210+ let poolRewardUpdateHeight = valueOrErrorMessage(getInteger(governanceAddress, (pool + keyHeightPoolFraction)), (((("No data on the key: " + pool) + keyHeightPoolFraction) + " at address ") + toString(governanceAddress)))
213211 let rewardPoolFractionPrevious = valueOrErrorMessage(getInteger(governanceAddress, (pool + keyRewardPoolFractionPrevious)), (((("No data on the key: " + pool) + keyRewardPoolFractionPrevious) + " at address ") + toString(governanceAddress)))
214212 let rewardPoolCurrent = fraction(totalRewardPerBlockCurrent, rewardPoolFractionCurrent, totalVoteShare)
215213 let rewardPoolPrevious = fraction(totalRewardPerBlockPrevious, rewardPoolFractionPrevious, totalVoteShare)
216214 if (if ((rewardPoolCurrent > totalRewardPerBlockCurrent))
217215 then true
218216 else (rewardPoolPrevious > totalRewardPerBlockPrevious))
219217 then throw("rewardPoolCurrent > totalRewardPerBlockCurrent or rewardPoolPrevious > totalRewardPerBlockPrevious")
220- else $Tuple3(rewardPoolCurrent, rewardUpdateHeight, rewardPoolPrevious)
218+ else $Tuple4(rewardPoolCurrent, rewardUpdateHeight, rewardPoolPrevious, poolRewardUpdateHeight)
221219 }
222220
223221
224222 func getLastInterestInfo (pool) = {
225223 let lastInterest = valueOrErrorMessage(getInteger(this, (pool + keyLastInterest)), (("No data on the key: " + pool) + keyLastInterest))
226224 let lastInterestHeight = valueOrElse(getInteger(this, (pool + keyLastInterestHeight)), height)
227225 $Tuple2(lastInterestHeight, lastInterest)
228226 }
229227
230228
231229 func getUserInterestInfo (pool,userAddress) = {
232230 let userLastInterest = getInteger(this, (((pool + "_") + toString(userAddress)) + keyUserLastInterest))
233231 let userShare = getInteger(this, (((pool + "_") + toString(userAddress)) + keyUserShareTokensLocked))
234232 let lastInterest = valueOrErrorMessage(getInteger(this, (pool + keyLastInterest)), (("No data on the key: " + pool) + keyLastInterest))
235233 let userLastInterestValue = match userLastInterest {
236234 case userLastInterest: Int =>
237235 userLastInterest
238236 case _ =>
239237 lastInterest
240238 }
241239 let userShareTokensAmount = match userShare {
242240 case userShare: Int =>
243241 userShare
244242 case _ =>
245243 0
246244 }
247245 $Tuple2(userLastInterestValue, userShareTokensAmount)
248246 }
249247
250248
251-func calcInterest (lastInterestHeight,rewardUpdateHeight,lastInterest,currentRewardPerBlock,shareTokenLocked,previousRewardPerBlock,shareAssetId,scaleValue,pmtAmount) = if ((shareTokenLocked == 0))
249+func calcInterest (lastInterestHeight,rewardUpdateHeight,poolRewardUpdateHeight,lastInterest,currentRewardPerBlock,shareTokenLocked,previousRewardPerBlock,shareAssetId,scaleValue,pmtAmount) = if ((shareTokenLocked == 0))
252250 then 0
253- else if ((rewardUpdateHeight > height))
251+ else if (if ((rewardUpdateHeight >= height))
252+ then (rewardUpdateHeight == poolRewardUpdateHeight)
253+ else false)
254254 then {
255- let reward = (previousRewardPerBlock * (height - lastInterestHeight))
255+ let reward = (currentRewardPerBlock * (height - lastInterestHeight))
256256 (lastInterest + fraction(reward, scaleValue, shareTokenLocked))
257257 }
258- else if ((lastInterestHeight > rewardUpdateHeight))
258+ else if (if ((height > rewardUpdateHeight))
259+ then (rewardUpdateHeight == poolRewardUpdateHeight)
260+ else false)
259261 then {
260262 let reward = (currentRewardPerBlock * (height - lastInterestHeight))
261263 (lastInterest + fraction(reward, scaleValue, shareTokenLocked))
262264 }
263- else {
264- let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight))
265- let interestAfterUpdate = (lastInterest + fraction(rewardAfterLastInterestBeforeReawardUpdate, scaleValue, shareTokenLocked))
266- let reward = (currentRewardPerBlock * (height - rewardUpdateHeight))
267- (interestAfterUpdate + fraction(reward, scaleValue, shareTokenLocked))
268- }
265+ else if (if ((height > rewardUpdateHeight))
266+ then (rewardUpdateHeight != poolRewardUpdateHeight)
267+ else false)
268+ then {
269+ let reward = (previousRewardPerBlock * (height - lastInterestHeight))
270+ (lastInterest + fraction(reward, scaleValue, shareTokenLocked))
271+ }
272+ else if ((lastInterestHeight > rewardUpdateHeight))
273+ then {
274+ let reward = (currentRewardPerBlock * (height - lastInterestHeight))
275+ (lastInterest + fraction(reward, scaleValue, shareTokenLocked))
276+ }
277+ else {
278+ let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight))
279+ let interestAfterUpdate = (lastInterest + fraction(rewardAfterLastInterestBeforeReawardUpdate, scaleValue, shareTokenLocked))
280+ let reward = (currentRewardPerBlock * (height - rewardUpdateHeight))
281+ (interestAfterUpdate + fraction(reward, scaleValue, shareTokenLocked))
282+ }
269283
270284
271285 func claimCalc (pool,caller,pmtAmount) = {
272286 let shareAssetId = getShareAssetId(pool)
273287 let scaleValue = calcScaleValue(SWOP, shareAssetId)
274288 let shareTokenLocked = getTotalShareTokenLocked(pool)
275- let $t01099411059 = getLastInterestInfo(pool)
276- let lastInterestHeight = $t01099411059._1
277- let lastInterest = $t01099411059._2
278- let $t01106411152 = rewardInfo(pool)
279- let currentRewardPerBlock = $t01106411152._1
280- let rewardUpdateHeight = $t01106411152._2
281- let previousRewardPerBlock = $t01106411152._3
282- let $t01115711236 = getUserInterestInfo(pool, caller)
283- let userLastInterest = $t01115711236._1
284- let userShareTokensAmount = $t01115711236._2
285- let currentInterest = calcInterest(lastInterestHeight, rewardUpdateHeight, lastInterest, currentRewardPerBlock, shareTokenLocked, previousRewardPerBlock, shareAssetId, scaleValue, pmtAmount)
289+ let $t01185711922 = getLastInterestInfo(pool)
290+ let lastInterestHeight = $t01185711922._1
291+ let lastInterest = $t01185711922._2
292+ let $t01192712039 = rewardInfo(pool)
293+ let currentRewardPerBlock = $t01192712039._1
294+ let rewardUpdateHeight = $t01192712039._2
295+ let previousRewardPerBlock = $t01192712039._3
296+ let poolRewardUpdateHeight = $t01192712039._4
297+ let $t01204412123 = getUserInterestInfo(pool, caller)
298+ let userLastInterest = $t01204412123._1
299+ let userShareTokensAmount = $t01204412123._2
300+ let currentInterest = calcInterest(lastInterestHeight, rewardUpdateHeight, poolRewardUpdateHeight, lastInterest, currentRewardPerBlock, shareTokenLocked, previousRewardPerBlock, shareAssetId, scaleValue, pmtAmount)
286301 let claimAmount = fraction(userShareTokensAmount, (currentInterest - userLastInterest), scaleValue)
287302 let userNewInterest = currentInterest
288303 $Tuple4(userNewInterest, currentInterest, claimAmount, userShareTokensAmount)
289304 }
290305
291306
292307 func calculateProtocolReward (pool) = {
293- let $t01170911774 = getLastInterestInfo(pool)
294- let lastInterestHeight = $t01170911774._1
295- let lastInterest = $t01170911774._2
296- let $t01177911867 = rewardInfo(pool)
297- let currentRewardPerBlock = $t01177911867._1
298- let rewardUpdateHeight = $t01177911867._2
299- let previousRewardPerBlock = $t01177911867._3
308+ let $t01261912684 = getLastInterestInfo(pool)
309+ let lastInterestHeight = $t01261912684._1
310+ let lastInterest = $t01261912684._2
311+ let $t01268912800 = rewardInfo(pool)
312+ let currentRewardPerBlock = $t01268912800._1
313+ let rewardUpdateHeight = $t01268912800._2
314+ let previousRewardPerBlock = $t01268912800._3
315+ let poolRewardUpdateHeight = $t01268912800._4
300316 let shareTokenLocked = getTotalShareTokenLocked(pool)
301317 if ((shareTokenLocked == 0))
302318 then if ((rewardUpdateHeight > height))
303319 then {
304320 let reward = (previousRewardPerBlock * (height - lastInterestHeight))
305321 reward
306322 }
307323 else if ((lastInterestHeight > rewardUpdateHeight))
308324 then {
309325 let reward = (currentRewardPerBlock * (height - lastInterestHeight))
310326 reward
311327 }
312328 else {
313329 let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight))
314330 let reward = (currentRewardPerBlock * (height - rewardUpdateHeight))
315331 (reward + rewardAfterLastInterestBeforeReawardUpdate)
316332 }
317333 else 0
318334 }
319335
320336
321337 func checkPmtAssetIdCorrect (pool,pmtAssetId) = {
322338 let poolShareAssetId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id"))
323339 if ((pmtAssetId == poolShareAssetId))
324340 then true
325341 else false
326342 }
327343
328344
329345 func getUserSWOPClaimedAmount (pool,user) = valueOrElse(getInteger(this, (((pool + "_") + toString(user)) + keyUserSWOPClaimedAmount)), 0)
330346
331347
332348 @Callable(i)
333349 func init (earlyLP) = if (isDefined(getString(this, keySWOPid)))
334350 then throw("SWOP already initialized")
335351 else {
336352 let initAmount = 100000000000000
337353 let SWOPissue = Issue("SWOP", "SWOP protocol token", initAmount, 8, true)
338354 let SWOPid = calculateAssetId(SWOPissue)
339355 [Issue("SWOP", "SWOP protocol token", initAmount, 8, true), StringEntry(keySWOPid, toBase58String(SWOPid))]
340356 }
341357
342358
343359
344360 @Callable(i)
345-func initPoolShareFarming (pool) = if (isPoolUnderway(pool))
346- then throw("Work is currently underway")
347- else if ((i.caller != this))
348- then throw("Only the DApp itself can call this function")
349- else {
350- let $t01372613806 = rewardInfo(pool)
351- let currentReward = $t01372613806._1
352- let rewardUpdateHeight = $t01372613806._2
353- let previousRewardPerBlock = $t01372613806._3
361+func initPoolShareFarming (pool) = if ((i.caller != this))
362+ then throw("Only the DApp itself can call this function")
363+ else {
364+ let $t01455014653 = rewardInfo(pool)
365+ let currentReward = $t01455014653._1
366+ let rewardUpdateHeight = $t01455014653._2
367+ let previousRewardPerBlock = $t01455014653._3
368+ let poolRewardUpdateHeight = $t01455014653._4
354369 [IntegerEntry((pool + keyShareTokensLocked), 0), IntegerEntry((pool + keyLastInterest), 0), IntegerEntry((pool + keyLastInterestHeight), height)]
355- }
356-
357-
358-
359-@Callable(i)
360-func lockShareTokens (pool) = if (isPoolUnderway(pool))
361- then throw("Work is currently underway")
362- else {
363- let $t01483214907 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
364- let pmtAmount = $t01483214907._1
365- let pmtAssetId = $t01483214907._2
366- let $t01491614989 = getAssetInfo(pmtAssetId)
367- let pmtStrAssetId = $t01491614989._1
368- let pmtAssetName = $t01491614989._2
369- let pmtDecimals = $t01491614989._3
370- let $t01499815106 = claimCalc(pool, i.caller, pmtAmount)
371- let userNewInterest = $t01499815106._1
372- let currentInterest = $t01499815106._2
373- let claimAmount = $t01499815106._3
374- let userShareTokensAmount = $t01499815106._4
375- let userShareAmountNew = (userShareTokensAmount + pmtAmount)
376- let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount)
377- let totalShareAmount = getTotalShareTokenLocked(pool)
378- let totalShareAmountNew = (totalShareAmount + pmtAmount)
379- let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
380- let userClaimedAmountNew = (userClaimedAmount + claimAmount)
381- 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)]
382- if ((0 >= pmtAmount))
383- then throw("You can't lock token")
384- else if (!(checkPmtAssetIdCorrect(pool, pmtAssetId)))
385- then throw("Incorrect pmtAssetId")
386- else if (if (isFirstHarvest(Address(fromBase58String(pool))))
387- then (getHeightFirstHarvest(Address(fromBase58String(pool))) > height)
388- else false)
389- then {
390- let harvestPeriod = ((((getHeightFirstHarvest(Address(fromBase58String(pool))) - startHeight) + 1) / periodLength) - 1)
391- let amountOfVoting = split(getStringValue(votingAddress, (((toString(i.caller) + "_") + pool) + "_user_pool_struc")), "_")
392- let amountPoolStract = split(getStringValue(votingAddress, (pool + "_pool_struc")), "_")
393- let amountActiveVoteUserPoolStract = split(valueOrElse(getString(votingAddress, (((toString(i.caller) + "_") + pool) + kHarvestUserPoolActiveVoteStrucVoting)), ""), "_")
394- let amountPoolActiveVoteStract = split(valueOrElse(getString(votingAddress, (pool + kHarvestPoolActiveVoteStrucVoting)), ""), "_")
395- let userShareTokenLocked = userShareTokensAmount
396- let userPoolActiveVote = if ((toString(currPeriod) == amountOfVoting[2]))
397- then valueOrElse(parseInt(amountActiveVoteUserPoolStract[0]), 0)
398- else valueOrElse(parseInt(amountOfVoting[1]), 0)
399- let poolActiveVote = if ((toString(currPeriod) == amountPoolStract[2]))
400- then valueOrElse(parseInt(amountPoolActiveVoteStract[0]), 0)
401- else valueOrElse(parseInt(amountPoolStract[1]), 0)
402- let protocolReward = calculateProtocolReward(pool)
403- if ((userPoolActiveVote != 0))
404- then {
405- let limitShareToken = getShareLimitToken(addressFromStringValue(pool))
406- let shareToken = (fraction(limitShareToken, userPoolActiveVote, poolActiveVote) - userShareTokenLocked)
407- if (if ((size(amountActiveVoteUserPoolStract) > 1))
408- then (valueOrElse(parseInt(amountActiveVoteUserPoolStract[1]), 0) >= harvestPeriod)
409- else false)
410- then throw("You can't share token")
411- else if ((pmtAmount > limitShareToken))
412- then throw(("You can't share token more than " + toString(limitShareToken)))
413- else if ((shareToken > 0))
414- then if ((totalShareAmount == 0))
415- then (baseEntry ++ [ScriptTransfer(wallet, protocolReward, SWOP)])
416- else if ((shareToken >= pmtAmount))
417- then baseEntry
418- else throw(("Your maximum share token is " + toString(shareToken)))
419- else throw("You can't share token")
420- }
421- else throw("Your amount of token less than 0")
422- }
423- else baseEntry
424370 }
425371
426372
427373
428374 @Callable(i)
429-func withdrawShareTokens (pool,shareTokensWithdrawAmount) = if (isPoolUnderway(pool))
430- then throw("Work is currently underway")
375+func updatePoolInterest (pool) = if ((i.caller != wallet))
376+ then throw("Only the Admin itself can call this function")
431377 else {
432- let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id"))
433- let $t01971519815 = claimCalc(pool, i.caller, 1)
434- let userNewInterest = $t01971519815._1
435- let currentInterest = $t01971519815._2
436- let claimAmount = $t01971519815._3
437- let userShareTokensAmount = $t01971519815._4
438- let userShareAmountNew = (userShareTokensAmount - shareTokensWithdrawAmount)
439- let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount)
440- let totalShareAmount = getTotalShareTokenLocked(pool)
441- let totalShareAmountNew = (totalShareAmount - shareTokensWithdrawAmount)
442- let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
443- let userClaimedAmountNew = (userClaimedAmount + claimAmount)
444- if ((shareTokensWithdrawAmount > userShareTokensAmount))
445- then throw("Withdraw amount more then user locked amount")
446- 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)]
378+ let $t01499115111 = claimCalc(pool, adminIncreaseInterestAddress, 0)
379+ let userNewInterest = $t01499115111._1
380+ let currentInterest = $t01499115111._2
381+ let claimAmount = $t01499115111._3
382+ let userShareTokensAmount = $t01499115111._4
383+ let $t01511615219 = rewardInfo(pool)
384+ let currentReward = $t01511615219._1
385+ let rewardUpdateHeight = $t01511615219._2
386+ let previousRewardPerBlock = $t01511615219._3
387+ let poolRewardUpdateHeight = $t01511615219._4
388+[IntegerEntry((pool + keyShareTokensLocked), 0), IntegerEntry((pool + keyLastInterest), userNewInterest), IntegerEntry((pool + keyLastInterestHeight), height)]
447389 }
448390
449391
450392
451393 @Callable(i)
452-func claim (pool) = if (isPoolUnderway(pool))
453- then throw("Work is currently underway")
454- else {
455- let shareTokenLocked = getTotalShareTokenLocked(pool)
456- let $t02143121496 = getLastInterestInfo(pool)
457- let lastInterestHeight = $t02143121496._1
458- let lastInterest = $t02143121496._2
459- let $t02150521594 = rewardInfo(pool)
460- let currentRewardPerBlock = $t02150521594._1
461- let rewardUpdateHeight = $t02150521594._2
462- let previousRewardPerBlock = $t02150521594._3
463- let $t02160321703 = claimCalc(pool, i.caller, 1)
464- let userNewInterest = $t02160321703._1
465- let currentInterest = $t02160321703._2
466- let claimAmount = $t02160321703._3
467- let userShareTokensAmount = $t02160321703._4
468- let availableFund = (userAvailableSWOP(pool, i.caller) + claimAmount)
469- let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
470- let userClaimedAmountNew = (userClaimedAmount + claimAmount)
471- if ((availableFund == 0))
472- then throw("You have 0 available SWOP")
473- else [IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry((pool + keyLastInterest), currentInterest), IntegerEntry((pool + keyLastInterestHeight), height), IntegerEntry((((pool + "_") + toString(i.caller)) + keyAvailableSWOP), 0), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPClaimedAmount), userClaimedAmountNew), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPLastClaimedAmount), claimAmount), ScriptTransfer(i.caller, availableFund, SWOP)]
474- }
394+func lockShareTokens (pool) = {
395+ let $t01546515540 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
396+ let pmtAmount = $t01546515540._1
397+ let pmtAssetId = $t01546515540._2
398+ let $t01554515618 = getAssetInfo(pmtAssetId)
399+ let pmtStrAssetId = $t01554515618._1
400+ let pmtAssetName = $t01554515618._2
401+ let pmtDecimals = $t01554515618._3
402+ let $t01562315731 = claimCalc(pool, i.caller, pmtAmount)
403+ let userNewInterest = $t01562315731._1
404+ let currentInterest = $t01562315731._2
405+ let claimAmount = $t01562315731._3
406+ let userShareTokensAmount = $t01562315731._4
407+ let userShareAmountNew = (userShareTokensAmount + pmtAmount)
408+ let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount)
409+ let totalShareAmount = getTotalShareTokenLocked(pool)
410+ let totalShareAmountNew = (totalShareAmount + pmtAmount)
411+ let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
412+ let userClaimedAmountNew = (userClaimedAmount + claimAmount)
413+ 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)]
414+ if ((0 >= pmtAmount))
415+ then throw("You can't lock token")
416+ else if (!(checkPmtAssetIdCorrect(pool, pmtAssetId)))
417+ then throw("Incorrect pmtAssetId")
418+ else if (if (isFirstHarvest(Address(fromBase58String(pool))))
419+ then (getHeightFirstHarvest(Address(fromBase58String(pool))) > height)
420+ else false)
421+ then {
422+ let harvestPeriod = ((((getHeightFirstHarvest(Address(fromBase58String(pool))) - startHeight) + 1) / periodLength) - 1)
423+ let amountOfVoting = split(getStringValue(votingAddress, (((toString(i.caller) + "_") + pool) + "_user_pool_struc")), "_")
424+ let amountPoolStract = split(getStringValue(votingAddress, (pool + "_pool_struc")), "_")
425+ let amountActiveVoteUserPoolStract = split(valueOrElse(getString(votingAddress, (((toString(i.caller) + "_") + pool) + kHarvestUserPoolActiveVoteStrucVoting)), ""), "_")
426+ let amountPoolActiveVoteStract = split(valueOrElse(getString(votingAddress, (pool + kHarvestPoolActiveVoteStrucVoting)), ""), "_")
427+ let userShareTokenLocked = userShareTokensAmount
428+ let userPoolActiveVote = if ((toString(currPeriod) == amountOfVoting[2]))
429+ then valueOrElse(parseInt(amountActiveVoteUserPoolStract[0]), 0)
430+ else valueOrElse(parseInt(amountOfVoting[1]), 0)
431+ let poolActiveVote = if ((toString(currPeriod) == amountPoolStract[2]))
432+ then valueOrElse(parseInt(amountPoolActiveVoteStract[0]), 0)
433+ else valueOrElse(parseInt(amountPoolStract[1]), 0)
434+ let protocolReward = calculateProtocolReward(pool)
435+ if ((userPoolActiveVote != 0))
436+ then {
437+ let limitShareToken = getShareLimitToken(addressFromStringValue(pool))
438+ let shareToken = (fraction(limitShareToken, userPoolActiveVote, poolActiveVote) - userShareTokenLocked)
439+ if (if ((size(amountActiveVoteUserPoolStract) > 1))
440+ then (valueOrElse(parseInt(amountActiveVoteUserPoolStract[1]), 0) >= harvestPeriod)
441+ else false)
442+ then throw("You can't share token")
443+ else if ((pmtAmount > limitShareToken))
444+ then throw(("You can't share token more than " + toString(limitShareToken)))
445+ else if ((shareToken > 0))
446+ then if ((totalShareAmount == 0))
447+ then (baseEntry ++ [ScriptTransfer(wallet, protocolReward, SWOP)])
448+ else if ((shareToken >= pmtAmount))
449+ then baseEntry
450+ else throw(("Your maximum share token is " + toString(shareToken)))
451+ else throw("You can't share token")
452+ }
453+ else throw("Your amount of token less than 0")
454+ }
455+ else baseEntry
456+ }
457+
458+
459+
460+@Callable(i)
461+func withdrawShareTokens (pool,shareTokensWithdrawAmount) = {
462+ let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id"))
463+ let $t02002620126 = claimCalc(pool, i.caller, 1)
464+ let userNewInterest = $t02002620126._1
465+ let currentInterest = $t02002620126._2
466+ let claimAmount = $t02002620126._3
467+ let userShareTokensAmount = $t02002620126._4
468+ let userShareAmountNew = (userShareTokensAmount - shareTokensWithdrawAmount)
469+ let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount)
470+ let totalShareAmount = getTotalShareTokenLocked(pool)
471+ let totalShareAmountNew = (totalShareAmount - shareTokensWithdrawAmount)
472+ let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
473+ let userClaimedAmountNew = (userClaimedAmount + claimAmount)
474+ if ((shareTokensWithdrawAmount > userShareTokensAmount))
475+ then throw("Withdraw amount more then user locked amount")
476+ 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)]
477+ }
478+
479+
480+
481+@Callable(i)
482+func claim (pool) = {
483+ let shareTokenLocked = getTotalShareTokenLocked(pool)
484+ let $t02163921704 = getLastInterestInfo(pool)
485+ let lastInterestHeight = $t02163921704._1
486+ let lastInterest = $t02163921704._2
487+ let $t02170921821 = rewardInfo(pool)
488+ let currentRewardPerBlock = $t02170921821._1
489+ let rewardUpdateHeight = $t02170921821._2
490+ let previousRewardPerBlock = $t02170921821._3
491+ let poolRewardUpdateHeight = $t02170921821._4
492+ let $t02182621926 = claimCalc(pool, i.caller, 1)
493+ let userNewInterest = $t02182621926._1
494+ let currentInterest = $t02182621926._2
495+ let claimAmount = $t02182621926._3
496+ let userShareTokensAmount = $t02182621926._4
497+ let availableFund = (userAvailableSWOP(pool, i.caller) + claimAmount)
498+ let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
499+ let userClaimedAmountNew = (userClaimedAmount + claimAmount)
500+ if ((availableFund == 0))
501+ then throw("You have 0 available SWOP")
502+ else [IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry((pool + keyLastInterest), currentInterest), IntegerEntry((pool + keyLastInterestHeight), height), IntegerEntry((((pool + "_") + toString(i.caller)) + keyAvailableSWOP), 0), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPClaimedAmount), userClaimedAmountNew), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPLastClaimedAmount), claimAmount), ScriptTransfer(i.caller, availableFund, SWOP)]
503+ }
475504
476505
477506 @Verifier(tx)
478507 func verify () = match tx {
479508 case _ =>
480509 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
481510 }
482511

github/deemru/w8io/169f3d6 
60.14 ms