tx · 5uVntR9kpZ69bPn5GWmWVsVgFkoycLi1R5wH4UdgpUvv 3MsXpzisJAwnzUr7XrEoW1BZo4U6rw4tsYK: -0.04100000 Waves 2023.04.12 14:24 [2531273] smart account 3MsXpzisJAwnzUr7XrEoW1BZo4U6rw4tsYK > SELF 0.00000000 Waves
{ "type": 13, "id": "5uVntR9kpZ69bPn5GWmWVsVgFkoycLi1R5wH4UdgpUvv", "fee": 4100000, "feeAssetId": null, "timestamp": 1681298602170, "version": 2, "chainId": 84, "sender": "3MsXpzisJAwnzUr7XrEoW1BZo4U6rw4tsYK", "senderPublicKey": "FFdBua5rzzMkZebvsvmN7sAdU7XhFK8QNJ3hiwwxAYRA", "proofs": [ "2i6u1fc9YzvSGFG7NrvRmTiWsR9ibDAsjPe2T84VWzNEP5msA9Du5mfuGMAbbzNusN3Ftm7JmcmcDyP41j2BUTNc", "62QgVJvetfCHFSHmyxqfmmRJiLhKf74TMEKMbCptRhTkLRVh5eGa7vvHkm9bwTzkf3ef1TycV3k2SQ8WnMDP8jtX" ], "script": "base64:BgJiCAISAwoBCBIDCgEIEgMKAQgSBAoCCAESBQoDAggBEgUKAwgBARIECgIICBIECgIICBIECgIIARIFCgMCCAESAwoBCBIECgIIAhIDCgEIEgMKARgSAwoBGBIECgIICBIAEgBlAAdrQWN0aXZlAgZhY3RpdmUAC2tBY3RpdmVHbG9iAhRhY3RpdmVfYWxsX2NvbnRyYWN0cwAPa0RlcHJlY2F0ZWRQb29sAgtkZXByZWNhdGVkXwAGa0NhdXNlAg5zaHV0ZG93bl9jYXVzZQAaa1Jld2FyZFBvb2xGcmFjdGlvbkN1cnJlbnQCHV9jdXJyZW50X3Bvb2xfZnJhY3Rpb25fcmV3YXJkABtrUmV3YXJkUG9vbEZyYWN0aW9uUHJldmlvdXMCHl9wcmV2aW91c19wb29sX2ZyYWN0aW9uX3Jld2FyZAATa0hlaWdodFBvb2xGcmFjdGlvbgIaX3Bvb2xfcmV3YXJkX3VwZGF0ZV9oZW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blB1YktleTFTaWduZWQDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQxhZG1pblB1YktleTEAAQAABBJhZG1pblB1YktleTJTaWduZWQDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwABBQxhZG1pblB1YktleTIAAQAABBJhZG1pblB1YktleTNTaWduZWQDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwACBQxhZG1pblB1YktleTMAAQAACQBnAgkAZAIJAGQCBRJhZG1pblB1YktleTFTaWduZWQFEmFkbWluUHViS2V5MlNpZ25lZAUSYWRtaW5QdWJLZXkzU2lnbmVkAAKK8C4H", "height": 2531273, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HRDFC4ah94Ar9JCX9iHWRotevaExRvf4mS7aoPaWMraD Next: CJiJrXDdFYXgKdqoRYvnyCtSfbmXB6dBxURCHn1RUuFF Diff:
Old | New | Differences | |
---|---|---|---|
68 | 68 | let kShareLimitFH = "share_limit_on_first_harvest" | |
69 | 69 | ||
70 | 70 | let kStratBFarmInterest = "_strat_b_farm_interest" | |
71 | + | ||
72 | + | let kPoolInOracle = "pool_" | |
71 | 73 | ||
72 | 74 | let kCpmmContract = "cpmm_contract" | |
73 | 75 | ||
150 | 152 | func getRewardsPerBlockInfo () = { | |
151 | 153 | let emissionPeriods = ((height - startEmissionH) / blocksPerYear) | |
152 | 154 | func calcEmission (acc,i) = { | |
153 | - | let $ | |
154 | - | let curEmission = $ | |
155 | - | let prevEmission = $ | |
155 | + | let $t049564993 = acc | |
156 | + | let curEmission = $t049564993._1 | |
157 | + | let prevEmission = $t049564993._2 | |
156 | 158 | if ((emissionPeriods > i)) | |
157 | 159 | then $Tuple2(fraction(curEmission, 75, 100), curEmission) | |
158 | 160 | else $Tuple2(curEmission, prevEmission) | |
159 | 161 | } | |
160 | 162 | ||
161 | - | let $ | |
163 | + | let $t051515317 = { | |
162 | 164 | let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] | |
163 | 165 | let $s = size($l) | |
164 | 166 | let $acc0 = $Tuple2(swopYearEmission, swopYearEmission) | |
172 | 174 | ||
173 | 175 | $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
174 | 176 | } | |
175 | - | let curEmission = $ | |
176 | - | let prevEmission = $ | |
177 | + | let curEmission = $t051515317._1 | |
178 | + | let prevEmission = $t051515317._2 | |
177 | 179 | $Tuple3((curEmission / blocksPerYear), (prevEmission / blocksPerYear), (startEmissionH + (blocksPerYear * emissionPeriods))) | |
178 | 180 | } | |
179 | 181 | ||
218 | 220 | ||
219 | 221 | ||
220 | 222 | func rewardInfo (pool) = { | |
221 | - | let $ | |
222 | - | let totalRewardPerBlockCurrent = $ | |
223 | - | let totalRewardPerBlockPrevious = $ | |
224 | - | let lastEmissionUpdateHeight = $ | |
223 | + | let $t071327247 = getRewardsPerBlockInfo() | |
224 | + | let totalRewardPerBlockCurrent = $t071327247._1 | |
225 | + | let totalRewardPerBlockPrevious = $t071327247._2 | |
226 | + | let lastEmissionUpdateHeight = $t071327247._3 | |
225 | 227 | let rewardPoolFractionCurrent = valueOrErrorMessage(getInteger(govAddress, (pool + kRewardPoolFractionCurrent)), (((("No data on the key: " + pool) + kRewardPoolFractionCurrent) + " at address ") + toString(govAddress))) | |
226 | 228 | let rewardUpdateHeight = valueOrErrorMessage(getInteger(govAddress, kRewardUpdateHeight), ((("No data on the key: " + kRewardUpdateHeight) + " at address ") + toString(govAddress))) | |
227 | 229 | let poolRewardUpdateHeight = valueOrElse(getInteger(govAddress, (pool + kHeightPoolFraction)), rewardUpdateHeight) | |
259 | 261 | ||
260 | 262 | ||
261 | 263 | func calcInterest (pool,lastInterestHeight,rewardUpdateHeight,poolRewardUpdateHeight,farmInterest,boostInterest,poolVoted,currentRewardPerBlock,shareTokenLocked,previousRewardPerBlock,scaleValue,toHeight) = { | |
262 | - | let $ | |
264 | + | let $t01026111446 = if (if (if ((rewardUpdateHeight > toHeight)) | |
263 | 265 | then (rewardUpdateHeight == poolRewardUpdateHeight) | |
264 | 266 | else false) | |
265 | 267 | then true | |
288 | 290 | let rwd = (currentRewardPerBlock * (toHeight - rewardUpdateHeight)) | |
289 | 291 | $Tuple3(rwd, fBfrUp, bBfrUp) | |
290 | 292 | } | |
291 | - | let reward = $ | |
292 | - | let farmIntrBefore = $ | |
293 | - | let boostIntrBefore = $ | |
293 | + | let reward = $t01026111446._1 | |
294 | + | let farmIntrBefore = $t01026111446._2 | |
295 | + | let boostIntrBefore = $t01026111446._3 | |
294 | 296 | let newFarmInterest = (farmIntrBefore + fraction(calcFarmRwd(pool, reward), scaleValue, shareTokenLocked)) | |
295 | 297 | let newBoostInterest = (boostIntrBefore + (if ((poolVoted > 0)) | |
296 | 298 | then fraction(calcBoostRwd(pool, reward), scaleValue8, poolVoted) | |
306 | 308 | let shareToken = getTotalShareToken(pool) | |
307 | 309 | let totalShareVirtual = valueOrElse(getInteger(this, (pool + kShareTokensVirtual)), shareToken) | |
308 | 310 | let stratBFarmInterest = valueOrElse(getInteger(this, (pool + kStratBFarmInterest)), 0) | |
309 | - | let $ | |
310 | - | let lastInterestHeight = $ | |
311 | - | let farmInterest = $ | |
312 | - | let boostInterest = $ | |
313 | - | let $ | |
314 | - | let currentRewardPerBlock = $ | |
315 | - | let rewardUpdateHeight = $ | |
316 | - | let previousRewardPerBlock = $ | |
317 | - | let poolRewardUpdateHeight = $ | |
318 | - | let emissionUpdateHeight = $ | |
319 | - | let prevCurrentRewardPerBlock = $ | |
320 | - | let prevPreviousRewardPerBlock = $ | |
311 | + | let $t01228412365 = getLastInterestInfo(pool) | |
312 | + | let lastInterestHeight = $t01228412365._1 | |
313 | + | let farmInterest = $t01228412365._2 | |
314 | + | let boostInterest = $t01228412365._3 | |
315 | + | let $t01237012627 = rewardInfo(pool) | |
316 | + | let currentRewardPerBlock = $t01237012627._1 | |
317 | + | let rewardUpdateHeight = $t01237012627._2 | |
318 | + | let previousRewardPerBlock = $t01237012627._3 | |
319 | + | let poolRewardUpdateHeight = $t01237012627._4 | |
320 | + | let emissionUpdateHeight = $t01237012627._5 | |
321 | + | let prevCurrentRewardPerBlock = $t01237012627._6 | |
322 | + | let prevPreviousRewardPerBlock = $t01237012627._7 | |
321 | 323 | let uFarmInterest = valueOrElse(getInteger(this, (((pool + "_") + user) + kFarmUserLastInterest)), farmInterest) | |
322 | 324 | let uBoostInterest = valueOrElse(getInteger(this, (((pool + "_") + user) + kBoostUserLastInterest)), if (if ((stratBFarmInterest > uFarmInterest)) | |
323 | 325 | then (uPoolVoted > 0) | |
335 | 337 | $Tuple5(farmInterest, boostInterest, 0, (toTreasury - teamReward), teamReward) | |
336 | 338 | } | |
337 | 339 | else { | |
338 | - | let $ | |
340 | + | let $t01367014807 = if ((emissionUpdateHeight > lastInterestHeight)) | |
339 | 341 | then { | |
340 | - | let $ | |
341 | - | let prevNewFarmInterest = $ | |
342 | - | let prevNewBoostInterest = $ | |
342 | + | let $t01408314642 = calcInterest(pool, lastInterestHeight, rewardUpdateHeight, poolRewardUpdateHeight, farmInterest, boostInterest, poolVoted, prevCurrentRewardPerBlock, totalShareVirtual, prevPreviousRewardPerBlock, scaleValue, emissionUpdateHeight) | |
343 | + | let prevNewFarmInterest = $t01408314642._1 | |
344 | + | let prevNewBoostInterest = $t01408314642._2 | |
343 | 345 | $Tuple3(prevNewFarmInterest, prevNewBoostInterest, emissionUpdateHeight) | |
344 | 346 | } | |
345 | 347 | else $Tuple3(farmInterest, boostInterest, lastInterestHeight) | |
346 | - | let prevFarmInterest = $ | |
347 | - | let prevBoostInterest = $ | |
348 | - | let LIHeight = $ | |
349 | - | let $ | |
350 | - | let newFarmInterest = $ | |
351 | - | let newBoostInterest = $ | |
348 | + | let prevFarmInterest = $t01367014807._1 | |
349 | + | let prevBoostInterest = $t01367014807._2 | |
350 | + | let LIHeight = $t01367014807._3 | |
351 | + | let $t01481615239 = calcInterest(pool, LIHeight, rewardUpdateHeight, poolRewardUpdateHeight, prevFarmInterest, prevBoostInterest, poolVoted, currentRewardPerBlock, totalShareVirtual, previousRewardPerBlock, scaleValue, height) | |
352 | + | let newFarmInterest = $t01481615239._1 | |
353 | + | let newBoostInterest = $t01481615239._2 | |
352 | 354 | let farmRwd = fraction(uShareTokensVirt, (newFarmInterest - uFarmInterest), scaleValue) | |
353 | 355 | let poolBoostCoef = valueOrElse(getInteger(this, (pool + kPoolBoostCoef)), defPoolBoostCoef) | |
354 | 356 | let boostRwdMax = fraction(fraction(uShareTokensVirt, (newFarmInterest - max([uFarmInterest, stratBFarmInterest])), scaleValue), poolBoostCoef, lockBoostCoefScale) | |
365 | 367 | ||
366 | 368 | func availableClaimCalcAllByUser (pools,user) = { | |
367 | 369 | func calcAvailable (acc,pool) = { | |
368 | - | let $ | |
369 | - | let newPools = $ | |
370 | - | let amounts = $ | |
371 | - | let $ | |
372 | - | let fi = $ | |
373 | - | let bi = $ | |
374 | - | let claimAmount = $ | |
375 | - | let tt = $ | |
370 | + | let $t01619316222 = acc | |
371 | + | let newPools = $t01619316222._1 | |
372 | + | let amounts = $t01619316222._2 | |
373 | + | let $t01623116284 = claimCalc(pool, user) | |
374 | + | let fi = $t01623116284._1 | |
375 | + | let bi = $t01623116284._2 | |
376 | + | let claimAmount = $t01623116284._3 | |
377 | + | let tt = $t01623116284._4 | |
376 | 378 | let availableFund = (userAvailableSWOP(pool, user) + claimAmount) | |
377 | 379 | $Tuple2((newPools :+ pool), (amounts :+ availableFund)) | |
378 | 380 | } | |
460 | 462 | let userLockedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLocked)), 0) | |
461 | 463 | let userAmountVirtual = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), userStakedAmount) | |
462 | 464 | let totalUserShareTokens = ((userStakedAmount + userLockedAmount) + i.payments[0].amount) | |
463 | - | let $ | |
464 | - | let lockPeriod = $ | |
465 | - | let lockCoef = $ | |
465 | + | let $t01940819460 = getLockParams(lockType) | |
466 | + | let lockPeriod = $t01940819460._1 | |
467 | + | let lockCoef = $t01940819460._2 | |
466 | 468 | let lockWavesFee = getIntegerValue(this, kLockWavesFee) | |
467 | 469 | if ((i.payments[0].assetId != shareAssetId)) | |
468 | 470 | then throw("Wrong sharetoken in payment") | |
474 | 476 | let shareTokensChangeOnFH = canLockInFirstHarvest(pool, user, userStakedAmount, i.payments[0].amount, lockType) | |
475 | 477 | if ((shareTokensChangeOnFH == shareTokensChangeOnFH)) | |
476 | 478 | then { | |
477 | - | let $ | |
479 | + | let $t01988721821 = if ((lockType == 0)) | |
478 | 480 | then { | |
479 | 481 | let userAmountVirtualNew = ((userAmountVirtual + i.payments[0].amount) - shareTokensChangeOnFH) | |
480 | 482 | $Tuple2([IntegerEntry((((pool + "_") + user) + kUserShareTokensStaked), ((userStakedAmount + i.payments[0].amount) - shareTokensChangeOnFH)), IntegerEntry((((pool + "_") + user) + kUserShareTokensVirtual), userAmountVirtualNew), IntegerEntry((pool + kShareTokensVirtual), ((totalShareVirtual + i.payments[0].amount) - shareTokensChangeOnFH)), ScriptTransfer(caller, shareTokensChangeOnFH, i.payments[0].assetId)], ((totalShare + i.payments[0].amount) - shareTokensChangeOnFH)) | |
495 | 497 | let userAmountVirtualNew = (fraction(userLockedAmountNew, lockCoef, lockBoostCoefScale) + userStakedAmount) | |
496 | 498 | $Tuple2([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))], (totalShare + i.payments[0].amount)) | |
497 | 499 | } | |
498 | - | let lockEntries = $ | |
499 | - | let totalShareNew = $ | |
500 | + | let lockEntries = $t01988721821._1 | |
501 | + | let totalShareNew = $t01988721821._2 | |
500 | 502 | if ((totalShareNew > accountBalance(shareAssetId))) | |
501 | 503 | then throw("Balance of share-token is lower than totalAmount") | |
502 | 504 | else { | |
503 | - | let $ | |
504 | - | let farmInterest = $ | |
505 | - | let boostInterest = $ | |
506 | - | let claimAmount = $ | |
507 | - | let toTreasure = $ | |
508 | - | let teamReward = $ | |
505 | + | let $t02194622040 = claimCalc(pool, user) | |
506 | + | let farmInterest = $t02194622040._1 | |
507 | + | let boostInterest = $t02194622040._2 | |
508 | + | let claimAmount = $t02194622040._3 | |
509 | + | let toTreasure = $t02194622040._4 | |
510 | + | let teamReward = $t02194622040._5 | |
509 | 511 | let availableFundsNew = (userAvailableSWOP(pool, user) + claimAmount) | |
510 | 512 | let uplp = if ((getString(Address(fromBase58String(pool)), "version") == "3.0.0")) | |
511 | 513 | then invoke(lpFarmingAddress, "updateUserInterest", [user, pool, totalUserShareTokens], nil) | |
528 | 530 | then { | |
529 | 531 | let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
530 | 532 | let user = toString(caller) | |
531 | - | let $ | |
532 | - | let farmInterest = $ | |
533 | - | let boostInterest = $ | |
534 | - | let claimAmount = $ | |
535 | - | let toTreasure = $ | |
536 | - | let teamReward = $ | |
533 | + | let $t02340823502 = claimCalc(pool, user) | |
534 | + | let farmInterest = $t02340823502._1 | |
535 | + | let boostInterest = $t02340823502._2 | |
536 | + | let claimAmount = $t02340823502._3 | |
537 | + | let toTreasure = $t02340823502._4 | |
538 | + | let teamReward = $t02340823502._5 | |
537 | 539 | let userStakedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensStaked)), 0) | |
538 | 540 | let userLockedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLocked)), 0) | |
539 | 541 | let userAmountVirtual = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), userStakedAmount) | |
565 | 567 | let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
566 | 568 | let user = toString(caller) | |
567 | 569 | let shareTokenLocked = getTotalShareToken(pool) | |
568 | - | let $ | |
569 | - | let farmInterest = $ | |
570 | - | let boostInterest = $ | |
571 | - | let claimAmount = $ | |
572 | - | let toTreasure = $ | |
573 | - | let teamReward = $ | |
570 | + | let $t02608526179 = claimCalc(pool, user) | |
571 | + | let farmInterest = $t02608526179._1 | |
572 | + | let boostInterest = $t02608526179._2 | |
573 | + | let claimAmount = $t02608526179._3 | |
574 | + | let toTreasure = $t02608526179._4 | |
575 | + | let teamReward = $t02608526179._5 | |
574 | 576 | let availableFund = (userAvailableSWOP(pool, user) + claimAmount) | |
575 | 577 | if ((accountBalance(shareTokensId) > shareTokenLocked)) | |
576 | 578 | then throw("Balance of share-token is lower than totalAmount") | |
589 | 591 | let userLockedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLocked)), 0) | |
590 | 592 | let userAmountVirtual = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), userStakedAmount) | |
591 | 593 | let userStakedAmountNew = (userStakedAmount + userLockedAmount) | |
592 | - | let $ | |
593 | - | let farmInterest = $ | |
594 | - | let boostInterest = $ | |
595 | - | let claimAmount = $ | |
596 | - | let toTreasure = $ | |
597 | - | let teamReward = $ | |
594 | + | let $t02765327747 = claimCalc(pool, user) | |
595 | + | let farmInterest = $t02765327747._1 | |
596 | + | let boostInterest = $t02765327747._2 | |
597 | + | let claimAmount = $t02765327747._3 | |
598 | + | let toTreasure = $t02765327747._4 | |
599 | + | let teamReward = $t02765327747._5 | |
598 | 600 | let availableFundsNew = (userAvailableSWOP(pool, user) + claimAmount) | |
599 | 601 | [IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kUserShareTokensStaked), userStakedAmountNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensVirtual), userStakedAmountNew), IntegerEntry((pool + kShareTokensVirtual), ((totalShareVirtual - userAmountVirtual) + userStakedAmountNew)), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), DeleteEntry((((pool + "_") + user) + kUserShareTokensLocked)), DeleteEntry((((pool + "_") + user) + kUserShareTokensLockedHeight)), DeleteEntry((((pool + "_") + user) + kUserShareTokensLockedType)), Reissue(SWOP, (toTreasure + teamReward), true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP), ScriptTransfer(teamBoxAddress, teamReward, SWOP)] | |
600 | 602 | } | |
613 | 615 | ||
614 | 616 | ||
615 | 617 | @Callable(i) | |
616 | - | func initPoolShareFarming (pool) = valueOrElse(isAdminCall(i), [IntegerEntry((pool + kShareTotalShareTokens), 0), IntegerEntry((pool + kFarmLastInterest), 0), IntegerEntry((pool + kBoostLastInterest), 0), IntegerEntry((pool + kLastInterestHeight), height)]) | |
618 | + | func initPoolShareFarming (pool) = valueOrElse(isAdminCall(i), if (!(isDefined(getString(oracle, (kPoolInOracle + pool))))) | |
619 | + | then throw("Pool is not in oracle") | |
620 | + | else if (isDefined(getInteger(this, (pool + kShareTotalShareTokens)))) | |
621 | + | then throw("Pool already inited") | |
622 | + | else [IntegerEntry((pool + kShareTotalShareTokens), 0), IntegerEntry((pool + kFarmLastInterest), 0), IntegerEntry((pool + kBoostLastInterest), 0), IntegerEntry((pool + kLastInterestHeight), height)]) | |
617 | 623 | ||
618 | 624 | ||
619 | 625 | ||
622 | 628 | then throw("Only Governance can call this function") | |
623 | 629 | else { | |
624 | 630 | let user = toString(addressFromPublicKey(adminInvokePubKey)) | |
625 | - | let $ | |
626 | - | let farmInterest = $ | |
627 | - | let boostInterest = $ | |
628 | - | let boostLPinterest = $ | |
631 | + | let $t03019730271 = claimCalc(pool, user) | |
632 | + | let farmInterest = $t03019730271._1 | |
633 | + | let boostInterest = $t03019730271._2 | |
634 | + | let boostLPinterest = $t03019730271._3 | |
629 | 635 | [IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height)] | |
630 | 636 | }) | |
631 | 637 | ||
652 | 658 | let userLockedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLocked)), 0) | |
653 | 659 | let userAmountVirtual = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), userStakedAmount) | |
654 | 660 | let totalUserShareTokens = (userStakedAmount + userLockedAmount) | |
655 | - | let $ | |
656 | - | let lockPeriod = $ | |
657 | - | let lockCoef = $ | |
661 | + | let $t03190031952 = getLockParams(lockType) | |
662 | + | let lockPeriod = $t03190031952._1 | |
663 | + | let lockCoef = $t03190031952._2 | |
658 | 664 | let lockWavesFee = getIntegerValue(this, kLockWavesFee) | |
659 | 665 | if ((getHeightFirstHarvest(pool) > height)) | |
660 | 666 | then throw("You can't lock shareTokens till first harvest end.") | |
685 | 691 | let userStakedAmountNew = (userStakedAmount - lockAmount) | |
686 | 692 | let userLockedHeigtNew = (height + lockPeriod) | |
687 | 693 | let userAmountVirtualNew = (fraction(userLockedAmountNew, lockCoef, lockBoostCoefScale) + userStakedAmountNew) | |
688 | - | let $ | |
689 | - | let farmInterest = $ | |
690 | - | let boostInterest = $ | |
691 | - | let claimAmount = $ | |
692 | - | let toTreasure = $ | |
693 | - | let teamReward = $ | |
694 | + | let $t03329833392 = claimCalc(pool, user) | |
695 | + | let farmInterest = $t03329833392._1 | |
696 | + | let boostInterest = $t03329833392._2 | |
697 | + | let claimAmount = $t03329833392._3 | |
698 | + | let toTreasure = $t03329833392._4 | |
699 | + | let teamReward = $t03329833392._5 | |
694 | 700 | let availableFundsNew = (userAvailableSWOP(pool, user) + claimAmount) | |
695 | 701 | [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)), IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, (toTreasure + teamReward), true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP), ScriptTransfer(teamBoxAddress, teamReward, SWOP)] | |
696 | 702 | } | |
843 | 849 | func updateUserBoostInterest (pool,user) = valueOrElse(isActive(), if ((i.caller != votingAddress)) | |
844 | 850 | then throw("Only voiting can call this function") | |
845 | 851 | else { | |
846 | - | let $ | |
847 | - | let farmInterest = $ | |
848 | - | let boostInterest = $ | |
849 | - | let claimAmount = $ | |
850 | - | let toTreasure = $ | |
851 | - | let teamReward = $ | |
852 | + | let $t03821638310 = claimCalc(pool, user) | |
853 | + | let farmInterest = $t03821638310._1 | |
854 | + | let boostInterest = $t03821638310._2 | |
855 | + | let claimAmount = $t03821638310._3 | |
856 | + | let toTreasure = $t03821638310._4 | |
857 | + | let teamReward = $t03821638310._5 | |
852 | 858 | let availableFundsNew = (userAvailableSWOP(pool, user) + claimAmount) | |
853 | 859 | [IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, (toTreasure + teamReward), true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP), ScriptTransfer(teamBoxAddress, teamReward, SWOP)] | |
854 | 860 | }) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let kActive = "active" | |
5 | 5 | ||
6 | 6 | let kActiveGlob = "active_all_contracts" | |
7 | 7 | ||
8 | 8 | let kDeprecatedPool = "deprecated_" | |
9 | 9 | ||
10 | 10 | let kCause = "shutdown_cause" | |
11 | 11 | ||
12 | 12 | let kRewardPoolFractionCurrent = "_current_pool_fraction_reward" | |
13 | 13 | ||
14 | 14 | let kRewardPoolFractionPrevious = "_previous_pool_fraction_reward" | |
15 | 15 | ||
16 | 16 | let kHeightPoolFraction = "_pool_reward_update_height" | |
17 | 17 | ||
18 | 18 | let kRewardUpdateHeight = "reward_update_height" | |
19 | 19 | ||
20 | 20 | let kUserShareTokensStaked = "_share_tokens_locked" | |
21 | 21 | ||
22 | 22 | let kUserShareTokensLocked = "_share_tokens_blocked" | |
23 | 23 | ||
24 | 24 | let kUserShareTokensLockedType = "_share_tokens_blocked_type" | |
25 | 25 | ||
26 | 26 | let kUserShareTokensLockedHeight = "_share_tokens_blocked_height" | |
27 | 27 | ||
28 | 28 | let kUserShareTokensVirtual = "_share_tokens_virtual" | |
29 | 29 | ||
30 | 30 | let kShareTotalShareTokens = "_total_share_tokens_locked" | |
31 | 31 | ||
32 | 32 | let kShareTokensVirtual = "_total_share_tokens_virtual" | |
33 | 33 | ||
34 | 34 | let kLockParams = "_lock_params" | |
35 | 35 | ||
36 | 36 | let kLockWavesFee = "lock_waves_fee" | |
37 | 37 | ||
38 | 38 | let kPoolBoostCoef = "_boost_coef" | |
39 | 39 | ||
40 | 40 | let kFarmLastInterest = "_last_interest" | |
41 | 41 | ||
42 | 42 | let kFarmUserLastInterest = "_last_interest" | |
43 | 43 | ||
44 | 44 | let kBoostLastInterest = "_last_interest_b" | |
45 | 45 | ||
46 | 46 | let kBoostUserLastInterest = "_last_interest_u_b" | |
47 | 47 | ||
48 | 48 | let kLastInterestHeight = "_last_interest_height" | |
49 | 49 | ||
50 | 50 | let kSWOPid = "SWOP_id" | |
51 | 51 | ||
52 | 52 | let kAvailableSWOP = "_available_SWOP" | |
53 | 53 | ||
54 | 54 | let kHarvestPoolVote = "_harvest_pool_vote_gSWOP" | |
55 | 55 | ||
56 | 56 | let kPoolVote = "_pool_vote_gSWOP" | |
57 | 57 | ||
58 | 58 | let kUserPoolVote = "_user_vote_gSWOP" | |
59 | 59 | ||
60 | 60 | let kPoolStruc = "_pool_struc" | |
61 | 61 | ||
62 | 62 | let kUserPoolStruc = "_user_pool_struc" | |
63 | 63 | ||
64 | 64 | let kHarvestUserPoolVote = "_harvest_user_pool_vote_gSWOP" | |
65 | 65 | ||
66 | 66 | let kFirstHarvestHeight = "first_harvest_height" | |
67 | 67 | ||
68 | 68 | let kShareLimitFH = "share_limit_on_first_harvest" | |
69 | 69 | ||
70 | 70 | let kStratBFarmInterest = "_strat_b_farm_interest" | |
71 | + | ||
72 | + | let kPoolInOracle = "pool_" | |
71 | 73 | ||
72 | 74 | let kCpmmContract = "cpmm_contract" | |
73 | 75 | ||
74 | 76 | let kAdminPubKey1 = "admin_pub_1" | |
75 | 77 | ||
76 | 78 | let kAdminPubKey2 = "admin_pub_2" | |
77 | 79 | ||
78 | 80 | let kAdminPubKey3 = "admin_pub_3" | |
79 | 81 | ||
80 | 82 | let kAdminInvokePubKey = "admin_invoke_pub" | |
81 | 83 | ||
82 | 84 | let kMoneyBoxAddress = "money_box_address" | |
83 | 85 | ||
84 | 86 | let kTeamBoxAddress = "team_box_address" | |
85 | 87 | ||
86 | 88 | let kVotingAddress = "voting_address" | |
87 | 89 | ||
88 | 90 | let kGovAddress = "governance_address" | |
89 | 91 | ||
90 | 92 | let kLPFarmingAddress = "lp_farming" | |
91 | 93 | ||
92 | 94 | let kFarmingTreasureAddr = "farming_treasure" | |
93 | 95 | ||
94 | 96 | let oracle = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz') | |
95 | 97 | ||
96 | 98 | let totalVoteShare = 10000000000 | |
97 | 99 | ||
98 | 100 | let scaleValue8 = 100000000 | |
99 | 101 | ||
100 | 102 | let scaleValue6 = 1000000 | |
101 | 103 | ||
102 | 104 | let lockBoostCoefScale = 1000 | |
103 | 105 | ||
104 | 106 | let defPoolBoostCoef = 500 | |
105 | 107 | ||
106 | 108 | let startEmissionH = 2976848 | |
107 | 109 | ||
108 | 110 | let swopYearEmission = 100000000000000 | |
109 | 111 | ||
110 | 112 | let blocksPerYear = 526330 | |
111 | 113 | ||
112 | 114 | let teamFee = 25 | |
113 | 115 | ||
114 | 116 | func getBase58FromOracle (key) = match getString(oracle, key) { | |
115 | 117 | case string: String => | |
116 | 118 | fromBase58String(string) | |
117 | 119 | case nothing => | |
118 | 120 | throw((key + "is empty")) | |
119 | 121 | } | |
120 | 122 | ||
121 | 123 | ||
122 | 124 | let adminPubKey1 = getBase58FromOracle(kAdminPubKey1) | |
123 | 125 | ||
124 | 126 | let adminPubKey2 = getBase58FromOracle(kAdminPubKey2) | |
125 | 127 | ||
126 | 128 | let adminPubKey3 = getBase58FromOracle(kAdminPubKey3) | |
127 | 129 | ||
128 | 130 | let moneyBoxAddress = Address(getBase58FromOracle(kMoneyBoxAddress)) | |
129 | 131 | ||
130 | 132 | let teamBoxAddress = Address(getBase58FromOracle(kTeamBoxAddress)) | |
131 | 133 | ||
132 | 134 | let votingAddress = Address(getBase58FromOracle(kVotingAddress)) | |
133 | 135 | ||
134 | 136 | let govAddress = Address(getBase58FromOracle(kGovAddress)) | |
135 | 137 | ||
136 | 138 | let adminInvokePubKey = getBase58FromOracle(kAdminInvokePubKey) | |
137 | 139 | ||
138 | 140 | let lpFarmingAddress = Address(getBase58FromOracle(kLPFarmingAddress)) | |
139 | 141 | ||
140 | 142 | let farmingTreasureAddr = Address(getBase58FromOracle(kFarmingTreasureAddr)) | |
141 | 143 | ||
142 | 144 | let cpmmContract = Address(getBase58FromOracle(kCpmmContract)) | |
143 | 145 | ||
144 | 146 | let active = getBooleanValue(this, kActive) | |
145 | 147 | ||
146 | 148 | let activeGlob = valueOrElse(getBoolean(oracle, kActiveGlob), true) | |
147 | 149 | ||
148 | 150 | let SWOP = fromBase58String(getStringValue(this, kSWOPid)) | |
149 | 151 | ||
150 | 152 | func getRewardsPerBlockInfo () = { | |
151 | 153 | let emissionPeriods = ((height - startEmissionH) / blocksPerYear) | |
152 | 154 | func calcEmission (acc,i) = { | |
153 | - | let $ | |
154 | - | let curEmission = $ | |
155 | - | let prevEmission = $ | |
155 | + | let $t049564993 = acc | |
156 | + | let curEmission = $t049564993._1 | |
157 | + | let prevEmission = $t049564993._2 | |
156 | 158 | if ((emissionPeriods > i)) | |
157 | 159 | then $Tuple2(fraction(curEmission, 75, 100), curEmission) | |
158 | 160 | else $Tuple2(curEmission, prevEmission) | |
159 | 161 | } | |
160 | 162 | ||
161 | - | let $ | |
163 | + | let $t051515317 = { | |
162 | 164 | let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] | |
163 | 165 | let $s = size($l) | |
164 | 166 | let $acc0 = $Tuple2(swopYearEmission, swopYearEmission) | |
165 | 167 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
166 | 168 | then $a | |
167 | 169 | else calcEmission($a, $l[$i]) | |
168 | 170 | ||
169 | 171 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
170 | 172 | then $a | |
171 | 173 | else throw("List size exceeds 20") | |
172 | 174 | ||
173 | 175 | $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
174 | 176 | } | |
175 | - | let curEmission = $ | |
176 | - | let prevEmission = $ | |
177 | + | let curEmission = $t051515317._1 | |
178 | + | let prevEmission = $t051515317._2 | |
177 | 179 | $Tuple3((curEmission / blocksPerYear), (prevEmission / blocksPerYear), (startEmissionH + (blocksPerYear * emissionPeriods))) | |
178 | 180 | } | |
179 | 181 | ||
180 | 182 | ||
181 | 183 | func getHeightFirstHarvest (pool) = valueOrElse(getInteger(Address(fromBase58String(pool)), kFirstHarvestHeight), 0) | |
182 | 184 | ||
183 | 185 | ||
184 | 186 | func getFHShareLimitToken (pool) = valueOrErrorMessage(getInteger(pool, kShareLimitFH), ("No data on the key: " + kShareLimitFH)) | |
185 | 187 | ||
186 | 188 | ||
187 | 189 | func getTotalShareToken (pool) = valueOrErrorMessage(getInteger(this, (pool + kShareTotalShareTokens)), (("No data on the key: " + pool) + kShareTotalShareTokens)) | |
188 | 190 | ||
189 | 191 | ||
190 | 192 | func getPoolVoted (pool) = valueOrElse(getInteger(votingAddress, (pool + kPoolVote)), valueOrElse(parseInt(split(valueOrElse(getString(votingAddress, (pool + kPoolStruc)), ""), "_")[0]), 0)) | |
191 | 193 | ||
192 | 194 | ||
193 | 195 | func getUserPoolVoted (pool,user) = valueOrElse(getInteger(votingAddress, (((user + "_") + pool) + kUserPoolVote)), valueOrElse(parseInt(split(valueOrElse(getString(votingAddress, (((user + "_") + pool) + kUserPoolStruc)), ""), "_")[0]), 0)) | |
194 | 196 | ||
195 | 197 | ||
196 | 198 | func getShareAssetId (pool) = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
197 | 199 | ||
198 | 200 | ||
199 | 201 | func accountBalance (assetId) = match assetId { | |
200 | 202 | case id: ByteVector => | |
201 | 203 | assetBalance(this, id) | |
202 | 204 | case waves: Unit => | |
203 | 205 | wavesBalance(this).available | |
204 | 206 | case _ => | |
205 | 207 | throw("Match error") | |
206 | 208 | } | |
207 | 209 | ||
208 | 210 | ||
209 | 211 | func calcScaleValue (assetId1,assetId2) = { | |
210 | 212 | let assetId1Decimals = value(assetInfo(assetId1)).decimals | |
211 | 213 | let assetId2Decimals = value(assetInfo(assetId2)).decimals | |
212 | 214 | let scaleDigits = ((assetId2Decimals - assetId1Decimals) + 8) | |
213 | 215 | pow(10, 0, scaleDigits, 0, 0, DOWN) | |
214 | 216 | } | |
215 | 217 | ||
216 | 218 | ||
217 | 219 | func userAvailableSWOP (pool,user) = valueOrElse(getInteger(this, (((pool + "_") + user) + kAvailableSWOP)), 0) | |
218 | 220 | ||
219 | 221 | ||
220 | 222 | func rewardInfo (pool) = { | |
221 | - | let $ | |
222 | - | let totalRewardPerBlockCurrent = $ | |
223 | - | let totalRewardPerBlockPrevious = $ | |
224 | - | let lastEmissionUpdateHeight = $ | |
223 | + | let $t071327247 = getRewardsPerBlockInfo() | |
224 | + | let totalRewardPerBlockCurrent = $t071327247._1 | |
225 | + | let totalRewardPerBlockPrevious = $t071327247._2 | |
226 | + | let lastEmissionUpdateHeight = $t071327247._3 | |
225 | 227 | let rewardPoolFractionCurrent = valueOrErrorMessage(getInteger(govAddress, (pool + kRewardPoolFractionCurrent)), (((("No data on the key: " + pool) + kRewardPoolFractionCurrent) + " at address ") + toString(govAddress))) | |
226 | 228 | let rewardUpdateHeight = valueOrErrorMessage(getInteger(govAddress, kRewardUpdateHeight), ((("No data on the key: " + kRewardUpdateHeight) + " at address ") + toString(govAddress))) | |
227 | 229 | let poolRewardUpdateHeight = valueOrElse(getInteger(govAddress, (pool + kHeightPoolFraction)), rewardUpdateHeight) | |
228 | 230 | let rewardPoolFractionPrevious = valueOrErrorMessage(getInteger(govAddress, (pool + kRewardPoolFractionPrevious)), (((("No data on the key: " + pool) + kRewardPoolFractionPrevious) + " at address ") + toString(govAddress))) | |
229 | 231 | let rewardPoolCurrent = fraction(totalRewardPerBlockCurrent, rewardPoolFractionCurrent, totalVoteShare) | |
230 | 232 | let rewardPoolPrevious = fraction(totalRewardPerBlockCurrent, rewardPoolFractionPrevious, totalVoteShare) | |
231 | 233 | let rewardPoolPrevCurrent = fraction(totalRewardPerBlockPrevious, rewardPoolFractionCurrent, totalVoteShare) | |
232 | 234 | let rewardPoolPrevPrevious = fraction(totalRewardPerBlockPrevious, rewardPoolFractionPrevious, totalVoteShare) | |
233 | 235 | if (if ((rewardPoolCurrent > totalRewardPerBlockCurrent)) | |
234 | 236 | then true | |
235 | 237 | else (rewardPoolPrevious > totalRewardPerBlockPrevious)) | |
236 | 238 | then throw("rewardPoolCurrent > totalRewardPerBlockCurrent or rewardPoolPrevious > totalRewardPerBlockPrevious") | |
237 | 239 | else $Tuple7(rewardPoolCurrent, rewardUpdateHeight, rewardPoolPrevious, poolRewardUpdateHeight, lastEmissionUpdateHeight, rewardPoolPrevCurrent, rewardPoolPrevPrevious) | |
238 | 240 | } | |
239 | 241 | ||
240 | 242 | ||
241 | 243 | func getLastInterestInfo (pool) = { | |
242 | 244 | let farmInterest = valueOrErrorMessage(getInteger(this, (pool + kFarmLastInterest)), (("No data on the key: " + pool) + kFarmLastInterest)) | |
243 | 245 | let boostInterest = valueOrElse(getInteger(this, (pool + kBoostLastInterest)), 0) | |
244 | 246 | let lastInterestHeight = valueOrElse(getInteger(this, (pool + kLastInterestHeight)), height) | |
245 | 247 | $Tuple3(lastInterestHeight, farmInterest, boostInterest) | |
246 | 248 | } | |
247 | 249 | ||
248 | 250 | ||
249 | 251 | func calcFarmRwd (pool,curTotalReward) = { | |
250 | 252 | let poolBoostCoef = valueOrElse(getInteger(this, (pool + kPoolBoostCoef)), defPoolBoostCoef) | |
251 | 253 | fraction(curTotalReward, lockBoostCoefScale, (poolBoostCoef + lockBoostCoefScale)) | |
252 | 254 | } | |
253 | 255 | ||
254 | 256 | ||
255 | 257 | func calcBoostRwd (pool,curTotalReward) = { | |
256 | 258 | let poolBoostCoef = valueOrElse(getInteger(this, (pool + kPoolBoostCoef)), defPoolBoostCoef) | |
257 | 259 | fraction(curTotalReward, poolBoostCoef, (poolBoostCoef + lockBoostCoefScale)) | |
258 | 260 | } | |
259 | 261 | ||
260 | 262 | ||
261 | 263 | func calcInterest (pool,lastInterestHeight,rewardUpdateHeight,poolRewardUpdateHeight,farmInterest,boostInterest,poolVoted,currentRewardPerBlock,shareTokenLocked,previousRewardPerBlock,scaleValue,toHeight) = { | |
262 | - | let $ | |
264 | + | let $t01026111446 = if (if (if ((rewardUpdateHeight > toHeight)) | |
263 | 265 | then (rewardUpdateHeight == poolRewardUpdateHeight) | |
264 | 266 | else false) | |
265 | 267 | then true | |
266 | 268 | else if ((toHeight > rewardUpdateHeight)) | |
267 | 269 | then (rewardUpdateHeight != poolRewardUpdateHeight) | |
268 | 270 | else false) | |
269 | 271 | then { | |
270 | 272 | let r = (previousRewardPerBlock * (toHeight - lastInterestHeight)) | |
271 | 273 | $Tuple3(r, farmInterest, boostInterest) | |
272 | 274 | } | |
273 | 275 | else if (if (if ((toHeight > rewardUpdateHeight)) | |
274 | 276 | then (rewardUpdateHeight == poolRewardUpdateHeight) | |
275 | 277 | else false) | |
276 | 278 | then (lastInterestHeight > rewardUpdateHeight) | |
277 | 279 | else false) | |
278 | 280 | then { | |
279 | 281 | let r = (currentRewardPerBlock * (toHeight - lastInterestHeight)) | |
280 | 282 | $Tuple3(r, farmInterest, boostInterest) | |
281 | 283 | } | |
282 | 284 | else { | |
283 | 285 | let rwdBfrUpd = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight)) | |
284 | 286 | let fBfrUp = (farmInterest + fraction(calcFarmRwd(pool, rwdBfrUpd), scaleValue, shareTokenLocked)) | |
285 | 287 | let bBfrUp = (boostInterest + (if ((poolVoted > 0)) | |
286 | 288 | then fraction(calcBoostRwd(pool, rwdBfrUpd), scaleValue8, poolVoted) | |
287 | 289 | else 0)) | |
288 | 290 | let rwd = (currentRewardPerBlock * (toHeight - rewardUpdateHeight)) | |
289 | 291 | $Tuple3(rwd, fBfrUp, bBfrUp) | |
290 | 292 | } | |
291 | - | let reward = $ | |
292 | - | let farmIntrBefore = $ | |
293 | - | let boostIntrBefore = $ | |
293 | + | let reward = $t01026111446._1 | |
294 | + | let farmIntrBefore = $t01026111446._2 | |
295 | + | let boostIntrBefore = $t01026111446._3 | |
294 | 296 | let newFarmInterest = (farmIntrBefore + fraction(calcFarmRwd(pool, reward), scaleValue, shareTokenLocked)) | |
295 | 297 | let newBoostInterest = (boostIntrBefore + (if ((poolVoted > 0)) | |
296 | 298 | then fraction(calcBoostRwd(pool, reward), scaleValue8, poolVoted) | |
297 | 299 | else 0)) | |
298 | 300 | $Tuple2(newFarmInterest, newBoostInterest) | |
299 | 301 | } | |
300 | 302 | ||
301 | 303 | ||
302 | 304 | func claimCalc (pool,user) = { | |
303 | 305 | let scaleValue = calcScaleValue(SWOP, getShareAssetId(pool)) | |
304 | 306 | let poolVoted = getPoolVoted(pool) | |
305 | 307 | let uPoolVoted = getUserPoolVoted(pool, user) | |
306 | 308 | let shareToken = getTotalShareToken(pool) | |
307 | 309 | let totalShareVirtual = valueOrElse(getInteger(this, (pool + kShareTokensVirtual)), shareToken) | |
308 | 310 | let stratBFarmInterest = valueOrElse(getInteger(this, (pool + kStratBFarmInterest)), 0) | |
309 | - | let $ | |
310 | - | let lastInterestHeight = $ | |
311 | - | let farmInterest = $ | |
312 | - | let boostInterest = $ | |
313 | - | let $ | |
314 | - | let currentRewardPerBlock = $ | |
315 | - | let rewardUpdateHeight = $ | |
316 | - | let previousRewardPerBlock = $ | |
317 | - | let poolRewardUpdateHeight = $ | |
318 | - | let emissionUpdateHeight = $ | |
319 | - | let prevCurrentRewardPerBlock = $ | |
320 | - | let prevPreviousRewardPerBlock = $ | |
311 | + | let $t01228412365 = getLastInterestInfo(pool) | |
312 | + | let lastInterestHeight = $t01228412365._1 | |
313 | + | let farmInterest = $t01228412365._2 | |
314 | + | let boostInterest = $t01228412365._3 | |
315 | + | let $t01237012627 = rewardInfo(pool) | |
316 | + | let currentRewardPerBlock = $t01237012627._1 | |
317 | + | let rewardUpdateHeight = $t01237012627._2 | |
318 | + | let previousRewardPerBlock = $t01237012627._3 | |
319 | + | let poolRewardUpdateHeight = $t01237012627._4 | |
320 | + | let emissionUpdateHeight = $t01237012627._5 | |
321 | + | let prevCurrentRewardPerBlock = $t01237012627._6 | |
322 | + | let prevPreviousRewardPerBlock = $t01237012627._7 | |
321 | 323 | let uFarmInterest = valueOrElse(getInteger(this, (((pool + "_") + user) + kFarmUserLastInterest)), farmInterest) | |
322 | 324 | let uBoostInterest = valueOrElse(getInteger(this, (((pool + "_") + user) + kBoostUserLastInterest)), if (if ((stratBFarmInterest > uFarmInterest)) | |
323 | 325 | then (uPoolVoted > 0) | |
324 | 326 | else false) | |
325 | 327 | then 0 | |
326 | 328 | else boostInterest) | |
327 | 329 | let uShareTokensStaked = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensStaked)), 0) | |
328 | 330 | let uShareTokensVirt = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), uShareTokensStaked) | |
329 | 331 | if ((totalShareVirtual == 0)) | |
330 | 332 | then { | |
331 | 333 | let toTreasury = if ((emissionUpdateHeight > lastInterestHeight)) | |
332 | 334 | then ((prevCurrentRewardPerBlock * (emissionUpdateHeight - lastInterestHeight)) + (currentRewardPerBlock * (height - emissionUpdateHeight))) | |
333 | 335 | else (currentRewardPerBlock * (height - lastInterestHeight)) | |
334 | 336 | let teamReward = fraction(toTreasury, teamFee, 100) | |
335 | 337 | $Tuple5(farmInterest, boostInterest, 0, (toTreasury - teamReward), teamReward) | |
336 | 338 | } | |
337 | 339 | else { | |
338 | - | let $ | |
340 | + | let $t01367014807 = if ((emissionUpdateHeight > lastInterestHeight)) | |
339 | 341 | then { | |
340 | - | let $ | |
341 | - | let prevNewFarmInterest = $ | |
342 | - | let prevNewBoostInterest = $ | |
342 | + | let $t01408314642 = calcInterest(pool, lastInterestHeight, rewardUpdateHeight, poolRewardUpdateHeight, farmInterest, boostInterest, poolVoted, prevCurrentRewardPerBlock, totalShareVirtual, prevPreviousRewardPerBlock, scaleValue, emissionUpdateHeight) | |
343 | + | let prevNewFarmInterest = $t01408314642._1 | |
344 | + | let prevNewBoostInterest = $t01408314642._2 | |
343 | 345 | $Tuple3(prevNewFarmInterest, prevNewBoostInterest, emissionUpdateHeight) | |
344 | 346 | } | |
345 | 347 | else $Tuple3(farmInterest, boostInterest, lastInterestHeight) | |
346 | - | let prevFarmInterest = $ | |
347 | - | let prevBoostInterest = $ | |
348 | - | let LIHeight = $ | |
349 | - | let $ | |
350 | - | let newFarmInterest = $ | |
351 | - | let newBoostInterest = $ | |
348 | + | let prevFarmInterest = $t01367014807._1 | |
349 | + | let prevBoostInterest = $t01367014807._2 | |
350 | + | let LIHeight = $t01367014807._3 | |
351 | + | let $t01481615239 = calcInterest(pool, LIHeight, rewardUpdateHeight, poolRewardUpdateHeight, prevFarmInterest, prevBoostInterest, poolVoted, currentRewardPerBlock, totalShareVirtual, previousRewardPerBlock, scaleValue, height) | |
352 | + | let newFarmInterest = $t01481615239._1 | |
353 | + | let newBoostInterest = $t01481615239._2 | |
352 | 354 | let farmRwd = fraction(uShareTokensVirt, (newFarmInterest - uFarmInterest), scaleValue) | |
353 | 355 | let poolBoostCoef = valueOrElse(getInteger(this, (pool + kPoolBoostCoef)), defPoolBoostCoef) | |
354 | 356 | let boostRwdMax = fraction(fraction(uShareTokensVirt, (newFarmInterest - max([uFarmInterest, stratBFarmInterest])), scaleValue), poolBoostCoef, lockBoostCoefScale) | |
355 | 357 | let curBoostRwd = fraction((newBoostInterest - uBoostInterest), uPoolVoted, scaleValue8) | |
356 | 358 | let boostRwd = min([boostRwdMax, curBoostRwd]) | |
357 | 359 | let toTreasury = (boostRwdMax - boostRwd) | |
358 | 360 | let teamReward = fraction(toTreasury, teamFee, 100) | |
359 | 361 | if ((0 > toTreasury)) | |
360 | 362 | then throw("toTreasury < 0") | |
361 | 363 | else $Tuple5(newFarmInterest, newBoostInterest, (farmRwd + boostRwd), (toTreasury - teamReward), teamReward) | |
362 | 364 | } | |
363 | 365 | } | |
364 | 366 | ||
365 | 367 | ||
366 | 368 | func availableClaimCalcAllByUser (pools,user) = { | |
367 | 369 | func calcAvailable (acc,pool) = { | |
368 | - | let $ | |
369 | - | let newPools = $ | |
370 | - | let amounts = $ | |
371 | - | let $ | |
372 | - | let fi = $ | |
373 | - | let bi = $ | |
374 | - | let claimAmount = $ | |
375 | - | let tt = $ | |
370 | + | let $t01619316222 = acc | |
371 | + | let newPools = $t01619316222._1 | |
372 | + | let amounts = $t01619316222._2 | |
373 | + | let $t01623116284 = claimCalc(pool, user) | |
374 | + | let fi = $t01623116284._1 | |
375 | + | let bi = $t01623116284._2 | |
376 | + | let claimAmount = $t01623116284._3 | |
377 | + | let tt = $t01623116284._4 | |
376 | 378 | let availableFund = (userAvailableSWOP(pool, user) + claimAmount) | |
377 | 379 | $Tuple2((newPools :+ pool), (amounts :+ availableFund)) | |
378 | 380 | } | |
379 | 381 | ||
380 | 382 | let $l = pools | |
381 | 383 | let $s = size($l) | |
382 | 384 | let $acc0 = $Tuple2(nil, nil) | |
383 | 385 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
384 | 386 | then $a | |
385 | 387 | else calcAvailable($a, $l[$i]) | |
386 | 388 | ||
387 | 389 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
388 | 390 | then $a | |
389 | 391 | else throw("List size exceeds 60") | |
390 | 392 | ||
391 | 393 | $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) | |
392 | 394 | } | |
393 | 395 | ||
394 | 396 | ||
395 | 397 | func canLockInFirstHarvest (pool,user,userShareTokensStaked,pmtAmount,lockType) = if ((getHeightFirstHarvest(pool) > height)) | |
396 | 398 | then { | |
397 | 399 | let totalVoteAmount = valueOrElse(getInteger(votingAddress, (pool + kHarvestPoolVote)), 0) | |
398 | 400 | let userVoteAmount = valueOrElse(getInteger(votingAddress, (((user + "_") + pool) + kHarvestUserPoolVote)), 0) | |
399 | 401 | let FHShareTokenLimit = getFHShareLimitToken(addressFromStringValue(pool)) | |
400 | 402 | let FHShareTokenUserLimit = (fraction(FHShareTokenLimit, userVoteAmount, totalVoteAmount) - userShareTokensStaked) | |
401 | 403 | if ((lockType > 0)) | |
402 | 404 | then throw("You can't lock shareTokens till first harvest end.") | |
403 | 405 | else if ((userVoteAmount == 0)) | |
404 | 406 | then throw("You can't lock shareTokens. You didn't vote for pool in first week.") | |
405 | 407 | else if ((pmtAmount >= FHShareTokenUserLimit)) | |
406 | 408 | then (pmtAmount - FHShareTokenUserLimit) | |
407 | 409 | else 0 | |
408 | 410 | } | |
409 | 411 | else 0 | |
410 | 412 | ||
411 | 413 | ||
412 | 414 | func getLockParams (type) = { | |
413 | 415 | let lockParams = split(valueOrErrorMessage(getString(this, (toString(type) + kLockParams)), ("There are no key for lock type" + toString(type))), "_") | |
414 | 416 | $Tuple2(parseIntValue(lockParams[0]), parseIntValue(lockParams[1])) | |
415 | 417 | } | |
416 | 418 | ||
417 | 419 | ||
418 | 420 | func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)] | |
419 | 421 | ||
420 | 422 | ||
421 | 423 | func isActive () = if (if (active) | |
422 | 424 | then activeGlob | |
423 | 425 | else false) | |
424 | 426 | then unit | |
425 | 427 | else throw("DApp is inactive at this moment") | |
426 | 428 | ||
427 | 429 | ||
428 | 430 | func isAdminCall (i) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)) | |
429 | 431 | then unit | |
430 | 432 | else throw("Only admin can call this function") | |
431 | 433 | ||
432 | 434 | ||
433 | 435 | func isPoolCall (i,pool) = if (if ((toString(i.caller) == pool)) | |
434 | 436 | then true | |
435 | 437 | else (i.caller == cpmmContract)) | |
436 | 438 | then unit | |
437 | 439 | else throw("Only pool can call this function") | |
438 | 440 | ||
439 | 441 | ||
440 | 442 | func getDeprecatedPool (pool) = valueOrElse(getBoolean(oracle, (kDeprecatedPool + pool)), false) | |
441 | 443 | ||
442 | 444 | ||
443 | 445 | func isDeprecatedPool (pool) = if (!(getDeprecatedPool(pool))) | |
444 | 446 | then unit | |
445 | 447 | else throw("Pool is deprecated. Only unlock action allowed.") | |
446 | 448 | ||
447 | 449 | ||
448 | 450 | func isSelfCall (i) = if ((i.caller == this)) | |
449 | 451 | then unit | |
450 | 452 | else throw("Only contract itself can call this function") | |
451 | 453 | ||
452 | 454 | ||
453 | 455 | func calcLockShareTokens (i,caller,pool,lockType) = { | |
454 | 456 | let shareAssetId = getShareAssetId(pool) | |
455 | 457 | let user = toString(caller) | |
456 | 458 | let totalShare = getTotalShareToken(pool) | |
457 | 459 | let totalShareVirtual = valueOrElse(getInteger(this, (pool + kShareTokensVirtual)), totalShare) | |
458 | 460 | let userStakedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensStaked)), 0) | |
459 | 461 | let userLockedHeigt = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLockedHeight)), 0) | |
460 | 462 | let userLockedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLocked)), 0) | |
461 | 463 | let userAmountVirtual = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), userStakedAmount) | |
462 | 464 | let totalUserShareTokens = ((userStakedAmount + userLockedAmount) + i.payments[0].amount) | |
463 | - | let $ | |
464 | - | let lockPeriod = $ | |
465 | - | let lockCoef = $ | |
465 | + | let $t01940819460 = getLockParams(lockType) | |
466 | + | let lockPeriod = $t01940819460._1 | |
467 | + | let lockCoef = $t01940819460._2 | |
466 | 468 | let lockWavesFee = getIntegerValue(this, kLockWavesFee) | |
467 | 469 | if ((i.payments[0].assetId != shareAssetId)) | |
468 | 470 | then throw("Wrong sharetoken in payment") | |
469 | 471 | else if ((0 >= i.payments[0].amount)) | |
470 | 472 | then throw("Payment amount must be greater than 0") | |
471 | 473 | else if ((0 > lockType)) | |
472 | 474 | then throw("lockType must be >= 0") | |
473 | 475 | else { | |
474 | 476 | let shareTokensChangeOnFH = canLockInFirstHarvest(pool, user, userStakedAmount, i.payments[0].amount, lockType) | |
475 | 477 | if ((shareTokensChangeOnFH == shareTokensChangeOnFH)) | |
476 | 478 | then { | |
477 | - | let $ | |
479 | + | let $t01988721821 = if ((lockType == 0)) | |
478 | 480 | then { | |
479 | 481 | let userAmountVirtualNew = ((userAmountVirtual + i.payments[0].amount) - shareTokensChangeOnFH) | |
480 | 482 | $Tuple2([IntegerEntry((((pool + "_") + user) + kUserShareTokensStaked), ((userStakedAmount + i.payments[0].amount) - shareTokensChangeOnFH)), IntegerEntry((((pool + "_") + user) + kUserShareTokensVirtual), userAmountVirtualNew), IntegerEntry((pool + kShareTokensVirtual), ((totalShareVirtual + i.payments[0].amount) - shareTokensChangeOnFH)), ScriptTransfer(caller, shareTokensChangeOnFH, i.payments[0].assetId)], ((totalShare + i.payments[0].amount) - shareTokensChangeOnFH)) | |
481 | 483 | } | |
482 | 484 | else if (if ((userLockedHeigt == 0)) | |
483 | 485 | then if (if ((2 > size(i.payments))) | |
484 | 486 | then true | |
485 | 487 | else (i.payments[1].assetId != unit)) | |
486 | 488 | then true | |
487 | 489 | else (lockWavesFee > i.payments[1].amount) | |
488 | 490 | else false) | |
489 | 491 | then throw((("You need to pay additional waves comission " + toString(lockWavesFee)) + "WAVES")) | |
490 | 492 | else if ((userLockedHeigt > (height + lockPeriod))) | |
491 | 493 | then throw("You cannot lock sharetokens for a period less than what you have already locked") | |
492 | 494 | else { | |
493 | 495 | let userLockedAmountNew = (userLockedAmount + i.payments[0].amount) | |
494 | 496 | let userLockedHeigtNew = (height + lockPeriod) | |
495 | 497 | let userAmountVirtualNew = (fraction(userLockedAmountNew, lockCoef, lockBoostCoefScale) + userStakedAmount) | |
496 | 498 | $Tuple2([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))], (totalShare + i.payments[0].amount)) | |
497 | 499 | } | |
498 | - | let lockEntries = $ | |
499 | - | let totalShareNew = $ | |
500 | + | let lockEntries = $t01988721821._1 | |
501 | + | let totalShareNew = $t01988721821._2 | |
500 | 502 | if ((totalShareNew > accountBalance(shareAssetId))) | |
501 | 503 | then throw("Balance of share-token is lower than totalAmount") | |
502 | 504 | else { | |
503 | - | let $ | |
504 | - | let farmInterest = $ | |
505 | - | let boostInterest = $ | |
506 | - | let claimAmount = $ | |
507 | - | let toTreasure = $ | |
508 | - | let teamReward = $ | |
505 | + | let $t02194622040 = claimCalc(pool, user) | |
506 | + | let farmInterest = $t02194622040._1 | |
507 | + | let boostInterest = $t02194622040._2 | |
508 | + | let claimAmount = $t02194622040._3 | |
509 | + | let toTreasure = $t02194622040._4 | |
510 | + | let teamReward = $t02194622040._5 | |
509 | 511 | let availableFundsNew = (userAvailableSWOP(pool, user) + claimAmount) | |
510 | 512 | let uplp = if ((getString(Address(fromBase58String(pool)), "version") == "3.0.0")) | |
511 | 513 | then invoke(lpFarmingAddress, "updateUserInterest", [user, pool, totalUserShareTokens], nil) | |
512 | 514 | else 0 | |
513 | 515 | if ((uplp == uplp)) | |
514 | 516 | then ([IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((pool + kShareTotalShareTokens), totalShareNew), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, (toTreasure + teamReward), true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP), ScriptTransfer(teamBoxAddress, teamReward, SWOP)] ++ lockEntries) | |
515 | 517 | else throw("Strict value is not equal to itself.") | |
516 | 518 | } | |
517 | 519 | } | |
518 | 520 | else throw("Strict value is not equal to itself.") | |
519 | 521 | } | |
520 | 522 | } | |
521 | 523 | ||
522 | 524 | ||
523 | 525 | func calcWithdrawShareTokens (i,caller,pool,shareTokensWithdrawAmount) = { | |
524 | 526 | let inv = if (getDeprecatedPool(pool)) | |
525 | 527 | then invoke(this, "unlockUserLockDeprecated", [pool, toString(caller)], nil) | |
526 | 528 | else 0 | |
527 | 529 | if ((inv == inv)) | |
528 | 530 | then { | |
529 | 531 | let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
530 | 532 | let user = toString(caller) | |
531 | - | let $ | |
532 | - | let farmInterest = $ | |
533 | - | let boostInterest = $ | |
534 | - | let claimAmount = $ | |
535 | - | let toTreasure = $ | |
536 | - | let teamReward = $ | |
533 | + | let $t02340823502 = claimCalc(pool, user) | |
534 | + | let farmInterest = $t02340823502._1 | |
535 | + | let boostInterest = $t02340823502._2 | |
536 | + | let claimAmount = $t02340823502._3 | |
537 | + | let toTreasure = $t02340823502._4 | |
538 | + | let teamReward = $t02340823502._5 | |
537 | 539 | let userStakedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensStaked)), 0) | |
538 | 540 | let userLockedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLocked)), 0) | |
539 | 541 | let userAmountVirtual = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), userStakedAmount) | |
540 | 542 | let userStakedAmountNew = (userStakedAmount - shareTokensWithdrawAmount) | |
541 | 543 | let availableFundsNew = (userAvailableSWOP(pool, user) + claimAmount) | |
542 | 544 | let totalShareAmount = getTotalShareToken(pool) | |
543 | 545 | let totalShareVirtual = valueOrElse(getInteger(this, (pool + kShareTokensVirtual)), totalShareAmount) | |
544 | 546 | let totalShareAmountNew = (totalShareAmount - shareTokensWithdrawAmount) | |
545 | 547 | let totalShareVirtualNew = (totalShareVirtual - shareTokensWithdrawAmount) | |
546 | 548 | let userAmountVirtualNew = (userAmountVirtual - shareTokensWithdrawAmount) | |
547 | 549 | if ((shareTokensWithdrawAmount > userStakedAmount)) | |
548 | 550 | then throw("Withdraw amount more then user locked amount") | |
549 | 551 | else if ((accountBalance(shareTokensId) > totalShareAmount)) | |
550 | 552 | then throw("Balance of share-token is lower than totalAmount") | |
551 | 553 | else { | |
552 | 554 | let uplp = if ((getString(Address(fromBase58String(pool)), "version") == "3.0.0")) | |
553 | 555 | then invoke(lpFarmingAddress, "updateUserInterest", [user, pool, (userStakedAmount + userLockedAmount)], nil) | |
554 | 556 | else 0 | |
555 | 557 | if ((uplp == uplp)) | |
556 | 558 | then [IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kUserShareTokensStaked), userStakedAmountNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensVirtual), userAmountVirtualNew), IntegerEntry((pool + kShareTotalShareTokens), totalShareAmountNew), IntegerEntry((pool + kShareTokensVirtual), totalShareVirtualNew), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, (toTreasure + teamReward), true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP), ScriptTransfer(teamBoxAddress, teamReward, SWOP), ScriptTransfer(i.caller, shareTokensWithdrawAmount, shareTokensId)] | |
557 | 559 | else throw("Strict value is not equal to itself.") | |
558 | 560 | } | |
559 | 561 | } | |
560 | 562 | else throw("Strict value is not equal to itself.") | |
561 | 563 | } | |
562 | 564 | ||
563 | 565 | ||
564 | 566 | func calcClaim (i,pool,caller) = { | |
565 | 567 | let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
566 | 568 | let user = toString(caller) | |
567 | 569 | let shareTokenLocked = getTotalShareToken(pool) | |
568 | - | let $ | |
569 | - | let farmInterest = $ | |
570 | - | let boostInterest = $ | |
571 | - | let claimAmount = $ | |
572 | - | let toTreasure = $ | |
573 | - | let teamReward = $ | |
570 | + | let $t02608526179 = claimCalc(pool, user) | |
571 | + | let farmInterest = $t02608526179._1 | |
572 | + | let boostInterest = $t02608526179._2 | |
573 | + | let claimAmount = $t02608526179._3 | |
574 | + | let toTreasure = $t02608526179._4 | |
575 | + | let teamReward = $t02608526179._5 | |
574 | 576 | let availableFund = (userAvailableSWOP(pool, user) + claimAmount) | |
575 | 577 | if ((accountBalance(shareTokensId) > shareTokenLocked)) | |
576 | 578 | then throw("Balance of share-token is lower than totalAmount") | |
577 | 579 | else { | |
578 | 580 | let uTrans = if ((i.caller != this)) | |
579 | 581 | then [ScriptTransfer(i.caller, availableFund, SWOP)] | |
580 | 582 | else nil | |
581 | 583 | $Tuple2(([IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), 0), Reissue(SWOP, ((toTreasure + availableFund) + teamReward), true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP), ScriptTransfer(teamBoxAddress, teamReward, SWOP)] ++ uTrans), availableFund) | |
582 | 584 | } | |
583 | 585 | } | |
584 | 586 | ||
585 | 587 | ||
586 | 588 | func unlockUserLockCalc (i,pool,user) = { | |
587 | 589 | let totalShareVirtual = getIntegerValue(this, (pool + kShareTokensVirtual)) | |
588 | 590 | let userStakedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensStaked)), 0) | |
589 | 591 | let userLockedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLocked)), 0) | |
590 | 592 | let userAmountVirtual = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), userStakedAmount) | |
591 | 593 | let userStakedAmountNew = (userStakedAmount + userLockedAmount) | |
592 | - | let $ | |
593 | - | let farmInterest = $ | |
594 | - | let boostInterest = $ | |
595 | - | let claimAmount = $ | |
596 | - | let toTreasure = $ | |
597 | - | let teamReward = $ | |
594 | + | let $t02765327747 = claimCalc(pool, user) | |
595 | + | let farmInterest = $t02765327747._1 | |
596 | + | let boostInterest = $t02765327747._2 | |
597 | + | let claimAmount = $t02765327747._3 | |
598 | + | let toTreasure = $t02765327747._4 | |
599 | + | let teamReward = $t02765327747._5 | |
598 | 600 | let availableFundsNew = (userAvailableSWOP(pool, user) + claimAmount) | |
599 | 601 | [IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kUserShareTokensStaked), userStakedAmountNew), IntegerEntry((((pool + "_") + user) + kUserShareTokensVirtual), userStakedAmountNew), IntegerEntry((pool + kShareTokensVirtual), ((totalShareVirtual - userAmountVirtual) + userStakedAmountNew)), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), DeleteEntry((((pool + "_") + user) + kUserShareTokensLocked)), DeleteEntry((((pool + "_") + user) + kUserShareTokensLockedHeight)), DeleteEntry((((pool + "_") + user) + kUserShareTokensLockedType)), Reissue(SWOP, (toTreasure + teamReward), true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP), ScriptTransfer(teamBoxAddress, teamReward, SWOP)] | |
600 | 602 | } | |
601 | 603 | ||
602 | 604 | ||
603 | 605 | @Callable(i) | |
604 | 606 | func init (earlyLP) = if (isDefined(getString(this, kSWOPid))) | |
605 | 607 | then throw("SWOP already initialized") | |
606 | 608 | else { | |
607 | 609 | let initAmount = 100000000000000 | |
608 | 610 | let SWOPissue = Issue("SWOP", "SWOP protocol token", initAmount, 8, true) | |
609 | 611 | let SWOPid = calculateAssetId(SWOPissue) | |
610 | 612 | [BooleanEntry(kActive, true), Issue("SWOP", "SWOP protocol token", initAmount, 8, true), StringEntry(kSWOPid, toBase58String(SWOPid))] | |
611 | 613 | } | |
612 | 614 | ||
613 | 615 | ||
614 | 616 | ||
615 | 617 | @Callable(i) | |
616 | - | func initPoolShareFarming (pool) = valueOrElse(isAdminCall(i), [IntegerEntry((pool + kShareTotalShareTokens), 0), IntegerEntry((pool + kFarmLastInterest), 0), IntegerEntry((pool + kBoostLastInterest), 0), IntegerEntry((pool + kLastInterestHeight), height)]) | |
618 | + | func initPoolShareFarming (pool) = valueOrElse(isAdminCall(i), if (!(isDefined(getString(oracle, (kPoolInOracle + pool))))) | |
619 | + | then throw("Pool is not in oracle") | |
620 | + | else if (isDefined(getInteger(this, (pool + kShareTotalShareTokens)))) | |
621 | + | then throw("Pool already inited") | |
622 | + | else [IntegerEntry((pool + kShareTotalShareTokens), 0), IntegerEntry((pool + kFarmLastInterest), 0), IntegerEntry((pool + kBoostLastInterest), 0), IntegerEntry((pool + kLastInterestHeight), height)]) | |
617 | 623 | ||
618 | 624 | ||
619 | 625 | ||
620 | 626 | @Callable(i) | |
621 | 627 | func updatePoolInterest (pool) = valueOrElse(isActive(), if ((i.caller != govAddress)) | |
622 | 628 | then throw("Only Governance can call this function") | |
623 | 629 | else { | |
624 | 630 | let user = toString(addressFromPublicKey(adminInvokePubKey)) | |
625 | - | let $ | |
626 | - | let farmInterest = $ | |
627 | - | let boostInterest = $ | |
628 | - | let boostLPinterest = $ | |
631 | + | let $t03019730271 = claimCalc(pool, user) | |
632 | + | let farmInterest = $t03019730271._1 | |
633 | + | let boostInterest = $t03019730271._2 | |
634 | + | let boostLPinterest = $t03019730271._3 | |
629 | 635 | [IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height)] | |
630 | 636 | }) | |
631 | 637 | ||
632 | 638 | ||
633 | 639 | ||
634 | 640 | @Callable(i) | |
635 | 641 | func lockShareTokens (pool,lockType) = valueOrElse(isDeprecatedPool(pool), valueOrElse(isActive(), calcLockShareTokens(i, i.caller, pool, lockType))) | |
636 | 642 | ||
637 | 643 | ||
638 | 644 | ||
639 | 645 | @Callable(i) | |
640 | 646 | func lockShareTokensFromPool (callerBytes,pool,lockType) = valueOrElse(isDeprecatedPool(pool), valueOrElse(isActive(), valueOrElse(isPoolCall(i, pool), calcLockShareTokens(i, Address(callerBytes), pool, lockType)))) | |
641 | 647 | ||
642 | 648 | ||
643 | 649 | ||
644 | 650 | @Callable(i) | |
645 | 651 | func lockStakedShareTokens (pool,lockType,lockAmount) = valueOrElse(isDeprecatedPool(pool), valueOrElse(isActive(), { | |
646 | 652 | let shareAssetId = getShareAssetId(pool) | |
647 | 653 | let user = toString(i.caller) | |
648 | 654 | let totalShare = getTotalShareToken(pool) | |
649 | 655 | let totalShareVirtual = valueOrElse(getInteger(this, (pool + kShareTokensVirtual)), totalShare) | |
650 | 656 | let userStakedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensStaked)), 0) | |
651 | 657 | let userLockedHeigt = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLockedHeight)), 0) | |
652 | 658 | let userLockedAmount = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensLocked)), 0) | |
653 | 659 | let userAmountVirtual = valueOrElse(getInteger(this, (((pool + "_") + user) + kUserShareTokensVirtual)), userStakedAmount) | |
654 | 660 | let totalUserShareTokens = (userStakedAmount + userLockedAmount) | |
655 | - | let $ | |
656 | - | let lockPeriod = $ | |
657 | - | let lockCoef = $ | |
661 | + | let $t03190031952 = getLockParams(lockType) | |
662 | + | let lockPeriod = $t03190031952._1 | |
663 | + | let lockCoef = $t03190031952._2 | |
658 | 664 | let lockWavesFee = getIntegerValue(this, kLockWavesFee) | |
659 | 665 | if ((getHeightFirstHarvest(pool) > height)) | |
660 | 666 | then throw("You can't lock shareTokens till first harvest end.") | |
661 | 667 | else if ((0 >= lockType)) | |
662 | 668 | then throw("lockType must be > 0") | |
663 | 669 | else if ((lockAmount > userStakedAmount)) | |
664 | 670 | then throw(("You can't lock more than " + toString(userStakedAmount))) | |
665 | 671 | else if ((accountBalance(shareAssetId) > totalShare)) | |
666 | 672 | then throw("Balance of share-token is lower than totalAmount") | |
667 | 673 | else if (if ((userLockedHeigt == 0)) | |
668 | 674 | then if (if ((1 > size(i.payments))) | |
669 | 675 | then true | |
670 | 676 | else (i.payments[0].assetId != unit)) | |
671 | 677 | then true | |
672 | 678 | else (lockWavesFee > i.payments[0].amount) | |
673 | 679 | else false) | |
674 | 680 | then throw((("You need to pay additional waves comission " + toString(lockWavesFee)) + "WAVES")) | |
675 | 681 | else if (if ((userLockedHeigt == 0)) | |
676 | 682 | then (0 >= lockAmount) | |
677 | 683 | else false) | |
678 | 684 | then throw("lockAmount must be greater than 0") | |
679 | 685 | else if ((0 > lockAmount)) | |
680 | 686 | then throw("lockAmount must be positive") | |
681 | 687 | else if ((userLockedHeigt > (height + lockPeriod))) | |
682 | 688 | then throw("You cannot lock sharetokens for a period less than what you have already locked") | |
683 | 689 | else { | |
684 | 690 | let userLockedAmountNew = (userLockedAmount + lockAmount) | |
685 | 691 | let userStakedAmountNew = (userStakedAmount - lockAmount) | |
686 | 692 | let userLockedHeigtNew = (height + lockPeriod) | |
687 | 693 | let userAmountVirtualNew = (fraction(userLockedAmountNew, lockCoef, lockBoostCoefScale) + userStakedAmountNew) | |
688 | - | let $ | |
689 | - | let farmInterest = $ | |
690 | - | let boostInterest = $ | |
691 | - | let claimAmount = $ | |
692 | - | let toTreasure = $ | |
693 | - | let teamReward = $ | |
694 | + | let $t03329833392 = claimCalc(pool, user) | |
695 | + | let farmInterest = $t03329833392._1 | |
696 | + | let boostInterest = $t03329833392._2 | |
697 | + | let claimAmount = $t03329833392._3 | |
698 | + | let toTreasure = $t03329833392._4 | |
699 | + | let teamReward = $t03329833392._5 | |
694 | 700 | let availableFundsNew = (userAvailableSWOP(pool, user) + claimAmount) | |
695 | 701 | [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)), IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, (toTreasure + teamReward), true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP), ScriptTransfer(teamBoxAddress, teamReward, SWOP)] | |
696 | 702 | } | |
697 | 703 | })) | |
698 | 704 | ||
699 | 705 | ||
700 | 706 | ||
701 | 707 | @Callable(i) | |
702 | 708 | func unlockUserLock (pool,user) = valueOrElse(isActive(), { | |
703 | 709 | let userLockedHeigt = valueOrErrorMessage(getInteger(this, (((pool + "_") + user) + kUserShareTokensLockedHeight)), (((("There is no pool " + pool) + " or user ") + user) + "with lock")) | |
704 | 710 | if ((userLockedHeigt > height)) | |
705 | 711 | then throw(("You can't unlock sharetokens till " + toString(userLockedHeigt))) | |
706 | 712 | else (unlockUserLockCalc(i, pool, user) ++ [ScriptTransfer(i.caller, getIntegerValue(this, kLockWavesFee), unit)]) | |
707 | 713 | }) | |
708 | 714 | ||
709 | 715 | ||
710 | 716 | ||
711 | 717 | @Callable(i) | |
712 | 718 | func unlockUserLockDeprecated (pool,user) = valueOrElse(isActive(), valueOrElse(isSelfCall(i), if (!(getDeprecatedPool(pool))) | |
713 | 719 | then throw("Pool must be deprecated") | |
714 | 720 | else if (isDefined(getInteger(this, (((pool + "_") + user) + kUserShareTokensLockedHeight)))) | |
715 | 721 | then (unlockUserLockCalc(i, pool, user) ++ [ScriptTransfer(moneyBoxAddress, getIntegerValue(this, kLockWavesFee), unit)]) | |
716 | 722 | else nil)) | |
717 | 723 | ||
718 | 724 | ||
719 | 725 | ||
720 | 726 | @Callable(i) | |
721 | 727 | func withdrawShareTokens (pool,shareTokensWithdrawAmount) = valueOrElse(isActive(), calcWithdrawShareTokens(i, i.caller, pool, shareTokensWithdrawAmount)) | |
722 | 728 | ||
723 | 729 | ||
724 | 730 | ||
725 | 731 | @Callable(i) | |
726 | 732 | func withdrawShareTokensFromPool (callerBytes,pool,shareTokensWithdrawAmount) = valueOrElse(isActive(), valueOrElse(isPoolCall(i, pool), calcWithdrawShareTokens(i, Address(callerBytes), pool, shareTokensWithdrawAmount))) | |
727 | 733 | ||
728 | 734 | ||
729 | 735 | ||
730 | 736 | @Callable(i) | |
731 | 737 | func claim (pool) = valueOrElse(isActive(), { | |
732 | 738 | let r = calcClaim(i, pool, i.caller) | |
733 | 739 | if ((r._2 == 0)) | |
734 | 740 | then throw("You have 0 available SWOP") | |
735 | 741 | else r | |
736 | 742 | }) | |
737 | 743 | ||
738 | 744 | ||
739 | 745 | ||
740 | 746 | @Callable(i) | |
741 | 747 | func claimInternal (pool,caller) = valueOrElse(isActive(), valueOrElse(isSelfCall(i), calcClaim(i, pool, Address(caller)))) | |
742 | 748 | ||
743 | 749 | ||
744 | 750 | ||
745 | 751 | @Callable(i) | |
746 | 752 | func claimAndStake (pool) = valueOrElse(isActive(), { | |
747 | 753 | let claimAmount = { | |
748 | 754 | let @ = invoke(this, "claimInternal", [pool, i.caller.bytes], nil) | |
749 | 755 | if ($isInstanceOf(@, "Int")) | |
750 | 756 | then @ | |
751 | 757 | else throw(($getType(@) + " couldn't be cast to Int")) | |
752 | 758 | } | |
753 | 759 | if ((claimAmount == claimAmount)) | |
754 | 760 | then if ((claimAmount == 0)) | |
755 | 761 | then throw("You have 0 available SWOP") | |
756 | 762 | else { | |
757 | 763 | let stakeToGov = invoke(govAddress, "lockSWOPFromFarming", nil, [AttachedPayment(SWOP, claimAmount)]) | |
758 | 764 | if ((stakeToGov == stakeToGov)) | |
759 | 765 | then nil | |
760 | 766 | else throw("Strict value is not equal to itself.") | |
761 | 767 | } | |
762 | 768 | else throw("Strict value is not equal to itself.") | |
763 | 769 | }) | |
764 | 770 | ||
765 | 771 | ||
766 | 772 | ||
767 | 773 | @Callable(i) | |
768 | 774 | func claimAll (pools) = valueOrElse(isActive(), { | |
769 | 775 | func claimInv (claimTotal,pool) = { | |
770 | 776 | let claimAmount = { | |
771 | 777 | let @ = invoke(this, "claimInternal", [pool, i.caller.bytes], nil) | |
772 | 778 | if ($isInstanceOf(@, "Int")) | |
773 | 779 | then @ | |
774 | 780 | else throw(($getType(@) + " couldn't be cast to Int")) | |
775 | 781 | } | |
776 | 782 | if ((claimAmount == claimAmount)) | |
777 | 783 | then (claimTotal + claimAmount) | |
778 | 784 | else throw("Strict value is not equal to itself.") | |
779 | 785 | } | |
780 | 786 | ||
781 | 787 | let claimTotal = { | |
782 | 788 | let $l = pools | |
783 | 789 | let $s = size($l) | |
784 | 790 | let $acc0 = 0 | |
785 | 791 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
786 | 792 | then $a | |
787 | 793 | else claimInv($a, $l[$i]) | |
788 | 794 | ||
789 | 795 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
790 | 796 | then $a | |
791 | 797 | else throw("List size exceeds 60") | |
792 | 798 | ||
793 | 799 | $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) | |
794 | 800 | } | |
795 | 801 | if ((claimTotal == 0)) | |
796 | 802 | then throw("You have 0 available SWOP") | |
797 | 803 | else [ScriptTransfer(i.caller, claimTotal, SWOP)] | |
798 | 804 | }) | |
799 | 805 | ||
800 | 806 | ||
801 | 807 | ||
802 | 808 | @Callable(i) | |
803 | 809 | func claimAllAndStake (pools) = valueOrElse(isActive(), { | |
804 | 810 | func claimInv (claimTotal,pool) = { | |
805 | 811 | let claimAmount = { | |
806 | 812 | let @ = invoke(this, "claimInternal", [pool, i.caller.bytes], nil) | |
807 | 813 | if ($isInstanceOf(@, "Int")) | |
808 | 814 | then @ | |
809 | 815 | else throw(($getType(@) + " couldn't be cast to Int")) | |
810 | 816 | } | |
811 | 817 | if ((claimAmount == claimAmount)) | |
812 | 818 | then (claimTotal + claimAmount) | |
813 | 819 | else throw("Strict value is not equal to itself.") | |
814 | 820 | } | |
815 | 821 | ||
816 | 822 | let claimTotal = { | |
817 | 823 | let $l = pools | |
818 | 824 | let $s = size($l) | |
819 | 825 | let $acc0 = 0 | |
820 | 826 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
821 | 827 | then $a | |
822 | 828 | else claimInv($a, $l[$i]) | |
823 | 829 | ||
824 | 830 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
825 | 831 | then $a | |
826 | 832 | else throw("List size exceeds 60") | |
827 | 833 | ||
828 | 834 | $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) | |
829 | 835 | } | |
830 | 836 | if ((claimTotal == 0)) | |
831 | 837 | then throw("You have 0 available SWOP") | |
832 | 838 | else { | |
833 | 839 | let stakeToGov = invoke(govAddress, "lockSWOPFromFarming", nil, [AttachedPayment(SWOP, claimTotal)]) | |
834 | 840 | if ((stakeToGov == stakeToGov)) | |
835 | 841 | then nil | |
836 | 842 | else throw("Strict value is not equal to itself.") | |
837 | 843 | } | |
838 | 844 | }) | |
839 | 845 | ||
840 | 846 | ||
841 | 847 | ||
842 | 848 | @Callable(i) | |
843 | 849 | func updateUserBoostInterest (pool,user) = valueOrElse(isActive(), if ((i.caller != votingAddress)) | |
844 | 850 | then throw("Only voiting can call this function") | |
845 | 851 | else { | |
846 | - | let $ | |
847 | - | let farmInterest = $ | |
848 | - | let boostInterest = $ | |
849 | - | let claimAmount = $ | |
850 | - | let toTreasure = $ | |
851 | - | let teamReward = $ | |
852 | + | let $t03821638310 = claimCalc(pool, user) | |
853 | + | let farmInterest = $t03821638310._1 | |
854 | + | let boostInterest = $t03821638310._2 | |
855 | + | let claimAmount = $t03821638310._3 | |
856 | + | let toTreasure = $t03821638310._4 | |
857 | + | let teamReward = $t03821638310._5 | |
852 | 858 | let availableFundsNew = (userAvailableSWOP(pool, user) + claimAmount) | |
853 | 859 | [IntegerEntry((((pool + "_") + user) + kFarmUserLastInterest), farmInterest), IntegerEntry((((pool + "_") + user) + kBoostUserLastInterest), boostInterest), IntegerEntry((pool + kFarmLastInterest), farmInterest), IntegerEntry((pool + kBoostLastInterest), boostInterest), IntegerEntry((pool + kLastInterestHeight), height), IntegerEntry((((pool + "_") + user) + kAvailableSWOP), availableFundsNew), Reissue(SWOP, (toTreasure + teamReward), true), ScriptTransfer(farmingTreasureAddr, toTreasure, SWOP), ScriptTransfer(teamBoxAddress, teamReward, SWOP)] | |
854 | 860 | }) | |
855 | 861 | ||
856 | 862 | ||
857 | 863 | ||
858 | 864 | @Callable(i) | |
859 | 865 | func shutdown () = valueOrElse(isAdminCall(i), if (!(active)) | |
860 | 866 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified"))) | |
861 | 867 | else suspend("Paused by admin")) | |
862 | 868 | ||
863 | 869 | ||
864 | 870 | ||
865 | 871 | @Callable(i) | |
866 | 872 | func activate () = valueOrElse(isAdminCall(i), if (active) | |
867 | 873 | then throw("DApp is already active") | |
868 | 874 | else [BooleanEntry(kActive, true), DeleteEntry(kCause)]) | |
869 | 875 | ||
870 | 876 | ||
871 | 877 | @Verifier(tx) | |
872 | 878 | func verify () = match tx { | |
873 | 879 | case _ => | |
874 | 880 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
875 | 881 | then 1 | |
876 | 882 | else 0 | |
877 | 883 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
878 | 884 | then 1 | |
879 | 885 | else 0 | |
880 | 886 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
881 | 887 | then 1 | |
882 | 888 | else 0 | |
883 | 889 | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
884 | 890 | } | |
885 | 891 |
github/deemru/w8io/026f985 134.09 ms ◑