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:AAIEAAAAAAAAABwIAhIDCgEIEgMKAQgSAwoBCBIECgIIARIDCgEIAAAAVAAAAAAMYWRtaW5QdWJLZXkxAQAAACAEz3XlZNDBD05nuR8TZMQaDeqEJEIxfTOQXUBYCp2TSgAAAAAMYWRtaW5QdWJLZXkyAQAAACAEz3XlZNDBD05nuR8TZMQaDeqEJEIxfTOQXUBYCp2TSgAAAAAMYWRtaW5QdWJLZXkzAQAAACAEz3XlZNDBD05nuR8TZMQaDeqEJEIxfTOQXUBYCp2TSgAAAAAUa2V5U2hhcmVUb2tlbnNMb2NrZWQCAAAAGl90b3RhbF9zaGFyZV90b2tlbnNfbG9ja2VkAAAAAAtrU2hhcmVMaW1pdAIAAAAcc2hhcmVfbGltaXRfb25fZmlyc3RfaGFydmVzdAAAAAAca2V5UmV3YXJkUG9vbEZyYWN0aW9uQ3VycmVudAIAAAAdX2N1cnJlbnRfcG9vbF9mcmFjdGlvbl9yZXdhcmQAAAAAHWtleVJld2FyZFBvb2xGcmFjdGlvblByZXZpb3VzAgAAAB5fcHJldmlvdXNfcG9vbF9mcmFjdGlvbl9yZ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haW1lZEFtb3VudE5ldwkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgUAAAAEcG9vbAIAAAABXwkABCUAAAABCAUAAAABaQAAAAZjYWxsZXIFAAAAHGtleVVzZXJTV09QTGFzdENsYWltZWRBbW91bnQFAAAAC2NsYWltQW1vdW50CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAANYXZhaWxhYmxlRnVuZAUAAAAEU1dPUAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5JABeGA==", "height": 1560277, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: XAMLD4ZSpzc5W9CWhzx33AvPDVVZnfDKatVDNMtQ5EV Next: none Diff:
Old | New | Differences | |
---|---|---|---|
10 | 10 | let keyShareTokensLocked = "_total_share_tokens_locked" | |
11 | 11 | ||
12 | 12 | let kShareLimit = "share_limit_on_first_harvest" | |
13 | - | ||
14 | - | let keyActive = "active" | |
15 | 13 | ||
16 | 14 | let keyRewardPoolFractionCurrent = "_current_pool_fraction_reward" | |
17 | 15 | ||
55 | 53 | ||
56 | 54 | let kHarvestUserPoolActiveVoteStrucVoting = "_harvest_user_pool_activeVote_struc" | |
57 | 55 | ||
58 | - | let kHarvestPoolPrevActiveVoteStruc = "_harvest_pool_previous_activeVote_struc" | |
59 | - | ||
60 | - | let kHarvestUserPoolPrevActiveVoteStruc = "_harvest_user_pool_previous_activeVote_struc" | |
61 | - | ||
62 | 56 | let keyLimitShareFirstHarvest = "share_limit_on_first_harvest" | |
63 | 57 | ||
64 | 58 | let keyAssetIdA = "A_asset_id" | |
69 | 63 | ||
70 | 64 | let keyfirstHarvestCpmm = "first_harvest" | |
71 | 65 | ||
72 | - | let governanceAddress = Address(base58' | |
66 | + | let governanceAddress = Address(base58'3N5W8da2iiijVieA6qLGo7KzCJj8B19smWU') | |
73 | 67 | ||
74 | 68 | let wallet = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4') | |
75 | 69 | ||
76 | - | let votingAddress = Address(base58' | |
70 | + | let votingAddress = Address(base58'3MrJgdL1GniipErHy44YF9idzLaUL2iX5DQ') | |
77 | 71 | ||
78 | 72 | let adminIncreaseInterestAddress = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4') | |
79 | 73 | ||
130 | 124 | let durationFullVotePower = valueOrErrorMessage(getInteger(votingAddress, kDurationFullVotePower), "Empty kDurationFullVotePower") | |
131 | 125 | ||
132 | 126 | let minVotePower = valueOrErrorMessage(getInteger(votingAddress, kMinVotePower), "Empty kMinVotePower") | |
133 | - | ||
134 | - | let isActive = getBooleanValue(this, keyActive) | |
135 | 127 | ||
136 | 128 | let currPeriod = (basePeriod + ((height - startHeight) / periodLength)) | |
137 | 129 | ||
208 | 200 | func userAvailableSWOP (pool,user) = valueOrElse(getInteger(this, (((pool + "_") + toString(user)) + keyAvailableSWOP)), 0) | |
209 | 201 | ||
210 | 202 | ||
203 | + | func isPoolUnderway (pool) = if ((pool == "3PCdNCULgjM9ZMLEt61M45qxV26ro6o48Jj")) | |
204 | + | then true | |
205 | + | else (pool == "3PMcDUBDyjNB1fkRGeLGpsz1ZQPfcmyp4r5") | |
206 | + | ||
207 | + | ||
211 | 208 | func rewardInfo (pool) = { | |
212 | 209 | let totalRewardPerBlockCurrent = valueOrErrorMessage(getInteger(governanceAddress, keyTotalRewardPerBlockCurrent), ((("No data on the key: " + keyTotalRewardPerBlockCurrent) + " at address ") + toString(governanceAddress))) | |
213 | 210 | let totalRewardPerBlockPrevious = valueOrErrorMessage(getInteger(governanceAddress, keyTotalRewardPerBlockPrevious), ((("No data on the key: " + keyTotalRewardPerBlockPrevious) + " at address ") + toString(governanceAddress))) | |
275 | 272 | let shareAssetId = getShareAssetId(pool) | |
276 | 273 | let scaleValue = calcScaleValue(SWOP, shareAssetId) | |
277 | 274 | let shareTokenLocked = getTotalShareTokenLocked(pool) | |
278 | - | let $ | |
279 | - | let lastInterestHeight = $ | |
280 | - | let lastInterest = $ | |
281 | - | let $ | |
282 | - | let currentRewardPerBlock = $ | |
283 | - | let rewardUpdateHeight = $ | |
284 | - | let previousRewardPerBlock = $ | |
285 | - | let $ | |
286 | - | let userLastInterest = $ | |
287 | - | let userShareTokensAmount = $ | |
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 | |
288 | 285 | let currentInterest = calcInterest(lastInterestHeight, rewardUpdateHeight, lastInterest, currentRewardPerBlock, shareTokenLocked, previousRewardPerBlock, shareAssetId, scaleValue, pmtAmount) | |
289 | 286 | let claimAmount = fraction(userShareTokensAmount, (currentInterest - userLastInterest), scaleValue) | |
290 | 287 | let userNewInterest = currentInterest | |
293 | 290 | ||
294 | 291 | ||
295 | 292 | func calculateProtocolReward (pool) = { | |
296 | - | let $ | |
297 | - | let lastInterestHeight = $ | |
298 | - | let lastInterest = $ | |
299 | - | let $ | |
300 | - | let currentRewardPerBlock = $ | |
301 | - | let rewardUpdateHeight = $ | |
302 | - | let previousRewardPerBlock = $ | |
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 | |
303 | 300 | let shareTokenLocked = getTotalShareTokenLocked(pool) | |
304 | 301 | if ((shareTokenLocked == 0)) | |
305 | 302 | then if ((rewardUpdateHeight > height)) | |
339 | 336 | let initAmount = 100000000000000 | |
340 | 337 | let SWOPissue = Issue("SWOP", "SWOP protocol token", initAmount, 8, true) | |
341 | 338 | let SWOPid = calculateAssetId(SWOPissue) | |
342 | - | [ | |
339 | + | [Issue("SWOP", "SWOP protocol token", initAmount, 8, true), StringEntry(keySWOPid, toBase58String(SWOPid))] | |
343 | 340 | } | |
344 | 341 | ||
345 | 342 | ||
346 | 343 | ||
347 | 344 | @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") | |
350 | 362 | 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 | |
356 | 424 | } | |
357 | 425 | ||
358 | 426 | ||
359 | 427 | ||
360 | 428 | @Callable(i) | |
361 | - | func | |
362 | - | then throw(" | |
429 | + | func withdrawShareTokens (pool,shareTokensWithdrawAmount) = if (isPoolUnderway(pool)) | |
430 | + | then throw("Work is currently underway") | |
363 | 431 | 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)] | |
374 | 447 | } | |
375 | 448 | ||
376 | 449 | ||
377 | 450 | ||
378 | 451 | @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 | + | } | |
488 | 475 | ||
489 | 476 | ||
490 | 477 | @Verifier(tx) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let adminPubKey1 = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
5 | 5 | ||
6 | 6 | let adminPubKey2 = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
7 | 7 | ||
8 | 8 | let adminPubKey3 = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
9 | 9 | ||
10 | 10 | let keyShareTokensLocked = "_total_share_tokens_locked" | |
11 | 11 | ||
12 | 12 | let kShareLimit = "share_limit_on_first_harvest" | |
13 | - | ||
14 | - | let keyActive = "active" | |
15 | 13 | ||
16 | 14 | let keyRewardPoolFractionCurrent = "_current_pool_fraction_reward" | |
17 | 15 | ||
18 | 16 | let keyRewardPoolFractionPrevious = "_previous_pool_fraction_reward" | |
19 | 17 | ||
20 | 18 | let keyTotalRewardPerBlockCurrent = "total_reward_per_block_current" | |
21 | 19 | ||
22 | 20 | let keyTotalRewardPerBlockPrevious = "total_reward_per_block_previous" | |
23 | 21 | ||
24 | 22 | let keyRewardUpdateHeight = "reward_update_height" | |
25 | 23 | ||
26 | 24 | let keyLastInterest = "_last_interest" | |
27 | 25 | ||
28 | 26 | let keyLastInterestHeight = "_last_interest_height" | |
29 | 27 | ||
30 | 28 | let keyUserShareTokensLocked = "_share_tokens_locked" | |
31 | 29 | ||
32 | 30 | let keyUserLastInterest = "_last_interest" | |
33 | 31 | ||
34 | 32 | let keySWOPid = "SWOP_id" | |
35 | 33 | ||
36 | 34 | let keyUserSWOPClaimedAmount = "_SWOP_claimed_amount" | |
37 | 35 | ||
38 | 36 | let keyUserSWOPLastClaimedAmount = "_SWOP_last_claimed_amount" | |
39 | 37 | ||
40 | 38 | let keyAvailableSWOP = "_available_SWOP" | |
41 | 39 | ||
42 | 40 | let keyFarmingStartHeight = "farming_start_height" | |
43 | 41 | ||
44 | 42 | let keyAPY = "apy" | |
45 | 43 | ||
46 | 44 | let kPreviousTotalVoteSWOP = "previous_total_vote_SWOP" | |
47 | 45 | ||
48 | 46 | let keySwopYearEmission = "swop_year_emission" | |
49 | 47 | ||
50 | 48 | let keyBalancecpmmA = "A_asset_balance" | |
51 | 49 | ||
52 | 50 | let keyBalancecpmmB = "B_asset_balance" | |
53 | 51 | ||
54 | 52 | let kHarvestPoolActiveVoteStrucVoting = "_harvest_pool_activeVote_struc" | |
55 | 53 | ||
56 | 54 | let kHarvestUserPoolActiveVoteStrucVoting = "_harvest_user_pool_activeVote_struc" | |
57 | 55 | ||
58 | - | let kHarvestPoolPrevActiveVoteStruc = "_harvest_pool_previous_activeVote_struc" | |
59 | - | ||
60 | - | let kHarvestUserPoolPrevActiveVoteStruc = "_harvest_user_pool_previous_activeVote_struc" | |
61 | - | ||
62 | 56 | let keyLimitShareFirstHarvest = "share_limit_on_first_harvest" | |
63 | 57 | ||
64 | 58 | let keyAssetIdA = "A_asset_id" | |
65 | 59 | ||
66 | 60 | let keyAssetIdB = "B_asset_id" | |
67 | 61 | ||
68 | 62 | let keyFirstHarvestHeight = "first_harvest_height" | |
69 | 63 | ||
70 | 64 | let keyfirstHarvestCpmm = "first_harvest" | |
71 | 65 | ||
72 | - | let governanceAddress = Address(base58' | |
66 | + | let governanceAddress = Address(base58'3N5W8da2iiijVieA6qLGo7KzCJj8B19smWU') | |
73 | 67 | ||
74 | 68 | let wallet = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4') | |
75 | 69 | ||
76 | - | let votingAddress = Address(base58' | |
70 | + | let votingAddress = Address(base58'3MrJgdL1GniipErHy44YF9idzLaUL2iX5DQ') | |
77 | 71 | ||
78 | 72 | let adminIncreaseInterestAddress = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4') | |
79 | 73 | ||
80 | 74 | let oneWeekInBlock = 10106 | |
81 | 75 | ||
82 | 76 | let totalVoteShare = 10000000000 | |
83 | 77 | ||
84 | 78 | let scaleValue1 = 10 | |
85 | 79 | ||
86 | 80 | let scaleValue3 = 1000 | |
87 | 81 | ||
88 | 82 | let scaleValue5 = 100000 | |
89 | 83 | ||
90 | 84 | let scaleValue6 = 1000000 | |
91 | 85 | ||
92 | 86 | let scaleValue8 = 100000000 | |
93 | 87 | ||
94 | 88 | let scaleValue11 = 100000000000 | |
95 | 89 | ||
96 | 90 | func strAssetIdA (pool) = getStringValue(pool, keyAssetIdA) | |
97 | 91 | ||
98 | 92 | ||
99 | 93 | func strAssetIdB (pool) = getStringValue(pool, keyAssetIdB) | |
100 | 94 | ||
101 | 95 | ||
102 | 96 | func assetIdA (pool) = if ((strAssetIdA(pool) == "WAVES")) | |
103 | 97 | then unit | |
104 | 98 | else fromBase58String(strAssetIdA(pool)) | |
105 | 99 | ||
106 | 100 | ||
107 | 101 | func assetIdB (pool) = if ((strAssetIdB(pool) == "WAVES")) | |
108 | 102 | then unit | |
109 | 103 | else fromBase58String(strAssetIdB(pool)) | |
110 | 104 | ||
111 | 105 | ||
112 | 106 | let kBasePeriod = "base_period" | |
113 | 107 | ||
114 | 108 | let kPeriodLength = "period_length" | |
115 | 109 | ||
116 | 110 | let kStartHeight = "start_height" | |
117 | 111 | ||
118 | 112 | let kFirstHarvestHeight = "first_harvest_height" | |
119 | 113 | ||
120 | 114 | let kDurationFullVotePower = "duration_full_vote_power" | |
121 | 115 | ||
122 | 116 | let kMinVotePower = "min_vote_power" | |
123 | 117 | ||
124 | 118 | let basePeriod = valueOrErrorMessage(getInteger(votingAddress, kBasePeriod), "Empty kBasePeriod") | |
125 | 119 | ||
126 | 120 | let startHeight = valueOrErrorMessage(getInteger(votingAddress, kStartHeight), "Empty kStartHeight") | |
127 | 121 | ||
128 | 122 | let periodLength = valueOrErrorMessage(getInteger(votingAddress, kPeriodLength), "Empty kPeriodLength") | |
129 | 123 | ||
130 | 124 | let durationFullVotePower = valueOrErrorMessage(getInteger(votingAddress, kDurationFullVotePower), "Empty kDurationFullVotePower") | |
131 | 125 | ||
132 | 126 | let minVotePower = valueOrErrorMessage(getInteger(votingAddress, kMinVotePower), "Empty kMinVotePower") | |
133 | - | ||
134 | - | let isActive = getBooleanValue(this, keyActive) | |
135 | 127 | ||
136 | 128 | let currPeriod = (basePeriod + ((height - startHeight) / periodLength)) | |
137 | 129 | ||
138 | 130 | func getLimitToken (pool) = valueOrElse(getIntegerValue(pool, keyLimitShareFirstHarvest), 0) | |
139 | 131 | ||
140 | 132 | ||
141 | 133 | let APY = getIntegerValue(this, keyAPY) | |
142 | 134 | ||
143 | 135 | let SwopYearEmission = getIntegerValue(this, keySwopYearEmission) | |
144 | 136 | ||
145 | 137 | func assetNameA (pool) = match assetIdA(pool) { | |
146 | 138 | case id: ByteVector => | |
147 | 139 | value(assetInfo(id)).name | |
148 | 140 | case waves: Unit => | |
149 | 141 | "WAVES" | |
150 | 142 | case _ => | |
151 | 143 | throw("Match error") | |
152 | 144 | } | |
153 | 145 | ||
154 | 146 | ||
155 | 147 | func assetNameB (pool) = match assetIdB(pool) { | |
156 | 148 | case id: ByteVector => | |
157 | 149 | value(assetInfo(id)).name | |
158 | 150 | case waves: Unit => | |
159 | 151 | "WAVES" | |
160 | 152 | case _ => | |
161 | 153 | throw("Match error") | |
162 | 154 | } | |
163 | 155 | ||
164 | 156 | ||
165 | 157 | let SWOP = fromBase58String(getStringValue(this, keySWOPid)) | |
166 | 158 | ||
167 | 159 | func isFirstHarvest (pool) = valueOrElse(getBoolean(pool, keyfirstHarvestCpmm), false) | |
168 | 160 | ||
169 | 161 | ||
170 | 162 | func getHeightFirstHarvest (pool) = valueOrElse(getInteger(pool, keyFirstHarvestHeight), 0) | |
171 | 163 | ||
172 | 164 | ||
173 | 165 | func getBalanceA (pool) = valueOrErrorMessage(getInteger(pool, keyBalancecpmmA), ("No data on the key: " + keyBalancecpmmA)) | |
174 | 166 | ||
175 | 167 | ||
176 | 168 | func getBalanceB (pool) = valueOrErrorMessage(getInteger(pool, keyBalancecpmmB), ("No data on the key: " + keyBalancecpmmB)) | |
177 | 169 | ||
178 | 170 | ||
179 | 171 | func getShareLimitToken (pool) = valueOrErrorMessage(getInteger(pool, kShareLimit), ("No data on the key: " + kShareLimit)) | |
180 | 172 | ||
181 | 173 | ||
182 | 174 | func getTotalShareTokenLocked (pool) = valueOrErrorMessage(getInteger(this, (pool + keyShareTokensLocked)), (("No data on the key: " + pool) + keyShareTokensLocked)) | |
183 | 175 | ||
184 | 176 | ||
185 | 177 | func getShareAssetId (pool) = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
186 | 178 | ||
187 | 179 | ||
188 | 180 | func getAssetInfo (assetId) = match assetId { | |
189 | 181 | case id: ByteVector => | |
190 | 182 | let stringId = toBase58String(id) | |
191 | 183 | let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist")) | |
192 | 184 | $Tuple3(stringId, info.name, info.decimals) | |
193 | 185 | case waves: Unit => | |
194 | 186 | $Tuple3("WAVES", "WAVES", 8) | |
195 | 187 | case _ => | |
196 | 188 | throw("Match error") | |
197 | 189 | } | |
198 | 190 | ||
199 | 191 | ||
200 | 192 | func calcScaleValue (assetId1,assetId2) = { | |
201 | 193 | let assetId1Decimals = value(assetInfo(assetId1)).decimals | |
202 | 194 | let assetId2Decimals = value(assetInfo(assetId2)).decimals | |
203 | 195 | let scaleDigits = ((assetId2Decimals - assetId1Decimals) + 8) | |
204 | 196 | pow(10, 0, scaleDigits, 0, 0, HALFDOWN) | |
205 | 197 | } | |
206 | 198 | ||
207 | 199 | ||
208 | 200 | func userAvailableSWOP (pool,user) = valueOrElse(getInteger(this, (((pool + "_") + toString(user)) + keyAvailableSWOP)), 0) | |
209 | 201 | ||
210 | 202 | ||
203 | + | func isPoolUnderway (pool) = if ((pool == "3PCdNCULgjM9ZMLEt61M45qxV26ro6o48Jj")) | |
204 | + | then true | |
205 | + | else (pool == "3PMcDUBDyjNB1fkRGeLGpsz1ZQPfcmyp4r5") | |
206 | + | ||
207 | + | ||
211 | 208 | func rewardInfo (pool) = { | |
212 | 209 | let totalRewardPerBlockCurrent = valueOrErrorMessage(getInteger(governanceAddress, keyTotalRewardPerBlockCurrent), ((("No data on the key: " + keyTotalRewardPerBlockCurrent) + " at address ") + toString(governanceAddress))) | |
213 | 210 | let totalRewardPerBlockPrevious = valueOrErrorMessage(getInteger(governanceAddress, keyTotalRewardPerBlockPrevious), ((("No data on the key: " + keyTotalRewardPerBlockPrevious) + " at address ") + toString(governanceAddress))) | |
214 | 211 | let rewardPoolFractionCurrent = valueOrErrorMessage(getInteger(governanceAddress, (pool + keyRewardPoolFractionCurrent)), (((("No data on the key: " + pool) + keyRewardPoolFractionCurrent) + " at address ") + toString(governanceAddress))) | |
215 | 212 | let rewardUpdateHeight = valueOrErrorMessage(getInteger(governanceAddress, keyRewardUpdateHeight), ((("No data on the key: " + keyRewardUpdateHeight) + " at address ") + toString(governanceAddress))) | |
216 | 213 | let rewardPoolFractionPrevious = valueOrErrorMessage(getInteger(governanceAddress, (pool + keyRewardPoolFractionPrevious)), (((("No data on the key: " + pool) + keyRewardPoolFractionPrevious) + " at address ") + toString(governanceAddress))) | |
217 | 214 | let rewardPoolCurrent = fraction(totalRewardPerBlockCurrent, rewardPoolFractionCurrent, totalVoteShare) | |
218 | 215 | let rewardPoolPrevious = fraction(totalRewardPerBlockPrevious, rewardPoolFractionPrevious, totalVoteShare) | |
219 | 216 | if (if ((rewardPoolCurrent > totalRewardPerBlockCurrent)) | |
220 | 217 | then true | |
221 | 218 | else (rewardPoolPrevious > totalRewardPerBlockPrevious)) | |
222 | 219 | then throw("rewardPoolCurrent > totalRewardPerBlockCurrent or rewardPoolPrevious > totalRewardPerBlockPrevious") | |
223 | 220 | else $Tuple3(rewardPoolCurrent, rewardUpdateHeight, rewardPoolPrevious) | |
224 | 221 | } | |
225 | 222 | ||
226 | 223 | ||
227 | 224 | func getLastInterestInfo (pool) = { | |
228 | 225 | let lastInterest = valueOrErrorMessage(getInteger(this, (pool + keyLastInterest)), (("No data on the key: " + pool) + keyLastInterest)) | |
229 | 226 | let lastInterestHeight = valueOrElse(getInteger(this, (pool + keyLastInterestHeight)), height) | |
230 | 227 | $Tuple2(lastInterestHeight, lastInterest) | |
231 | 228 | } | |
232 | 229 | ||
233 | 230 | ||
234 | 231 | func getUserInterestInfo (pool,userAddress) = { | |
235 | 232 | let userLastInterest = getInteger(this, (((pool + "_") + toString(userAddress)) + keyUserLastInterest)) | |
236 | 233 | let userShare = getInteger(this, (((pool + "_") + toString(userAddress)) + keyUserShareTokensLocked)) | |
237 | 234 | let lastInterest = valueOrErrorMessage(getInteger(this, (pool + keyLastInterest)), (("No data on the key: " + pool) + keyLastInterest)) | |
238 | 235 | let userLastInterestValue = match userLastInterest { | |
239 | 236 | case userLastInterest: Int => | |
240 | 237 | userLastInterest | |
241 | 238 | case _ => | |
242 | 239 | lastInterest | |
243 | 240 | } | |
244 | 241 | let userShareTokensAmount = match userShare { | |
245 | 242 | case userShare: Int => | |
246 | 243 | userShare | |
247 | 244 | case _ => | |
248 | 245 | 0 | |
249 | 246 | } | |
250 | 247 | $Tuple2(userLastInterestValue, userShareTokensAmount) | |
251 | 248 | } | |
252 | 249 | ||
253 | 250 | ||
254 | 251 | func calcInterest (lastInterestHeight,rewardUpdateHeight,lastInterest,currentRewardPerBlock,shareTokenLocked,previousRewardPerBlock,shareAssetId,scaleValue,pmtAmount) = if ((shareTokenLocked == 0)) | |
255 | 252 | then 0 | |
256 | 253 | else if ((rewardUpdateHeight > height)) | |
257 | 254 | then { | |
258 | 255 | let reward = (previousRewardPerBlock * (height - lastInterestHeight)) | |
259 | 256 | (lastInterest + fraction(reward, scaleValue, shareTokenLocked)) | |
260 | 257 | } | |
261 | 258 | else if ((lastInterestHeight > rewardUpdateHeight)) | |
262 | 259 | then { | |
263 | 260 | let reward = (currentRewardPerBlock * (height - lastInterestHeight)) | |
264 | 261 | (lastInterest + fraction(reward, scaleValue, shareTokenLocked)) | |
265 | 262 | } | |
266 | 263 | else { | |
267 | 264 | let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight)) | |
268 | 265 | let interestAfterUpdate = (lastInterest + fraction(rewardAfterLastInterestBeforeReawardUpdate, scaleValue, shareTokenLocked)) | |
269 | 266 | let reward = (currentRewardPerBlock * (height - rewardUpdateHeight)) | |
270 | 267 | (interestAfterUpdate + fraction(reward, scaleValue, shareTokenLocked)) | |
271 | 268 | } | |
272 | 269 | ||
273 | 270 | ||
274 | 271 | func claimCalc (pool,caller,pmtAmount) = { | |
275 | 272 | let shareAssetId = getShareAssetId(pool) | |
276 | 273 | let scaleValue = calcScaleValue(SWOP, shareAssetId) | |
277 | 274 | let shareTokenLocked = getTotalShareTokenLocked(pool) | |
278 | - | let $ | |
279 | - | let lastInterestHeight = $ | |
280 | - | let lastInterest = $ | |
281 | - | let $ | |
282 | - | let currentRewardPerBlock = $ | |
283 | - | let rewardUpdateHeight = $ | |
284 | - | let previousRewardPerBlock = $ | |
285 | - | let $ | |
286 | - | let userLastInterest = $ | |
287 | - | let userShareTokensAmount = $ | |
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 | |
288 | 285 | let currentInterest = calcInterest(lastInterestHeight, rewardUpdateHeight, lastInterest, currentRewardPerBlock, shareTokenLocked, previousRewardPerBlock, shareAssetId, scaleValue, pmtAmount) | |
289 | 286 | let claimAmount = fraction(userShareTokensAmount, (currentInterest - userLastInterest), scaleValue) | |
290 | 287 | let userNewInterest = currentInterest | |
291 | 288 | $Tuple4(userNewInterest, currentInterest, claimAmount, userShareTokensAmount) | |
292 | 289 | } | |
293 | 290 | ||
294 | 291 | ||
295 | 292 | func calculateProtocolReward (pool) = { | |
296 | - | let $ | |
297 | - | let lastInterestHeight = $ | |
298 | - | let lastInterest = $ | |
299 | - | let $ | |
300 | - | let currentRewardPerBlock = $ | |
301 | - | let rewardUpdateHeight = $ | |
302 | - | let previousRewardPerBlock = $ | |
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 | |
303 | 300 | let shareTokenLocked = getTotalShareTokenLocked(pool) | |
304 | 301 | if ((shareTokenLocked == 0)) | |
305 | 302 | then if ((rewardUpdateHeight > height)) | |
306 | 303 | then { | |
307 | 304 | let reward = (previousRewardPerBlock * (height - lastInterestHeight)) | |
308 | 305 | reward | |
309 | 306 | } | |
310 | 307 | else if ((lastInterestHeight > rewardUpdateHeight)) | |
311 | 308 | then { | |
312 | 309 | let reward = (currentRewardPerBlock * (height - lastInterestHeight)) | |
313 | 310 | reward | |
314 | 311 | } | |
315 | 312 | else { | |
316 | 313 | let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight)) | |
317 | 314 | let reward = (currentRewardPerBlock * (height - rewardUpdateHeight)) | |
318 | 315 | (reward + rewardAfterLastInterestBeforeReawardUpdate) | |
319 | 316 | } | |
320 | 317 | else 0 | |
321 | 318 | } | |
322 | 319 | ||
323 | 320 | ||
324 | 321 | func checkPmtAssetIdCorrect (pool,pmtAssetId) = { | |
325 | 322 | let poolShareAssetId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
326 | 323 | if ((pmtAssetId == poolShareAssetId)) | |
327 | 324 | then true | |
328 | 325 | else false | |
329 | 326 | } | |
330 | 327 | ||
331 | 328 | ||
332 | 329 | func getUserSWOPClaimedAmount (pool,user) = valueOrElse(getInteger(this, (((pool + "_") + toString(user)) + keyUserSWOPClaimedAmount)), 0) | |
333 | 330 | ||
334 | 331 | ||
335 | 332 | @Callable(i) | |
336 | 333 | func init (earlyLP) = if (isDefined(getString(this, keySWOPid))) | |
337 | 334 | then throw("SWOP already initialized") | |
338 | 335 | else { | |
339 | 336 | let initAmount = 100000000000000 | |
340 | 337 | let SWOPissue = Issue("SWOP", "SWOP protocol token", initAmount, 8, true) | |
341 | 338 | let SWOPid = calculateAssetId(SWOPissue) | |
342 | - | [ | |
339 | + | [Issue("SWOP", "SWOP protocol token", initAmount, 8, true), StringEntry(keySWOPid, toBase58String(SWOPid))] | |
343 | 340 | } | |
344 | 341 | ||
345 | 342 | ||
346 | 343 | ||
347 | 344 | @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") | |
350 | 362 | 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 | |
356 | 424 | } | |
357 | 425 | ||
358 | 426 | ||
359 | 427 | ||
360 | 428 | @Callable(i) | |
361 | - | func | |
362 | - | then throw(" | |
429 | + | func withdrawShareTokens (pool,shareTokensWithdrawAmount) = if (isPoolUnderway(pool)) | |
430 | + | then throw("Work is currently underway") | |
363 | 431 | 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)] | |
374 | 447 | } | |
375 | 448 | ||
376 | 449 | ||
377 | 450 | ||
378 | 451 | @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 | + | } | |
488 | 475 | ||
489 | 476 | ||
490 | 477 | @Verifier(tx) | |
491 | 478 | func verify () = match tx { | |
492 | 479 | case _ => | |
493 | 480 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
494 | 481 | } | |
495 | 482 |
github/deemru/w8io/026f985 67.69 ms ◑