tx · 5ksTh9RwN23PKqr7F325kW8svzkis5rP4kTjvt86fLtQ

3MsjAKkxKjxVU4gC1BpJ1jKmAZyRufUCErC:  -0.01400000 Waves

2021.06.07 21:07 [1560277] smart account 3MsjAKkxKjxVU4gC1BpJ1jKmAZyRufUCErC > SELF 0.00000000 Waves

{ "type": 13, "id": "5ksTh9RwN23PKqr7F325kW8svzkis5rP4kTjvt86fLtQ", "fee": 1400000, "feeAssetId": null, "timestamp": 1623089273384, "version": 2, "chainId": 84, "sender": "3MsjAKkxKjxVU4gC1BpJ1jKmAZyRufUCErC", "senderPublicKey": "FQ5JNhUjFS3Ty3nSykXrGWHDt4NvXJDCv4JQiJ3dXmKa", "proofs": [ "2GwUYuNj8fVegCCvjL7s6dsaChWjJHYdBWpHB9mDNFE4HZ8Ki1coEdUZTJZHEGyS3Uyke5vc66ac2essb1QSpBgA" ], "script": "base64:AAIEAAAAAAAAABwIAhIDCgEIEgMKAQgSAwoBCBIECgIIARIDCgEIAAAAVAAAAAAMYWRtaW5QdWJLZXkxAQAAACAEz3XlZNDBD05nuR8TZMQaDeqEJEIxfTOQXUBYCp2TSgAAAAAMYWRtaW5QdWJLZXkyAQAAACAEz3XlZNDBD05nuR8TZMQaDeqEJEIxfTOQXUBYCp2TSgAAAAAMYWRtaW5QdWJLZXkzAQAAACAEz3XlZNDBD05nuR8TZMQaDeqEJEIxfTOQXUBYCp2TSgAAAAAUa2V5U2hhcmVUb2tlbnNMb2NrZWQCAAAAGl90b3RhbF9zaGFyZV90b2tlbnNfbG9ja2VkAAAAAAtrU2hhcmVMaW1pdAIAAAAcc2hhcmVfbGltaXRfb25fZmlyc3RfaGFydmVzdAAAAAAca2V5UmV3YXJkUG9vbEZyYWN0aW9uQ3VycmVudAIAAAAdX2N1cnJlbnRfcG9vbF9mcmFjdGlvbl9yZXdhcmQAAAAAHWtleVJld2FyZFBvb2xGcmFjdGlvblByZXZpb3VzAgAAAB5fcHJldmlvdXNfcG9vbF9mcmFjdGlvbl9y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xhaW1lZEFtb3VudE5ldwkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgUAAAAEcG9vbAIAAAABXwkABCUAAAABCAUAAAABaQAAAAZjYWxsZXIFAAAAHGtleVVzZXJTV09QTGFzdENsYWltZWRBbW91bnQFAAAAC2NsYWltQW1vdW50CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAANYXZhaWxhYmxlRnVuZAUAAAAEU1dPUAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5JABeGA==", "height": 1560277, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: XAMLD4ZSpzc5W9CWhzx33AvPDVVZnfDKatVDNMtQ5EV Next: none Diff:
OldNewDifferences
1010 let keyShareTokensLocked = "_total_share_tokens_locked"
1111
1212 let kShareLimit = "share_limit_on_first_harvest"
13-
14-let keyActive = "active"
1513
1614 let keyRewardPoolFractionCurrent = "_current_pool_fraction_reward"
1715
5553
5654 let kHarvestUserPoolActiveVoteStrucVoting = "_harvest_user_pool_activeVote_struc"
5755
58-let kHarvestPoolPrevActiveVoteStruc = "_harvest_pool_previous_activeVote_struc"
59-
60-let kHarvestUserPoolPrevActiveVoteStruc = "_harvest_user_pool_previous_activeVote_struc"
61-
6256 let keyLimitShareFirstHarvest = "share_limit_on_first_harvest"
6357
6458 let keyAssetIdA = "A_asset_id"
6963
7064 let keyfirstHarvestCpmm = "first_harvest"
7165
72-let governanceAddress = Address(base58'3MzJZEn6jzxCPaHEfkrXd7FhbjTyVjdRPLS')
66+let governanceAddress = Address(base58'3N5W8da2iiijVieA6qLGo7KzCJj8B19smWU')
7367
7468 let wallet = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4')
7569
76-let votingAddress = Address(base58'3N6CYoCsxrcXKe75pQvvV3JqJrwJjm1t4QN')
70+let votingAddress = Address(base58'3MrJgdL1GniipErHy44YF9idzLaUL2iX5DQ')
7771
7872 let adminIncreaseInterestAddress = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4')
7973
130124 let durationFullVotePower = valueOrErrorMessage(getInteger(votingAddress, kDurationFullVotePower), "Empty kDurationFullVotePower")
131125
132126 let minVotePower = valueOrErrorMessage(getInteger(votingAddress, kMinVotePower), "Empty kMinVotePower")
133-
134-let isActive = getBooleanValue(this, keyActive)
135127
136128 let currPeriod = (basePeriod + ((height - startHeight) / periodLength))
137129
208200 func userAvailableSWOP (pool,user) = valueOrElse(getInteger(this, (((pool + "_") + toString(user)) + keyAvailableSWOP)), 0)
209201
210202
203+func isPoolUnderway (pool) = if ((pool == "3PCdNCULgjM9ZMLEt61M45qxV26ro6o48Jj"))
204+ then true
205+ else (pool == "3PMcDUBDyjNB1fkRGeLGpsz1ZQPfcmyp4r5")
206+
207+
211208 func rewardInfo (pool) = {
212209 let totalRewardPerBlockCurrent = valueOrErrorMessage(getInteger(governanceAddress, keyTotalRewardPerBlockCurrent), ((("No data on the key: " + keyTotalRewardPerBlockCurrent) + " at address ") + toString(governanceAddress)))
213210 let totalRewardPerBlockPrevious = valueOrErrorMessage(getInteger(governanceAddress, keyTotalRewardPerBlockPrevious), ((("No data on the key: " + keyTotalRewardPerBlockPrevious) + " at address ") + toString(governanceAddress)))
275272 let shareAssetId = getShareAssetId(pool)
276273 let scaleValue = calcScaleValue(SWOP, shareAssetId)
277274 let shareTokenLocked = getTotalShareTokenLocked(pool)
278- let $t01109311158 = getLastInterestInfo(pool)
279- let lastInterestHeight = $t01109311158._1
280- let lastInterest = $t01109311158._2
281- let $t01116311251 = rewardInfo(pool)
282- let currentRewardPerBlock = $t01116311251._1
283- let rewardUpdateHeight = $t01116311251._2
284- let previousRewardPerBlock = $t01116311251._3
285- let $t01125611335 = getUserInterestInfo(pool, caller)
286- let userLastInterest = $t01125611335._1
287- let userShareTokensAmount = $t01125611335._2
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
288285 let currentInterest = calcInterest(lastInterestHeight, rewardUpdateHeight, lastInterest, currentRewardPerBlock, shareTokenLocked, previousRewardPerBlock, shareAssetId, scaleValue, pmtAmount)
289286 let claimAmount = fraction(userShareTokensAmount, (currentInterest - userLastInterest), scaleValue)
290287 let userNewInterest = currentInterest
293290
294291
295292 func calculateProtocolReward (pool) = {
296- let $t01180811873 = getLastInterestInfo(pool)
297- let lastInterestHeight = $t01180811873._1
298- let lastInterest = $t01180811873._2
299- let $t01187811966 = rewardInfo(pool)
300- let currentRewardPerBlock = $t01187811966._1
301- let rewardUpdateHeight = $t01187811966._2
302- let previousRewardPerBlock = $t01187811966._3
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
303300 let shareTokenLocked = getTotalShareTokenLocked(pool)
304301 if ((shareTokenLocked == 0))
305302 then if ((rewardUpdateHeight > height))
339336 let initAmount = 100000000000000
340337 let SWOPissue = Issue("SWOP", "SWOP protocol token", initAmount, 8, true)
341338 let SWOPid = calculateAssetId(SWOPissue)
342-[BooleanEntry(keyActive, true), Issue("SWOP", "SWOP protocol token", initAmount, 8, true), StringEntry(keySWOPid, toBase58String(SWOPid))]
339+[Issue("SWOP", "SWOP protocol token", initAmount, 8, true), StringEntry(keySWOPid, toBase58String(SWOPid))]
343340 }
344341
345342
346343
347344 @Callable(i)
348-func initPoolShareFarming (pool) = if ((i.caller != this))
349- then throw("Only the DApp itself can call this function")
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
354+[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")
350362 else {
351- let $t01394014020 = rewardInfo(pool)
352- let currentReward = $t01394014020._1
353- let rewardUpdateHeight = $t01394014020._2
354- let previousRewardPerBlock = $t01394014020._3
355-[IntegerEntry((pool + keyShareTokensLocked), 0), IntegerEntry((pool + keyLastInterest), 0), IntegerEntry((pool + keyLastInterestHeight), height)]
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
356424 }
357425
358426
359427
360428 @Callable(i)
361-func updatePoolInterest (pool) = if ((i.caller != wallet))
362- then throw("Only the Admin itself can call this function")
429+func withdrawShareTokens (pool,shareTokensWithdrawAmount) = if (isPoolUnderway(pool))
430+ then throw("Work is currently underway")
363431 else {
364- let $t01443614556 = claimCalc(pool, adminIncreaseInterestAddress, 0)
365- let userNewInterest = $t01443614556._1
366- let currentInterest = $t01443614556._2
367- let claimAmount = $t01443614556._3
368- let userShareTokensAmount = $t01443614556._4
369- let $t01456114641 = rewardInfo(pool)
370- let currentReward = $t01456114641._1
371- let rewardUpdateHeight = $t01456114641._2
372- let previousRewardPerBlock = $t01456114641._3
373-[IntegerEntry((pool + keyShareTokensLocked), 0), IntegerEntry((pool + keyLastInterest), userNewInterest), IntegerEntry((pool + keyLastInterestHeight), height)]
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)]
374447 }
375448
376449
377450
378451 @Callable(i)
379-func lockShareTokens (pool) = {
380- let $t01488714962 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
381- let pmtAmount = $t01488714962._1
382- let pmtAssetId = $t01488714962._2
383- let $t01496715040 = getAssetInfo(pmtAssetId)
384- let pmtStrAssetId = $t01496715040._1
385- let pmtAssetName = $t01496715040._2
386- let pmtDecimals = $t01496715040._3
387- let $t01504515153 = claimCalc(pool, i.caller, pmtAmount)
388- let userNewInterest = $t01504515153._1
389- let currentInterest = $t01504515153._2
390- let claimAmount = $t01504515153._3
391- let userShareTokensAmount = $t01504515153._4
392- let userShareAmountNew = (userShareTokensAmount + pmtAmount)
393- let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount)
394- let totalShareAmount = getTotalShareTokenLocked(pool)
395- let totalShareAmountNew = (totalShareAmount + pmtAmount)
396- let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
397- let userClaimedAmountNew = (userClaimedAmount + claimAmount)
398- 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)]
399- if ((0 >= pmtAmount))
400- then throw("You can't lock token")
401- else if (!(checkPmtAssetIdCorrect(pool, pmtAssetId)))
402- then throw("Incorrect pmtAssetId")
403- else if (if (isFirstHarvest(Address(fromBase58String(pool))))
404- then (getHeightFirstHarvest(Address(fromBase58String(pool))) > height)
405- else false)
406- then {
407- let harvestPeriod = ((((getHeightFirstHarvest(Address(fromBase58String(pool))) - startHeight) + 1) / periodLength) - 1)
408- let amountOfVoting = split(getStringValue(votingAddress, (((toString(i.caller) + "_") + pool) + "_user_pool_struc")), "_")
409- let amountPoolStract = split(getStringValue(votingAddress, (pool + "_pool_struc")), "_")
410- let amountActiveVoteUserPoolStract = split(getStringValue(votingAddress, (((toString(i.caller) + "_") + pool) + kHarvestUserPoolActiveVoteStrucVoting)), "_")
411- let amountPoolActiveVoteStract = split(getStringValue(votingAddress, (pool + kHarvestPoolActiveVoteStrucVoting)), "_")
412- let amountActiveVoteUserPoolPrevStract = split(getStringValue(votingAddress, (((toString(i.caller) + "_") + pool) + kHarvestPoolPrevActiveVoteStruc)), "_")
413- let amountPoolActiveVotePrevStract = split(getStringValue(votingAddress, (pool + kHarvestUserPoolPrevActiveVoteStruc)), "_")
414- let userShareTokenLocked = userShareTokensAmount
415- let userPoolActiveVote = if ((toString(currPeriod) == amountOfVoting[2]))
416- then valueOrElse(parseInt(amountActiveVoteUserPoolStract[0]), 0)
417- else valueOrElse(parseInt(amountOfVoting[1]), 0)
418- let poolActiveVote = if ((toString(currPeriod) == amountPoolStract[2]))
419- then valueOrElse(parseInt(amountPoolActiveVoteStract[0]), 0)
420- else valueOrElse(parseInt(amountPoolStract[1]), 0)
421- let protocolReward = calculateProtocolReward(pool)
422- if ((userPoolActiveVote != 0))
423- then {
424- let limitShareToken = getShareLimitToken(addressFromStringValue(pool))
425- let shareToken = (fraction(limitShareToken, userPoolActiveVote, poolActiveVote) - userShareTokenLocked)
426- if ((amountActiveVoteUserPoolStract[1] != toString(harvestPeriod)))
427- then throw("You can't share token")
428- else if ((pmtAmount > limitShareToken))
429- then throw(("You can't share token more than " + toString(limitShareToken)))
430- else if ((shareToken > 0))
431- then if ((totalShareAmount == 0))
432- then (baseEntry ++ [ScriptTransfer(wallet, protocolReward, SWOP)])
433- else if ((shareToken >= pmtAmount))
434- then baseEntry
435- else throw(("Your maximum share token is " + toString(shareToken)))
436- else throw("You can't share token")
437- }
438- else throw("Your amount of token less than 0")
439- }
440- else baseEntry
441- }
442-
443-
444-
445-@Callable(i)
446-func withdrawShareTokens (pool,shareTokensWithdrawAmount) = {
447- let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id"))
448- let $t01955919659 = claimCalc(pool, i.caller, 1)
449- let userNewInterest = $t01955919659._1
450- let currentInterest = $t01955919659._2
451- let claimAmount = $t01955919659._3
452- let userShareTokensAmount = $t01955919659._4
453- let userShareAmountNew = (userShareTokensAmount - shareTokensWithdrawAmount)
454- let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount)
455- let totalShareAmount = getTotalShareTokenLocked(pool)
456- let totalShareAmountNew = (totalShareAmount - shareTokensWithdrawAmount)
457- let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
458- let userClaimedAmountNew = (userClaimedAmount + claimAmount)
459- if ((shareTokensWithdrawAmount > userShareTokensAmount))
460- then throw("Withdraw amount more then user locked amount")
461- 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)]
462- }
463-
464-
465-
466-@Callable(i)
467-func claim (pool) = {
468- let shareTokenLocked = getTotalShareTokenLocked(pool)
469- let $t02126021325 = getLastInterestInfo(pool)
470- let lastInterestHeight = $t02126021325._1
471- let lastInterest = $t02126021325._2
472- let $t02133021419 = rewardInfo(pool)
473- let currentRewardPerBlock = $t02133021419._1
474- let rewardUpdateHeight = $t02133021419._2
475- let previousRewardPerBlock = $t02133021419._3
476- let $t02142421524 = claimCalc(pool, i.caller, 1)
477- let userNewInterest = $t02142421524._1
478- let currentInterest = $t02142421524._2
479- let claimAmount = $t02142421524._3
480- let userShareTokensAmount = $t02142421524._4
481- let availableFund = (userAvailableSWOP(pool, i.caller) + claimAmount)
482- let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
483- let userClaimedAmountNew = (userClaimedAmount + claimAmount)
484- if ((availableFund == 0))
485- then throw("You have 0 available SWOP")
486- 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)]
487- }
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+ }
488475
489476
490477 @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"
13-
14-let keyActive = "active"
1513
1614 let keyRewardPoolFractionCurrent = "_current_pool_fraction_reward"
1715
1816 let keyRewardPoolFractionPrevious = "_previous_pool_fraction_reward"
1917
2018 let keyTotalRewardPerBlockCurrent = "total_reward_per_block_current"
2119
2220 let keyTotalRewardPerBlockPrevious = "total_reward_per_block_previous"
2321
2422 let keyRewardUpdateHeight = "reward_update_height"
2523
2624 let keyLastInterest = "_last_interest"
2725
2826 let keyLastInterestHeight = "_last_interest_height"
2927
3028 let keyUserShareTokensLocked = "_share_tokens_locked"
3129
3230 let keyUserLastInterest = "_last_interest"
3331
3432 let keySWOPid = "SWOP_id"
3533
3634 let keyUserSWOPClaimedAmount = "_SWOP_claimed_amount"
3735
3836 let keyUserSWOPLastClaimedAmount = "_SWOP_last_claimed_amount"
3937
4038 let keyAvailableSWOP = "_available_SWOP"
4139
4240 let keyFarmingStartHeight = "farming_start_height"
4341
4442 let keyAPY = "apy"
4543
4644 let kPreviousTotalVoteSWOP = "previous_total_vote_SWOP"
4745
4846 let keySwopYearEmission = "swop_year_emission"
4947
5048 let keyBalancecpmmA = "A_asset_balance"
5149
5250 let keyBalancecpmmB = "B_asset_balance"
5351
5452 let kHarvestPoolActiveVoteStrucVoting = "_harvest_pool_activeVote_struc"
5553
5654 let kHarvestUserPoolActiveVoteStrucVoting = "_harvest_user_pool_activeVote_struc"
5755
58-let kHarvestPoolPrevActiveVoteStruc = "_harvest_pool_previous_activeVote_struc"
59-
60-let kHarvestUserPoolPrevActiveVoteStruc = "_harvest_user_pool_previous_activeVote_struc"
61-
6256 let keyLimitShareFirstHarvest = "share_limit_on_first_harvest"
6357
6458 let keyAssetIdA = "A_asset_id"
6559
6660 let keyAssetIdB = "B_asset_id"
6761
6862 let keyFirstHarvestHeight = "first_harvest_height"
6963
7064 let keyfirstHarvestCpmm = "first_harvest"
7165
72-let governanceAddress = Address(base58'3MzJZEn6jzxCPaHEfkrXd7FhbjTyVjdRPLS')
66+let governanceAddress = Address(base58'3N5W8da2iiijVieA6qLGo7KzCJj8B19smWU')
7367
7468 let wallet = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4')
7569
76-let votingAddress = Address(base58'3N6CYoCsxrcXKe75pQvvV3JqJrwJjm1t4QN')
70+let votingAddress = Address(base58'3MrJgdL1GniipErHy44YF9idzLaUL2iX5DQ')
7771
7872 let adminIncreaseInterestAddress = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4')
7973
8074 let oneWeekInBlock = 10106
8175
8276 let totalVoteShare = 10000000000
8377
8478 let scaleValue1 = 10
8579
8680 let scaleValue3 = 1000
8781
8882 let scaleValue5 = 100000
8983
9084 let scaleValue6 = 1000000
9185
9286 let scaleValue8 = 100000000
9387
9488 let scaleValue11 = 100000000000
9589
9690 func strAssetIdA (pool) = getStringValue(pool, keyAssetIdA)
9791
9892
9993 func strAssetIdB (pool) = getStringValue(pool, keyAssetIdB)
10094
10195
10296 func assetIdA (pool) = if ((strAssetIdA(pool) == "WAVES"))
10397 then unit
10498 else fromBase58String(strAssetIdA(pool))
10599
106100
107101 func assetIdB (pool) = if ((strAssetIdB(pool) == "WAVES"))
108102 then unit
109103 else fromBase58String(strAssetIdB(pool))
110104
111105
112106 let kBasePeriod = "base_period"
113107
114108 let kPeriodLength = "period_length"
115109
116110 let kStartHeight = "start_height"
117111
118112 let kFirstHarvestHeight = "first_harvest_height"
119113
120114 let kDurationFullVotePower = "duration_full_vote_power"
121115
122116 let kMinVotePower = "min_vote_power"
123117
124118 let basePeriod = valueOrErrorMessage(getInteger(votingAddress, kBasePeriod), "Empty kBasePeriod")
125119
126120 let startHeight = valueOrErrorMessage(getInteger(votingAddress, kStartHeight), "Empty kStartHeight")
127121
128122 let periodLength = valueOrErrorMessage(getInteger(votingAddress, kPeriodLength), "Empty kPeriodLength")
129123
130124 let durationFullVotePower = valueOrErrorMessage(getInteger(votingAddress, kDurationFullVotePower), "Empty kDurationFullVotePower")
131125
132126 let minVotePower = valueOrErrorMessage(getInteger(votingAddress, kMinVotePower), "Empty kMinVotePower")
133-
134-let isActive = getBooleanValue(this, keyActive)
135127
136128 let currPeriod = (basePeriod + ((height - startHeight) / periodLength))
137129
138130 func getLimitToken (pool) = valueOrElse(getIntegerValue(pool, keyLimitShareFirstHarvest), 0)
139131
140132
141133 let APY = getIntegerValue(this, keyAPY)
142134
143135 let SwopYearEmission = getIntegerValue(this, keySwopYearEmission)
144136
145137 func assetNameA (pool) = match assetIdA(pool) {
146138 case id: ByteVector =>
147139 value(assetInfo(id)).name
148140 case waves: Unit =>
149141 "WAVES"
150142 case _ =>
151143 throw("Match error")
152144 }
153145
154146
155147 func assetNameB (pool) = match assetIdB(pool) {
156148 case id: ByteVector =>
157149 value(assetInfo(id)).name
158150 case waves: Unit =>
159151 "WAVES"
160152 case _ =>
161153 throw("Match error")
162154 }
163155
164156
165157 let SWOP = fromBase58String(getStringValue(this, keySWOPid))
166158
167159 func isFirstHarvest (pool) = valueOrElse(getBoolean(pool, keyfirstHarvestCpmm), false)
168160
169161
170162 func getHeightFirstHarvest (pool) = valueOrElse(getInteger(pool, keyFirstHarvestHeight), 0)
171163
172164
173165 func getBalanceA (pool) = valueOrErrorMessage(getInteger(pool, keyBalancecpmmA), ("No data on the key: " + keyBalancecpmmA))
174166
175167
176168 func getBalanceB (pool) = valueOrErrorMessage(getInteger(pool, keyBalancecpmmB), ("No data on the key: " + keyBalancecpmmB))
177169
178170
179171 func getShareLimitToken (pool) = valueOrErrorMessage(getInteger(pool, kShareLimit), ("No data on the key: " + kShareLimit))
180172
181173
182174 func getTotalShareTokenLocked (pool) = valueOrErrorMessage(getInteger(this, (pool + keyShareTokensLocked)), (("No data on the key: " + pool) + keyShareTokensLocked))
183175
184176
185177 func getShareAssetId (pool) = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id"))
186178
187179
188180 func getAssetInfo (assetId) = match assetId {
189181 case id: ByteVector =>
190182 let stringId = toBase58String(id)
191183 let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist"))
192184 $Tuple3(stringId, info.name, info.decimals)
193185 case waves: Unit =>
194186 $Tuple3("WAVES", "WAVES", 8)
195187 case _ =>
196188 throw("Match error")
197189 }
198190
199191
200192 func calcScaleValue (assetId1,assetId2) = {
201193 let assetId1Decimals = value(assetInfo(assetId1)).decimals
202194 let assetId2Decimals = value(assetInfo(assetId2)).decimals
203195 let scaleDigits = ((assetId2Decimals - assetId1Decimals) + 8)
204196 pow(10, 0, scaleDigits, 0, 0, HALFDOWN)
205197 }
206198
207199
208200 func userAvailableSWOP (pool,user) = valueOrElse(getInteger(this, (((pool + "_") + toString(user)) + keyAvailableSWOP)), 0)
209201
210202
203+func isPoolUnderway (pool) = if ((pool == "3PCdNCULgjM9ZMLEt61M45qxV26ro6o48Jj"))
204+ then true
205+ else (pool == "3PMcDUBDyjNB1fkRGeLGpsz1ZQPfcmyp4r5")
206+
207+
211208 func rewardInfo (pool) = {
212209 let totalRewardPerBlockCurrent = valueOrErrorMessage(getInteger(governanceAddress, keyTotalRewardPerBlockCurrent), ((("No data on the key: " + keyTotalRewardPerBlockCurrent) + " at address ") + toString(governanceAddress)))
213210 let totalRewardPerBlockPrevious = valueOrErrorMessage(getInteger(governanceAddress, keyTotalRewardPerBlockPrevious), ((("No data on the key: " + keyTotalRewardPerBlockPrevious) + " at address ") + toString(governanceAddress)))
214211 let rewardPoolFractionCurrent = valueOrErrorMessage(getInteger(governanceAddress, (pool + keyRewardPoolFractionCurrent)), (((("No data on the key: " + pool) + keyRewardPoolFractionCurrent) + " at address ") + toString(governanceAddress)))
215212 let rewardUpdateHeight = valueOrErrorMessage(getInteger(governanceAddress, keyRewardUpdateHeight), ((("No data on the key: " + keyRewardUpdateHeight) + " at address ") + toString(governanceAddress)))
216213 let rewardPoolFractionPrevious = valueOrErrorMessage(getInteger(governanceAddress, (pool + keyRewardPoolFractionPrevious)), (((("No data on the key: " + pool) + keyRewardPoolFractionPrevious) + " at address ") + toString(governanceAddress)))
217214 let rewardPoolCurrent = fraction(totalRewardPerBlockCurrent, rewardPoolFractionCurrent, totalVoteShare)
218215 let rewardPoolPrevious = fraction(totalRewardPerBlockPrevious, rewardPoolFractionPrevious, totalVoteShare)
219216 if (if ((rewardPoolCurrent > totalRewardPerBlockCurrent))
220217 then true
221218 else (rewardPoolPrevious > totalRewardPerBlockPrevious))
222219 then throw("rewardPoolCurrent > totalRewardPerBlockCurrent or rewardPoolPrevious > totalRewardPerBlockPrevious")
223220 else $Tuple3(rewardPoolCurrent, rewardUpdateHeight, rewardPoolPrevious)
224221 }
225222
226223
227224 func getLastInterestInfo (pool) = {
228225 let lastInterest = valueOrErrorMessage(getInteger(this, (pool + keyLastInterest)), (("No data on the key: " + pool) + keyLastInterest))
229226 let lastInterestHeight = valueOrElse(getInteger(this, (pool + keyLastInterestHeight)), height)
230227 $Tuple2(lastInterestHeight, lastInterest)
231228 }
232229
233230
234231 func getUserInterestInfo (pool,userAddress) = {
235232 let userLastInterest = getInteger(this, (((pool + "_") + toString(userAddress)) + keyUserLastInterest))
236233 let userShare = getInteger(this, (((pool + "_") + toString(userAddress)) + keyUserShareTokensLocked))
237234 let lastInterest = valueOrErrorMessage(getInteger(this, (pool + keyLastInterest)), (("No data on the key: " + pool) + keyLastInterest))
238235 let userLastInterestValue = match userLastInterest {
239236 case userLastInterest: Int =>
240237 userLastInterest
241238 case _ =>
242239 lastInterest
243240 }
244241 let userShareTokensAmount = match userShare {
245242 case userShare: Int =>
246243 userShare
247244 case _ =>
248245 0
249246 }
250247 $Tuple2(userLastInterestValue, userShareTokensAmount)
251248 }
252249
253250
254251 func calcInterest (lastInterestHeight,rewardUpdateHeight,lastInterest,currentRewardPerBlock,shareTokenLocked,previousRewardPerBlock,shareAssetId,scaleValue,pmtAmount) = if ((shareTokenLocked == 0))
255252 then 0
256253 else if ((rewardUpdateHeight > height))
257254 then {
258255 let reward = (previousRewardPerBlock * (height - lastInterestHeight))
259256 (lastInterest + fraction(reward, scaleValue, shareTokenLocked))
260257 }
261258 else if ((lastInterestHeight > rewardUpdateHeight))
262259 then {
263260 let reward = (currentRewardPerBlock * (height - lastInterestHeight))
264261 (lastInterest + fraction(reward, scaleValue, shareTokenLocked))
265262 }
266263 else {
267264 let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight))
268265 let interestAfterUpdate = (lastInterest + fraction(rewardAfterLastInterestBeforeReawardUpdate, scaleValue, shareTokenLocked))
269266 let reward = (currentRewardPerBlock * (height - rewardUpdateHeight))
270267 (interestAfterUpdate + fraction(reward, scaleValue, shareTokenLocked))
271268 }
272269
273270
274271 func claimCalc (pool,caller,pmtAmount) = {
275272 let shareAssetId = getShareAssetId(pool)
276273 let scaleValue = calcScaleValue(SWOP, shareAssetId)
277274 let shareTokenLocked = getTotalShareTokenLocked(pool)
278- let $t01109311158 = getLastInterestInfo(pool)
279- let lastInterestHeight = $t01109311158._1
280- let lastInterest = $t01109311158._2
281- let $t01116311251 = rewardInfo(pool)
282- let currentRewardPerBlock = $t01116311251._1
283- let rewardUpdateHeight = $t01116311251._2
284- let previousRewardPerBlock = $t01116311251._3
285- let $t01125611335 = getUserInterestInfo(pool, caller)
286- let userLastInterest = $t01125611335._1
287- let userShareTokensAmount = $t01125611335._2
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
288285 let currentInterest = calcInterest(lastInterestHeight, rewardUpdateHeight, lastInterest, currentRewardPerBlock, shareTokenLocked, previousRewardPerBlock, shareAssetId, scaleValue, pmtAmount)
289286 let claimAmount = fraction(userShareTokensAmount, (currentInterest - userLastInterest), scaleValue)
290287 let userNewInterest = currentInterest
291288 $Tuple4(userNewInterest, currentInterest, claimAmount, userShareTokensAmount)
292289 }
293290
294291
295292 func calculateProtocolReward (pool) = {
296- let $t01180811873 = getLastInterestInfo(pool)
297- let lastInterestHeight = $t01180811873._1
298- let lastInterest = $t01180811873._2
299- let $t01187811966 = rewardInfo(pool)
300- let currentRewardPerBlock = $t01187811966._1
301- let rewardUpdateHeight = $t01187811966._2
302- let previousRewardPerBlock = $t01187811966._3
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
303300 let shareTokenLocked = getTotalShareTokenLocked(pool)
304301 if ((shareTokenLocked == 0))
305302 then if ((rewardUpdateHeight > height))
306303 then {
307304 let reward = (previousRewardPerBlock * (height - lastInterestHeight))
308305 reward
309306 }
310307 else if ((lastInterestHeight > rewardUpdateHeight))
311308 then {
312309 let reward = (currentRewardPerBlock * (height - lastInterestHeight))
313310 reward
314311 }
315312 else {
316313 let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight))
317314 let reward = (currentRewardPerBlock * (height - rewardUpdateHeight))
318315 (reward + rewardAfterLastInterestBeforeReawardUpdate)
319316 }
320317 else 0
321318 }
322319
323320
324321 func checkPmtAssetIdCorrect (pool,pmtAssetId) = {
325322 let poolShareAssetId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id"))
326323 if ((pmtAssetId == poolShareAssetId))
327324 then true
328325 else false
329326 }
330327
331328
332329 func getUserSWOPClaimedAmount (pool,user) = valueOrElse(getInteger(this, (((pool + "_") + toString(user)) + keyUserSWOPClaimedAmount)), 0)
333330
334331
335332 @Callable(i)
336333 func init (earlyLP) = if (isDefined(getString(this, keySWOPid)))
337334 then throw("SWOP already initialized")
338335 else {
339336 let initAmount = 100000000000000
340337 let SWOPissue = Issue("SWOP", "SWOP protocol token", initAmount, 8, true)
341338 let SWOPid = calculateAssetId(SWOPissue)
342-[BooleanEntry(keyActive, true), Issue("SWOP", "SWOP protocol token", initAmount, 8, true), StringEntry(keySWOPid, toBase58String(SWOPid))]
339+[Issue("SWOP", "SWOP protocol token", initAmount, 8, true), StringEntry(keySWOPid, toBase58String(SWOPid))]
343340 }
344341
345342
346343
347344 @Callable(i)
348-func initPoolShareFarming (pool) = if ((i.caller != this))
349- then throw("Only the DApp itself can call this function")
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
354+[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")
350362 else {
351- let $t01394014020 = rewardInfo(pool)
352- let currentReward = $t01394014020._1
353- let rewardUpdateHeight = $t01394014020._2
354- let previousRewardPerBlock = $t01394014020._3
355-[IntegerEntry((pool + keyShareTokensLocked), 0), IntegerEntry((pool + keyLastInterest), 0), IntegerEntry((pool + keyLastInterestHeight), height)]
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
356424 }
357425
358426
359427
360428 @Callable(i)
361-func updatePoolInterest (pool) = if ((i.caller != wallet))
362- then throw("Only the Admin itself can call this function")
429+func withdrawShareTokens (pool,shareTokensWithdrawAmount) = if (isPoolUnderway(pool))
430+ then throw("Work is currently underway")
363431 else {
364- let $t01443614556 = claimCalc(pool, adminIncreaseInterestAddress, 0)
365- let userNewInterest = $t01443614556._1
366- let currentInterest = $t01443614556._2
367- let claimAmount = $t01443614556._3
368- let userShareTokensAmount = $t01443614556._4
369- let $t01456114641 = rewardInfo(pool)
370- let currentReward = $t01456114641._1
371- let rewardUpdateHeight = $t01456114641._2
372- let previousRewardPerBlock = $t01456114641._3
373-[IntegerEntry((pool + keyShareTokensLocked), 0), IntegerEntry((pool + keyLastInterest), userNewInterest), IntegerEntry((pool + keyLastInterestHeight), height)]
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)]
374447 }
375448
376449
377450
378451 @Callable(i)
379-func lockShareTokens (pool) = {
380- let $t01488714962 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
381- let pmtAmount = $t01488714962._1
382- let pmtAssetId = $t01488714962._2
383- let $t01496715040 = getAssetInfo(pmtAssetId)
384- let pmtStrAssetId = $t01496715040._1
385- let pmtAssetName = $t01496715040._2
386- let pmtDecimals = $t01496715040._3
387- let $t01504515153 = claimCalc(pool, i.caller, pmtAmount)
388- let userNewInterest = $t01504515153._1
389- let currentInterest = $t01504515153._2
390- let claimAmount = $t01504515153._3
391- let userShareTokensAmount = $t01504515153._4
392- let userShareAmountNew = (userShareTokensAmount + pmtAmount)
393- let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount)
394- let totalShareAmount = getTotalShareTokenLocked(pool)
395- let totalShareAmountNew = (totalShareAmount + pmtAmount)
396- let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
397- let userClaimedAmountNew = (userClaimedAmount + claimAmount)
398- 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)]
399- if ((0 >= pmtAmount))
400- then throw("You can't lock token")
401- else if (!(checkPmtAssetIdCorrect(pool, pmtAssetId)))
402- then throw("Incorrect pmtAssetId")
403- else if (if (isFirstHarvest(Address(fromBase58String(pool))))
404- then (getHeightFirstHarvest(Address(fromBase58String(pool))) > height)
405- else false)
406- then {
407- let harvestPeriod = ((((getHeightFirstHarvest(Address(fromBase58String(pool))) - startHeight) + 1) / periodLength) - 1)
408- let amountOfVoting = split(getStringValue(votingAddress, (((toString(i.caller) + "_") + pool) + "_user_pool_struc")), "_")
409- let amountPoolStract = split(getStringValue(votingAddress, (pool + "_pool_struc")), "_")
410- let amountActiveVoteUserPoolStract = split(getStringValue(votingAddress, (((toString(i.caller) + "_") + pool) + kHarvestUserPoolActiveVoteStrucVoting)), "_")
411- let amountPoolActiveVoteStract = split(getStringValue(votingAddress, (pool + kHarvestPoolActiveVoteStrucVoting)), "_")
412- let amountActiveVoteUserPoolPrevStract = split(getStringValue(votingAddress, (((toString(i.caller) + "_") + pool) + kHarvestPoolPrevActiveVoteStruc)), "_")
413- let amountPoolActiveVotePrevStract = split(getStringValue(votingAddress, (pool + kHarvestUserPoolPrevActiveVoteStruc)), "_")
414- let userShareTokenLocked = userShareTokensAmount
415- let userPoolActiveVote = if ((toString(currPeriod) == amountOfVoting[2]))
416- then valueOrElse(parseInt(amountActiveVoteUserPoolStract[0]), 0)
417- else valueOrElse(parseInt(amountOfVoting[1]), 0)
418- let poolActiveVote = if ((toString(currPeriod) == amountPoolStract[2]))
419- then valueOrElse(parseInt(amountPoolActiveVoteStract[0]), 0)
420- else valueOrElse(parseInt(amountPoolStract[1]), 0)
421- let protocolReward = calculateProtocolReward(pool)
422- if ((userPoolActiveVote != 0))
423- then {
424- let limitShareToken = getShareLimitToken(addressFromStringValue(pool))
425- let shareToken = (fraction(limitShareToken, userPoolActiveVote, poolActiveVote) - userShareTokenLocked)
426- if ((amountActiveVoteUserPoolStract[1] != toString(harvestPeriod)))
427- then throw("You can't share token")
428- else if ((pmtAmount > limitShareToken))
429- then throw(("You can't share token more than " + toString(limitShareToken)))
430- else if ((shareToken > 0))
431- then if ((totalShareAmount == 0))
432- then (baseEntry ++ [ScriptTransfer(wallet, protocolReward, SWOP)])
433- else if ((shareToken >= pmtAmount))
434- then baseEntry
435- else throw(("Your maximum share token is " + toString(shareToken)))
436- else throw("You can't share token")
437- }
438- else throw("Your amount of token less than 0")
439- }
440- else baseEntry
441- }
442-
443-
444-
445-@Callable(i)
446-func withdrawShareTokens (pool,shareTokensWithdrawAmount) = {
447- let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id"))
448- let $t01955919659 = claimCalc(pool, i.caller, 1)
449- let userNewInterest = $t01955919659._1
450- let currentInterest = $t01955919659._2
451- let claimAmount = $t01955919659._3
452- let userShareTokensAmount = $t01955919659._4
453- let userShareAmountNew = (userShareTokensAmount - shareTokensWithdrawAmount)
454- let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount)
455- let totalShareAmount = getTotalShareTokenLocked(pool)
456- let totalShareAmountNew = (totalShareAmount - shareTokensWithdrawAmount)
457- let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
458- let userClaimedAmountNew = (userClaimedAmount + claimAmount)
459- if ((shareTokensWithdrawAmount > userShareTokensAmount))
460- then throw("Withdraw amount more then user locked amount")
461- 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)]
462- }
463-
464-
465-
466-@Callable(i)
467-func claim (pool) = {
468- let shareTokenLocked = getTotalShareTokenLocked(pool)
469- let $t02126021325 = getLastInterestInfo(pool)
470- let lastInterestHeight = $t02126021325._1
471- let lastInterest = $t02126021325._2
472- let $t02133021419 = rewardInfo(pool)
473- let currentRewardPerBlock = $t02133021419._1
474- let rewardUpdateHeight = $t02133021419._2
475- let previousRewardPerBlock = $t02133021419._3
476- let $t02142421524 = claimCalc(pool, i.caller, 1)
477- let userNewInterest = $t02142421524._1
478- let currentInterest = $t02142421524._2
479- let claimAmount = $t02142421524._3
480- let userShareTokensAmount = $t02142421524._4
481- let availableFund = (userAvailableSWOP(pool, i.caller) + claimAmount)
482- let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
483- let userClaimedAmountNew = (userClaimedAmount + claimAmount)
484- if ((availableFund == 0))
485- then throw("You have 0 available SWOP")
486- 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)]
487- }
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+ }
488475
489476
490477 @Verifier(tx)
491478 func verify () = match tx {
492479 case _ =>
493480 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
494481 }
495482

github/deemru/w8io/026f985 
67.69 ms