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