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