tx · DCAx8MDDkdNncZda2euzyMuTYYQTy6YkZ46XVSYBjZft 3MsXpzisJAwnzUr7XrEoW1BZo4U6rw4tsYK: -0.14000000 Waves 2022.10.20 15:43 [2280731] smart account 3MsXpzisJAwnzUr7XrEoW1BZo4U6rw4tsYK > SELF 0.00000000 Waves
{ "type": 13, "id": "DCAx8MDDkdNncZda2euzyMuTYYQTy6YkZ46XVSYBjZft", "fee": 14000000, "feeAssetId": null, "timestamp": 1666269788149, "version": 2, "chainId": 84, "sender": "3MsXpzisJAwnzUr7XrEoW1BZo4U6rw4tsYK", "senderPublicKey": "FFdBua5rzzMkZebvsvmN7sAdU7XhFK8QNJ3hiwwxAYRA", "proofs": [ "4Z3t8Bo1sB1B9FxpyW7xfDPg4VvpVLiSTSDKYpTCSfSGpodoSLnyaCYjSg7DWFTzSqhJqFyhZNPmiVKzJ5ZSKvAc", "3g3a3jL3p5T1kro5Ly518xzKH33pbDHsEvjjiMyDQgaw2BvpH3pXJQV9e8SMXMjjCM3p5VhHZPW174Yjy913GkeV" ], "script": "base64:BgJICAISAwoBCBIDCgEIEgMKAQgSBAoCCAESBQoDCAEBEgQKAggIEgQKAggBEgMKAQgSAwoBCBIDCgEYEgMKARgSBAoCCAgSABIAWgAHa0FjdGl2ZQIGYWN0aXZlAAtrQWN0aXZlR2xvYgIUYWN0aXZlX2FsbF9jb250cmFjdHMABmtDYXVzZQIOc2h1dGRvd25fY2F1c2UAGmtSZXdhcmRQb29sRnJhY3Rpb25DdXJyZW50Ah1fY3VycmVudF9wb29sX2ZyYWN0aW9uX3Jld2FyZAAba1Jld2FyZFBvb2xGcmFjdGlvblByZXZpb3VzAh5fcHJldmlvdXNfcG9vbF9mcmFjdGlvbl9yZXdhcmQAE2tIZWlnaHRQb29sRnJhY3Rpb24CGl9wb29sX3Jld2FyZF91cGRhdGVfaGVpZ2h0ABtrVG90YWxSZXdhcmRQZXJCbG9ja0N1cnJlbnQCHnRvdGFsX3Jld2FyZF9wZXJfYmxvY2t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leTEAAQAABBJhZG1pblB1YktleTJTaWduZWQDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwABBQxhZG1pblB1YktleTIAAQAABBJhZG1pblB1YktleTNTaWduZWQDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwACBQxhZG1pblB1YktleTMAAQAACQBnAgkAZAIJAGQCBRJhZG1pblB1YktleTFTaWduZWQFEmFkbWluUHViS2V5MlNpZ25lZAUSYWRtaW5QdWJLZXkzU2lnbmVkAAJSFXEV", "height": 2280731, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Yat37uPdCqfD1maLiPe6WR4HQcVLmeyMY48afutrdGq Next: HM8uwcxPrnYjhbFrMvReGv956yPcSVeQQ5mh2YWT1EEP Diff:
Old | New | Differences | |
---|---|---|---|
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let kActive = "active" | |
5 | + | ||
6 | + | let kActiveGlob = "active_all_contracts" | |
5 | 7 | ||
6 | 8 | let kCause = "shutdown_cause" | |
7 | 9 | ||
91 | 93 | ||
92 | 94 | let kLPFarmingAddress = "lp_farming" | |
93 | 95 | ||
94 | - | let | |
96 | + | let kFarmingTreasureAddr = "farming_treasure" | |
95 | 97 | ||
96 | 98 | let oracle = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz') | |
97 | 99 | ||
125 | 127 | ||
126 | 128 | let lpFarmingAddress = Address(getBase58FromOracle(kLPFarmingAddress)) | |
127 | 129 | ||
128 | - | let | |
130 | + | let farmingTreasureAddr = Address(getBase58FromOracle(kFarmingTreasureAddr)) | |
129 | 131 | ||
130 | 132 | let basePeriod = valueOrErrorMessage(getInteger(votingAddress, kBasePeriod), "Empty kBasePeriod") | |
131 | 133 | ||
136 | 138 | let currPeriod = (basePeriod + ((height - startHeight) / periodLength)) | |
137 | 139 | ||
138 | 140 | let active = getBooleanValue(this, kActive) | |
141 | + | ||
142 | + | let activeGlob = valueOrElse(getBoolean(oracle, kActiveGlob), true) | |
139 | 143 | ||
140 | 144 | let SwopYearEmission = getIntegerValue(this, kSwopYearEmission) | |
141 | 145 | ||
313 | 317 | let uPoolVoted = getUserPoolVoted(pool, user) | |
314 | 318 | let shareTokenStaked = getTotalShareTokenStaked(pool) | |
315 | 319 | let totalShareVirtual = valueOrElse(getInteger(this, (pool + kShareTokensVirtual)), shareTokenStaked) | |
316 | - | let $ | |
317 | - | let lastInterestHeight = $ | |
318 | - | let farmInterest = $ | |
319 | - | let boostInterest = $ | |
320 | - | let boostLPInterest = $ | |
321 | - | let $ | |
322 | - | let currentRewardPerBlock = $ | |
323 | - | let rewardUpdateHeight = $ | |
324 | - | let previousRewardPerBlock = $ | |
325 | - | let poolRewardUpdateHeight = $ | |
320 | + | let $t01430314401 = getLastInterestInfo(pool) | |
321 | + | let lastInterestHeight = $t01430314401._1 | |
322 | + | let farmInterest = $t01430314401._2 | |
323 | + | let boostInterest = $t01430314401._3 | |
324 | + | let boostLPInterest = $t01430314401._4 | |
325 | + | let $t01440614520 = rewardInfo(pool) | |
326 | + | let currentRewardPerBlock = $t01440614520._1 | |
327 | + | let rewardUpdateHeight = $t01440614520._2 | |
328 | + | let previousRewardPerBlock = $t01440614520._3 | |
329 | + | let poolRewardUpdateHeight = $t01440614520._4 | |
326 | 330 | let uFarmInterest = valueOrElse(getInteger(this, (((pool + "_") + user) + kFarmUserLastInterest)), farmInterest) | |
327 | 331 | let uBoostInterest = valueOrElse(getInteger(this, (((pool + "_") + user) + kBoostUserLastInterest)), boostInterest) | |
328 | 332 | let uBoostLPInterest = valueOrElse(getInteger(this, (((pool + "_") + user) + kBoostLPUserLastInterest)), boostLPInterest) | |
329 | 333 | let uShareTokensStaked = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensStaked)), 0) | |
330 | 334 | let uShareTokensVirt = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), uShareTokensStaked) | |
331 | - | let $ | |
332 | - | let newFarmInterest = $ | |
333 | - | let newBoostInterest = $ | |
334 | - | let newBoostLPInterest = $ | |
335 | + | let $t01508815480 = calcInterest(pool, lastInterestHeight, rewardUpdateHeight, poolRewardUpdateHeight, farmInterest, boostInterest, poolVoted, boostLPInterest, currentRewardPerBlock, shareTokenStaked, previousRewardPerBlock, scaleValue) | |
336 | + | let newFarmInterest = $t01508815480._1 | |
337 | + | let newBoostInterest = $t01508815480._2 | |
338 | + | let newBoostLPInterest = $t01508815480._3 | |
335 | 339 | let claimFarming = fraction(uShareTokensVirt, (newFarmInterest - uFarmInterest), scaleValue) | |
336 | 340 | let claimBoostingMax = fraction(uPoolVoted, (newBoostInterest - uBoostInterest), scaleValue) | |
337 | 341 | let claimBoosting = fraction((uShareTokensVirt * uPoolVoted), (newBoostLPInterest - uBoostLPInterest), scaleValue) | |
366 | 370 | func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)] | |
367 | 371 | ||
368 | 372 | ||
369 | - | func isActive () = if (active) | |
373 | + | func isActive () = if (if (active) | |
374 | + | then activeGlob | |
375 | + | else false) | |
370 | 376 | then unit | |
371 | 377 | else throw("DApp is inactive at this moment") | |
372 | 378 | ||
398 | 404 | then throw("Only Governance can call this function") | |
399 | 405 | else { | |
400 | 406 | let user = toString(addressFromPublicKey(adminInvokePubKey)) | |
401 | - | let $ | |
402 | - | let farmInterest = $ | |
403 | - | let boostInterest = $ | |
404 | - | let boostLPinterest = $ | |
407 | + | let $t01849718571 = claimCalc(pool, user) | |
408 | + | let farmInterest = $t01849718571._1 | |
409 | + | let boostInterest = $t01849718571._2 | |
410 | + | let boostLPinterest = $t01849718571._3 | |
405 | 411 | [IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kLastInterestHeight), height)] | |
406 | 412 | }) | |
407 | 413 | ||
418 | 424 | let userLockedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLocked)), 0) | |
419 | 425 | let userAmountVirtual = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), userStakedAmount) | |
420 | 426 | let totalUserShareTokens = ((userStakedAmount + userLockedAmount) + i.payments[0].amount) | |
421 | - | let $ | |
422 | - | let lockPeriod = $ | |
423 | - | let lockCoef = $ | |
427 | + | let $t01969819750 = getLockParams(lockType) | |
428 | + | let lockPeriod = $t01969819750._1 | |
429 | + | let lockCoef = $t01969819750._2 | |
424 | 430 | let lockWavesFee = getIntegerValue(this, kLockWavesFee) | |
425 | 431 | if ((i.payments[0].assetId != shareAssetId)) | |
426 | 432 | then throw("Wrong sharetoken in payment") | |
432 | 438 | let shareTokensChangeOnFH = canLockInFirstHarvest(pool, user, userStakedAmount, i.payments[0].amount, lockType) | |
433 | 439 | if ((shareTokensChangeOnFH == shareTokensChangeOnFH)) | |
434 | 440 | then { | |
435 | - | let $ | |
441 | + | let $t02017722106 = if ((lockType == 0)) | |
436 | 442 | then { | |
437 | 443 | let userAmountVirtualNew = ((userAmountVirtual + i.payments[0].amount) - shareTokensChangeOnFH) | |
438 | 444 | $Tuple3([IntegerEntry((((pool + "_") + user) + kUserShareTokensStaked), ((userStakedAmount + i.payments[0].amount) - shareTokensChangeOnFH)), IntegerEntry((pool + kShareTokensVirtual), ((totalShareVirtual + i.payments[0].amount) - shareTokensChangeOnFH)), ScriptTransfer(i.originCaller, shareTokensChangeOnFH, i.payments[0].assetId)], userAmountVirtualNew, ((totalShareStaked + i.payments[0].amount) - shareTokensChangeOnFH)) | |
453 | 459 | let userAmountVirtualNew = (fraction(userLockedAmountNew, lockCoef, lockBoostCoefScale) + userStakedAmount) | |
454 | 460 | $Tuple3([IntegerEntry((((pool + "_") + user) + kUserShareTokensLocked), userLockedAmountNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensLockedHeight), userLockedHeigtNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensLockedType), lockType), IntegerEntry((((pool + "_") + user) + kUserShareTokensVirtual), userAmountVirtualNew), IntegerEntry((pool + kShareTokensVirtual), ((totalShareVirtual - userAmountVirtual) + userAmountVirtualNew))], userAmountVirtualNew, (totalShareStaked + i.payments[0].amount)) | |
455 | 461 | } | |
456 | - | let lockEntries = $ | |
457 | - | let userAmountVirtualNew = $ | |
458 | - | let totalShareStakedNew = $ | |
462 | + | let lockEntries = $t02017722106._1 | |
463 | + | let userAmountVirtualNew = $t02017722106._2 | |
464 | + | let totalShareStakedNew = $t02017722106._3 | |
459 | 465 | if ((accountBalance(shareAssetId) > totalShareStakedNew)) | |
460 | 466 | then throw("Balance of share-token is lower than totalAmount") | |
461 | 467 | else { | |
462 | - | let $ | |
463 | - | let farmInterest = $ | |
464 | - | let boostInterest = $ | |
465 | - | let boostLPinterest = $ | |
466 | - | let claimAmount = $ | |
467 | - | let toTreasure = $ | |
468 | + | let $t02223722336 = claimCalc(pool, user) | |
469 | + | let farmInterest = $t02223722336._1 | |
470 | + | let boostInterest = $t02223722336._2 | |
471 | + | let boostLPinterest = $t02223722336._3 | |
472 | + | let claimAmount = $t02223722336._4 | |
473 | + | let toTreasure = $t02223722336._5 | |
468 | 474 | let availableFundsNew = (userAvailableSWOP(pool, i.originCaller) + claimAmount) | |
469 | 475 | let uplp = if ((getString(Address(fromBase58String(pool)), "version") == "3.0.0")) | |
470 | 476 | then invoke(lpFarmingAddress, "updateUserInterest", [pool, totalUserShareTokens], nil) | |
471 | 477 | else 0 | |
472 | 478 | if ((uplp == uplp)) | |
473 | - | then ([IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((((pool + "_") + user) + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((pool + kShareTotalShareTokens), totalShareStakedNew), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, toTreasure, true), ScriptTransfer( | |
479 | + | then ([IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((((pool + "_") + user) + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((pool + kShareTotalShareTokens), totalShareStakedNew), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, toTreasure, true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP)] ++ lockEntries) | |
474 | 480 | else throw("Strict value is not equal to itself.") | |
475 | 481 | } | |
476 | 482 | } | |
491 | 497 | let userLockedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLocked)), 0) | |
492 | 498 | let userAmountVirtual = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), userStakedAmount) | |
493 | 499 | let totalUserShareTokens = (userStakedAmount + userLockedAmount) | |
494 | - | let $ | |
495 | - | let lockPeriod = $ | |
496 | - | let lockCoef = $ | |
500 | + | let $t02426824320 = getLockParams(lockType) | |
501 | + | let lockPeriod = $t02426824320._1 | |
502 | + | let lockCoef = $t02426824320._2 | |
497 | 503 | let lockWavesFee = getIntegerValue(this, kLockWavesFee) | |
498 | 504 | if ((height > getHeightFirstHarvest(pool))) | |
499 | 505 | then throw("You can't lock shareTokens till first harvest end.") | |
519 | 525 | let userLockedHeigtNew = (height + lockPeriod) | |
520 | 526 | let userAmountVirtualNew = (fraction(userLockedAmountNew, lockCoef, lockBoostCoefScale) + userStakedAmount) | |
521 | 527 | let lockEntries = [IntegerEntry((((pool + "_") + user) + kUserShareTokensStaked), userStakedAmountNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensLocked), userLockedAmountNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensLockedHeight), userLockedHeigtNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensLockedType), lockType), IntegerEntry((((pool + "_") + user) + kUserShareTokensVirtual), userAmountVirtualNew), IntegerEntry((pool + kShareTokensVirtual), ((totalShareVirtual - userAmountVirtual) + userAmountVirtualNew))] | |
522 | - | let $ | |
523 | - | let farmInterest = $ | |
524 | - | let boostInterest = $ | |
525 | - | let boostLPinterest = $ | |
526 | - | let claimAmount = $ | |
527 | - | let toTreasure = $ | |
528 | + | let $t02602026119 = claimCalc(pool, user) | |
529 | + | let farmInterest = $t02602026119._1 | |
530 | + | let boostInterest = $t02602026119._2 | |
531 | + | let boostLPinterest = $t02602026119._3 | |
532 | + | let claimAmount = $t02602026119._4 | |
533 | + | let toTreasure = $t02602026119._5 | |
528 | 534 | let availableFundsNew = (userAvailableSWOP(pool, i.originCaller) + claimAmount) | |
529 | - | [IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((((pool + "_") + user) + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, toTreasure, true), ScriptTransfer( | |
535 | + | [IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((((pool + "_") + user) + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, toTreasure, true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP)] | |
530 | 536 | } | |
531 | 537 | }) | |
532 | 538 | ||
544 | 550 | then throw(("You can't unlock sharetokens till " + toString(userLockedHeigt))) | |
545 | 551 | else { | |
546 | 552 | let userStakedAmountNew = (userStakedAmount + userLockedAmount) | |
547 | - | let $ | |
548 | - | let farmInterest = $ | |
549 | - | let boostInterest = $ | |
550 | - | let boostLPinterest = $ | |
551 | - | let claimAmount = $ | |
552 | - | let toTreasure = $ | |
553 | + | let $t02780727906 = claimCalc(pool, user) | |
554 | + | let farmInterest = $t02780727906._1 | |
555 | + | let boostInterest = $t02780727906._2 | |
556 | + | let boostLPinterest = $t02780727906._3 | |
557 | + | let claimAmount = $t02780727906._4 | |
558 | + | let toTreasure = $t02780727906._5 | |
553 | 559 | let availableFundsNew = (userAvailableSWOP(pool, i.originCaller) + claimAmount) | |
554 | - | [IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((((pool + "_") + user) + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kUserShareTokensStaked), userStakedAmountNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensVirtual), userStakedAmountNew), IntegerEntry((pool + kShareTokensVirtual), ((totalShareVirtual - userAmountVirtual) + userStakedAmountNew)), DeleteEntry((((pool + "_") + user) + kUserShareTokensLocked)), DeleteEntry((((pool + "_") + user) + kUserShareTokensLockedHeight)), DeleteEntry((((pool + "_") + user) + kUserShareTokensLockedType)), Reissue(SWOP, toTreasure, true), ScriptTransfer( | |
560 | + | [IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((((pool + "_") + user) + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kUserShareTokensStaked), userStakedAmountNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensVirtual), userStakedAmountNew), IntegerEntry((pool + kShareTokensVirtual), ((totalShareVirtual - userAmountVirtual) + userStakedAmountNew)), DeleteEntry((((pool + "_") + user) + kUserShareTokensLocked)), DeleteEntry((((pool + "_") + user) + kUserShareTokensLockedHeight)), DeleteEntry((((pool + "_") + user) + kUserShareTokensLockedType)), Reissue(SWOP, toTreasure, true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP), ScriptTransfer(i.caller, lockWavesFee, unit)] | |
555 | 561 | } | |
556 | 562 | }) | |
557 | 563 | ||
561 | 567 | func withdrawShareTokens (pool,shareTokensWithdrawAmount) = valueOrElse(isActive(), { | |
562 | 568 | let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
563 | 569 | let user = toString(i.originCaller) | |
564 | - | let $ | |
565 | - | let farmInterest = $ | |
566 | - | let boostInterest = $ | |
567 | - | let boostLPinterest = $ | |
568 | - | let claimAmount = $ | |
569 | - | let toTreasure = $ | |
570 | + | let $t02941029509 = claimCalc(pool, user) | |
571 | + | let farmInterest = $t02941029509._1 | |
572 | + | let boostInterest = $t02941029509._2 | |
573 | + | let boostLPinterest = $t02941029509._3 | |
574 | + | let claimAmount = $t02941029509._4 | |
575 | + | let toTreasure = $t02941029509._5 | |
570 | 576 | let userStakedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensStaked)), 0) | |
571 | 577 | let userLockedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLocked)), 0) | |
572 | 578 | let userStakedAmountNew = (userStakedAmount - shareTokensWithdrawAmount) | |
573 | 579 | let availableFundsNew = (userAvailableSWOP(pool, i.originCaller) + claimAmount) | |
574 | 580 | let totalShareAmount = getTotalShareTokenStaked(pool) | |
575 | 581 | let totalShareAmountNew = (totalShareAmount - shareTokensWithdrawAmount) | |
576 | - | if ((shareTokensWithdrawAmount > | |
582 | + | if ((shareTokensWithdrawAmount > userStakedAmount)) | |
577 | 583 | then throw("Withdraw amount more then user locked amount") | |
578 | 584 | else if ((accountBalance(shareTokensId) > totalShareAmount)) | |
579 | 585 | then throw("Balance of share-token is lower than totalAmount") | |
582 | 588 | then invoke(lpFarmingAddress, "updateUserInterest", [pool, (userStakedAmount + userLockedAmount)], nil) | |
583 | 589 | else 0 | |
584 | 590 | if ((uplp == uplp)) | |
585 | - | then [IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((((pool + "_") + user) + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kUserShareTokensStaked), userStakedAmountNew), IntegerEntry((pool + kShareTotalShareTokens), totalShareAmountNew), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, toTreasure, true), ScriptTransfer( | |
591 | + | then [IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((((pool + "_") + user) + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kUserShareTokensStaked), userStakedAmountNew), IntegerEntry((pool + kShareTotalShareTokens), totalShareAmountNew), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, toTreasure, true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP), ScriptTransfer(i.caller, shareTokensWithdrawAmount, shareTokensId)] | |
586 | 592 | else throw("Strict value is not equal to itself.") | |
587 | 593 | } | |
588 | 594 | }) | |
594 | 600 | let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
595 | 601 | let user = toString(i.caller) | |
596 | 602 | let shareTokenLocked = getTotalShareTokenStaked(pool) | |
597 | - | let $ | |
598 | - | let farmInterest = $ | |
599 | - | let boostInterest = $ | |
600 | - | let boostLPinterest = $ | |
601 | - | let claimAmount = $ | |
602 | - | let toTreasure = $ | |
603 | + | let $t03165231751 = claimCalc(pool, user) | |
604 | + | let farmInterest = $t03165231751._1 | |
605 | + | let boostInterest = $t03165231751._2 | |
606 | + | let boostLPinterest = $t03165231751._3 | |
607 | + | let claimAmount = $t03165231751._4 | |
608 | + | let toTreasure = $t03165231751._5 | |
603 | 609 | let availableFund = (userAvailableSWOP(pool, i.caller) + claimAmount) | |
604 | 610 | if ((availableFund == 0)) | |
605 | 611 | then throw("You have 0 available SWOP") | |
606 | 612 | else if ((accountBalance(shareTokensId) > shareTokenLocked)) | |
607 | 613 | then throw("Balance of share-token is lower than totalAmount") | |
608 | - | else $Tuple2([IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((((pool + "_") + user) + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), 0), Reissue(SWOP, (toTreasure + availableFund), true), ScriptTransfer( | |
614 | + | else $Tuple2([IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((((pool + "_") + user) + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), 0), Reissue(SWOP, (toTreasure + availableFund), true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP), ScriptTransfer(i.caller, availableFund, SWOP)], availableFund) | |
609 | 615 | }) | |
610 | 616 | ||
611 | 617 | ||
709 | 715 | func updateUserBoostInterest (pool,user) = valueOrElse(isActive(), if ((i.caller != votingAddress)) | |
710 | 716 | then throw("Only voiting can call this function") | |
711 | 717 | else { | |
712 | - | let $ | |
713 | - | let farmInterest = $ | |
714 | - | let boostInterest = $ | |
715 | - | let boostLPinterest = $ | |
716 | - | let claimAmount = $ | |
717 | - | let toTreasure = $ | |
718 | + | let $t03413134230 = claimCalc(pool, user) | |
719 | + | let farmInterest = $t03413134230._1 | |
720 | + | let boostInterest = $t03413134230._2 | |
721 | + | let boostLPinterest = $t03413134230._3 | |
722 | + | let claimAmount = $t03413134230._4 | |
723 | + | let toTreasure = $t03413134230._5 | |
718 | 724 | let availableFundsNew = (userAvailableSWOP(pool, i.originCaller) + claimAmount) | |
719 | - | [IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((((pool + "_") + user) + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, toTreasure, true), ScriptTransfer( | |
725 | + | [IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((((pool + "_") + user) + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, toTreasure, true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP)] | |
720 | 726 | }) | |
721 | 727 | ||
722 | 728 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let kActive = "active" | |
5 | + | ||
6 | + | let kActiveGlob = "active_all_contracts" | |
5 | 7 | ||
6 | 8 | let kCause = "shutdown_cause" | |
7 | 9 | ||
8 | 10 | let kRewardPoolFractionCurrent = "_current_pool_fraction_reward" | |
9 | 11 | ||
10 | 12 | let kRewardPoolFractionPrevious = "_previous_pool_fraction_reward" | |
11 | 13 | ||
12 | 14 | let kHeightPoolFraction = "_pool_reward_update_height" | |
13 | 15 | ||
14 | 16 | let kTotalRewardPerBlockCurrent = "total_reward_per_block_current" | |
15 | 17 | ||
16 | 18 | let kTotalRewardPerBlockPrevious = "total_reward_per_block_previous" | |
17 | 19 | ||
18 | 20 | let kRewardUpdateHeight = "reward_update_height" | |
19 | 21 | ||
20 | 22 | let kUserShareTokensStaked = "_share_tokens_locked" | |
21 | 23 | ||
22 | 24 | let kUserShareTokensLocked = "_share_tokens_blocked" | |
23 | 25 | ||
24 | 26 | let kUserShareTokensLockedType = "_share_tokens_blocked_type" | |
25 | 27 | ||
26 | 28 | let kUserShareTokensLockedHeight = "_share_tokens_blocked_height" | |
27 | 29 | ||
28 | 30 | let kUserShareTokensVirtual = "_share_tokens_virtual" | |
29 | 31 | ||
30 | 32 | let kShareTotalShareTokens = "_total_share_tokens_locked" | |
31 | 33 | ||
32 | 34 | let kShareTokensVirtual = "_total_share_tokens_virtual" | |
33 | 35 | ||
34 | 36 | let kLockParams = "_lock_params" | |
35 | 37 | ||
36 | 38 | let kLockWavesFee = "lock_waves_fee" | |
37 | 39 | ||
38 | 40 | let kPoolBoostCoef = "_boost_coef" | |
39 | 41 | ||
40 | 42 | let kFarmLastInterest = "_last_interest" | |
41 | 43 | ||
42 | 44 | let kFarmUserLastInterest = "_last_interest" | |
43 | 45 | ||
44 | 46 | let kBoostLastInterest = "_last_interest_b" | |
45 | 47 | ||
46 | 48 | let kBoostUserLastInterest = "_last_interest_u_b" | |
47 | 49 | ||
48 | 50 | let kBoostLPLastInterest = "_last_interest_lpb" | |
49 | 51 | ||
50 | 52 | let kBoostLPUserLastInterest = "_last_interest_u_lpb" | |
51 | 53 | ||
52 | 54 | let kLastInterestHeight = "_last_interest_height" | |
53 | 55 | ||
54 | 56 | let kSWOPid = "SWOP_id" | |
55 | 57 | ||
56 | 58 | let kAvailableSWOP = "_available_SWOP" | |
57 | 59 | ||
58 | 60 | let kSwopYearEmission = "swop_year_emission" | |
59 | 61 | ||
60 | 62 | let kHarvestPoolVote = "_harvest_pool_vote_gSWOP" | |
61 | 63 | ||
62 | 64 | let kPoolVote = "_pool_vote_gSWOP" | |
63 | 65 | ||
64 | 66 | let kUserPoolVote = "_user_vote_gSWOP" | |
65 | 67 | ||
66 | 68 | let kHarvestUserPoolVote = "_harvest_user_pool_vote_gSWOP" | |
67 | 69 | ||
68 | 70 | let kBasePeriod = "base_period" | |
69 | 71 | ||
70 | 72 | let kPeriodLength = "period_length" | |
71 | 73 | ||
72 | 74 | let kStartHeight = "start_height" | |
73 | 75 | ||
74 | 76 | let kFirstHarvestHeight = "first_harvest_height" | |
75 | 77 | ||
76 | 78 | let kShareLimitFH = "share_limit_on_first_harvest" | |
77 | 79 | ||
78 | 80 | let kAdminPubKey1 = "admin_pub_1" | |
79 | 81 | ||
80 | 82 | let kAdminPubKey2 = "admin_pub_2" | |
81 | 83 | ||
82 | 84 | let kAdminPubKey3 = "admin_pub_3" | |
83 | 85 | ||
84 | 86 | let kAdminInvokePubKey = "admin_invoke_pub" | |
85 | 87 | ||
86 | 88 | let kMoneyBoxAddress = "money_box_address" | |
87 | 89 | ||
88 | 90 | let kVotingAddress = "voting_address" | |
89 | 91 | ||
90 | 92 | let kGovAddress = "governance_address" | |
91 | 93 | ||
92 | 94 | let kLPFarmingAddress = "lp_farming" | |
93 | 95 | ||
94 | - | let | |
96 | + | let kFarmingTreasureAddr = "farming_treasure" | |
95 | 97 | ||
96 | 98 | let oracle = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz') | |
97 | 99 | ||
98 | 100 | let totalVoteShare = 10000000000 | |
99 | 101 | ||
100 | 102 | let lockBoostCoefScale = 1000 | |
101 | 103 | ||
102 | 104 | let defPoolBoostCoef = 500 | |
103 | 105 | ||
104 | 106 | func getBase58FromOracle (key) = match getString(oracle, key) { | |
105 | 107 | case string: String => | |
106 | 108 | fromBase58String(string) | |
107 | 109 | case nothing => | |
108 | 110 | throw((key + "is empty")) | |
109 | 111 | } | |
110 | 112 | ||
111 | 113 | ||
112 | 114 | let adminPubKey1 = getBase58FromOracle(kAdminPubKey1) | |
113 | 115 | ||
114 | 116 | let adminPubKey2 = getBase58FromOracle(kAdminPubKey2) | |
115 | 117 | ||
116 | 118 | let adminPubKey3 = getBase58FromOracle(kAdminPubKey3) | |
117 | 119 | ||
118 | 120 | let moneyBoxAddress = Address(getBase58FromOracle(kMoneyBoxAddress)) | |
119 | 121 | ||
120 | 122 | let votingAddress = Address(getBase58FromOracle(kVotingAddress)) | |
121 | 123 | ||
122 | 124 | let govAddress = Address(getBase58FromOracle(kGovAddress)) | |
123 | 125 | ||
124 | 126 | let adminInvokePubKey = getBase58FromOracle(kAdminInvokePubKey) | |
125 | 127 | ||
126 | 128 | let lpFarmingAddress = Address(getBase58FromOracle(kLPFarmingAddress)) | |
127 | 129 | ||
128 | - | let | |
130 | + | let farmingTreasureAddr = Address(getBase58FromOracle(kFarmingTreasureAddr)) | |
129 | 131 | ||
130 | 132 | let basePeriod = valueOrErrorMessage(getInteger(votingAddress, kBasePeriod), "Empty kBasePeriod") | |
131 | 133 | ||
132 | 134 | let startHeight = valueOrErrorMessage(getInteger(votingAddress, kStartHeight), "Empty kStartHeight") | |
133 | 135 | ||
134 | 136 | let periodLength = valueOrErrorMessage(getInteger(votingAddress, kPeriodLength), "Empty kPeriodLength") | |
135 | 137 | ||
136 | 138 | let currPeriod = (basePeriod + ((height - startHeight) / periodLength)) | |
137 | 139 | ||
138 | 140 | let active = getBooleanValue(this, kActive) | |
141 | + | ||
142 | + | let activeGlob = valueOrElse(getBoolean(oracle, kActiveGlob), true) | |
139 | 143 | ||
140 | 144 | let SwopYearEmission = getIntegerValue(this, kSwopYearEmission) | |
141 | 145 | ||
142 | 146 | let SWOP = fromBase58String(getStringValue(this, kSWOPid)) | |
143 | 147 | ||
144 | 148 | func getHeightFirstHarvest (pool) = valueOrElse(getInteger(Address(fromBase58String(pool)), kFirstHarvestHeight), 0) | |
145 | 149 | ||
146 | 150 | ||
147 | 151 | func getFHShareLimitToken (pool) = valueOrErrorMessage(getInteger(pool, kShareLimitFH), ("No data on the key: " + kShareLimitFH)) | |
148 | 152 | ||
149 | 153 | ||
150 | 154 | func getTotalShareTokenStaked (pool) = valueOrErrorMessage(getInteger(this, (pool + kShareTotalShareTokens)), (("No data on the key: " + pool) + kShareTotalShareTokens)) | |
151 | 155 | ||
152 | 156 | ||
153 | 157 | func getPoolVoted (pool) = valueOrElse(getInteger(votingAddress, (pool + kPoolVote)), 0) | |
154 | 158 | ||
155 | 159 | ||
156 | 160 | func getUserPoolVoted (pool,user) = valueOrElse(getInteger(votingAddress, (((user + "_") + pool) + kPoolVote)), 0) | |
157 | 161 | ||
158 | 162 | ||
159 | 163 | func getShareAssetId (pool) = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
160 | 164 | ||
161 | 165 | ||
162 | 166 | func accountBalance (assetId) = match assetId { | |
163 | 167 | case id: ByteVector => | |
164 | 168 | assetBalance(this, id) | |
165 | 169 | case waves: Unit => | |
166 | 170 | wavesBalance(this).available | |
167 | 171 | case _ => | |
168 | 172 | throw("Match error") | |
169 | 173 | } | |
170 | 174 | ||
171 | 175 | ||
172 | 176 | func getAssetInfo (assetId) = match assetId { | |
173 | 177 | case id: ByteVector => | |
174 | 178 | let stringId = toBase58String(id) | |
175 | 179 | let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist")) | |
176 | 180 | $Tuple3(stringId, info.name, info.decimals) | |
177 | 181 | case waves: Unit => | |
178 | 182 | $Tuple3("WAVES", "WAVES", 8) | |
179 | 183 | case _ => | |
180 | 184 | throw("Match error") | |
181 | 185 | } | |
182 | 186 | ||
183 | 187 | ||
184 | 188 | func calcScaleValue (assetId1,assetId2) = { | |
185 | 189 | let assetId1Decimals = value(assetInfo(assetId1)).decimals | |
186 | 190 | let assetId2Decimals = value(assetInfo(assetId2)).decimals | |
187 | 191 | let scaleDigits = ((assetId2Decimals - assetId1Decimals) + 8) | |
188 | 192 | pow(10, 0, scaleDigits, 0, 0, DOWN) | |
189 | 193 | } | |
190 | 194 | ||
191 | 195 | ||
192 | 196 | func userAvailableSWOP (pool,user) = valueOrElse(getInteger(this, (((pool + "_") + toString(user)) + kAvailableSWOP)), 0) | |
193 | 197 | ||
194 | 198 | ||
195 | 199 | func rewardInfo (pool) = { | |
196 | 200 | let totalRewardPerBlockCurrent = valueOrErrorMessage(getInteger(govAddress, kTotalRewardPerBlockCurrent), ((("No data on the key: " + kTotalRewardPerBlockCurrent) + " at address ") + toString(govAddress))) | |
197 | 201 | let totalRewardPerBlockPrevious = valueOrErrorMessage(getInteger(govAddress, kTotalRewardPerBlockPrevious), ((("No data on the key: " + kTotalRewardPerBlockPrevious) + " at address ") + toString(govAddress))) | |
198 | 202 | let rewardPoolFractionCurrent = valueOrErrorMessage(getInteger(govAddress, (pool + kRewardPoolFractionCurrent)), (((("No data on the key: " + pool) + kRewardPoolFractionCurrent) + " at address ") + toString(govAddress))) | |
199 | 203 | let rewardUpdateHeight = valueOrErrorMessage(getInteger(govAddress, kRewardUpdateHeight), ((("No data on the key: " + kRewardUpdateHeight) + " at address ") + toString(govAddress))) | |
200 | 204 | let poolRewardUpdateHeight = valueOrElse(getInteger(govAddress, (pool + kHeightPoolFraction)), rewardUpdateHeight) | |
201 | 205 | let rewardPoolFractionPrevious = valueOrErrorMessage(getInteger(govAddress, (pool + kRewardPoolFractionPrevious)), (((("No data on the key: " + pool) + kRewardPoolFractionPrevious) + " at address ") + toString(govAddress))) | |
202 | 206 | let rewardPoolCurrent = fraction(totalRewardPerBlockCurrent, rewardPoolFractionCurrent, totalVoteShare) | |
203 | 207 | let rewardPoolPrevious = fraction(totalRewardPerBlockCurrent, rewardPoolFractionPrevious, totalVoteShare) | |
204 | 208 | if (if ((rewardPoolCurrent > totalRewardPerBlockCurrent)) | |
205 | 209 | then true | |
206 | 210 | else (rewardPoolPrevious > totalRewardPerBlockPrevious)) | |
207 | 211 | then throw("rewardPoolCurrent > totalRewardPerBlockCurrent or rewardPoolPrevious > totalRewardPerBlockPrevious") | |
208 | 212 | else $Tuple4(rewardPoolCurrent, rewardUpdateHeight, rewardPoolPrevious, poolRewardUpdateHeight) | |
209 | 213 | } | |
210 | 214 | ||
211 | 215 | ||
212 | 216 | func getLastInterestInfo (pool) = { | |
213 | 217 | let farmInterest = valueOrErrorMessage(getInteger(this, (pool + kFarmLastInterest)), (("No data on the key: " + pool) + kFarmLastInterest)) | |
214 | 218 | let boostInterest = valueOrErrorMessage(getInteger(this, (pool + kFarmLastInterest)), (("No data on the key: " + pool) + kBoostLastInterest)) | |
215 | 219 | let boostLPInterest = valueOrErrorMessage(getInteger(this, (pool + kFarmLastInterest)), (("No data on the key: " + pool) + kBoostLPLastInterest)) | |
216 | 220 | let lastInterestHeight = valueOrElse(getInteger(this, (pool + kLastInterestHeight)), height) | |
217 | 221 | $Tuple4(lastInterestHeight, farmInterest, boostInterest, boostLPInterest) | |
218 | 222 | } | |
219 | 223 | ||
220 | 224 | ||
221 | 225 | func calcFarmRwd (pool,curTotalReward) = { | |
222 | 226 | let poolBoostCoef = valueOrElse(getInteger(this, (pool + kPoolBoostCoef)), defPoolBoostCoef) | |
223 | 227 | ((curTotalReward / (poolBoostCoef + 1)) / lockBoostCoefScale) | |
224 | 228 | } | |
225 | 229 | ||
226 | 230 | ||
227 | 231 | func calcBoostRwd (pool,curTotalReward) = { | |
228 | 232 | let poolBoostCoef = valueOrElse(getInteger(this, (pool + kPoolBoostCoef)), defPoolBoostCoef) | |
229 | 233 | (fraction(curTotalReward, poolBoostCoef, (poolBoostCoef + 1)) / lockBoostCoefScale) | |
230 | 234 | } | |
231 | 235 | ||
232 | 236 | ||
233 | 237 | func calcInterest (pool,lastInterestHeight,rewardUpdateHeight,poolRewardUpdateHeight,farmInterest,boostInterest,poolVoted,boostLpInterest,currentRewardPerBlock,shareTokenLocked,previousRewardPerBlock,scaleValue) = if ((shareTokenLocked == 0)) | |
234 | 238 | then $Tuple3(0, 0, 0) | |
235 | 239 | else if (if ((rewardUpdateHeight > height)) | |
236 | 240 | then (rewardUpdateHeight == poolRewardUpdateHeight) | |
237 | 241 | else false) | |
238 | 242 | then { | |
239 | 243 | let reward = (previousRewardPerBlock * (height - lastInterestHeight)) | |
240 | 244 | let newFarmInterest = (farmInterest + fraction(calcFarmRwd(pool, reward), scaleValue, shareTokenLocked)) | |
241 | 245 | let newBoostInterest = (boostInterest + (if ((poolVoted > 0)) | |
242 | 246 | then fraction(calcBoostRwd(pool, reward), scaleValue, poolVoted) | |
243 | 247 | else 0)) | |
244 | 248 | let newBoostLPInterest = (boostLpInterest + (if (if ((poolVoted > 0)) | |
245 | 249 | then (shareTokenLocked > 0) | |
246 | 250 | else false) | |
247 | 251 | then (fraction(calcBoostRwd(pool, reward), scaleValue, shareTokenLocked) / poolVoted) | |
248 | 252 | else 0)) | |
249 | 253 | $Tuple3(newFarmInterest, newBoostInterest, newBoostLPInterest) | |
250 | 254 | } | |
251 | 255 | else if (if ((height > rewardUpdateHeight)) | |
252 | 256 | then (rewardUpdateHeight != poolRewardUpdateHeight) | |
253 | 257 | else false) | |
254 | 258 | then { | |
255 | 259 | let reward = (previousRewardPerBlock * (height - lastInterestHeight)) | |
256 | 260 | let newFarmInterest = (farmInterest + fraction(calcFarmRwd(pool, reward), scaleValue, shareTokenLocked)) | |
257 | 261 | let newBoostInterest = (boostInterest + (if ((poolVoted > 0)) | |
258 | 262 | then fraction(calcBoostRwd(pool, reward), scaleValue, poolVoted) | |
259 | 263 | else 0)) | |
260 | 264 | let newBoostLPInterest = (boostLpInterest + (if (if ((poolVoted > 0)) | |
261 | 265 | then (shareTokenLocked > 0) | |
262 | 266 | else false) | |
263 | 267 | then (fraction(calcBoostRwd(pool, reward), scaleValue, shareTokenLocked) / poolVoted) | |
264 | 268 | else 0)) | |
265 | 269 | $Tuple3(newFarmInterest, newBoostInterest, newBoostLPInterest) | |
266 | 270 | } | |
267 | 271 | else if (if (if ((height > rewardUpdateHeight)) | |
268 | 272 | then (rewardUpdateHeight == poolRewardUpdateHeight) | |
269 | 273 | else false) | |
270 | 274 | then (lastInterestHeight > rewardUpdateHeight) | |
271 | 275 | else false) | |
272 | 276 | then { | |
273 | 277 | let reward = (currentRewardPerBlock * (height - lastInterestHeight)) | |
274 | 278 | let newFarmInterest = (farmInterest + fraction(calcFarmRwd(pool, reward), scaleValue, shareTokenLocked)) | |
275 | 279 | let newBoostInterest = (boostInterest + (if ((poolVoted > 0)) | |
276 | 280 | then fraction(calcBoostRwd(pool, reward), scaleValue, poolVoted) | |
277 | 281 | else 0)) | |
278 | 282 | let newBoostLPInterest = (boostLpInterest + (if (if ((poolVoted > 0)) | |
279 | 283 | then (shareTokenLocked > 0) | |
280 | 284 | else false) | |
281 | 285 | then (fraction(calcBoostRwd(pool, reward), scaleValue, shareTokenLocked) / poolVoted) | |
282 | 286 | else 0)) | |
283 | 287 | $Tuple3(newFarmInterest, newBoostInterest, newBoostLPInterest) | |
284 | 288 | } | |
285 | 289 | else { | |
286 | 290 | let rwdBfrUpd = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight)) | |
287 | 291 | let framIntrAftrUp = (farmInterest + fraction(calcFarmRwd(pool, rwdBfrUpd), scaleValue, shareTokenLocked)) | |
288 | 292 | let boostIntrAftrUp = (boostInterest + (if ((poolVoted > 0)) | |
289 | 293 | then fraction(calcBoostRwd(pool, rwdBfrUpd), scaleValue, poolVoted) | |
290 | 294 | else 0)) | |
291 | 295 | let bostLPIntrAftrUp = (farmInterest + (if (if ((poolVoted > 0)) | |
292 | 296 | then (shareTokenLocked > 0) | |
293 | 297 | else false) | |
294 | 298 | then fraction(calcBoostRwd(pool, rwdBfrUpd), scaleValue, poolVoted) | |
295 | 299 | else 0)) | |
296 | 300 | let reward = (currentRewardPerBlock * (height - rewardUpdateHeight)) | |
297 | 301 | let newFarmInterest = (framIntrAftrUp + fraction(calcFarmRwd(pool, reward), scaleValue, shareTokenLocked)) | |
298 | 302 | let newBoostInterest = (boostIntrAftrUp + (if ((poolVoted > 0)) | |
299 | 303 | then fraction(calcBoostRwd(pool, reward), scaleValue, poolVoted) | |
300 | 304 | else 0)) | |
301 | 305 | let newBoostLPInterest = (bostLPIntrAftrUp + (if (if ((poolVoted > 0)) | |
302 | 306 | then (shareTokenLocked > 0) | |
303 | 307 | else false) | |
304 | 308 | then (fraction(calcBoostRwd(pool, reward), scaleValue, shareTokenLocked) / poolVoted) | |
305 | 309 | else 0)) | |
306 | 310 | $Tuple3(newFarmInterest, newBoostInterest, newBoostLPInterest) | |
307 | 311 | } | |
308 | 312 | ||
309 | 313 | ||
310 | 314 | func claimCalc (pool,user) = { | |
311 | 315 | let scaleValue = calcScaleValue(SWOP, getShareAssetId(pool)) | |
312 | 316 | let poolVoted = getPoolVoted(pool) | |
313 | 317 | let uPoolVoted = getUserPoolVoted(pool, user) | |
314 | 318 | let shareTokenStaked = getTotalShareTokenStaked(pool) | |
315 | 319 | let totalShareVirtual = valueOrElse(getInteger(this, (pool + kShareTokensVirtual)), shareTokenStaked) | |
316 | - | let $ | |
317 | - | let lastInterestHeight = $ | |
318 | - | let farmInterest = $ | |
319 | - | let boostInterest = $ | |
320 | - | let boostLPInterest = $ | |
321 | - | let $ | |
322 | - | let currentRewardPerBlock = $ | |
323 | - | let rewardUpdateHeight = $ | |
324 | - | let previousRewardPerBlock = $ | |
325 | - | let poolRewardUpdateHeight = $ | |
320 | + | let $t01430314401 = getLastInterestInfo(pool) | |
321 | + | let lastInterestHeight = $t01430314401._1 | |
322 | + | let farmInterest = $t01430314401._2 | |
323 | + | let boostInterest = $t01430314401._3 | |
324 | + | let boostLPInterest = $t01430314401._4 | |
325 | + | let $t01440614520 = rewardInfo(pool) | |
326 | + | let currentRewardPerBlock = $t01440614520._1 | |
327 | + | let rewardUpdateHeight = $t01440614520._2 | |
328 | + | let previousRewardPerBlock = $t01440614520._3 | |
329 | + | let poolRewardUpdateHeight = $t01440614520._4 | |
326 | 330 | let uFarmInterest = valueOrElse(getInteger(this, (((pool + "_") + user) + kFarmUserLastInterest)), farmInterest) | |
327 | 331 | let uBoostInterest = valueOrElse(getInteger(this, (((pool + "_") + user) + kBoostUserLastInterest)), boostInterest) | |
328 | 332 | let uBoostLPInterest = valueOrElse(getInteger(this, (((pool + "_") + user) + kBoostLPUserLastInterest)), boostLPInterest) | |
329 | 333 | let uShareTokensStaked = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensStaked)), 0) | |
330 | 334 | let uShareTokensVirt = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), uShareTokensStaked) | |
331 | - | let $ | |
332 | - | let newFarmInterest = $ | |
333 | - | let newBoostInterest = $ | |
334 | - | let newBoostLPInterest = $ | |
335 | + | let $t01508815480 = calcInterest(pool, lastInterestHeight, rewardUpdateHeight, poolRewardUpdateHeight, farmInterest, boostInterest, poolVoted, boostLPInterest, currentRewardPerBlock, shareTokenStaked, previousRewardPerBlock, scaleValue) | |
336 | + | let newFarmInterest = $t01508815480._1 | |
337 | + | let newBoostInterest = $t01508815480._2 | |
338 | + | let newBoostLPInterest = $t01508815480._3 | |
335 | 339 | let claimFarming = fraction(uShareTokensVirt, (newFarmInterest - uFarmInterest), scaleValue) | |
336 | 340 | let claimBoostingMax = fraction(uPoolVoted, (newBoostInterest - uBoostInterest), scaleValue) | |
337 | 341 | let claimBoosting = fraction((uShareTokensVirt * uPoolVoted), (newBoostLPInterest - uBoostLPInterest), scaleValue) | |
338 | 342 | let toTreasury = (claimBoostingMax - claimBoosting) | |
339 | 343 | $Tuple5(newFarmInterest, newBoostInterest, newBoostLPInterest, (claimFarming + claimBoosting), toTreasury) | |
340 | 344 | } | |
341 | 345 | ||
342 | 346 | ||
343 | 347 | func canLockInFirstHarvest (pool,user,userShareTokensStaked,pmtAmount,lockType) = if ((height > getHeightFirstHarvest(pool))) | |
344 | 348 | then { | |
345 | 349 | let totalVoteAmount = valueOrElse(getInteger(votingAddress, (pool + kHarvestPoolVote)), 0) | |
346 | 350 | let userVoteAmount = valueOrElse(getInteger(votingAddress, (((user + "_") + pool) + kHarvestPoolVote)), 0) | |
347 | 351 | let FHShareTokenLimit = getFHShareLimitToken(addressFromStringValue(pool)) | |
348 | 352 | let FHShareTokenUserLimit = (fraction(FHShareTokenLimit, userVoteAmount, totalVoteAmount) - userShareTokensStaked) | |
349 | 353 | if ((lockType > 0)) | |
350 | 354 | then throw("You can't lock shareTokens till first harvest end.") | |
351 | 355 | else if ((userVoteAmount == 0)) | |
352 | 356 | then 0 | |
353 | 357 | else if ((pmtAmount >= FHShareTokenUserLimit)) | |
354 | 358 | then (pmtAmount - FHShareTokenUserLimit) | |
355 | 359 | else 0 | |
356 | 360 | } | |
357 | 361 | else 0 | |
358 | 362 | ||
359 | 363 | ||
360 | 364 | func getLockParams (type) = { | |
361 | 365 | let lockParams = split(valueOrErrorMessage(getString(this, (toString(type) + kLockParams)), ("There are no key for lock type" + toString(type))), "_") | |
362 | 366 | $Tuple2(parseIntValue(lockParams[0]), parseIntValue(lockParams[1])) | |
363 | 367 | } | |
364 | 368 | ||
365 | 369 | ||
366 | 370 | func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)] | |
367 | 371 | ||
368 | 372 | ||
369 | - | func isActive () = if (active) | |
373 | + | func isActive () = if (if (active) | |
374 | + | then activeGlob | |
375 | + | else false) | |
370 | 376 | then unit | |
371 | 377 | else throw("DApp is inactive at this moment") | |
372 | 378 | ||
373 | 379 | ||
374 | 380 | func isAdminCall (i) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)) | |
375 | 381 | then unit | |
376 | 382 | else throw("Only admin can call this function") | |
377 | 383 | ||
378 | 384 | ||
379 | 385 | @Callable(i) | |
380 | 386 | func init (earlyLP) = if (isDefined(getString(this, kSWOPid))) | |
381 | 387 | then throw("SWOP already initialized") | |
382 | 388 | else { | |
383 | 389 | let initAmount = 100000000000000 | |
384 | 390 | let SWOPissue = Issue("SWOP", "SWOP protocol token", initAmount, 8, true) | |
385 | 391 | let SWOPid = calculateAssetId(SWOPissue) | |
386 | 392 | [BooleanEntry(kActive, true), Issue("SWOP", "SWOP protocol token", initAmount, 8, true), StringEntry(kSWOPid, toBase58String(SWOPid))] | |
387 | 393 | } | |
388 | 394 | ||
389 | 395 | ||
390 | 396 | ||
391 | 397 | @Callable(i) | |
392 | 398 | func initPoolShareFarming (pool) = valueOrElse(isAdminCall(i), [IntegerEntry((pool + kShareTotalShareTokens), 0), IntegerEntry((pool + kFarmLastInterest), 0), IntegerEntry((pool + kBoostLastInterest), 0), IntegerEntry((pool + kBoostLPLastInterest), 0), IntegerEntry((pool + kLastInterestHeight), height)]) | |
393 | 399 | ||
394 | 400 | ||
395 | 401 | ||
396 | 402 | @Callable(i) | |
397 | 403 | func updatePoolInterest (pool) = valueOrElse(isActive(), if ((i.caller != govAddress)) | |
398 | 404 | then throw("Only Governance can call this function") | |
399 | 405 | else { | |
400 | 406 | let user = toString(addressFromPublicKey(adminInvokePubKey)) | |
401 | - | let $ | |
402 | - | let farmInterest = $ | |
403 | - | let boostInterest = $ | |
404 | - | let boostLPinterest = $ | |
407 | + | let $t01849718571 = claimCalc(pool, user) | |
408 | + | let farmInterest = $t01849718571._1 | |
409 | + | let boostInterest = $t01849718571._2 | |
410 | + | let boostLPinterest = $t01849718571._3 | |
405 | 411 | [IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kLastInterestHeight), height)] | |
406 | 412 | }) | |
407 | 413 | ||
408 | 414 | ||
409 | 415 | ||
410 | 416 | @Callable(i) | |
411 | 417 | func lockShareTokens (pool,lockType) = valueOrElse(isActive(), { | |
412 | 418 | let shareAssetId = getShareAssetId(pool) | |
413 | 419 | let user = toString(i.originCaller) | |
414 | 420 | let totalShareStaked = getTotalShareTokenStaked(pool) | |
415 | 421 | let totalShareVirtual = valueOrElse(getInteger(this, (pool + kShareTokensVirtual)), totalShareStaked) | |
416 | 422 | let userStakedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensStaked)), 0) | |
417 | 423 | let userLockedHeigt = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLockedHeight)), 0) | |
418 | 424 | let userLockedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLocked)), 0) | |
419 | 425 | let userAmountVirtual = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), userStakedAmount) | |
420 | 426 | let totalUserShareTokens = ((userStakedAmount + userLockedAmount) + i.payments[0].amount) | |
421 | - | let $ | |
422 | - | let lockPeriod = $ | |
423 | - | let lockCoef = $ | |
427 | + | let $t01969819750 = getLockParams(lockType) | |
428 | + | let lockPeriod = $t01969819750._1 | |
429 | + | let lockCoef = $t01969819750._2 | |
424 | 430 | let lockWavesFee = getIntegerValue(this, kLockWavesFee) | |
425 | 431 | if ((i.payments[0].assetId != shareAssetId)) | |
426 | 432 | then throw("Wrong sharetoken in payment") | |
427 | 433 | else if ((0 >= i.payments[0].amount)) | |
428 | 434 | then throw("Payment amount must be greater than 0") | |
429 | 435 | else if ((0 > lockType)) | |
430 | 436 | then throw("lockType must be >= 0") | |
431 | 437 | else { | |
432 | 438 | let shareTokensChangeOnFH = canLockInFirstHarvest(pool, user, userStakedAmount, i.payments[0].amount, lockType) | |
433 | 439 | if ((shareTokensChangeOnFH == shareTokensChangeOnFH)) | |
434 | 440 | then { | |
435 | - | let $ | |
441 | + | let $t02017722106 = if ((lockType == 0)) | |
436 | 442 | then { | |
437 | 443 | let userAmountVirtualNew = ((userAmountVirtual + i.payments[0].amount) - shareTokensChangeOnFH) | |
438 | 444 | $Tuple3([IntegerEntry((((pool + "_") + user) + kUserShareTokensStaked), ((userStakedAmount + i.payments[0].amount) - shareTokensChangeOnFH)), IntegerEntry((pool + kShareTokensVirtual), ((totalShareVirtual + i.payments[0].amount) - shareTokensChangeOnFH)), ScriptTransfer(i.originCaller, shareTokensChangeOnFH, i.payments[0].assetId)], userAmountVirtualNew, ((totalShareStaked + i.payments[0].amount) - shareTokensChangeOnFH)) | |
439 | 445 | } | |
440 | 446 | else if (if ((userLockedHeigt == 0)) | |
441 | 447 | then if (if ((2 > size(i.payments))) | |
442 | 448 | then true | |
443 | 449 | else (i.payments[1].assetId != unit)) | |
444 | 450 | then true | |
445 | 451 | else (lockWavesFee > i.payments[1].amount) | |
446 | 452 | else false) | |
447 | 453 | then throw((("You need to pay additional waves comission " + toString(lockWavesFee)) + "WAVES")) | |
448 | 454 | else if ((userLockedHeigt > (height + lockPeriod))) | |
449 | 455 | then throw("You cannot lock sharetokens for a period less than what you have already locked") | |
450 | 456 | else { | |
451 | 457 | let userLockedAmountNew = (userLockedAmount + i.payments[0].amount) | |
452 | 458 | let userLockedHeigtNew = (height + lockPeriod) | |
453 | 459 | let userAmountVirtualNew = (fraction(userLockedAmountNew, lockCoef, lockBoostCoefScale) + userStakedAmount) | |
454 | 460 | $Tuple3([IntegerEntry((((pool + "_") + user) + kUserShareTokensLocked), userLockedAmountNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensLockedHeight), userLockedHeigtNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensLockedType), lockType), IntegerEntry((((pool + "_") + user) + kUserShareTokensVirtual), userAmountVirtualNew), IntegerEntry((pool + kShareTokensVirtual), ((totalShareVirtual - userAmountVirtual) + userAmountVirtualNew))], userAmountVirtualNew, (totalShareStaked + i.payments[0].amount)) | |
455 | 461 | } | |
456 | - | let lockEntries = $ | |
457 | - | let userAmountVirtualNew = $ | |
458 | - | let totalShareStakedNew = $ | |
462 | + | let lockEntries = $t02017722106._1 | |
463 | + | let userAmountVirtualNew = $t02017722106._2 | |
464 | + | let totalShareStakedNew = $t02017722106._3 | |
459 | 465 | if ((accountBalance(shareAssetId) > totalShareStakedNew)) | |
460 | 466 | then throw("Balance of share-token is lower than totalAmount") | |
461 | 467 | else { | |
462 | - | let $ | |
463 | - | let farmInterest = $ | |
464 | - | let boostInterest = $ | |
465 | - | let boostLPinterest = $ | |
466 | - | let claimAmount = $ | |
467 | - | let toTreasure = $ | |
468 | + | let $t02223722336 = claimCalc(pool, user) | |
469 | + | let farmInterest = $t02223722336._1 | |
470 | + | let boostInterest = $t02223722336._2 | |
471 | + | let boostLPinterest = $t02223722336._3 | |
472 | + | let claimAmount = $t02223722336._4 | |
473 | + | let toTreasure = $t02223722336._5 | |
468 | 474 | let availableFundsNew = (userAvailableSWOP(pool, i.originCaller) + claimAmount) | |
469 | 475 | let uplp = if ((getString(Address(fromBase58String(pool)), "version") == "3.0.0")) | |
470 | 476 | then invoke(lpFarmingAddress, "updateUserInterest", [pool, totalUserShareTokens], nil) | |
471 | 477 | else 0 | |
472 | 478 | if ((uplp == uplp)) | |
473 | - | then ([IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((((pool + "_") + user) + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((pool + kShareTotalShareTokens), totalShareStakedNew), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, toTreasure, true), ScriptTransfer( | |
479 | + | then ([IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((((pool + "_") + user) + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((pool + kShareTotalShareTokens), totalShareStakedNew), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, toTreasure, true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP)] ++ lockEntries) | |
474 | 480 | else throw("Strict value is not equal to itself.") | |
475 | 481 | } | |
476 | 482 | } | |
477 | 483 | else throw("Strict value is not equal to itself.") | |
478 | 484 | } | |
479 | 485 | }) | |
480 | 486 | ||
481 | 487 | ||
482 | 488 | ||
483 | 489 | @Callable(i) | |
484 | 490 | func lockStakedShareTokens (pool,lockType,lockAmount) = valueOrElse(isActive(), { | |
485 | 491 | let shareAssetId = getShareAssetId(pool) | |
486 | 492 | let user = toString(i.originCaller) | |
487 | 493 | let totalShareStaked = getTotalShareTokenStaked(pool) | |
488 | 494 | let totalShareVirtual = valueOrElse(getInteger(this, (pool + kShareTokensVirtual)), totalShareStaked) | |
489 | 495 | let userStakedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensStaked)), 0) | |
490 | 496 | let userLockedHeigt = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLockedHeight)), 0) | |
491 | 497 | let userLockedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLocked)), 0) | |
492 | 498 | let userAmountVirtual = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), userStakedAmount) | |
493 | 499 | let totalUserShareTokens = (userStakedAmount + userLockedAmount) | |
494 | - | let $ | |
495 | - | let lockPeriod = $ | |
496 | - | let lockCoef = $ | |
500 | + | let $t02426824320 = getLockParams(lockType) | |
501 | + | let lockPeriod = $t02426824320._1 | |
502 | + | let lockCoef = $t02426824320._2 | |
497 | 503 | let lockWavesFee = getIntegerValue(this, kLockWavesFee) | |
498 | 504 | if ((height > getHeightFirstHarvest(pool))) | |
499 | 505 | then throw("You can't lock shareTokens till first harvest end.") | |
500 | 506 | else if ((lockType > 0)) | |
501 | 507 | then throw("lockType must be > 0") | |
502 | 508 | else if ((lockAmount > userStakedAmount)) | |
503 | 509 | then throw(("You can't lock more than " + toString(userStakedAmount))) | |
504 | 510 | else if ((accountBalance(shareAssetId) > totalShareStaked)) | |
505 | 511 | then throw("Balance of share-token is lower than totalAmount") | |
506 | 512 | else if (if ((userLockedHeigt == 0)) | |
507 | 513 | then if (if ((1 > size(i.payments))) | |
508 | 514 | then true | |
509 | 515 | else (i.payments[0].assetId != unit)) | |
510 | 516 | then true | |
511 | 517 | else (lockWavesFee > i.payments[0].amount) | |
512 | 518 | else false) | |
513 | 519 | then throw((("You need to pay additional waves comission " + toString(lockWavesFee)) + "WAVES")) | |
514 | 520 | else if ((userLockedHeigt > (height + lockPeriod))) | |
515 | 521 | then throw("You cannot lock sharetokens for a period less than what you have already locked") | |
516 | 522 | else { | |
517 | 523 | let userLockedAmountNew = (userLockedAmount + lockAmount) | |
518 | 524 | let userStakedAmountNew = (userStakedAmount - lockAmount) | |
519 | 525 | let userLockedHeigtNew = (height + lockPeriod) | |
520 | 526 | let userAmountVirtualNew = (fraction(userLockedAmountNew, lockCoef, lockBoostCoefScale) + userStakedAmount) | |
521 | 527 | let lockEntries = [IntegerEntry((((pool + "_") + user) + kUserShareTokensStaked), userStakedAmountNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensLocked), userLockedAmountNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensLockedHeight), userLockedHeigtNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensLockedType), lockType), IntegerEntry((((pool + "_") + user) + kUserShareTokensVirtual), userAmountVirtualNew), IntegerEntry((pool + kShareTokensVirtual), ((totalShareVirtual - userAmountVirtual) + userAmountVirtualNew))] | |
522 | - | let $ | |
523 | - | let farmInterest = $ | |
524 | - | let boostInterest = $ | |
525 | - | let boostLPinterest = $ | |
526 | - | let claimAmount = $ | |
527 | - | let toTreasure = $ | |
528 | + | let $t02602026119 = claimCalc(pool, user) | |
529 | + | let farmInterest = $t02602026119._1 | |
530 | + | let boostInterest = $t02602026119._2 | |
531 | + | let boostLPinterest = $t02602026119._3 | |
532 | + | let claimAmount = $t02602026119._4 | |
533 | + | let toTreasure = $t02602026119._5 | |
528 | 534 | let availableFundsNew = (userAvailableSWOP(pool, i.originCaller) + claimAmount) | |
529 | - | [IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((((pool + "_") + user) + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, toTreasure, true), ScriptTransfer( | |
535 | + | [IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((((pool + "_") + user) + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, toTreasure, true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP)] | |
530 | 536 | } | |
531 | 537 | }) | |
532 | 538 | ||
533 | 539 | ||
534 | 540 | ||
535 | 541 | @Callable(i) | |
536 | 542 | func unlockUserLock (pool,user) = valueOrElse(isActive(), { | |
537 | 543 | let lockWavesFee = getIntegerValue(this, kLockWavesFee) | |
538 | 544 | let userLockedHeigt = valueOrErrorMessage(getInteger(this, (((pool + "_") + user) + kUserShareTokensLockedHeight)), (((("There is no pool " + pool) + " or user ") + user) + "with lock")) | |
539 | 545 | let totalShareVirtual = getIntegerValue(this, (pool + kShareTokensVirtual)) | |
540 | 546 | let userStakedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensStaked)), 0) | |
541 | 547 | let userLockedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLocked)), 0) | |
542 | 548 | let userAmountVirtual = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), userStakedAmount) | |
543 | 549 | if ((userLockedHeigt > height)) | |
544 | 550 | then throw(("You can't unlock sharetokens till " + toString(userLockedHeigt))) | |
545 | 551 | else { | |
546 | 552 | let userStakedAmountNew = (userStakedAmount + userLockedAmount) | |
547 | - | let $ | |
548 | - | let farmInterest = $ | |
549 | - | let boostInterest = $ | |
550 | - | let boostLPinterest = $ | |
551 | - | let claimAmount = $ | |
552 | - | let toTreasure = $ | |
553 | + | let $t02780727906 = claimCalc(pool, user) | |
554 | + | let farmInterest = $t02780727906._1 | |
555 | + | let boostInterest = $t02780727906._2 | |
556 | + | let boostLPinterest = $t02780727906._3 | |
557 | + | let claimAmount = $t02780727906._4 | |
558 | + | let toTreasure = $t02780727906._5 | |
553 | 559 | let availableFundsNew = (userAvailableSWOP(pool, i.originCaller) + claimAmount) | |
554 | - | [IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((((pool + "_") + user) + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kUserShareTokensStaked), userStakedAmountNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensVirtual), userStakedAmountNew), IntegerEntry((pool + kShareTokensVirtual), ((totalShareVirtual - userAmountVirtual) + userStakedAmountNew)), DeleteEntry((((pool + "_") + user) + kUserShareTokensLocked)), DeleteEntry((((pool + "_") + user) + kUserShareTokensLockedHeight)), DeleteEntry((((pool + "_") + user) + kUserShareTokensLockedType)), Reissue(SWOP, toTreasure, true), ScriptTransfer( | |
560 | + | [IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((((pool + "_") + user) + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kUserShareTokensStaked), userStakedAmountNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensVirtual), userStakedAmountNew), IntegerEntry((pool + kShareTokensVirtual), ((totalShareVirtual - userAmountVirtual) + userStakedAmountNew)), DeleteEntry((((pool + "_") + user) + kUserShareTokensLocked)), DeleteEntry((((pool + "_") + user) + kUserShareTokensLockedHeight)), DeleteEntry((((pool + "_") + user) + kUserShareTokensLockedType)), Reissue(SWOP, toTreasure, true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP), ScriptTransfer(i.caller, lockWavesFee, unit)] | |
555 | 561 | } | |
556 | 562 | }) | |
557 | 563 | ||
558 | 564 | ||
559 | 565 | ||
560 | 566 | @Callable(i) | |
561 | 567 | func withdrawShareTokens (pool,shareTokensWithdrawAmount) = valueOrElse(isActive(), { | |
562 | 568 | let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
563 | 569 | let user = toString(i.originCaller) | |
564 | - | let $ | |
565 | - | let farmInterest = $ | |
566 | - | let boostInterest = $ | |
567 | - | let boostLPinterest = $ | |
568 | - | let claimAmount = $ | |
569 | - | let toTreasure = $ | |
570 | + | let $t02941029509 = claimCalc(pool, user) | |
571 | + | let farmInterest = $t02941029509._1 | |
572 | + | let boostInterest = $t02941029509._2 | |
573 | + | let boostLPinterest = $t02941029509._3 | |
574 | + | let claimAmount = $t02941029509._4 | |
575 | + | let toTreasure = $t02941029509._5 | |
570 | 576 | let userStakedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensStaked)), 0) | |
571 | 577 | let userLockedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLocked)), 0) | |
572 | 578 | let userStakedAmountNew = (userStakedAmount - shareTokensWithdrawAmount) | |
573 | 579 | let availableFundsNew = (userAvailableSWOP(pool, i.originCaller) + claimAmount) | |
574 | 580 | let totalShareAmount = getTotalShareTokenStaked(pool) | |
575 | 581 | let totalShareAmountNew = (totalShareAmount - shareTokensWithdrawAmount) | |
576 | - | if ((shareTokensWithdrawAmount > | |
582 | + | if ((shareTokensWithdrawAmount > userStakedAmount)) | |
577 | 583 | then throw("Withdraw amount more then user locked amount") | |
578 | 584 | else if ((accountBalance(shareTokensId) > totalShareAmount)) | |
579 | 585 | then throw("Balance of share-token is lower than totalAmount") | |
580 | 586 | else { | |
581 | 587 | let uplp = if ((getString(Address(fromBase58String(pool)), "version") == "3.0.0")) | |
582 | 588 | then invoke(lpFarmingAddress, "updateUserInterest", [pool, (userStakedAmount + userLockedAmount)], nil) | |
583 | 589 | else 0 | |
584 | 590 | if ((uplp == uplp)) | |
585 | - | then [IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((((pool + "_") + user) + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kUserShareTokensStaked), userStakedAmountNew), IntegerEntry((pool + kShareTotalShareTokens), totalShareAmountNew), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, toTreasure, true), ScriptTransfer( | |
591 | + | then [IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((((pool + "_") + user) + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kUserShareTokensStaked), userStakedAmountNew), IntegerEntry((pool + kShareTotalShareTokens), totalShareAmountNew), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, toTreasure, true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP), ScriptTransfer(i.caller, shareTokensWithdrawAmount, shareTokensId)] | |
586 | 592 | else throw("Strict value is not equal to itself.") | |
587 | 593 | } | |
588 | 594 | }) | |
589 | 595 | ||
590 | 596 | ||
591 | 597 | ||
592 | 598 | @Callable(i) | |
593 | 599 | func claim (pool) = valueOrElse(isActive(), { | |
594 | 600 | let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
595 | 601 | let user = toString(i.caller) | |
596 | 602 | let shareTokenLocked = getTotalShareTokenStaked(pool) | |
597 | - | let $ | |
598 | - | let farmInterest = $ | |
599 | - | let boostInterest = $ | |
600 | - | let boostLPinterest = $ | |
601 | - | let claimAmount = $ | |
602 | - | let toTreasure = $ | |
603 | + | let $t03165231751 = claimCalc(pool, user) | |
604 | + | let farmInterest = $t03165231751._1 | |
605 | + | let boostInterest = $t03165231751._2 | |
606 | + | let boostLPinterest = $t03165231751._3 | |
607 | + | let claimAmount = $t03165231751._4 | |
608 | + | let toTreasure = $t03165231751._5 | |
603 | 609 | let availableFund = (userAvailableSWOP(pool, i.caller) + claimAmount) | |
604 | 610 | if ((availableFund == 0)) | |
605 | 611 | then throw("You have 0 available SWOP") | |
606 | 612 | else if ((accountBalance(shareTokensId) > shareTokenLocked)) | |
607 | 613 | then throw("Balance of share-token is lower than totalAmount") | |
608 | - | else $Tuple2([IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((((pool + "_") + user) + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), 0), Reissue(SWOP, (toTreasure + availableFund), true), ScriptTransfer( | |
614 | + | else $Tuple2([IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((((pool + "_") + user) + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), 0), Reissue(SWOP, (toTreasure + availableFund), true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP), ScriptTransfer(i.caller, availableFund, SWOP)], availableFund) | |
609 | 615 | }) | |
610 | 616 | ||
611 | 617 | ||
612 | 618 | ||
613 | 619 | @Callable(i) | |
614 | 620 | func claimAndStake (pool) = valueOrElse(isActive(), { | |
615 | 621 | let claimAmount = { | |
616 | 622 | let @ = invoke(this, "claim", [pool], nil) | |
617 | 623 | if ($isInstanceOf(@, "Int")) | |
618 | 624 | then @ | |
619 | 625 | else throw(($getType(@) + " couldn't be cast to Int")) | |
620 | 626 | } | |
621 | 627 | if ((claimAmount == claimAmount)) | |
622 | 628 | then { | |
623 | 629 | let stakeToGov = invoke(govAddress, "lockSWOPFromFarming", nil, [AttachedPayment(SWOP, claimAmount)]) | |
624 | 630 | if ((stakeToGov == stakeToGov)) | |
625 | 631 | then nil | |
626 | 632 | else throw("Strict value is not equal to itself.") | |
627 | 633 | } | |
628 | 634 | else throw("Strict value is not equal to itself.") | |
629 | 635 | }) | |
630 | 636 | ||
631 | 637 | ||
632 | 638 | ||
633 | 639 | @Callable(i) | |
634 | 640 | func claimAll (pools) = valueOrElse(isActive(), { | |
635 | 641 | func claimInv (claimTotal,pool) = { | |
636 | 642 | let claimAmount = { | |
637 | 643 | let @ = invoke(this, "claim", [pool], nil) | |
638 | 644 | if ($isInstanceOf(@, "Int")) | |
639 | 645 | then @ | |
640 | 646 | else throw(($getType(@) + " couldn't be cast to Int")) | |
641 | 647 | } | |
642 | 648 | if ((claimAmount == claimAmount)) | |
643 | 649 | then (claimTotal + claimAmount) | |
644 | 650 | else throw("Strict value is not equal to itself.") | |
645 | 651 | } | |
646 | 652 | ||
647 | 653 | let claimTotal = { | |
648 | 654 | let $l = pools | |
649 | 655 | let $s = size($l) | |
650 | 656 | let $acc0 = 0 | |
651 | 657 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
652 | 658 | then $a | |
653 | 659 | else claimInv($a, $l[$i]) | |
654 | 660 | ||
655 | 661 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
656 | 662 | then $a | |
657 | 663 | else throw("List size exceeds 60") | |
658 | 664 | ||
659 | 665 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60) | |
660 | 666 | } | |
661 | 667 | if ((claimTotal == 0)) | |
662 | 668 | then throw("You have 0 available SWOP") | |
663 | 669 | else [ScriptTransfer(i.caller, claimTotal, SWOP)] | |
664 | 670 | }) | |
665 | 671 | ||
666 | 672 | ||
667 | 673 | ||
668 | 674 | @Callable(i) | |
669 | 675 | func claimAllAndStake (pools) = valueOrElse(isActive(), { | |
670 | 676 | func claimInv (claimTotal,pool) = { | |
671 | 677 | let claimAmount = { | |
672 | 678 | let @ = invoke(this, "claim", [pool], nil) | |
673 | 679 | if ($isInstanceOf(@, "Int")) | |
674 | 680 | then @ | |
675 | 681 | else throw(($getType(@) + " couldn't be cast to Int")) | |
676 | 682 | } | |
677 | 683 | if ((claimAmount == claimAmount)) | |
678 | 684 | then (claimTotal + claimAmount) | |
679 | 685 | else throw("Strict value is not equal to itself.") | |
680 | 686 | } | |
681 | 687 | ||
682 | 688 | let claimTotal = { | |
683 | 689 | let $l = pools | |
684 | 690 | let $s = size($l) | |
685 | 691 | let $acc0 = 0 | |
686 | 692 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
687 | 693 | then $a | |
688 | 694 | else claimInv($a, $l[$i]) | |
689 | 695 | ||
690 | 696 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
691 | 697 | then $a | |
692 | 698 | else throw("List size exceeds 60") | |
693 | 699 | ||
694 | 700 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60) | |
695 | 701 | } | |
696 | 702 | if ((claimTotal == 0)) | |
697 | 703 | then throw("You have 0 available SWOP") | |
698 | 704 | else { | |
699 | 705 | let stakeToGov = invoke(govAddress, "lockSWOPFromFarming", nil, [AttachedPayment(SWOP, claimTotal)]) | |
700 | 706 | if ((stakeToGov == stakeToGov)) | |
701 | 707 | then nil | |
702 | 708 | else throw("Strict value is not equal to itself.") | |
703 | 709 | } | |
704 | 710 | }) | |
705 | 711 | ||
706 | 712 | ||
707 | 713 | ||
708 | 714 | @Callable(i) | |
709 | 715 | func updateUserBoostInterest (pool,user) = valueOrElse(isActive(), if ((i.caller != votingAddress)) | |
710 | 716 | then throw("Only voiting can call this function") | |
711 | 717 | else { | |
712 | - | let $ | |
713 | - | let farmInterest = $ | |
714 | - | let boostInterest = $ | |
715 | - | let boostLPinterest = $ | |
716 | - | let claimAmount = $ | |
717 | - | let toTreasure = $ | |
718 | + | let $t03413134230 = claimCalc(pool, user) | |
719 | + | let farmInterest = $t03413134230._1 | |
720 | + | let boostInterest = $t03413134230._2 | |
721 | + | let boostLPinterest = $t03413134230._3 | |
722 | + | let claimAmount = $t03413134230._4 | |
723 | + | let toTreasure = $t03413134230._5 | |
718 | 724 | let availableFundsNew = (userAvailableSWOP(pool, i.originCaller) + claimAmount) | |
719 | - | [IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((((pool + "_") + user) + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, toTreasure, true), ScriptTransfer( | |
725 | + | [IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((((pool + "_") + user) + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kBoostLPLastInterest), boostLPinterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, toTreasure, true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP)] | |
720 | 726 | }) | |
721 | 727 | ||
722 | 728 | ||
723 | 729 | ||
724 | 730 | @Callable(i) | |
725 | 731 | func shutdown () = valueOrElse(isAdminCall(i), if (!(active)) | |
726 | 732 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified"))) | |
727 | 733 | else suspend("Paused by admin")) | |
728 | 734 | ||
729 | 735 | ||
730 | 736 | ||
731 | 737 | @Callable(i) | |
732 | 738 | func activate () = valueOrElse(isAdminCall(i), if (active) | |
733 | 739 | then throw("DApp is already active") | |
734 | 740 | else [BooleanEntry(kActive, true), DeleteEntry(kCause)]) | |
735 | 741 | ||
736 | 742 | ||
737 | 743 | @Verifier(tx) | |
738 | 744 | func verify () = match tx { | |
739 | 745 | case _ => | |
740 | 746 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
741 | 747 | then 1 | |
742 | 748 | else 0 | |
743 | 749 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
744 | 750 | then 1 | |
745 | 751 | else 0 | |
746 | 752 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
747 | 753 | then 1 | |
748 | 754 | else 0 | |
749 | 755 | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
750 | 756 | } | |
751 | 757 |
github/deemru/w8io/169f3d6 151.20 ms ◑