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