tx · 5SfFbPUiv9VipdnQKBN3QmB6ZiaaQv8tAaZWNbQhtT7P

3MsjAKkxKjxVU4gC1BpJ1jKmAZyRufUCErC:  -0.01400000 Waves

2021.04.30 12:05 [1504986] smart account 3MsjAKkxKjxVU4gC1BpJ1jKmAZyRufUCErC > SELF 0.00000000 Waves

{ "type": 13, "id": "5SfFbPUiv9VipdnQKBN3QmB6ZiaaQv8tAaZWNbQhtT7P", "fee": 1400000, "feeAssetId": null, "timestamp": 1619773542375, "version": 2, "chainId": 84, "sender": "3MsjAKkxKjxVU4gC1BpJ1jKmAZyRufUCErC", "senderPublicKey": "FQ5JNhUjFS3Ty3nSykXrGWHDt4NvXJDCv4JQiJ3dXmKa", "proofs": [ "4PbYAyBV5Mr2KZnu9jbb7FESiSQg7uKMJA4m5HC7UZfFvQo17SpZgt9zjByfcaK6SdeqyBgNDTifGFCtevmoETyF" ], "script": "base64:AAIEAAAAAAAAACEIAhIDCgEIEgMKAQgSAwoBCBIDCgEIEgQKAggBEgMKAQgAAABTAAAAAAxhZG1pblB1YktleTEBAAAAILoJ1zuJWaTRXaD/8bsz0KrhOWkPy+K9kdY77k9eqOATAAAAAAxhZG1pblB1YktleTIBAAAAIMKRRJmz0rC0DSKlkVi9iLyhN7sIy//djOaU71sWDn5AAAAAAAxhZG1pblB1YktleTMBAAAAII4eFy54sQc79EhOejMoYHYod/yZ5ZIwoyDCz6ir6Q5VAAAAABRrZXlTaGFyZVRva2Vuc0xvY2tlZAIAAAAaX3RvdGFsX3NoYXJlX3Rva2Vuc19sb2NrZWQAAAAAHGtleVJld2FyZFBvb2xGcmFjdGlvbkN1cnJlbnQCAAAAHV9jdXJyZW50X3Bvb2xfZnJhY3Rpb25fcmV3YXJkAAAAAB1rZXlSZXdhcmRQb29sRnJhY3Rpb25QcmV2aW91cwIAAAAeX3ByZXZpb3VzX3Bvb2xfZnJhY3Rpb25fcmV3YXJkAAAAAB1rZXlUb3RhbFJld2FyZFBlckJsb2NrQ3VycmVudAIA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AACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACBQAAAARwb29sAgAAAAFfCQAEJQAAAAEIBQAAAAFpAAAABmNhbGxlcgUAAAAQa2V5QXZhaWxhYmxlU1dPUAAAAAAAAAAAAAkABEwAAAACCQEAAAAHUmVpc3N1ZQAAAAMFAAAABFNXT1AFAAAADWF2YWlsYWJsZUZ1bmQGCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACBQAAAARwb29sAgAAAAFfCQAEJQAAAAEIBQAAAAFpAAAABmNhbGxlcgUAAAAYa2V5VXNlclNXT1BDbGFpbWVkQW1vdW50BQAAABR1c2VyQ2xhaW1lZEFtb3VudE5ldwkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgUAAAAEcG9vbAIAAAABXwkABCUAAAABCAUAAAABaQAAAAZjYWxsZXIFAAAAHGtleVVzZXJTV09QTGFzdENsYWltZWRBbW91bnQFAAAAC2NsYWltQW1vdW50CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAANYXZhaWxhYmxlRnVuZAUAAAAEU1dPUAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5nGsfHg==", "height": 1504986, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DxvhVLHzdYaUYCXvd5L28WacPAnaeqFHhA1C9TDcsZa Next: E1NMK6kGvMJGTUusiXB2JpnSzvSb3PzRTovg4VhC8t96 Diff:
OldNewDifferences
3939
4040 let keyAPY = "apy"
4141
42-let kPreviousTotalVoteSWOP = "previous_total_struc"
42+let kPreviousTotalVoteSWOP = "previous_total_vote_SWOP"
4343
4444 let keySwopYearEmission = "swop_year_emission"
4545
4646 let keyBalancecpmmA = "A_asset_balance"
4747
4848 let keyBalancecpmmB = "B_asset_balance"
49+
50+let kHarvestPoolActiveVoteStrucVoting = "_harvest_pool_activeVote_struc"
51+
52+let kHarvestUserPoolActiveVoteStrucVoting = "_harvest_user_pool_ActiveVote_struc"
53+
54+let keyLimitShareFirstHarvest = "share_limit_on_first_harvest"
4955
5056 let keyAssetIdA = "A_asset_id"
5157
7177
7278 let totalVoteShare = 10000000000
7379
80+let scaleValue1 = 10
81+
82+let scaleValue3 = 1000
83+
84+let scaleValue5 = 100000
85+
7486 let scaleValue6 = 1000000
7587
7688 let scaleValue8 = 100000000
89+
90+let scaleValue11 = 100000000000
7791
7892 func strAssetIdA (pool) = getStringValue(pool, keyAssetIdA)
7993
114128 let minVotePower = valueOrErrorMessage(getInteger(votingAddress, kMinVotePower), "Empty kMinVotePower")
115129
116130 let currPeriod = (basePeriod + ((height - startHeight) / periodLength))
131+
132+func getLimitToken (pool) = valueOrElse(getIntegerValue(pool, keyLimitShareFirstHarvest), 0)
133+
117134
118135 let APY = getIntegerValue(this, keyAPY)
119136
157174
158175
159176 func getShareAssetId (pool) = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id"))
177+
178+
179+func getAssetInfo (assetId) = match assetId {
180+ case id: ByteVector =>
181+ let stringId = toBase58String(id)
182+ let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist"))
183+ $Tuple3(stringId, info.name, info.decimals)
184+ case waves: Unit =>
185+ $Tuple3("WAVES", "WAVES", 8)
186+ case _ =>
187+ throw("Match error")
188+}
160189
161190
162191 func calcScaleValue (assetId1,assetId2) = {
237266 let shareAssetId = getShareAssetId(pool)
238267 let scaleValue = calcScaleValue(SWOP, shareAssetId)
239268 let shareTokenLocked = getTotalShareTokenLocked(pool)
240- let $t01012110186 = getLastInterestInfo(pool)
241- let lastInterestHeight = $t01012110186._1
242- let lastInterest = $t01012110186._2
243- let $t01019110279 = rewardInfo(pool)
244- let currentRewardPerBlock = $t01019110279._1
245- let rewardUpdateHeight = $t01019110279._2
246- let previousRewardPerBlock = $t01019110279._3
247- let $t01028410363 = getUserInterestInfo(pool, caller)
248- let userLastInterest = $t01028410363._1
249- let userShareTokensAmount = $t01028410363._2
269+ let $t01086910934 = getLastInterestInfo(pool)
270+ let lastInterestHeight = $t01086910934._1
271+ let lastInterest = $t01086910934._2
272+ let $t01093911027 = rewardInfo(pool)
273+ let currentRewardPerBlock = $t01093911027._1
274+ let rewardUpdateHeight = $t01093911027._2
275+ let previousRewardPerBlock = $t01093911027._3
276+ let $t01103211111 = getUserInterestInfo(pool, caller)
277+ let userLastInterest = $t01103211111._1
278+ let userShareTokensAmount = $t01103211111._2
250279 let currentInterest = calcInterest(lastInterestHeight, rewardUpdateHeight, lastInterest, currentRewardPerBlock, shareTokenLocked, previousRewardPerBlock, shareAssetId, scaleValue, pmtAmount)
251280 let claimAmount = fraction(userShareTokensAmount, (currentInterest - userLastInterest), scaleValue)
252281 let userNewInterest = currentInterest
255284
256285
257286 func calculateProtocolReward (pool) = {
258- let $t01083710902 = getLastInterestInfo(pool)
259- let lastInterestHeight = $t01083710902._1
260- let lastInterest = $t01083710902._2
261- let $t01090810996 = rewardInfo(pool)
262- let currentRewardPerBlock = $t01090810996._1
263- let rewardUpdateHeight = $t01090810996._2
264- let previousRewardPerBlock = $t01090810996._3
287+ let $t01158511650 = getLastInterestInfo(pool)
288+ let lastInterestHeight = $t01158511650._1
289+ let lastInterest = $t01158511650._2
290+ let $t01165611744 = rewardInfo(pool)
291+ let currentRewardPerBlock = $t01165611744._1
292+ let rewardUpdateHeight = $t01165611744._2
293+ let previousRewardPerBlock = $t01165611744._3
265294 let shareTokenLocked = getTotalShareTokenLocked(pool)
266295 if ((shareTokenLocked == 0))
267296 then 0
310339 func initPoolShareFarming (pool) = if ((i.caller != this))
311340 then throw("Only the DApp itself can call this function")
312341 else {
313- let $t01293113011 = rewardInfo(pool)
314- let currentReward = $t01293113011._1
315- let rewardUpdateHeight = $t01293113011._2
316- let previousRewardPerBlock = $t01293113011._3
342+ let $t01367913759 = rewardInfo(pool)
343+ let currentReward = $t01367913759._1
344+ let rewardUpdateHeight = $t01367913759._2
345+ let previousRewardPerBlock = $t01367913759._3
317346 [IntegerEntry((pool + keyShareTokensLocked), 0), IntegerEntry((pool + keyLastInterest), 0), IntegerEntry((pool + keyLastInterestHeight), height)]
318347 }
319348
323352 func updatePoolInterest (pool) = if ((i.caller != wallet))
324353 then throw("Only the Admin itself can call this function")
325354 else {
326- let $t01336013480 = claimCalc(pool, adminIncreaseInterestAddress, 0)
327- let userNewInterest = $t01336013480._1
328- let currentInterest = $t01336013480._2
329- let claimAmount = $t01336013480._3
330- let userShareTokensAmount = $t01336013480._4
355+ let $t01410814228 = claimCalc(pool, adminIncreaseInterestAddress, 0)
356+ let userNewInterest = $t01410814228._1
357+ let currentInterest = $t01410814228._2
358+ let claimAmount = $t01410814228._3
359+ let userShareTokensAmount = $t01410814228._4
331360 [IntegerEntry((pool + keyLastInterest), userNewInterest)]
332361 }
333362
335364
336365 @Callable(i)
337366 func lockShareTokens (pool) = {
338- let $t01361313688 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
339- let pmtAmount = $t01361313688._1
340- let pmtAssetId = $t01361313688._2
341- let $t01369313801 = claimCalc(pool, i.caller, pmtAmount)
342- let userNewInterest = $t01369313801._1
343- let currentInterest = $t01369313801._2
344- let claimAmount = $t01369313801._3
345- let userShareTokensAmount = $t01369313801._4
367+ let $t01436114436 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
368+ let pmtAmount = $t01436114436._1
369+ let pmtAssetId = $t01436114436._2
370+ let $t01444114514 = getAssetInfo(pmtAssetId)
371+ let pmtStrAssetId = $t01444114514._1
372+ let pmtAssetName = $t01444114514._2
373+ let pmtDecimals = $t01444114514._3
374+ let $t01451914627 = claimCalc(pool, i.caller, pmtAmount)
375+ let userNewInterest = $t01451914627._1
376+ let currentInterest = $t01451914627._2
377+ let claimAmount = $t01451914627._3
378+ let userShareTokensAmount = $t01451914627._4
346379 let userShareAmountNew = (userShareTokensAmount + pmtAmount)
347380 let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount)
348381 let totalShareAmount = getTotalShareTokenLocked(pool)
350383 let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
351384 let userClaimedAmountNew = (userClaimedAmount + claimAmount)
352385 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)]
353- if (!(checkPmtAssetIdCorrect(pool, pmtAssetId)))
354- then throw("Incorrect pmtAssetId")
355- else if (if (isFirstHarvest(Address(fromBase58String(pool))))
356- then (height > (getHeightFirstHarvest(Address(fromBase58String(pool))) * periodLength))
357- else false)
358- then {
359- let amountOfVoting = split(getStringValue(votingAddress, (((toString(this) + "_") + pool) + "_user_pool_struc")), "_")
360- let previosTotalVoting = split(getStringValue(votingAddress, kPreviousTotalVoteSWOP), "_")
361- let assetbalanceswopusdnA = valueOrElse(getIntegerValue(swopUsdnAddress, keyBalancecpmmA), 0)
362- let assetbalanceswopusdnB = valueOrElse(getIntegerValue(swopUsdnAddress, keyBalancecpmmB), 0)
363- let assetbalancewavesusdnA = valueOrElse(getIntegerValue(wavesUsdnAddress, keyBalancecpmmA), 0)
364- let assetbalancewavesusdnB = valueOrElse(getIntegerValue(wavesUsdnAddress, keyBalancecpmmB), 0)
365- let totalPeriod = previosTotalVoting[1]
366- let previosTotal = previosTotalVoting[0]
367- let userShareTokenLocked = userShareTokensAmount
368- let userSwopVote = if ((toString(currPeriod) == amountOfVoting[2]))
369- then valueOrElse(parseInt(amountOfVoting[1]), 0)
370- else valueOrElse(parseInt(amountOfVoting[0]), 0)
371- let swopRate = ((assetbalanceswopusdnA / scaleValue8) / (assetbalanceswopusdnB / scaleValue6))
372- let votingTotal = if ((currPeriod == valueOrElse(parseInt(totalPeriod), -1)))
373- then valueOrElse(parseInt(previosTotal), 0)
374- else valueOrElse(parseInt(totalPeriod), 0)
375- let harvestPower = ((SwopYearEmission / votingTotal) / APY)
376- let protocolReward = calculateProtocolReward(pool)
377- if ((parseInt(amountOfVoting[1]) != 0))
378- then {
379- let assetBalanceB = getBalanceB(Address(fromBase58String(pool)))
380- let shareTokenRate = if ((assetNameB(Address(fromBase58String(pool))) == "USDN"))
381- then ((2 * assetBalanceB) / totalShareAmount)
382- else if ((assetNameA(Address(fromBase58String(pool))) == "SWOP"))
383- then (((2 * assetBalanceB) * ((assetbalanceswopusdnB / scaleValue8) / (assetbalanceswopusdnA / scaleValue6))) / totalShareAmount)
384- else if ((assetNameA(Address(fromBase58String(pool))) == "WAVES"))
385- then (((2 * assetBalanceB) * ((assetbalancewavesusdnB / scaleValue8) / (assetbalancewavesusdnA / scaleValue6))) / totalShareAmount)
386- else 0
387- let shareToken = ((((userSwopVote * swopRate) * harvestPower) / shareTokenRate) - userShareTokenLocked)
388- if ((shareToken > 0))
389- then if ((totalShareAmountNew >= shareToken))
390- then (baseEntry ++ [ScriptTransfer(wallet, protocolReward, SWOP)])
391- else throw(("You maximum share token is " + toString(shareToken)))
392- else throw("You can't share token")
393- }
394- else throw("Your amount of token less than 0")
395- }
396- else baseEntry
386+ if ((0 >= pmtAmount))
387+ then throw("You can't lock token")
388+ else if (!(checkPmtAssetIdCorrect(pool, pmtAssetId)))
389+ then throw("Incorrect pmtAssetId")
390+ else if (if (isFirstHarvest(Address(fromBase58String(pool))))
391+ then (height > (getHeightFirstHarvest(Address(fromBase58String(pool))) * periodLength))
392+ else false)
393+ then {
394+ let amountOfVoting = split(getStringValue(votingAddress, (((toString(this) + "_") + pool) + "_user_pool_struc")), "_")
395+ let amountPoolStract = split(getStringValue(votingAddress, (((toString(this) + "_") + pool) + "_pool_struc")), "_")
396+ let amountActiveVoteUserPoolStract = split(getStringValue(votingAddress, (((toString(this) + "_") + pool) + kHarvestUserPoolActiveVoteStrucVoting)), "_")
397+ let amountPoolActiveVoteStract = split(getStringValue(votingAddress, (pool + kHarvestPoolActiveVoteStrucVoting)), "_")
398+ let userShareTokenLocked = userShareTokensAmount
399+ let userPoolActiveVote = if ((toString(currPeriod) == amountOfVoting[2]))
400+ then valueOrElse(parseInt(amountActiveVoteUserPoolStract[0]), 0)
401+ else valueOrElse(parseInt(amountOfVoting[0]), 0)
402+ let poolActiveVote = if ((toString(currPeriod) == amountPoolStract[2]))
403+ then valueOrElse(parseInt(amountPoolActiveVoteStract[0]), 0)
404+ else valueOrElse(parseInt(amountPoolStract[0]), 0)
405+ let protocolReward = calculateProtocolReward(pool)
406+ if ((parseInt(amountOfVoting[1]) != 0))
407+ then {
408+ let shareToken = (fraction(getTotalShareTokenLocked(pool), userPoolActiveVote, poolActiveVote) - userShareTokenLocked)
409+ if ((shareToken > 0))
410+ then if ((totalShareAmountNew >= shareToken))
411+ then (baseEntry ++ [ScriptTransfer(wallet, protocolReward, SWOP)])
412+ else throw(("You maximum share token is " + toString(shareToken)))
413+ else throw("You can't share token")
414+ }
415+ else throw("Your amount of token less than 0")
416+ }
417+ else baseEntry
397418 }
398419
399420
401422 @Callable(i)
402423 func withdrawShareTokens (pool,shareTokensWithdrawAmount) = {
403424 let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id"))
404- let $t01831718417 = claimCalc(pool, i.caller, 1)
405- let userNewInterest = $t01831718417._1
406- let currentInterest = $t01831718417._2
407- let claimAmount = $t01831718417._3
408- let userShareTokensAmount = $t01831718417._4
425+ let $t01813418234 = claimCalc(pool, i.caller, 1)
426+ let userNewInterest = $t01813418234._1
427+ let currentInterest = $t01813418234._2
428+ let claimAmount = $t01813418234._3
429+ let userShareTokensAmount = $t01813418234._4
409430 let userShareAmountNew = (userShareTokensAmount - shareTokensWithdrawAmount)
410431 let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount)
411432 let totalShareAmount = getTotalShareTokenLocked(pool)
422443 @Callable(i)
423444 func claim (pool) = {
424445 let shareTokenLocked = getTotalShareTokenLocked(pool)
425- let $t01991019975 = getLastInterestInfo(pool)
426- let lastInterestHeight = $t01991019975._1
427- let lastInterest = $t01991019975._2
428- let $t01998020069 = rewardInfo(pool)
429- let currentRewardPerBlock = $t01998020069._1
430- let rewardUpdateHeight = $t01998020069._2
431- let previousRewardPerBlock = $t01998020069._3
432- let $t02007420174 = claimCalc(pool, i.caller, 1)
433- let userNewInterest = $t02007420174._1
434- let currentInterest = $t02007420174._2
435- let claimAmount = $t02007420174._3
436- let userShareTokensAmount = $t02007420174._4
446+ let $t01972719792 = getLastInterestInfo(pool)
447+ let lastInterestHeight = $t01972719792._1
448+ let lastInterest = $t01972719792._2
449+ let $t01979719886 = rewardInfo(pool)
450+ let currentRewardPerBlock = $t01979719886._1
451+ let rewardUpdateHeight = $t01979719886._2
452+ let previousRewardPerBlock = $t01979719886._3
453+ let $t01989119991 = claimCalc(pool, i.caller, 1)
454+ let userNewInterest = $t01989119991._1
455+ let currentInterest = $t01989119991._2
456+ let claimAmount = $t01989119991._3
457+ let userShareTokensAmount = $t01989119991._4
437458 let availableFund = (userAvailableSWOP(pool, i.caller) + claimAmount)
438459 let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
439460 let userClaimedAmountNew = (userClaimedAmount + claimAmount)
440461 if ((availableFund == 0))
441462 then throw("You have 0 available SWOP")
442- 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)]
463+ else [IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry((pool + keyLastInterest), currentInterest), IntegerEntry((pool + keyLastInterestHeight), height), IntegerEntry((((pool + "_") + toString(i.caller)) + keyAvailableSWOP), 0), Reissue(SWOP, availableFund, true), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPClaimedAmount), userClaimedAmountNew), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPLastClaimedAmount), claimAmount), ScriptTransfer(i.caller, availableFund, SWOP)]
443464 }
444465
445466
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let adminPubKey1 = base58'DXDY2itiEcYBtGkVLnkpHtDFyWQUkoLJz79uJ7ECbMrA'
55
66 let adminPubKey2 = base58'E6Wa1SGoktYcjHjsKrvjMiqJY3SWmGKcD8Q5L8kxSPS7'
77
88 let adminPubKey3 = base58'AZmWJtuy4GeVrMmJH4hfFBRApe1StvhJSk4jcbT6bArQ'
99
1010 let keyShareTokensLocked = "_total_share_tokens_locked"
1111
1212 let keyRewardPoolFractionCurrent = "_current_pool_fraction_reward"
1313
1414 let keyRewardPoolFractionPrevious = "_previous_pool_fraction_reward"
1515
1616 let keyTotalRewardPerBlockCurrent = "total_reward_per_block_current"
1717
1818 let keyTotalRewardPerBlockPrevious = "total_reward_per_block_previous"
1919
2020 let keyRewardUpdateHeight = "reward_update_height"
2121
2222 let keyLastInterest = "_last_interest"
2323
2424 let keyLastInterestHeight = "_last_interest_height"
2525
2626 let keyUserShareTokensLocked = "_share_tokens_locked"
2727
2828 let keyUserLastInterest = "_last_interest"
2929
3030 let keySWOPid = "SWOP_id"
3131
3232 let keyUserSWOPClaimedAmount = "_SWOP_claimed_amount"
3333
3434 let keyUserSWOPLastClaimedAmount = "_SWOP_last_claimed_amount"
3535
3636 let keyAvailableSWOP = "_available_SWOP"
3737
3838 let keyFarmingStartHeight = "farming_start_height"
3939
4040 let keyAPY = "apy"
4141
42-let kPreviousTotalVoteSWOP = "previous_total_struc"
42+let kPreviousTotalVoteSWOP = "previous_total_vote_SWOP"
4343
4444 let keySwopYearEmission = "swop_year_emission"
4545
4646 let keyBalancecpmmA = "A_asset_balance"
4747
4848 let keyBalancecpmmB = "B_asset_balance"
49+
50+let kHarvestPoolActiveVoteStrucVoting = "_harvest_pool_activeVote_struc"
51+
52+let kHarvestUserPoolActiveVoteStrucVoting = "_harvest_user_pool_ActiveVote_struc"
53+
54+let keyLimitShareFirstHarvest = "share_limit_on_first_harvest"
4955
5056 let keyAssetIdA = "A_asset_id"
5157
5258 let keyAssetIdB = "B_asset_id"
5359
5460 let keyFirstHarvestHeight = "first_harvest_height"
5561
5662 let keyfirstHarvestCpmm = "first_harvest"
5763
5864 let governanceAddress = Address(base58'3MzJZEn6jzxCPaHEfkrXd7FhbjTyVjdRPLS')
5965
6066 let wallet = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4')
6167
6268 let votingAddress = Address(base58'3N6CYoCsxrcXKe75pQvvV3JqJrwJjm1t4QN')
6369
6470 let swopUsdnAddress = Address(base58'3N4kooq5242vPtJzBDrmukK6ptrjRRjEBWi')
6571
6672 let wavesUsdnAddress = Address(base58'3MxtJmAsKsfof4X28MJPBtvRUyz1PbCnbhF')
6773
6874 let adminIncreaseInterestAddress = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4')
6975
7076 let oneWeekInBlock = 10106
7177
7278 let totalVoteShare = 10000000000
7379
80+let scaleValue1 = 10
81+
82+let scaleValue3 = 1000
83+
84+let scaleValue5 = 100000
85+
7486 let scaleValue6 = 1000000
7587
7688 let scaleValue8 = 100000000
89+
90+let scaleValue11 = 100000000000
7791
7892 func strAssetIdA (pool) = getStringValue(pool, keyAssetIdA)
7993
8094
8195 func strAssetIdB (pool) = getStringValue(pool, keyAssetIdB)
8296
8397
8498 func assetIdA (pool) = if ((strAssetIdA(pool) == "WAVES"))
8599 then unit
86100 else fromBase58String(strAssetIdA(pool))
87101
88102
89103 func assetIdB (pool) = if ((strAssetIdB(pool) == "WAVES"))
90104 then unit
91105 else fromBase58String(strAssetIdB(pool))
92106
93107
94108 let kBasePeriod = "base_period"
95109
96110 let kPeriodLength = "period_length"
97111
98112 let kStartHeight = "start_height"
99113
100114 let kFirstHarvestHeight = "first_harvest_height"
101115
102116 let kDurationFullVotePower = "duration_full_vote_power"
103117
104118 let kMinVotePower = "min_vote_power"
105119
106120 let basePeriod = valueOrErrorMessage(getInteger(votingAddress, kBasePeriod), "Empty kBasePeriod")
107121
108122 let startHeight = valueOrErrorMessage(getInteger(votingAddress, kStartHeight), "Empty kStartHeight")
109123
110124 let periodLength = valueOrErrorMessage(getInteger(votingAddress, kPeriodLength), "Empty kPeriodLength")
111125
112126 let durationFullVotePower = valueOrErrorMessage(getInteger(votingAddress, kDurationFullVotePower), "Empty kDurationFullVotePower")
113127
114128 let minVotePower = valueOrErrorMessage(getInteger(votingAddress, kMinVotePower), "Empty kMinVotePower")
115129
116130 let currPeriod = (basePeriod + ((height - startHeight) / periodLength))
131+
132+func getLimitToken (pool) = valueOrElse(getIntegerValue(pool, keyLimitShareFirstHarvest), 0)
133+
117134
118135 let APY = getIntegerValue(this, keyAPY)
119136
120137 let SwopYearEmission = getIntegerValue(this, keySwopYearEmission)
121138
122139 func assetNameA (pool) = match assetIdA(pool) {
123140 case id: ByteVector =>
124141 value(assetInfo(id)).name
125142 case waves: Unit =>
126143 "WAVES"
127144 case _ =>
128145 throw("Match error")
129146 }
130147
131148
132149 func assetNameB (pool) = match assetIdB(pool) {
133150 case id: ByteVector =>
134151 value(assetInfo(id)).name
135152 case waves: Unit =>
136153 "WAVES"
137154 case _ =>
138155 throw("Match error")
139156 }
140157
141158
142159 let SWOP = fromBase58String(getStringValue(this, keySWOPid))
143160
144161 func isFirstHarvest (pool) = valueOrElse(getBoolean(pool, keyfirstHarvestCpmm), false)
145162
146163
147164 func getHeightFirstHarvest (pool) = valueOrElse(getInteger(pool, keyFirstHarvestHeight), 0)
148165
149166
150167 func getBalanceA (pool) = valueOrErrorMessage(getInteger(pool, keyBalancecpmmA), ("No data on the key: " + keyBalancecpmmA))
151168
152169
153170 func getBalanceB (pool) = valueOrErrorMessage(getInteger(pool, keyBalancecpmmB), ("No data on the key: " + keyBalancecpmmB))
154171
155172
156173 func getTotalShareTokenLocked (pool) = valueOrErrorMessage(getInteger(this, (pool + keyShareTokensLocked)), (("No data on the key: " + pool) + keyShareTokensLocked))
157174
158175
159176 func getShareAssetId (pool) = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id"))
177+
178+
179+func getAssetInfo (assetId) = match assetId {
180+ case id: ByteVector =>
181+ let stringId = toBase58String(id)
182+ let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist"))
183+ $Tuple3(stringId, info.name, info.decimals)
184+ case waves: Unit =>
185+ $Tuple3("WAVES", "WAVES", 8)
186+ case _ =>
187+ throw("Match error")
188+}
160189
161190
162191 func calcScaleValue (assetId1,assetId2) = {
163192 let assetId1Decimals = value(assetInfo(assetId1)).decimals
164193 let assetId2Decimals = value(assetInfo(assetId2)).decimals
165194 let scaleDigits = ((assetId2Decimals - assetId1Decimals) + 8)
166195 pow(10, 0, scaleDigits, 0, 0, HALFDOWN)
167196 }
168197
169198
170199 func userAvailableSWOP (pool,user) = valueOrElse(getInteger(this, (((pool + "_") + toString(user)) + keyAvailableSWOP)), 0)
171200
172201
173202 func rewardInfo (pool) = {
174203 let totalRewardPerBlockCurrent = valueOrErrorMessage(getInteger(governanceAddress, keyTotalRewardPerBlockCurrent), ((("No data on the key: " + keyTotalRewardPerBlockCurrent) + " at address ") + toString(governanceAddress)))
175204 let totalRewardPerBlockPrevious = valueOrErrorMessage(getInteger(governanceAddress, keyTotalRewardPerBlockPrevious), ((("No data on the key: " + keyTotalRewardPerBlockPrevious) + " at address ") + toString(governanceAddress)))
176205 let rewardPoolFractionCurrent = valueOrErrorMessage(getInteger(governanceAddress, (pool + keyRewardPoolFractionCurrent)), (((("No data on the key: " + pool) + keyRewardPoolFractionCurrent) + " at address ") + toString(governanceAddress)))
177206 let rewardUpdateHeight = valueOrErrorMessage(getInteger(governanceAddress, keyRewardUpdateHeight), ((("No data on the key: " + keyRewardUpdateHeight) + " at address ") + toString(governanceAddress)))
178207 let rewardPoolFractionPrevious = valueOrErrorMessage(getInteger(governanceAddress, (pool + keyRewardPoolFractionPrevious)), (((("No data on the key: " + pool) + keyRewardPoolFractionPrevious) + " at address ") + toString(governanceAddress)))
179208 let rewardPoolCurrent = fraction(totalRewardPerBlockCurrent, rewardPoolFractionCurrent, totalVoteShare)
180209 let rewardPoolPrevious = fraction(totalRewardPerBlockPrevious, rewardPoolFractionPrevious, totalVoteShare)
181210 if (if ((rewardPoolCurrent > totalRewardPerBlockCurrent))
182211 then true
183212 else (rewardPoolPrevious > totalRewardPerBlockPrevious))
184213 then throw("rewardPoolCurrent > totalRewardPerBlockCurrent or rewardPoolPrevious > totalRewardPerBlockPrevious")
185214 else $Tuple3(rewardPoolCurrent, rewardUpdateHeight, rewardPoolPrevious)
186215 }
187216
188217
189218 func getLastInterestInfo (pool) = {
190219 let lastInterest = valueOrErrorMessage(getInteger(this, (pool + keyLastInterest)), (("No data on the key: " + pool) + keyLastInterest))
191220 let lastInterestHeight = valueOrElse(getInteger(this, (pool + keyLastInterestHeight)), height)
192221 $Tuple2(lastInterestHeight, lastInterest)
193222 }
194223
195224
196225 func getUserInterestInfo (pool,userAddress) = {
197226 let userLastInterest = getInteger(this, (((pool + "_") + toString(userAddress)) + keyUserLastInterest))
198227 let userShare = getInteger(this, (((pool + "_") + toString(userAddress)) + keyUserShareTokensLocked))
199228 let lastInterest = valueOrErrorMessage(getInteger(this, (pool + keyLastInterest)), (("No data on the key: " + pool) + keyLastInterest))
200229 let userLastInterestValue = match userLastInterest {
201230 case userLastInterest: Int =>
202231 userLastInterest
203232 case _ =>
204233 lastInterest
205234 }
206235 let userShareTokensAmount = match userShare {
207236 case userShare: Int =>
208237 userShare
209238 case _ =>
210239 0
211240 }
212241 $Tuple2(userLastInterestValue, userShareTokensAmount)
213242 }
214243
215244
216245 func calcInterest (lastInterestHeight,rewardUpdateHeight,lastInterest,currentRewardPerBlock,shareTokenLocked,previousRewardPerBlock,shareAssetId,scaleValue,pmtAmount) = if ((shareTokenLocked == 0))
217246 then 0
218247 else if ((rewardUpdateHeight > height))
219248 then {
220249 let reward = (previousRewardPerBlock * (height - lastInterestHeight))
221250 (lastInterest + fraction(reward, scaleValue, shareTokenLocked))
222251 }
223252 else if ((lastInterestHeight > rewardUpdateHeight))
224253 then {
225254 let reward = (currentRewardPerBlock * (height - lastInterestHeight))
226255 (lastInterest + fraction(reward, scaleValue, shareTokenLocked))
227256 }
228257 else {
229258 let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight))
230259 let interestAfterUpdate = (lastInterest + fraction(rewardAfterLastInterestBeforeReawardUpdate, scaleValue, shareTokenLocked))
231260 let reward = (currentRewardPerBlock * (height - rewardUpdateHeight))
232261 (interestAfterUpdate + fraction(reward, scaleValue, shareTokenLocked))
233262 }
234263
235264
236265 func claimCalc (pool,caller,pmtAmount) = {
237266 let shareAssetId = getShareAssetId(pool)
238267 let scaleValue = calcScaleValue(SWOP, shareAssetId)
239268 let shareTokenLocked = getTotalShareTokenLocked(pool)
240- let $t01012110186 = getLastInterestInfo(pool)
241- let lastInterestHeight = $t01012110186._1
242- let lastInterest = $t01012110186._2
243- let $t01019110279 = rewardInfo(pool)
244- let currentRewardPerBlock = $t01019110279._1
245- let rewardUpdateHeight = $t01019110279._2
246- let previousRewardPerBlock = $t01019110279._3
247- let $t01028410363 = getUserInterestInfo(pool, caller)
248- let userLastInterest = $t01028410363._1
249- let userShareTokensAmount = $t01028410363._2
269+ let $t01086910934 = getLastInterestInfo(pool)
270+ let lastInterestHeight = $t01086910934._1
271+ let lastInterest = $t01086910934._2
272+ let $t01093911027 = rewardInfo(pool)
273+ let currentRewardPerBlock = $t01093911027._1
274+ let rewardUpdateHeight = $t01093911027._2
275+ let previousRewardPerBlock = $t01093911027._3
276+ let $t01103211111 = getUserInterestInfo(pool, caller)
277+ let userLastInterest = $t01103211111._1
278+ let userShareTokensAmount = $t01103211111._2
250279 let currentInterest = calcInterest(lastInterestHeight, rewardUpdateHeight, lastInterest, currentRewardPerBlock, shareTokenLocked, previousRewardPerBlock, shareAssetId, scaleValue, pmtAmount)
251280 let claimAmount = fraction(userShareTokensAmount, (currentInterest - userLastInterest), scaleValue)
252281 let userNewInterest = currentInterest
253282 $Tuple4(userNewInterest, currentInterest, claimAmount, userShareTokensAmount)
254283 }
255284
256285
257286 func calculateProtocolReward (pool) = {
258- let $t01083710902 = getLastInterestInfo(pool)
259- let lastInterestHeight = $t01083710902._1
260- let lastInterest = $t01083710902._2
261- let $t01090810996 = rewardInfo(pool)
262- let currentRewardPerBlock = $t01090810996._1
263- let rewardUpdateHeight = $t01090810996._2
264- let previousRewardPerBlock = $t01090810996._3
287+ let $t01158511650 = getLastInterestInfo(pool)
288+ let lastInterestHeight = $t01158511650._1
289+ let lastInterest = $t01158511650._2
290+ let $t01165611744 = rewardInfo(pool)
291+ let currentRewardPerBlock = $t01165611744._1
292+ let rewardUpdateHeight = $t01165611744._2
293+ let previousRewardPerBlock = $t01165611744._3
265294 let shareTokenLocked = getTotalShareTokenLocked(pool)
266295 if ((shareTokenLocked == 0))
267296 then 0
268297 else if ((rewardUpdateHeight > height))
269298 then {
270299 let reward = (previousRewardPerBlock * (height - lastInterestHeight))
271300 reward
272301 }
273302 else if ((lastInterestHeight > rewardUpdateHeight))
274303 then {
275304 let reward = (currentRewardPerBlock * (height - lastInterestHeight))
276305 reward
277306 }
278307 else {
279308 let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight))
280309 let reward = (currentRewardPerBlock * (height - rewardUpdateHeight))
281310 (reward + rewardAfterLastInterestBeforeReawardUpdate)
282311 }
283312 }
284313
285314
286315 func checkPmtAssetIdCorrect (pool,pmtAssetId) = {
287316 let poolShareAssetId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id"))
288317 if ((pmtAssetId == poolShareAssetId))
289318 then true
290319 else false
291320 }
292321
293322
294323 func getUserSWOPClaimedAmount (pool,user) = valueOrElse(getInteger(this, (((pool + "_") + toString(user)) + keyUserSWOPClaimedAmount)), 0)
295324
296325
297326 @Callable(i)
298327 func init (earlyLP) = if (isDefined(getString(this, "keySWOPid")))
299328 then throw("SWOP already initialized")
300329 else {
301330 let initAmount = 100000000000000
302331 let SWOPissue = Issue("SWOP", "SWOP protocol token", initAmount, 8, true)
303332 let SWOPid = calculateAssetId(SWOPissue)
304333 [Issue("SWOP", "SWOP protocol token", initAmount, 8, true), StringEntry(keySWOPid, toBase58String(SWOPid))]
305334 }
306335
307336
308337
309338 @Callable(i)
310339 func initPoolShareFarming (pool) = if ((i.caller != this))
311340 then throw("Only the DApp itself can call this function")
312341 else {
313- let $t01293113011 = rewardInfo(pool)
314- let currentReward = $t01293113011._1
315- let rewardUpdateHeight = $t01293113011._2
316- let previousRewardPerBlock = $t01293113011._3
342+ let $t01367913759 = rewardInfo(pool)
343+ let currentReward = $t01367913759._1
344+ let rewardUpdateHeight = $t01367913759._2
345+ let previousRewardPerBlock = $t01367913759._3
317346 [IntegerEntry((pool + keyShareTokensLocked), 0), IntegerEntry((pool + keyLastInterest), 0), IntegerEntry((pool + keyLastInterestHeight), height)]
318347 }
319348
320349
321350
322351 @Callable(i)
323352 func updatePoolInterest (pool) = if ((i.caller != wallet))
324353 then throw("Only the Admin itself can call this function")
325354 else {
326- let $t01336013480 = claimCalc(pool, adminIncreaseInterestAddress, 0)
327- let userNewInterest = $t01336013480._1
328- let currentInterest = $t01336013480._2
329- let claimAmount = $t01336013480._3
330- let userShareTokensAmount = $t01336013480._4
355+ let $t01410814228 = claimCalc(pool, adminIncreaseInterestAddress, 0)
356+ let userNewInterest = $t01410814228._1
357+ let currentInterest = $t01410814228._2
358+ let claimAmount = $t01410814228._3
359+ let userShareTokensAmount = $t01410814228._4
331360 [IntegerEntry((pool + keyLastInterest), userNewInterest)]
332361 }
333362
334363
335364
336365 @Callable(i)
337366 func lockShareTokens (pool) = {
338- let $t01361313688 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
339- let pmtAmount = $t01361313688._1
340- let pmtAssetId = $t01361313688._2
341- let $t01369313801 = claimCalc(pool, i.caller, pmtAmount)
342- let userNewInterest = $t01369313801._1
343- let currentInterest = $t01369313801._2
344- let claimAmount = $t01369313801._3
345- let userShareTokensAmount = $t01369313801._4
367+ let $t01436114436 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
368+ let pmtAmount = $t01436114436._1
369+ let pmtAssetId = $t01436114436._2
370+ let $t01444114514 = getAssetInfo(pmtAssetId)
371+ let pmtStrAssetId = $t01444114514._1
372+ let pmtAssetName = $t01444114514._2
373+ let pmtDecimals = $t01444114514._3
374+ let $t01451914627 = claimCalc(pool, i.caller, pmtAmount)
375+ let userNewInterest = $t01451914627._1
376+ let currentInterest = $t01451914627._2
377+ let claimAmount = $t01451914627._3
378+ let userShareTokensAmount = $t01451914627._4
346379 let userShareAmountNew = (userShareTokensAmount + pmtAmount)
347380 let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount)
348381 let totalShareAmount = getTotalShareTokenLocked(pool)
349382 let totalShareAmountNew = (totalShareAmount + pmtAmount)
350383 let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
351384 let userClaimedAmountNew = (userClaimedAmount + claimAmount)
352385 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)]
353- if (!(checkPmtAssetIdCorrect(pool, pmtAssetId)))
354- then throw("Incorrect pmtAssetId")
355- else if (if (isFirstHarvest(Address(fromBase58String(pool))))
356- then (height > (getHeightFirstHarvest(Address(fromBase58String(pool))) * periodLength))
357- else false)
358- then {
359- let amountOfVoting = split(getStringValue(votingAddress, (((toString(this) + "_") + pool) + "_user_pool_struc")), "_")
360- let previosTotalVoting = split(getStringValue(votingAddress, kPreviousTotalVoteSWOP), "_")
361- let assetbalanceswopusdnA = valueOrElse(getIntegerValue(swopUsdnAddress, keyBalancecpmmA), 0)
362- let assetbalanceswopusdnB = valueOrElse(getIntegerValue(swopUsdnAddress, keyBalancecpmmB), 0)
363- let assetbalancewavesusdnA = valueOrElse(getIntegerValue(wavesUsdnAddress, keyBalancecpmmA), 0)
364- let assetbalancewavesusdnB = valueOrElse(getIntegerValue(wavesUsdnAddress, keyBalancecpmmB), 0)
365- let totalPeriod = previosTotalVoting[1]
366- let previosTotal = previosTotalVoting[0]
367- let userShareTokenLocked = userShareTokensAmount
368- let userSwopVote = if ((toString(currPeriod) == amountOfVoting[2]))
369- then valueOrElse(parseInt(amountOfVoting[1]), 0)
370- else valueOrElse(parseInt(amountOfVoting[0]), 0)
371- let swopRate = ((assetbalanceswopusdnA / scaleValue8) / (assetbalanceswopusdnB / scaleValue6))
372- let votingTotal = if ((currPeriod == valueOrElse(parseInt(totalPeriod), -1)))
373- then valueOrElse(parseInt(previosTotal), 0)
374- else valueOrElse(parseInt(totalPeriod), 0)
375- let harvestPower = ((SwopYearEmission / votingTotal) / APY)
376- let protocolReward = calculateProtocolReward(pool)
377- if ((parseInt(amountOfVoting[1]) != 0))
378- then {
379- let assetBalanceB = getBalanceB(Address(fromBase58String(pool)))
380- let shareTokenRate = if ((assetNameB(Address(fromBase58String(pool))) == "USDN"))
381- then ((2 * assetBalanceB) / totalShareAmount)
382- else if ((assetNameA(Address(fromBase58String(pool))) == "SWOP"))
383- then (((2 * assetBalanceB) * ((assetbalanceswopusdnB / scaleValue8) / (assetbalanceswopusdnA / scaleValue6))) / totalShareAmount)
384- else if ((assetNameA(Address(fromBase58String(pool))) == "WAVES"))
385- then (((2 * assetBalanceB) * ((assetbalancewavesusdnB / scaleValue8) / (assetbalancewavesusdnA / scaleValue6))) / totalShareAmount)
386- else 0
387- let shareToken = ((((userSwopVote * swopRate) * harvestPower) / shareTokenRate) - userShareTokenLocked)
388- if ((shareToken > 0))
389- then if ((totalShareAmountNew >= shareToken))
390- then (baseEntry ++ [ScriptTransfer(wallet, protocolReward, SWOP)])
391- else throw(("You maximum share token is " + toString(shareToken)))
392- else throw("You can't share token")
393- }
394- else throw("Your amount of token less than 0")
395- }
396- else baseEntry
386+ if ((0 >= pmtAmount))
387+ then throw("You can't lock token")
388+ else if (!(checkPmtAssetIdCorrect(pool, pmtAssetId)))
389+ then throw("Incorrect pmtAssetId")
390+ else if (if (isFirstHarvest(Address(fromBase58String(pool))))
391+ then (height > (getHeightFirstHarvest(Address(fromBase58String(pool))) * periodLength))
392+ else false)
393+ then {
394+ let amountOfVoting = split(getStringValue(votingAddress, (((toString(this) + "_") + pool) + "_user_pool_struc")), "_")
395+ let amountPoolStract = split(getStringValue(votingAddress, (((toString(this) + "_") + pool) + "_pool_struc")), "_")
396+ let amountActiveVoteUserPoolStract = split(getStringValue(votingAddress, (((toString(this) + "_") + pool) + kHarvestUserPoolActiveVoteStrucVoting)), "_")
397+ let amountPoolActiveVoteStract = split(getStringValue(votingAddress, (pool + kHarvestPoolActiveVoteStrucVoting)), "_")
398+ let userShareTokenLocked = userShareTokensAmount
399+ let userPoolActiveVote = if ((toString(currPeriod) == amountOfVoting[2]))
400+ then valueOrElse(parseInt(amountActiveVoteUserPoolStract[0]), 0)
401+ else valueOrElse(parseInt(amountOfVoting[0]), 0)
402+ let poolActiveVote = if ((toString(currPeriod) == amountPoolStract[2]))
403+ then valueOrElse(parseInt(amountPoolActiveVoteStract[0]), 0)
404+ else valueOrElse(parseInt(amountPoolStract[0]), 0)
405+ let protocolReward = calculateProtocolReward(pool)
406+ if ((parseInt(amountOfVoting[1]) != 0))
407+ then {
408+ let shareToken = (fraction(getTotalShareTokenLocked(pool), userPoolActiveVote, poolActiveVote) - userShareTokenLocked)
409+ if ((shareToken > 0))
410+ then if ((totalShareAmountNew >= shareToken))
411+ then (baseEntry ++ [ScriptTransfer(wallet, protocolReward, SWOP)])
412+ else throw(("You maximum share token is " + toString(shareToken)))
413+ else throw("You can't share token")
414+ }
415+ else throw("Your amount of token less than 0")
416+ }
417+ else baseEntry
397418 }
398419
399420
400421
401422 @Callable(i)
402423 func withdrawShareTokens (pool,shareTokensWithdrawAmount) = {
403424 let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id"))
404- let $t01831718417 = claimCalc(pool, i.caller, 1)
405- let userNewInterest = $t01831718417._1
406- let currentInterest = $t01831718417._2
407- let claimAmount = $t01831718417._3
408- let userShareTokensAmount = $t01831718417._4
425+ let $t01813418234 = claimCalc(pool, i.caller, 1)
426+ let userNewInterest = $t01813418234._1
427+ let currentInterest = $t01813418234._2
428+ let claimAmount = $t01813418234._3
429+ let userShareTokensAmount = $t01813418234._4
409430 let userShareAmountNew = (userShareTokensAmount - shareTokensWithdrawAmount)
410431 let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount)
411432 let totalShareAmount = getTotalShareTokenLocked(pool)
412433 let totalShareAmountNew = (totalShareAmount - shareTokensWithdrawAmount)
413434 let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
414435 let userClaimedAmountNew = (userClaimedAmount + claimAmount)
415436 if ((shareTokensWithdrawAmount > userShareTokensAmount))
416437 then throw("Withdraw amount more then user locked amount")
417438 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)]
418439 }
419440
420441
421442
422443 @Callable(i)
423444 func claim (pool) = {
424445 let shareTokenLocked = getTotalShareTokenLocked(pool)
425- let $t01991019975 = getLastInterestInfo(pool)
426- let lastInterestHeight = $t01991019975._1
427- let lastInterest = $t01991019975._2
428- let $t01998020069 = rewardInfo(pool)
429- let currentRewardPerBlock = $t01998020069._1
430- let rewardUpdateHeight = $t01998020069._2
431- let previousRewardPerBlock = $t01998020069._3
432- let $t02007420174 = claimCalc(pool, i.caller, 1)
433- let userNewInterest = $t02007420174._1
434- let currentInterest = $t02007420174._2
435- let claimAmount = $t02007420174._3
436- let userShareTokensAmount = $t02007420174._4
446+ let $t01972719792 = getLastInterestInfo(pool)
447+ let lastInterestHeight = $t01972719792._1
448+ let lastInterest = $t01972719792._2
449+ let $t01979719886 = rewardInfo(pool)
450+ let currentRewardPerBlock = $t01979719886._1
451+ let rewardUpdateHeight = $t01979719886._2
452+ let previousRewardPerBlock = $t01979719886._3
453+ let $t01989119991 = claimCalc(pool, i.caller, 1)
454+ let userNewInterest = $t01989119991._1
455+ let currentInterest = $t01989119991._2
456+ let claimAmount = $t01989119991._3
457+ let userShareTokensAmount = $t01989119991._4
437458 let availableFund = (userAvailableSWOP(pool, i.caller) + claimAmount)
438459 let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
439460 let userClaimedAmountNew = (userClaimedAmount + claimAmount)
440461 if ((availableFund == 0))
441462 then throw("You have 0 available SWOP")
442- 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)]
463+ else [IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry((pool + keyLastInterest), currentInterest), IntegerEntry((pool + keyLastInterestHeight), height), IntegerEntry((((pool + "_") + toString(i.caller)) + keyAvailableSWOP), 0), Reissue(SWOP, availableFund, true), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPClaimedAmount), userClaimedAmountNew), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPLastClaimedAmount), claimAmount), ScriptTransfer(i.caller, availableFund, SWOP)]
443464 }
444465
445466
446467 @Verifier(tx)
447468 func verify () = match tx {
448469 case _ =>
449470 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
450471 }
451472

github/deemru/w8io/026f985 
91.91 ms