tx · 83YoB1oxbbnAnJDKTgA4Y41y7DzfKFpnCTG3mzT7z3qB 3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy: -0.02700000 Waves 2024.01.10 19:40 [2925648] smart account 3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy > SELF 0.00000000 Waves
{ "type": 13, "id": "83YoB1oxbbnAnJDKTgA4Y41y7DzfKFpnCTG3mzT7z3qB", "fee": 2700000, "feeAssetId": null, "timestamp": 1704904835407, "version": 2, "chainId": 84, "sender": "3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy", "senderPublicKey": "9W33iCCNfmFxUbiC6XZcH5x7f6xfwC7Jb3BoExT5q2PV", "proofs": [ "4ZgvK9ajGhG55YbNP3mLg6k1yJMyvpMedLaoXVExei5bayCv3f6heKN7DAhaoew2gpqcLqe3GD4A8V76QqCLbMZK" ], "script": "base64:BgKZLwgCEggKBggIAQEBCBIFCgMBCAISAwoBARIDCgEBEgQKAggIEgQKAggIEgMKAQgSAwoBCBIDCgEIEgQKAggBEgASABIFCgMICAQSAwoBCBIDCgEIEgQKAggIEgQKAggIIgNTRVAiBlNDQUxFOCIFTVVMVDgiDlBPT0xXRUlHSFRNVUxUIgd3cmFwRXJyIgNtc2ciCHRocm93RXJyIgRzdHJmIgdhZGRyZXNzIgNrZXkiA2lveiIDaW9kIgpkZWZhdWx0VmFsIgNpb2YiA2FicyIDdmFsIgNhYWwiByRtYXRjaDAiCnZhbEFueUx5c3QiAmFpIgZ2YWxJbnQiG2tleVJlZmVycmFsc0NvbnRyYWN0QWRkcmVzcyIecmVmZXJyYWxzQ29udHJhY3RBZGRyZXNzT3JGYWlsIhZrZXlSZWZlcnJhbFByb2dyYW1OYW1lIhpyZWZlcnJhbFByb2dyYW1OYW1lRGVmYXVsdCITcmVmZXJyYWxQcm9ncmFtTmFtZSIRa2V5RmFjdG9yeUFkZHJlc3MiGElkeEZhY3RvcnlDZmdTdGFraW5nRGFwcCIZSWR4RmFjdG9y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YUkBHGdldFVzZXJWb3RlRmluYWxpemVkUkVBRE9OTFkCAmJKAmJSCQCUCgIFA25pbAkBAmRpAgUCYkoFAmJSAmFJASFnZXRVc2VyVm90ZVN0YWtlZEludGVncmFsUkVBRE9OTFkCAmJKAmJSCQCUCgIFA25pbAkBAmREAgUCYkoFAmJSAQJmcAECZnEABAJmcgQBcgkBAmFGAAMJAAECBQFyAgpCeXRlVmVjdG9yBAJhSwUBcgUCYUsDCQABAgUBcgIEVW5pdAgFAmZwD3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJmcAlib2R5Qnl0ZXMJAJEDAggFAmZwBnByb29mcwAABQJmcpZtyL4=", "height": 2925648, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: D4ajEzGWvhoHAR9C2TnuhtZpS99tu1nZV3VNcZK2t2uC Next: none Diff:
Old | New | Differences | |
---|---|---|---|
447 | 447 | ||
448 | 448 | ||
449 | 449 | func getVotingEmissionEpochInfo () = { | |
450 | - | let $ | |
450 | + | let $t01782918119 = { | |
451 | 451 | let currentEpochUi = value(getInteger(votingEmissionContract, keyCurrentEpochUi())) | |
452 | 452 | let lastFinalizedEpoch = (currentEpochUi - 1) | |
453 | 453 | if ((0 > lastFinalizedEpoch)) | |
454 | 454 | then throwErr("invalid epoch") | |
455 | 455 | else $Tuple2(currentEpochUi, lastFinalizedEpoch) | |
456 | 456 | } | |
457 | - | let currentEpochUi = $ | |
458 | - | let lastFinalizedEpoch = $ | |
457 | + | let currentEpochUi = $t01782918119._1 | |
458 | + | let lastFinalizedEpoch = $t01782918119._2 | |
459 | 459 | let currentEpochStartHeight = value(getInteger(votingEmissionContract, keyStartHeightByEpoch(currentEpochUi))) | |
460 | 460 | $Tuple2(lastFinalizedEpoch, currentEpochStartHeight) | |
461 | 461 | } | |
488 | 488 | ||
489 | 489 | func getUserVoteFinalized (lpAssetIdStr,userAddressStr) = { | |
490 | 490 | let userAddress = addressFromStringValue(userAddressStr) | |
491 | - | let $ | |
492 | - | let lastFinalizedEpoch = $ | |
493 | - | let currentEpochStartHeight = $ | |
494 | - | let $ | |
495 | - | let amountAssetId = $ | |
496 | - | let priceAssetId = $ | |
491 | + | let $t01881018890 = getVotingEmissionEpochInfo() | |
492 | + | let lastFinalizedEpoch = $t01881018890._1 | |
493 | + | let currentEpochStartHeight = $t01881018890._2 | |
494 | + | let $t01889318968 = getPoolAssetsByLpAssetId(lpAssetIdStr) | |
495 | + | let amountAssetId = $t01889318968._1 | |
496 | + | let priceAssetId = $t01889318968._2 | |
497 | 497 | let userVoteKey = keyVote(amountAssetId, priceAssetId, userAddress, lastFinalizedEpoch) | |
498 | 498 | let userVote = valueOrElse(getInteger(votingEmissionContract, userVoteKey), 0) | |
499 | 499 | userVote | |
510 | 510 | ||
511 | 511 | ||
512 | 512 | func getVotingResultStaked (lpAssetIdStr) = { | |
513 | - | let $ | |
514 | - | let lastFinalizedEpoch = $ | |
515 | - | let currentEpochStartHeight = $ | |
513 | + | let $t01951219592 = getVotingEmissionEpochInfo() | |
514 | + | let lastFinalizedEpoch = $t01951219592._1 | |
515 | + | let currentEpochStartHeight = $t01951219592._2 | |
516 | 516 | let votingResultStakedStart = valueOrElse(getInteger(votingEmissionContract, keyVotingResultStaked(lpAssetIdStr, lastFinalizedEpoch)), 0) | |
517 | 517 | let votingResultStaked = valueOrElse(getInteger(this, keyVotingResultStaked(lpAssetIdStr, lastFinalizedEpoch)), votingResultStakedStart) | |
518 | 518 | votingResultStaked | |
520 | 520 | ||
521 | 521 | ||
522 | 522 | func getVotingResultStakedIntegral (lpAssetIdStr) = { | |
523 | - | let $ | |
524 | - | let lastFinalizedEpoch = $ | |
525 | - | let currentEpochStartHeight = $ | |
523 | + | let $t01995420034 = getVotingEmissionEpochInfo() | |
524 | + | let lastFinalizedEpoch = $t01995420034._1 | |
525 | + | let currentEpochStartHeight = $t01995420034._2 | |
526 | 526 | let votingResultStaked = getVotingResultStaked(lpAssetIdStr) | |
527 | 527 | let votingResultStakedIntegralPrev = valueOrElse(getInteger(this, keyVotingResultStakedIntegral(lpAssetIdStr, lastFinalizedEpoch)), 0) | |
528 | 528 | let votingResultStakedLastUpdateHeight = valueOrElse(getInteger(this, keyVotingResultStakedLastUpdateHeight(lpAssetIdStr, lastFinalizedEpoch)), currentEpochStartHeight) | |
533 | 533 | ||
534 | 534 | ||
535 | 535 | func refreshVotingResultStakedIntegral (lpAssetIdStr,stakedVoteDelta) = { | |
536 | - | let $ | |
537 | - | let lastFinalizedEpoch = $ | |
538 | - | let currentEpochStartHeight = $ | |
536 | + | let $t02087120951 = getVotingEmissionEpochInfo() | |
537 | + | let lastFinalizedEpoch = $t02087120951._1 | |
538 | + | let currentEpochStartHeight = $t02087120951._2 | |
539 | 539 | let votingResultStaked = getVotingResultStaked(lpAssetIdStr) | |
540 | 540 | let votingResultStakedNew = (votingResultStaked + stakedVoteDelta) | |
541 | 541 | let votingResultStakedIntegral = getVotingResultStakedIntegral(lpAssetIdStr) | |
544 | 544 | ||
545 | 545 | ||
546 | 546 | func getUserVoteStakedIntegral (lpAssetIdStr,userAddressStr) = { | |
547 | - | let $ | |
548 | - | let lastFinalizedEpoch = $ | |
549 | - | let currentEpochStartHeight = $ | |
547 | + | let $t02156221642 = getVotingEmissionEpochInfo() | |
548 | + | let lastFinalizedEpoch = $t02156221642._1 | |
549 | + | let currentEpochStartHeight = $t02156221642._2 | |
550 | 550 | let userAddress = addressFromStringValue(userAddressStr) | |
551 | 551 | let userVoteStaked = getUserVoteStaked(lpAssetIdStr, userAddressStr) | |
552 | 552 | let userVoteStakedIntegralPrev = valueOrElse(getInteger(this, keyVoteStakedIntegral(lpAssetIdStr, userAddress, lastFinalizedEpoch)), 0) | |
558 | 558 | ||
559 | 559 | ||
560 | 560 | func refreshVoteStakedIntegral (lpAssetIdStr,userAddressStr,edge) = { | |
561 | - | let $ | |
562 | - | let lastFinalizedEpoch = $ | |
563 | - | let currentEpochStartHeight = $ | |
561 | + | let $t02243022510 = getVotingEmissionEpochInfo() | |
562 | + | let lastFinalizedEpoch = $t02243022510._1 | |
563 | + | let currentEpochStartHeight = $t02243022510._2 | |
564 | 564 | let userAddress = addressFromStringValue(userAddressStr) | |
565 | 565 | let userVoteFinalized = getUserVoteFinalized(lpAssetIdStr, userAddressStr) | |
566 | 566 | let actions = if ((userVoteFinalized == 0)) | |
579 | 579 | ||
580 | 580 | ||
581 | 581 | func getStakedVotesIntegralsDiff (lpAssetIdStr,userAddressStr) = { | |
582 | - | let $ | |
583 | - | let lastFinalizedEpoch = $ | |
584 | - | let currentEpochStartHeight = $ | |
582 | + | let $t02336423444 = getVotingEmissionEpochInfo() | |
583 | + | let lastFinalizedEpoch = $t02336423444._1 | |
584 | + | let currentEpochStartHeight = $t02336423444._2 | |
585 | 585 | let userAddress = addressFromStringValue(userAddressStr) | |
586 | 586 | let userVoteStakedIntegralLastKey = keyVoteStakedIntegralLast(lpAssetIdStr, userAddress, lastFinalizedEpoch) | |
587 | 587 | let userVoteStakedIntegralLast = valueOrElse(getInteger(this, userVoteStakedIntegralLastKey), 0) | |
642 | 642 | if ((0 > userBoostEmissionIntegral)) | |
643 | 643 | then throwErr("wrong calculations") | |
644 | 644 | else { | |
645 | - | let $ | |
646 | - | let stakedVotesIntegralsActions = $ | |
647 | - | let userVoteIntegralDiff = $ | |
648 | - | let totalVotesIntegralDiff = $ | |
645 | + | let $t02706327202 = getStakedVotesIntegralsDiff(lpAssetIdStr, userAddressStr) | |
646 | + | let stakedVotesIntegralsActions = $t02706327202._1 | |
647 | + | let userVoteIntegralDiff = $t02706327202._2 | |
648 | + | let totalVotesIntegralDiff = $t02706327202._3 | |
649 | 649 | let poolUserBoostEmissionIntegral = fraction(userBoostEmissionIntegral, poolWeight, POOLWEIGHTMULT) | |
650 | 650 | let userBoostAvaliableToClaimTotalNew = if ((totalVotesIntegralDiff == 0)) | |
651 | 651 | then 0 | |
732 | 732 | ||
733 | 733 | @Callable(i) | |
734 | 734 | func lockRef (duration,referrerAddress,signature) = { | |
735 | - | let $ | |
736 | - | let lockActionsResult = $ | |
737 | - | let gWxAmountStart = $ | |
735 | + | let $t03181331878 = lockActions(i, duration) | |
736 | + | let lockActionsResult = $t03181331878._1 | |
737 | + | let gWxAmountStart = $t03181331878._2 | |
738 | 738 | let referralAddress = toString(i.caller) | |
739 | 739 | let refInv = if (if ((referrerAddress == "")) | |
740 | 740 | then true | |
755 | 755 | ||
756 | 756 | @Callable(i) | |
757 | 757 | func lock (duration) = { | |
758 | - | let $ | |
759 | - | let lockActionsResult = $ | |
760 | - | let gWxAmountStart = $ | |
758 | + | let $t03233632401 = lockActions(i, duration) | |
759 | + | let lockActionsResult = $t03233632401._1 | |
760 | + | let gWxAmountStart = $t03233632401._2 | |
761 | 761 | let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil) | |
762 | 762 | if ((updateRefActivity == updateRefActivity)) | |
763 | 763 | then $Tuple2(lockActionsResult, unit) | |
821 | 821 | func claimWxBoost (lpAssetIdStr,userAddressStr) = if ((stakingContract != i.caller)) | |
822 | 822 | then throwErr("permissions denied") | |
823 | 823 | else { | |
824 | - | let $ | |
825 | - | let userBoostAvailable = $ | |
826 | - | let dataState = $ | |
827 | - | let debug = $ | |
824 | + | let $t03550635608 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false) | |
825 | + | let userBoostAvailable = $t03550635608._1 | |
826 | + | let dataState = $t03550635608._2 | |
827 | + | let debug = $t03550635608._3 | |
828 | 828 | $Tuple2(dataState, [userBoostAvailable]) | |
829 | 829 | } | |
830 | 830 | ||
832 | 832 | ||
833 | 833 | @Callable(i) | |
834 | 834 | func claimWxBoostREADONLY (lpAssetIdStr,userAddressStr) = { | |
835 | - | let $ | |
836 | - | let userBoostAvailable = $ | |
837 | - | let dataState = $ | |
838 | - | let debug = $ | |
835 | + | let $t03574035841 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true) | |
836 | + | let userBoostAvailable = $t03574035841._1 | |
837 | + | let dataState = $t03574035841._2 | |
838 | + | let debug = $t03574035841._3 | |
839 | 839 | $Tuple2(nil, [userBoostAvailable, debug]) | |
840 | 840 | } | |
841 | 841 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | let SCALE8 = 8 | |
7 | 7 | ||
8 | 8 | let MULT8 = 100000000 | |
9 | 9 | ||
10 | 10 | let POOLWEIGHTMULT = MULT8 | |
11 | 11 | ||
12 | 12 | func wrapErr (msg) = makeString(["boosting.ride:", msg], " ") | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func throwErr (msg) = throw(wrapErr(msg)) | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | func strf (address,key) = valueOrErrorMessage(getString(address, key), wrapErr((("mandatory this." + key) + " is not defined"))) | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func ioz (address,key) = valueOrElse(getInteger(address, key), 0) | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | func iod (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal) | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func iof (address,key) = valueOrErrorMessage(getInteger(address, key), wrapErr((("mandatory this." + key) + " is not defined"))) | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func abs (val) = if ((0 > val)) | |
31 | 31 | then -(val) | |
32 | 32 | else val | |
33 | 33 | ||
34 | 34 | ||
35 | 35 | func aal (val) = match val { | |
36 | 36 | case valAnyLyst: List[Any] => | |
37 | 37 | valAnyLyst | |
38 | 38 | case _ => | |
39 | 39 | throwErr("fail to cast into List[Any]") | |
40 | 40 | } | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func ai (val) = match val { | |
44 | 44 | case valInt: Int => | |
45 | 45 | valInt | |
46 | 46 | case _ => | |
47 | 47 | throwErr("fail to cast into Int") | |
48 | 48 | } | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func keyReferralsContractAddress () = makeString(["%s%s", "config", "referralsContractAddress"], SEP) | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | let referralsContractAddressOrFail = addressFromStringValue(strf(this, keyReferralsContractAddress())) | |
55 | 55 | ||
56 | 56 | let keyReferralProgramName = makeString(["%s%s", "referral", "programName"], SEP) | |
57 | 57 | ||
58 | 58 | let referralProgramNameDefault = "wxlock" | |
59 | 59 | ||
60 | 60 | let referralProgramName = valueOrElse(getString(this, keyReferralProgramName), referralProgramNameDefault) | |
61 | 61 | ||
62 | 62 | func keyFactoryAddress () = "%s%s__config__factoryAddress" | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | let IdxFactoryCfgStakingDapp = 1 | |
66 | 66 | ||
67 | 67 | let IdxFactoryCfgBoostingDapp = 2 | |
68 | 68 | ||
69 | 69 | let IdxFactoryCfgIdoDapp = 3 | |
70 | 70 | ||
71 | 71 | let IdxFactoryCfgTeamDapp = 4 | |
72 | 72 | ||
73 | 73 | let IdxFactoryCfgEmissionDapp = 5 | |
74 | 74 | ||
75 | 75 | let IdxFactoryCfgRestDapp = 6 | |
76 | 76 | ||
77 | 77 | let IdxFactoryCfgSlippageDapp = 7 | |
78 | 78 | ||
79 | 79 | let IdxFactoryCfgDaoDapp = 8 | |
80 | 80 | ||
81 | 81 | let IdxFactoryCfgMarketingDapp = 9 | |
82 | 82 | ||
83 | 83 | let IdxFactoryCfgGwxRewardDapp = 10 | |
84 | 84 | ||
85 | 85 | let IdxFactoryCfgBirdsDapp = 11 | |
86 | 86 | ||
87 | 87 | func keyFactoryCfg () = "%s__factoryConfig" | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func keyFactoryLpList () = "%s__lpTokensList" | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP) | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func keyFactoryPoolWeightHistory (poolAddress,num) = ((("%s%s__poolWeight__" + poolAddress) + "__") + toString(num)) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func readFactoryAddressOrFail () = addressFromStringValue(strf(this, keyFactoryAddress())) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func readLpList () = split(valueOrElse(getString(readFactoryAddressOrFail(), keyFactoryLpList()), ""), SEP) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func readFactoryCfgOrFail (factory) = split(strf(factory, keyFactoryCfg()), SEP) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp]) | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp]) | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp]) | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp]) | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func keyManagerVaultAddress () = "%s__managerVaultAddress" | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current" | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current" | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func keyEmissionStartBlock () = "%s%s__emission__startBlock" | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func keyBoostingV2LastUpdateHeight () = "%s%s__boostingV2__startBlock" | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func keyBoostingV2Integral () = "%s%s__boostingV2__integral" | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func keyEmissionDurationInBlocks () = "%s%s__emission__duration" | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func keyEmissionEndBlock () = "%s%s__emission__endBlock" | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func keyNextPeriod () = "%s__nextPeriod" | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func keyGwxRewardEmissionStartHeight () = "%s%s__gwxRewardEmissionPart__startHeight" | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | let IdxCfgAssetId = 1 | |
157 | 157 | ||
158 | 158 | let IdxCfgMinLockAmount = 2 | |
159 | 159 | ||
160 | 160 | let IdxCfgMinLockDuration = 3 | |
161 | 161 | ||
162 | 162 | let IdxCfgMaxLockDuration = 4 | |
163 | 163 | ||
164 | 164 | let IdxCfgMathContract = 5 | |
165 | 165 | ||
166 | 166 | func keyConfig () = "%s__config" | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | func readConfigArrayOrFail () = split(strf(this, keyConfig()), SEP) | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | let mathContract = addressFromStringValue(readConfigArrayOrFail()[IdxCfgMathContract]) | |
173 | 173 | ||
174 | 174 | func formatConfigS (assetId,minLockAmount,minLockDuration,maxLockDuration,mathContract) = makeString(["%s%d%d%d", assetId, minLockAmount, minLockDuration, maxLockDuration, mathContract], SEP) | |
175 | 175 | ||
176 | 176 | ||
177 | 177 | func formatConfig (assetId,minLockAmount,minLockDuration,maxLockDuration,mathContract) = formatConfigS(assetId, toString(minLockAmount), toString(minLockDuration), toString(maxLockDuration), mathContract) | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) { | |
181 | 181 | case s: String => | |
182 | 182 | addressFromStringValue(s) | |
183 | 183 | case _ => | |
184 | 184 | this | |
185 | 185 | } | |
186 | 186 | ||
187 | 187 | ||
188 | 188 | func managerPublicKeyOrUnit () = { | |
189 | 189 | let managerVaultAddress = getManagerVaultAddressOrThis() | |
190 | 190 | match getString(managerVaultAddress, keyManagerPublicKey()) { | |
191 | 191 | case s: String => | |
192 | 192 | fromBase58String(s) | |
193 | 193 | case _: Unit => | |
194 | 194 | unit | |
195 | 195 | case _ => | |
196 | 196 | throw("Match error") | |
197 | 197 | } | |
198 | 198 | } | |
199 | 199 | ||
200 | 200 | ||
201 | 201 | func mustManager (i) = { | |
202 | 202 | let pd = throwErr("Permission denied") | |
203 | 203 | match managerPublicKeyOrUnit() { | |
204 | 204 | case pk: ByteVector => | |
205 | 205 | if ((i.callerPublicKey == pk)) | |
206 | 206 | then true | |
207 | 207 | else pd | |
208 | 208 | case _: Unit => | |
209 | 209 | if ((i.caller == this)) | |
210 | 210 | then true | |
211 | 211 | else pd | |
212 | 212 | case _ => | |
213 | 213 | throw("Match error") | |
214 | 214 | } | |
215 | 215 | } | |
216 | 216 | ||
217 | 217 | ||
218 | 218 | let IdxLockUserNum = 1 | |
219 | 219 | ||
220 | 220 | let IdxLockAmount = 2 | |
221 | 221 | ||
222 | 222 | let IdxLockStart = 3 | |
223 | 223 | ||
224 | 224 | let IdxLockDuration = 4 | |
225 | 225 | ||
226 | 226 | let IdxLockParamK = 5 | |
227 | 227 | ||
228 | 228 | let IdxLockParamB = 6 | |
229 | 229 | ||
230 | 230 | func keyLockParamsRecord (userAddress) = makeString(["%s%s__lock", userAddress], SEP) | |
231 | 231 | ||
232 | 232 | ||
233 | 233 | func readLockParamsRecordOrFail (userAddress) = split(strf(this, keyLockParamsRecord(userAddress)), SEP) | |
234 | 234 | ||
235 | 235 | ||
236 | 236 | func formatLockParamsRecordS (userNum,amount,start,duration,paramK,paramB,lastUpdTimestamp,gwxAmount) = makeString(["%d%d%d%d%d%d%d%d", userNum, amount, start, duration, paramK, paramB, lastUpdTimestamp, gwxAmount], SEP) | |
237 | 237 | ||
238 | 238 | ||
239 | 239 | func formatLockParamsRecord (userNum,amount,start,duration,paramK,paramB,gwxAmount) = formatLockParamsRecordS(userNum, toString(amount), toString(start), toString(duration), toString(paramK), toString(paramB), toString(lastBlock.timestamp), toString(gwxAmount)) | |
240 | 240 | ||
241 | 241 | ||
242 | 242 | func keyNextUserNum () = "%s__nextUserNum" | |
243 | 243 | ||
244 | 244 | ||
245 | 245 | func keyUser2NumMapping (userAddress) = makeString(["%s%s%s__mapping__user2num", userAddress], SEP) | |
246 | 246 | ||
247 | 247 | ||
248 | 248 | func keyNum2UserMapping (num) = makeString(["%s%s%s__mapping__num2user", num], SEP) | |
249 | 249 | ||
250 | 250 | ||
251 | 251 | func keyLockParamUserAmount (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "amount"], SEP) | |
252 | 252 | ||
253 | 253 | ||
254 | 254 | func keyLockParamStartBlock (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "start"], SEP) | |
255 | 255 | ||
256 | 256 | ||
257 | 257 | func keyLockParamDuration (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "duration"], SEP) | |
258 | 258 | ||
259 | 259 | ||
260 | 260 | func keyLockParamK (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "k"], SEP) | |
261 | 261 | ||
262 | 262 | ||
263 | 263 | func keyLockParamB (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "b"], SEP) | |
264 | 264 | ||
265 | 265 | ||
266 | 266 | func keyLockParamByPeriodK (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "k", period], SEP) | |
267 | 267 | ||
268 | 268 | ||
269 | 269 | func keyLockParamByPeriodB (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "b", period], SEP) | |
270 | 270 | ||
271 | 271 | ||
272 | 272 | func keyLockParamTotalAmount () = "%s%s__stats__activeTotalLocked" | |
273 | 273 | ||
274 | 274 | ||
275 | 275 | func keyStatsLocksDurationSumInBlocks () = "%s%s__stats__locksDurationSumInBlocks" | |
276 | 276 | ||
277 | 277 | ||
278 | 278 | func keyStatsLocksCount () = "%s%s__stats__locksCount" | |
279 | 279 | ||
280 | 280 | ||
281 | 281 | func keyStatsUsersCount () = "%s%s__stats__activeUsersCount" | |
282 | 282 | ||
283 | 283 | ||
284 | 284 | func keyUserBoostEmissionLastINTEGRAL (userNum) = makeString(["%s%d__userBoostEmissionLastIntV2", userNum], SEP) | |
285 | 285 | ||
286 | 286 | ||
287 | 287 | func keyUserLpBoostEmissionLastINTEGRAL (userNum,lpAssetId) = makeString(["%s%d__userBoostEmissionLastIntV2", userNum, lpAssetId], SEP) | |
288 | 288 | ||
289 | 289 | ||
290 | 290 | func keyUserMaxBoostINTEGRAL (userNum) = makeString(["%s%d__maxBoostInt", userNum], SEP) | |
291 | 291 | ||
292 | 292 | ||
293 | 293 | func keyTotalMaxBoostINTEGRAL () = "%s%s__maxBoostInt__total" | |
294 | 294 | ||
295 | 295 | ||
296 | 296 | func keyUserBoostAvalaibleToClaimTotal (userNum) = makeString(["%s%d__userBoostAvaliableToClaimTotal", userNum], SEP) | |
297 | 297 | ||
298 | 298 | ||
299 | 299 | func keyUserBoostClaimed (userNum) = makeString(["%s%d__userBoostClaimed", userNum], SEP) | |
300 | 300 | ||
301 | 301 | ||
302 | 302 | func keyTotalCachedGwx () = "%s%s__gwxCached__total" | |
303 | 303 | ||
304 | 304 | ||
305 | 305 | func keyTotalCachedGwxCorrective () = "%s__gwxCachedTotalCorrective" | |
306 | 306 | ||
307 | 307 | ||
308 | 308 | func keyVote (amountAssetId,priceAssetId,address,epoch) = makeString(["%s%s%s%s%d", "vote", amountAssetId, priceAssetId, toString(address), toString(epoch)], SEP) | |
309 | 309 | ||
310 | 310 | ||
311 | 311 | func keyStartHeightByEpoch (epoch) = makeString(["%s%d", "startHeight", toString(epoch)], SEP) | |
312 | 312 | ||
313 | 313 | ||
314 | 314 | func keyCurrentEpochUi () = makeString(["%s", "currentEpochUi"], SEP) | |
315 | 315 | ||
316 | 316 | ||
317 | 317 | func keyVotingResultStaked (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStaked", lpAssetIdStr, toString(epoch)], SEP) | |
318 | 318 | ||
319 | 319 | ||
320 | 320 | func keyVotingResultStakedIntegral (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStakedIntegral", lpAssetIdStr, toString(epoch)], SEP) | |
321 | 321 | ||
322 | 322 | ||
323 | 323 | func keyVotingResultStakedLastUpdateHeight (lpAssetIdStr,epoch) = makeString(["%s%s%d", "votingResultStakedIntegralLastUpdateHeight", lpAssetIdStr, toString(epoch)], SEP) | |
324 | 324 | ||
325 | 325 | ||
326 | 326 | func keyVotingResultStakedIntegralLast (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "votingResultStakedIntegralLast", lpAssetIdStr, toString(address), toString(epoch)], SEP) | |
327 | 327 | ||
328 | 328 | ||
329 | 329 | func keyVoteStakedIntegral (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "voteStakedIntegral", lpAssetIdStr, toString(address), toString(epoch)], SEP) | |
330 | 330 | ||
331 | 331 | ||
332 | 332 | func keyVoteStakedLastUpdateHeight (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "voteStakedIntegralLastUpdateHeight", lpAssetIdStr, toString(address), toString(epoch)], SEP) | |
333 | 333 | ||
334 | 334 | ||
335 | 335 | func keyVoteStakedIntegralLast (lpAssetIdStr,address,epoch) = makeString(["%s%s%s%d", "voteStakedIntegralLast", lpAssetIdStr, toString(address), toString(epoch)], SEP) | |
336 | 336 | ||
337 | 337 | ||
338 | 338 | func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s", "staked", userAddressStr, lpAssetIdStr], SEP) | |
339 | 339 | ||
340 | 340 | ||
341 | 341 | let factoryContract = readFactoryAddressOrFail() | |
342 | 342 | ||
343 | 343 | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
344 | 344 | ||
345 | 345 | let emissionContract = getEmissionAddressOrFail(factoryCfg) | |
346 | 346 | ||
347 | 347 | let stakingContract = getStakingAddressOrFail(factoryCfg) | |
348 | 348 | ||
349 | 349 | let gwxRewardContract = getGwxRewardAddressOrFail(factoryCfg) | |
350 | 350 | ||
351 | 351 | let lpStakingPoolsContract = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(makeString(["%s", "lpStakingPoolsContract"], SEP)), wrapErr("lp_staking_pools contract address is undefined"))), wrapErr("invalid lp_staking_pools contract address")) | |
352 | 352 | ||
353 | 353 | let keyVotingEmissionContract = makeString(["%s", "votingEmissionContract"], SEP) | |
354 | 354 | ||
355 | 355 | let votingEmissionContract = addressFromStringValue(getStringValue(factoryContract, keyVotingEmissionContract)) | |
356 | 356 | ||
357 | 357 | let boostCoeff = { | |
358 | 358 | let @ = invoke(emissionContract, "getBoostCoeffREADONLY", nil, nil) | |
359 | 359 | if ($isInstanceOf(@, "Int")) | |
360 | 360 | then @ | |
361 | 361 | else throw(($getType(@) + " couldn't be cast to Int")) | |
362 | 362 | } | |
363 | 363 | ||
364 | 364 | func getTotalCachedGwx (correct) = { | |
365 | 365 | let currentEpochUi = getIntegerValue(votingEmissionContract, keyCurrentEpochUi()) | |
366 | 366 | let keyTargetEpoch = makeString(["%s%s", "totalCachedGwxCorrection__activationEpoch"], SEP) | |
367 | 367 | let targetEpochOption = getInteger(this, keyTargetEpoch) | |
368 | 368 | let totalCachedGwxRaw = valueOrElse(getInteger(this, keyTotalCachedGwx()), 0) | |
369 | 369 | let isCorrectionActivated = if (isDefined(targetEpochOption)) | |
370 | 370 | then (currentEpochUi >= value(targetEpochOption)) | |
371 | 371 | else false | |
372 | 372 | let corrective = if (if (isCorrectionActivated) | |
373 | 373 | then correct | |
374 | 374 | else false) | |
375 | 375 | then valueOrElse(getInteger(this, keyTotalCachedGwxCorrective()), 0) | |
376 | 376 | else 0 | |
377 | 377 | max([0, (totalCachedGwxRaw + corrective)]) | |
378 | 378 | } | |
379 | 379 | ||
380 | 380 | ||
381 | 381 | func HistoryEntry (type,user,amount,lockStart,duration,k,b,i) = { | |
382 | 382 | let historyKEY = makeString(["%s%s%s%s__history", type, user, toBase58String(i.transactionId)], SEP) | |
383 | 383 | let historyDATA = makeString(["%d%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(amount), toString(lockStart), toString(duration), toString(k), toString(b)], SEP) | |
384 | 384 | StringEntry(historyKEY, historyDATA) | |
385 | 385 | } | |
386 | 386 | ||
387 | 387 | ||
388 | 388 | func StatsEntry (totalLockedInc,durationInc,lockCountInc,usersCountInc) = { | |
389 | 389 | let locksDurationSumInBlocksKEY = keyStatsLocksDurationSumInBlocks() | |
390 | 390 | let locksCountKEY = keyStatsLocksCount() | |
391 | 391 | let usersCountKEY = keyStatsUsersCount() | |
392 | 392 | let totalAmountKEY = keyLockParamTotalAmount() | |
393 | 393 | let locksDurationSumInBlocks = ioz(this, locksDurationSumInBlocksKEY) | |
394 | 394 | let locksCount = ioz(this, locksCountKEY) | |
395 | 395 | let usersCount = ioz(this, usersCountKEY) | |
396 | 396 | let totalAmount = ioz(this, totalAmountKEY) | |
397 | 397 | [IntegerEntry(locksDurationSumInBlocksKEY, (locksDurationSumInBlocks + durationInc)), IntegerEntry(locksCountKEY, (locksCount + lockCountInc)), IntegerEntry(usersCountKEY, (usersCount + usersCountInc)), IntegerEntry(totalAmountKEY, (totalAmount + totalLockedInc))] | |
398 | 398 | } | |
399 | 399 | ||
400 | 400 | ||
401 | 401 | func calcGwxAmount (kRaw,bRaw,h) = { | |
402 | 402 | let SCALE = 1000 | |
403 | 403 | (((kRaw * h) + bRaw) / SCALE) | |
404 | 404 | } | |
405 | 405 | ||
406 | 406 | ||
407 | 407 | func LockParamsEntry (userAddress,userNum,amount,start,duration,k,b,period) = { | |
408 | 408 | let userAmountKEY = keyLockParamUserAmount(userNum) | |
409 | 409 | let startBlockKEY = keyLockParamStartBlock(userNum) | |
410 | 410 | let durationKEY = keyLockParamDuration(userNum) | |
411 | 411 | let kKEY = keyLockParamK(userNum) | |
412 | 412 | let bKEY = keyLockParamB(userNum) | |
413 | 413 | let kByPeriodKEY = keyLockParamByPeriodK(userNum, period) | |
414 | 414 | let bByPeriodKEY = keyLockParamByPeriodB(userNum, period) | |
415 | 415 | let gwxAmount = calcGwxAmount(k, b, height) | |
416 | 416 | [IntegerEntry(userAmountKEY, amount), IntegerEntry(startBlockKEY, start), IntegerEntry(durationKEY, duration), IntegerEntry(kKEY, k), IntegerEntry(bKEY, b), IntegerEntry(kByPeriodKEY, k), IntegerEntry(bByPeriodKEY, b), StringEntry(keyLockParamsRecord(userAddress), formatLockParamsRecord(userNum, amount, start, duration, k, b, gwxAmount))] | |
417 | 417 | } | |
418 | 418 | ||
419 | 419 | ||
420 | 420 | func extractOptionalPaymentAmountOrFail (i,expectedAssetId) = if ((size(i.payments) > 1)) | |
421 | 421 | then throwErr("only one payment is allowed") | |
422 | 422 | else if ((size(i.payments) == 0)) | |
423 | 423 | then 0 | |
424 | 424 | else { | |
425 | 425 | let pmt = i.payments[0] | |
426 | 426 | if ((value(pmt.assetId) != expectedAssetId)) | |
427 | 427 | then throwErr("invalid asset id in payment") | |
428 | 428 | else pmt.amount | |
429 | 429 | } | |
430 | 430 | ||
431 | 431 | ||
432 | 432 | func calcUserGwxAmountAtHeight (userAddress,targetHeight) = { | |
433 | 433 | let EMPTY = "empty" | |
434 | 434 | let user2NumMappingKEY = keyUser2NumMapping(userAddress) | |
435 | 435 | let userNum = valueOrElse(getString(user2NumMappingKEY), EMPTY) | |
436 | 436 | let k = valueOrElse(getInteger(keyLockParamK(userNum)), 0) | |
437 | 437 | let b = valueOrElse(getInteger(keyLockParamB(userNum)), 0) | |
438 | 438 | let gwxAmountCalc = calcGwxAmount(k, b, targetHeight) | |
439 | 439 | let gwxAmount = if ((0 > gwxAmountCalc)) | |
440 | 440 | then 0 | |
441 | 441 | else gwxAmountCalc | |
442 | 442 | gwxAmount | |
443 | 443 | } | |
444 | 444 | ||
445 | 445 | ||
446 | 446 | func calcCurrentGwxAmount (userAddress) = calcUserGwxAmountAtHeight(userAddress, height) | |
447 | 447 | ||
448 | 448 | ||
449 | 449 | func getVotingEmissionEpochInfo () = { | |
450 | - | let $ | |
450 | + | let $t01782918119 = { | |
451 | 451 | let currentEpochUi = value(getInteger(votingEmissionContract, keyCurrentEpochUi())) | |
452 | 452 | let lastFinalizedEpoch = (currentEpochUi - 1) | |
453 | 453 | if ((0 > lastFinalizedEpoch)) | |
454 | 454 | then throwErr("invalid epoch") | |
455 | 455 | else $Tuple2(currentEpochUi, lastFinalizedEpoch) | |
456 | 456 | } | |
457 | - | let currentEpochUi = $ | |
458 | - | let lastFinalizedEpoch = $ | |
457 | + | let currentEpochUi = $t01782918119._1 | |
458 | + | let lastFinalizedEpoch = $t01782918119._2 | |
459 | 459 | let currentEpochStartHeight = value(getInteger(votingEmissionContract, keyStartHeightByEpoch(currentEpochUi))) | |
460 | 460 | $Tuple2(lastFinalizedEpoch, currentEpochStartHeight) | |
461 | 461 | } | |
462 | 462 | ||
463 | 463 | ||
464 | 464 | func getPoolAssetsByLpAssetId (lpAssetIdStr) = { | |
465 | 465 | let idxAmountAssetId = 4 | |
466 | 466 | let idxPriceAssetId = 5 | |
467 | 467 | let poolCfg = { | |
468 | 468 | let @ = invoke(factoryContract, "getPoolConfigByLpAssetIdREADONLY", [lpAssetIdStr], nil) | |
469 | 469 | if ($isInstanceOf(@, "List[Any]")) | |
470 | 470 | then @ | |
471 | 471 | else throw(($getType(@) + " couldn't be cast to List[Any]")) | |
472 | 472 | } | |
473 | 473 | let amountAssetId = { | |
474 | 474 | let @ = poolCfg[idxAmountAssetId] | |
475 | 475 | if ($isInstanceOf(@, "String")) | |
476 | 476 | then @ | |
477 | 477 | else throw(($getType(@) + " couldn't be cast to String")) | |
478 | 478 | } | |
479 | 479 | let priceAssetId = { | |
480 | 480 | let @ = poolCfg[idxPriceAssetId] | |
481 | 481 | if ($isInstanceOf(@, "String")) | |
482 | 482 | then @ | |
483 | 483 | else throw(($getType(@) + " couldn't be cast to String")) | |
484 | 484 | } | |
485 | 485 | $Tuple2(amountAssetId, priceAssetId) | |
486 | 486 | } | |
487 | 487 | ||
488 | 488 | ||
489 | 489 | func getUserVoteFinalized (lpAssetIdStr,userAddressStr) = { | |
490 | 490 | let userAddress = addressFromStringValue(userAddressStr) | |
491 | - | let $ | |
492 | - | let lastFinalizedEpoch = $ | |
493 | - | let currentEpochStartHeight = $ | |
494 | - | let $ | |
495 | - | let amountAssetId = $ | |
496 | - | let priceAssetId = $ | |
491 | + | let $t01881018890 = getVotingEmissionEpochInfo() | |
492 | + | let lastFinalizedEpoch = $t01881018890._1 | |
493 | + | let currentEpochStartHeight = $t01881018890._2 | |
494 | + | let $t01889318968 = getPoolAssetsByLpAssetId(lpAssetIdStr) | |
495 | + | let amountAssetId = $t01889318968._1 | |
496 | + | let priceAssetId = $t01889318968._2 | |
497 | 497 | let userVoteKey = keyVote(amountAssetId, priceAssetId, userAddress, lastFinalizedEpoch) | |
498 | 498 | let userVote = valueOrElse(getInteger(votingEmissionContract, userVoteKey), 0) | |
499 | 499 | userVote | |
500 | 500 | } | |
501 | 501 | ||
502 | 502 | ||
503 | 503 | func getUserVoteStaked (lpAssetIdStr,userAddressStr) = { | |
504 | 504 | let stakedByUser = valueOrElse(getInteger(stakingContract, keyStakedByUser(userAddressStr, lpAssetIdStr)), 0) | |
505 | 505 | let userVote = getUserVoteFinalized(lpAssetIdStr, userAddressStr) | |
506 | 506 | if ((stakedByUser == 0)) | |
507 | 507 | then 0 | |
508 | 508 | else userVote | |
509 | 509 | } | |
510 | 510 | ||
511 | 511 | ||
512 | 512 | func getVotingResultStaked (lpAssetIdStr) = { | |
513 | - | let $ | |
514 | - | let lastFinalizedEpoch = $ | |
515 | - | let currentEpochStartHeight = $ | |
513 | + | let $t01951219592 = getVotingEmissionEpochInfo() | |
514 | + | let lastFinalizedEpoch = $t01951219592._1 | |
515 | + | let currentEpochStartHeight = $t01951219592._2 | |
516 | 516 | let votingResultStakedStart = valueOrElse(getInteger(votingEmissionContract, keyVotingResultStaked(lpAssetIdStr, lastFinalizedEpoch)), 0) | |
517 | 517 | let votingResultStaked = valueOrElse(getInteger(this, keyVotingResultStaked(lpAssetIdStr, lastFinalizedEpoch)), votingResultStakedStart) | |
518 | 518 | votingResultStaked | |
519 | 519 | } | |
520 | 520 | ||
521 | 521 | ||
522 | 522 | func getVotingResultStakedIntegral (lpAssetIdStr) = { | |
523 | - | let $ | |
524 | - | let lastFinalizedEpoch = $ | |
525 | - | let currentEpochStartHeight = $ | |
523 | + | let $t01995420034 = getVotingEmissionEpochInfo() | |
524 | + | let lastFinalizedEpoch = $t01995420034._1 | |
525 | + | let currentEpochStartHeight = $t01995420034._2 | |
526 | 526 | let votingResultStaked = getVotingResultStaked(lpAssetIdStr) | |
527 | 527 | let votingResultStakedIntegralPrev = valueOrElse(getInteger(this, keyVotingResultStakedIntegral(lpAssetIdStr, lastFinalizedEpoch)), 0) | |
528 | 528 | let votingResultStakedLastUpdateHeight = valueOrElse(getInteger(this, keyVotingResultStakedLastUpdateHeight(lpAssetIdStr, lastFinalizedEpoch)), currentEpochStartHeight) | |
529 | 529 | let votingResultStakedIntegralDh = (height - votingResultStakedLastUpdateHeight) | |
530 | 530 | let votingResultStakedIntegral = ((votingResultStakedIntegralDh * votingResultStaked) + votingResultStakedIntegralPrev) | |
531 | 531 | votingResultStakedIntegral | |
532 | 532 | } | |
533 | 533 | ||
534 | 534 | ||
535 | 535 | func refreshVotingResultStakedIntegral (lpAssetIdStr,stakedVoteDelta) = { | |
536 | - | let $ | |
537 | - | let lastFinalizedEpoch = $ | |
538 | - | let currentEpochStartHeight = $ | |
536 | + | let $t02087120951 = getVotingEmissionEpochInfo() | |
537 | + | let lastFinalizedEpoch = $t02087120951._1 | |
538 | + | let currentEpochStartHeight = $t02087120951._2 | |
539 | 539 | let votingResultStaked = getVotingResultStaked(lpAssetIdStr) | |
540 | 540 | let votingResultStakedNew = (votingResultStaked + stakedVoteDelta) | |
541 | 541 | let votingResultStakedIntegral = getVotingResultStakedIntegral(lpAssetIdStr) | |
542 | 542 | [IntegerEntry(keyVotingResultStaked(lpAssetIdStr, lastFinalizedEpoch), votingResultStakedNew), IntegerEntry(keyVotingResultStakedLastUpdateHeight(lpAssetIdStr, lastFinalizedEpoch), height), IntegerEntry(keyVotingResultStakedIntegral(lpAssetIdStr, lastFinalizedEpoch), votingResultStakedIntegral)] | |
543 | 543 | } | |
544 | 544 | ||
545 | 545 | ||
546 | 546 | func getUserVoteStakedIntegral (lpAssetIdStr,userAddressStr) = { | |
547 | - | let $ | |
548 | - | let lastFinalizedEpoch = $ | |
549 | - | let currentEpochStartHeight = $ | |
547 | + | let $t02156221642 = getVotingEmissionEpochInfo() | |
548 | + | let lastFinalizedEpoch = $t02156221642._1 | |
549 | + | let currentEpochStartHeight = $t02156221642._2 | |
550 | 550 | let userAddress = addressFromStringValue(userAddressStr) | |
551 | 551 | let userVoteStaked = getUserVoteStaked(lpAssetIdStr, userAddressStr) | |
552 | 552 | let userVoteStakedIntegralPrev = valueOrElse(getInteger(this, keyVoteStakedIntegral(lpAssetIdStr, userAddress, lastFinalizedEpoch)), 0) | |
553 | 553 | let userVoteStakedLastUpdateHeight = valueOrElse(getInteger(this, keyVoteStakedLastUpdateHeight(lpAssetIdStr, userAddress, lastFinalizedEpoch)), currentEpochStartHeight) | |
554 | 554 | let userVoteStakedIntegralDh = (height - userVoteStakedLastUpdateHeight) | |
555 | 555 | let userVoteStakedIntegral = ((userVoteStakedIntegralDh * userVoteStaked) + userVoteStakedIntegralPrev) | |
556 | 556 | userVoteStakedIntegral | |
557 | 557 | } | |
558 | 558 | ||
559 | 559 | ||
560 | 560 | func refreshVoteStakedIntegral (lpAssetIdStr,userAddressStr,edge) = { | |
561 | - | let $ | |
562 | - | let lastFinalizedEpoch = $ | |
563 | - | let currentEpochStartHeight = $ | |
561 | + | let $t02243022510 = getVotingEmissionEpochInfo() | |
562 | + | let lastFinalizedEpoch = $t02243022510._1 | |
563 | + | let currentEpochStartHeight = $t02243022510._2 | |
564 | 564 | let userAddress = addressFromStringValue(userAddressStr) | |
565 | 565 | let userVoteFinalized = getUserVoteFinalized(lpAssetIdStr, userAddressStr) | |
566 | 566 | let actions = if ((userVoteFinalized == 0)) | |
567 | 567 | then nil | |
568 | 568 | else { | |
569 | 569 | let stakedVoteDelta = if (edge) | |
570 | 570 | then userVoteFinalized | |
571 | 571 | else -(userVoteFinalized) | |
572 | 572 | let votingResultActions = refreshVotingResultStakedIntegral(lpAssetIdStr, stakedVoteDelta) | |
573 | 573 | let userVoteStakedIntegral = getUserVoteStakedIntegral(lpAssetIdStr, userAddressStr) | |
574 | 574 | let voteActions = [IntegerEntry(keyVoteStakedLastUpdateHeight(lpAssetIdStr, userAddress, lastFinalizedEpoch), height), IntegerEntry(keyVoteStakedIntegral(lpAssetIdStr, userAddress, lastFinalizedEpoch), userVoteStakedIntegral)] | |
575 | 575 | (votingResultActions ++ voteActions) | |
576 | 576 | } | |
577 | 577 | actions | |
578 | 578 | } | |
579 | 579 | ||
580 | 580 | ||
581 | 581 | func getStakedVotesIntegralsDiff (lpAssetIdStr,userAddressStr) = { | |
582 | - | let $ | |
583 | - | let lastFinalizedEpoch = $ | |
584 | - | let currentEpochStartHeight = $ | |
582 | + | let $t02336423444 = getVotingEmissionEpochInfo() | |
583 | + | let lastFinalizedEpoch = $t02336423444._1 | |
584 | + | let currentEpochStartHeight = $t02336423444._2 | |
585 | 585 | let userAddress = addressFromStringValue(userAddressStr) | |
586 | 586 | let userVoteStakedIntegralLastKey = keyVoteStakedIntegralLast(lpAssetIdStr, userAddress, lastFinalizedEpoch) | |
587 | 587 | let userVoteStakedIntegralLast = valueOrElse(getInteger(this, userVoteStakedIntegralLastKey), 0) | |
588 | 588 | let votingResultStakedIntegralLastKey = keyVotingResultStakedIntegralLast(lpAssetIdStr, userAddress, lastFinalizedEpoch) | |
589 | 589 | let votingResultStakedIntegralLast = valueOrElse(getInteger(this, votingResultStakedIntegralLastKey), 0) | |
590 | 590 | let userVoteStakedIntegral = getUserVoteStakedIntegral(lpAssetIdStr, userAddressStr) | |
591 | 591 | let votingResultStakedIntegral = getVotingResultStakedIntegral(lpAssetIdStr) | |
592 | 592 | let userVoteStakedIntegralDiff = (userVoteStakedIntegral - userVoteStakedIntegralLast) | |
593 | 593 | let votingResultStakedIntegralDiff = (votingResultStakedIntegral - votingResultStakedIntegralLast) | |
594 | 594 | $Tuple3([IntegerEntry(userVoteStakedIntegralLastKey, userVoteStakedIntegral), IntegerEntry(votingResultStakedIntegralLastKey, votingResultStakedIntegral)], userVoteStakedIntegralDiff, votingResultStakedIntegralDiff) | |
595 | 595 | } | |
596 | 596 | ||
597 | 597 | ||
598 | 598 | func refreshBoostEmissionIntegral () = { | |
599 | 599 | let wxEmissionPerBlock = iof(emissionContract, keyEmissionRatePerBlockCurrent()) | |
600 | 600 | let boostingV2LastUpdateHeightOption = getInteger(this, keyBoostingV2LastUpdateHeight()) | |
601 | 601 | let boostingV2IngergalOption = getInteger(this, keyBoostingV2Integral()) | |
602 | 602 | let emissionEnd = iof(emissionContract, keyEmissionEndBlock()) | |
603 | 603 | let h = if ((height > emissionEnd)) | |
604 | 604 | then emissionEnd | |
605 | 605 | else height | |
606 | 606 | let dh = match boostingV2LastUpdateHeightOption { | |
607 | 607 | case lastUpdateHeight: Int => | |
608 | 608 | max([(h - lastUpdateHeight), 0]) | |
609 | 609 | case _: Unit => | |
610 | 610 | 0 | |
611 | 611 | case _ => | |
612 | 612 | throw("Match error") | |
613 | 613 | } | |
614 | 614 | let boostEmissionPerBlock = ((wxEmissionPerBlock * (boostCoeff - 1)) / boostCoeff) | |
615 | 615 | let boostEmissionIntegralPrev = valueOrElse(boostingV2IngergalOption, 0) | |
616 | 616 | let boostEmissionIntegral = ((boostEmissionPerBlock * dh) + boostEmissionIntegralPrev) | |
617 | 617 | $Tuple2([IntegerEntry(keyBoostingV2Integral(), boostEmissionIntegral), IntegerEntry(keyBoostingV2LastUpdateHeight(), height)], boostEmissionIntegral) | |
618 | 618 | } | |
619 | 619 | ||
620 | 620 | ||
621 | 621 | func internalClaimWxBoost (lpAssetIdStr,userAddressStr,readOnly) = { | |
622 | 622 | let userRecordOption = getString(this, keyLockParamsRecord(userAddressStr)) | |
623 | 623 | if ((userRecordOption == unit)) | |
624 | 624 | then $Tuple3(0, nil, "userRecord::is::empty") | |
625 | 625 | else { | |
626 | 626 | let userRecordArray = split(value(userRecordOption), SEP) | |
627 | 627 | let userNumStr = userRecordArray[IdxLockUserNum] | |
628 | 628 | let EMPTYSTR = "empty" | |
629 | 629 | let poolWeight = if ((lpAssetIdStr != EMPTYSTR)) | |
630 | 630 | then { | |
631 | 631 | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)), wrapErr(("unsupported lp asset " + lpAssetIdStr))) | |
632 | 632 | getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr)) | |
633 | 633 | } | |
634 | 634 | else if (readOnly) | |
635 | 635 | then 0 | |
636 | 636 | else throwErr(("not readonly mode: unsupported lp asset " + lpAssetIdStr)) | |
637 | 637 | let userLpBoostEmissionLastIntegralKEY = keyUserLpBoostEmissionLastINTEGRAL(userNumStr, lpAssetIdStr) | |
638 | 638 | let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNumStr) | |
639 | 639 | let userBoostEmissionLastIntegral = valueOrElse(getInteger(this, userLpBoostEmissionLastIntegralKEY), ioz(this, userBoostEmissionLastIntegralKEY)) | |
640 | 640 | let boostEmissionIntegral = refreshBoostEmissionIntegral()._2 | |
641 | 641 | let userBoostEmissionIntegral = (boostEmissionIntegral - userBoostEmissionLastIntegral) | |
642 | 642 | if ((0 > userBoostEmissionIntegral)) | |
643 | 643 | then throwErr("wrong calculations") | |
644 | 644 | else { | |
645 | - | let $ | |
646 | - | let stakedVotesIntegralsActions = $ | |
647 | - | let userVoteIntegralDiff = $ | |
648 | - | let totalVotesIntegralDiff = $ | |
645 | + | let $t02706327202 = getStakedVotesIntegralsDiff(lpAssetIdStr, userAddressStr) | |
646 | + | let stakedVotesIntegralsActions = $t02706327202._1 | |
647 | + | let userVoteIntegralDiff = $t02706327202._2 | |
648 | + | let totalVotesIntegralDiff = $t02706327202._3 | |
649 | 649 | let poolUserBoostEmissionIntegral = fraction(userBoostEmissionIntegral, poolWeight, POOLWEIGHTMULT) | |
650 | 650 | let userBoostAvaliableToClaimTotalNew = if ((totalVotesIntegralDiff == 0)) | |
651 | 651 | then 0 | |
652 | 652 | else fraction(poolUserBoostEmissionIntegral, userVoteIntegralDiff, totalVotesIntegralDiff) | |
653 | 653 | let dataState = ([IntegerEntry(userLpBoostEmissionLastIntegralKEY, boostEmissionIntegral)] ++ stakedVotesIntegralsActions) | |
654 | 654 | let debug = makeString([toString(userBoostEmissionLastIntegral), toString(userBoostEmissionIntegral), toString(poolWeight), toString(userVoteIntegralDiff), toString(totalVotesIntegralDiff)], ":") | |
655 | 655 | $Tuple3(userBoostAvaliableToClaimTotalNew, dataState, debug) | |
656 | 656 | } | |
657 | 657 | } | |
658 | 658 | } | |
659 | 659 | ||
660 | 660 | ||
661 | 661 | func lockActions (i,duration) = { | |
662 | 662 | let cfgArray = readConfigArrayOrFail() | |
663 | 663 | let assetIdStr = cfgArray[IdxCfgAssetId] | |
664 | 664 | let assetId = fromBase58String(assetIdStr) | |
665 | 665 | let minLockAmount = parseIntValue(cfgArray[IdxCfgMinLockAmount]) | |
666 | 666 | let minLockDuration = parseIntValue(cfgArray[IdxCfgMinLockDuration]) | |
667 | 667 | let maxLockDuration = parseIntValue(cfgArray[IdxCfgMaxLockDuration]) | |
668 | 668 | if ((size(i.payments) != 1)) | |
669 | 669 | then throwErr("invalid payment - exact one payment must be attached") | |
670 | 670 | else { | |
671 | 671 | let pmt = i.payments[0] | |
672 | 672 | let pmtAmount = pmt.amount | |
673 | 673 | if ((assetId != value(pmt.assetId))) | |
674 | 674 | then throwErr((("invalid asset is in payment - " + assetIdStr) + " is expected")) | |
675 | 675 | else { | |
676 | 676 | let nextUserNumKEY = keyNextUserNum() | |
677 | 677 | let userAddressStr = toString(i.caller) | |
678 | 678 | let userIsExisting = isDefined(getString(keyUser2NumMapping(userAddressStr))) | |
679 | 679 | let userNumStr = if (userIsExisting) | |
680 | 680 | then value(getString(keyUser2NumMapping(userAddressStr))) | |
681 | 681 | else toString(iof(this, nextUserNumKEY)) | |
682 | 682 | let userNum = parseIntValue(userNumStr) | |
683 | 683 | let lockStart = height | |
684 | 684 | let startBlockKEY = keyLockParamStartBlock(userNumStr) | |
685 | 685 | let durationKEY = keyLockParamDuration(userNumStr) | |
686 | 686 | let userAmountKEY = keyLockParamUserAmount(userNumStr) | |
687 | 687 | if (if ((minLockAmount > pmtAmount)) | |
688 | 688 | then (i.caller != lpStakingPoolsContract) | |
689 | 689 | else false) | |
690 | 690 | then throwErr(("amount is less then minLockAmount=" + toString(minLockAmount))) | |
691 | 691 | else if ((minLockDuration > duration)) | |
692 | 692 | then throwErr(("passed duration is less then minLockDuration=" + toString(minLockDuration))) | |
693 | 693 | else if ((duration > maxLockDuration)) | |
694 | 694 | then throwErr(("passed duration is greater then maxLockDuration=" + toString(maxLockDuration))) | |
695 | 695 | else if (if (userIsExisting) | |
696 | 696 | then ((iof(this, startBlockKEY) + iof(this, durationKEY)) >= lockStart) | |
697 | 697 | else false) | |
698 | 698 | then throwErr("there is an active lock - consider to use increaseLock") | |
699 | 699 | else if ((ioz(this, userAmountKEY) > 0)) | |
700 | 700 | then throwErr(("there are locked WXs - consider to use increaseLock " + userAmountKEY)) | |
701 | 701 | else { | |
702 | 702 | let coeffX8 = fraction(duration, MULT8, maxLockDuration) | |
703 | 703 | let gWxAmountStart = fraction(pmtAmount, coeffX8, MULT8) | |
704 | 704 | let gWxParamsResultList = aal(invoke(mathContract, "calcGwxParamsREADONLY", [gWxAmountStart, lockStart, duration], nil)) | |
705 | 705 | let k = ai(gWxParamsResultList[0]) | |
706 | 706 | let b = ai(gWxParamsResultList[1]) | |
707 | 707 | let period = toString(ai(gWxParamsResultList[2])) | |
708 | 708 | let totalCachedGwxRaw = getTotalCachedGwx(false) | |
709 | 709 | let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNumStr) | |
710 | 710 | let boostEmissionIntegral = refreshBoostEmissionIntegral()._2 | |
711 | 711 | let arr = if (userIsExisting) | |
712 | 712 | then nil | |
713 | 713 | else [IntegerEntry(nextUserNumKEY, (userNum + 1)), StringEntry(keyUser2NumMapping(userAddressStr), userNumStr), StringEntry(keyNum2UserMapping(userNumStr), userAddressStr)] | |
714 | 714 | $Tuple2(((((arr ++ LockParamsEntry(userAddressStr, userNumStr, pmtAmount, lockStart, duration, k, b, period)) ++ StatsEntry(pmtAmount, duration, 1, if (userIsExisting) | |
715 | 715 | then 0 | |
716 | 716 | else 1)) :+ HistoryEntry("lock", userAddressStr, pmtAmount, lockStart, duration, k, b, i)) ++ [IntegerEntry(userBoostEmissionLastIntegralKEY, boostEmissionIntegral), IntegerEntry(keyTotalCachedGwx(), (totalCachedGwxRaw + gWxAmountStart))]), gWxAmountStart) | |
717 | 717 | } | |
718 | 718 | } | |
719 | 719 | } | |
720 | 720 | } | |
721 | 721 | ||
722 | 722 | ||
723 | 723 | @Callable(i) | |
724 | 724 | func constructor (factoryAddressStr,lockAssetIdStr,minLockAmount,minDuration,maxDuration,mathContract) = { | |
725 | 725 | let checkCaller = mustManager(i) | |
726 | 726 | if ((checkCaller == checkCaller)) | |
727 | 727 | then ([IntegerEntry(keyNextUserNum(), 0), StringEntry(keyConfig(), formatConfig(lockAssetIdStr, minLockAmount, minDuration, maxDuration, mathContract)), StringEntry(keyFactoryAddress(), factoryAddressStr)] ++ StatsEntry(0, 0, 0, 0)) | |
728 | 728 | else throw("Strict value is not equal to itself.") | |
729 | 729 | } | |
730 | 730 | ||
731 | 731 | ||
732 | 732 | ||
733 | 733 | @Callable(i) | |
734 | 734 | func lockRef (duration,referrerAddress,signature) = { | |
735 | - | let $ | |
736 | - | let lockActionsResult = $ | |
737 | - | let gWxAmountStart = $ | |
735 | + | let $t03181331878 = lockActions(i, duration) | |
736 | + | let lockActionsResult = $t03181331878._1 | |
737 | + | let gWxAmountStart = $t03181331878._2 | |
738 | 738 | let referralAddress = toString(i.caller) | |
739 | 739 | let refInv = if (if ((referrerAddress == "")) | |
740 | 740 | then true | |
741 | 741 | else (signature == base58'')) | |
742 | 742 | then unit | |
743 | 743 | else invoke(referralsContractAddressOrFail, "createPair", [referralProgramName, referrerAddress, referralAddress, signature], nil) | |
744 | 744 | if ((refInv == refInv)) | |
745 | 745 | then { | |
746 | 746 | let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil) | |
747 | 747 | if ((updateRefActivity == updateRefActivity)) | |
748 | 748 | then $Tuple2(lockActionsResult, unit) | |
749 | 749 | else throw("Strict value is not equal to itself.") | |
750 | 750 | } | |
751 | 751 | else throw("Strict value is not equal to itself.") | |
752 | 752 | } | |
753 | 753 | ||
754 | 754 | ||
755 | 755 | ||
756 | 756 | @Callable(i) | |
757 | 757 | func lock (duration) = { | |
758 | - | let $ | |
759 | - | let lockActionsResult = $ | |
760 | - | let gWxAmountStart = $ | |
758 | + | let $t03233632401 = lockActions(i, duration) | |
759 | + | let lockActionsResult = $t03233632401._1 | |
760 | + | let gWxAmountStart = $t03233632401._2 | |
761 | 761 | let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil) | |
762 | 762 | if ((updateRefActivity == updateRefActivity)) | |
763 | 763 | then $Tuple2(lockActionsResult, unit) | |
764 | 764 | else throw("Strict value is not equal to itself.") | |
765 | 765 | } | |
766 | 766 | ||
767 | 767 | ||
768 | 768 | ||
769 | 769 | @Callable(i) | |
770 | 770 | func increaseLock (deltaDuration) = { | |
771 | 771 | let cfgArray = readConfigArrayOrFail() | |
772 | 772 | let assetIdStr = cfgArray[IdxCfgAssetId] | |
773 | 773 | let assetId = fromBase58String(assetIdStr) | |
774 | 774 | let minLockDuration = parseIntValue(cfgArray[IdxCfgMinLockDuration]) | |
775 | 775 | let maxLockDuration = parseIntValue(cfgArray[IdxCfgMaxLockDuration]) | |
776 | 776 | let pmtAmount = extractOptionalPaymentAmountOrFail(i, assetId) | |
777 | 777 | let userAddressStr = toString(i.caller) | |
778 | 778 | let userRecordArray = readLockParamsRecordOrFail(userAddressStr) | |
779 | 779 | let userNumStr = userRecordArray[IdxLockUserNum] | |
780 | 780 | let userAmount = parseIntValue(userRecordArray[IdxLockAmount]) | |
781 | 781 | let lockStart = parseIntValue(userRecordArray[IdxLockStart]) | |
782 | 782 | let lockDuration = parseIntValue(userRecordArray[IdxLockDuration]) | |
783 | 783 | let lockEnd = (lockStart + lockDuration) | |
784 | 784 | let remainingDuration = max([(lockEnd - height), 0]) | |
785 | 785 | let userAmountNew = (userAmount + pmtAmount) | |
786 | 786 | let lockDurationNew = (remainingDuration + deltaDuration) | |
787 | 787 | if ((0 > deltaDuration)) | |
788 | 788 | then throwErr("duration is less then zero") | |
789 | 789 | else if ((minLockDuration > lockDurationNew)) | |
790 | 790 | then throwErr(("lockDurationNew is less then minLockDuration=" + toString(minLockDuration))) | |
791 | 791 | else if ((lockDurationNew > maxLockDuration)) | |
792 | 792 | then throwErr(("deltaDuration + existedLockDuration is greater then maxLockDuration=" + toString(maxLockDuration))) | |
793 | 793 | else { | |
794 | 794 | let coeffX8 = fraction(lockDurationNew, MULT8, maxLockDuration) | |
795 | 795 | let gWxAmountStart = fraction(userAmountNew, coeffX8, MULT8) | |
796 | 796 | let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil) | |
797 | 797 | if ((updateRefActivity == updateRefActivity)) | |
798 | 798 | then { | |
799 | 799 | let lockStartNew = height | |
800 | 800 | let gWxParamsResultList = aal(invoke(mathContract, "calcGwxParamsREADONLY", [gWxAmountStart, lockStartNew, lockDurationNew], nil)) | |
801 | 801 | let k = ai(gWxParamsResultList[0]) | |
802 | 802 | let b = ai(gWxParamsResultList[1]) | |
803 | 803 | let period = toString(ai(gWxParamsResultList[2])) | |
804 | 804 | let currUserGwx = calcCurrentGwxAmount(userAddressStr) | |
805 | 805 | let gwxDiff = (gWxAmountStart - currUserGwx) | |
806 | 806 | if ((0 > gwxDiff)) | |
807 | 807 | then throwErr(("gwxDiff is less then 0: " + toString(gwxDiff))) | |
808 | 808 | else { | |
809 | 809 | let totalCachedGwxRaw = getTotalCachedGwx(false) | |
810 | 810 | let totalCachedGwxCorrected = getTotalCachedGwx(true) | |
811 | 811 | (((LockParamsEntry(userAddressStr, userNumStr, userAmountNew, lockStartNew, lockDurationNew, k, b, period) ++ StatsEntry(pmtAmount, deltaDuration, 0, 0)) :+ HistoryEntry("lock", userAddressStr, pmtAmount, lockStart, lockDurationNew, k, b, i)) ++ [IntegerEntry(keyTotalCachedGwx(), (totalCachedGwxRaw + gwxDiff))]) | |
812 | 812 | } | |
813 | 813 | } | |
814 | 814 | else throw("Strict value is not equal to itself.") | |
815 | 815 | } | |
816 | 816 | } | |
817 | 817 | ||
818 | 818 | ||
819 | 819 | ||
820 | 820 | @Callable(i) | |
821 | 821 | func claimWxBoost (lpAssetIdStr,userAddressStr) = if ((stakingContract != i.caller)) | |
822 | 822 | then throwErr("permissions denied") | |
823 | 823 | else { | |
824 | - | let $ | |
825 | - | let userBoostAvailable = $ | |
826 | - | let dataState = $ | |
827 | - | let debug = $ | |
824 | + | let $t03550635608 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false) | |
825 | + | let userBoostAvailable = $t03550635608._1 | |
826 | + | let dataState = $t03550635608._2 | |
827 | + | let debug = $t03550635608._3 | |
828 | 828 | $Tuple2(dataState, [userBoostAvailable]) | |
829 | 829 | } | |
830 | 830 | ||
831 | 831 | ||
832 | 832 | ||
833 | 833 | @Callable(i) | |
834 | 834 | func claimWxBoostREADONLY (lpAssetIdStr,userAddressStr) = { | |
835 | - | let $ | |
836 | - | let userBoostAvailable = $ | |
837 | - | let dataState = $ | |
838 | - | let debug = $ | |
835 | + | let $t03574035841 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true) | |
836 | + | let userBoostAvailable = $t03574035841._1 | |
837 | + | let dataState = $t03574035841._2 | |
838 | + | let debug = $t03574035841._3 | |
839 | 839 | $Tuple2(nil, [userBoostAvailable, debug]) | |
840 | 840 | } | |
841 | 841 | ||
842 | 842 | ||
843 | 843 | ||
844 | 844 | @Callable(i) | |
845 | 845 | func unlock (userAddress) = { | |
846 | 846 | let userRecordArray = readLockParamsRecordOrFail(userAddress) | |
847 | 847 | let userNumStr = userRecordArray[IdxLockUserNum] | |
848 | 848 | let userAmount = parseIntValue(userRecordArray[IdxLockAmount]) | |
849 | 849 | let lockStart = parseIntValue(userRecordArray[IdxLockStart]) | |
850 | 850 | let lockDuration = parseIntValue(userRecordArray[IdxLockDuration]) | |
851 | 851 | let lockEnd = (lockStart + lockDuration) | |
852 | 852 | let cfgArray = readConfigArrayOrFail() | |
853 | 853 | let assetId = fromBase58String(cfgArray[IdxCfgAssetId]) | |
854 | 854 | if ((lockEnd >= height)) | |
855 | 855 | then throwErr((("wait " + toString(lockEnd)) + " to unlock")) | |
856 | 856 | else if ((0 >= userAmount)) | |
857 | 857 | then throwErr("nothing to unlock") | |
858 | 858 | else { | |
859 | 859 | let period = valueOrElse(getInteger(mathContract, keyNextPeriod()), 0) | |
860 | 860 | (((LockParamsEntry(userAddress, userNumStr, 0, lockStart, lockDuration, 0, 0, toString(period)) ++ StatsEntry(-(userAmount), 0, 0, -1)) :+ HistoryEntry("unlock", userAddress, userAmount, lockStart, lockDuration, 0, 0, i)) :+ ScriptTransfer(addressFromStringValue(userAddress), userAmount, assetId)) | |
861 | 861 | } | |
862 | 862 | } | |
863 | 863 | ||
864 | 864 | ||
865 | 865 | ||
866 | 866 | @Callable(i) | |
867 | 867 | func gwxUserInfoREADONLY (userAddress) = { | |
868 | 868 | let gwxAmount = calcCurrentGwxAmount(userAddress) | |
869 | 869 | $Tuple2(nil, [gwxAmount]) | |
870 | 870 | } | |
871 | 871 | ||
872 | 872 | ||
873 | 873 | ||
874 | 874 | @Callable(i) | |
875 | 875 | func userMaxDurationREADONLY (userAddressStr) = { | |
876 | 876 | let cfgArray = readConfigArrayOrFail() | |
877 | 877 | let maxLockDuration = parseIntValue(cfgArray[IdxCfgMaxLockDuration]) | |
878 | 878 | let userRecordOption = getString(this, keyLockParamsRecord(userAddressStr)) | |
879 | 879 | if ((userRecordOption == unit)) | |
880 | 880 | then $Tuple2(nil, $Tuple2("lock", maxLockDuration)) | |
881 | 881 | else { | |
882 | 882 | let userRecordArray = split(value(userRecordOption), SEP) | |
883 | 883 | let lockStart = parseIntValue(userRecordArray[IdxLockStart]) | |
884 | 884 | let lockDuration = parseIntValue(userRecordArray[IdxLockDuration]) | |
885 | 885 | let lockEnd = (lockStart + lockDuration) | |
886 | 886 | let remainingDuration = max([(lockEnd - height), 0]) | |
887 | 887 | let maxDeltaDuration = (maxLockDuration - remainingDuration) | |
888 | 888 | $Tuple2(nil, $Tuple2("increaseLock", maxDeltaDuration)) | |
889 | 889 | } | |
890 | 890 | } | |
891 | 891 | ||
892 | 892 | ||
893 | 893 | ||
894 | 894 | @Callable(i) | |
895 | 895 | func getUserGwxAmountAtHeightREADONLY (userAddress,targetHeight) = { | |
896 | 896 | let gwxAmount = calcUserGwxAmountAtHeight(userAddress, targetHeight) | |
897 | 897 | $Tuple2(nil, gwxAmount) | |
898 | 898 | } | |
899 | 899 | ||
900 | 900 | ||
901 | 901 | ||
902 | 902 | @Callable(i) | |
903 | 903 | func getTotalCachedGwxREADONLY () = $Tuple2(nil, getTotalCachedGwx(true)) | |
904 | 904 | ||
905 | 905 | ||
906 | 906 | ||
907 | 907 | @Callable(i) | |
908 | 908 | func onBoostEmissionUpdate () = { | |
909 | 909 | let checkCaller = if ((i.caller == emissionContract)) | |
910 | 910 | then true | |
911 | 911 | else mustManager(i) | |
912 | 912 | if ((checkCaller == checkCaller)) | |
913 | 913 | then refreshBoostEmissionIntegral() | |
914 | 914 | else throw("Strict value is not equal to itself.") | |
915 | 915 | } | |
916 | 916 | ||
917 | 917 | ||
918 | 918 | ||
919 | 919 | @Callable(i) | |
920 | 920 | func onStakedVoteUpdate (lpAssetIdStr,userAddressStr,edge) = { | |
921 | 921 | let checkCaller = if ((i.caller == stakingContract)) | |
922 | 922 | then true | |
923 | 923 | else mustManager(i) | |
924 | 924 | if ((checkCaller == checkCaller)) | |
925 | 925 | then { | |
926 | 926 | let actions = refreshVoteStakedIntegral(lpAssetIdStr, userAddressStr, edge) | |
927 | 927 | $Tuple2(actions, unit) | |
928 | 928 | } | |
929 | 929 | else throw("Strict value is not equal to itself.") | |
930 | 930 | } | |
931 | 931 | ||
932 | 932 | ||
933 | 933 | ||
934 | 934 | @Callable(i) | |
935 | 935 | func getVotingResultStakedREADONLY (lpAssetIdStr) = $Tuple2(nil, getVotingResultStaked(lpAssetIdStr)) | |
936 | 936 | ||
937 | 937 | ||
938 | 938 | ||
939 | 939 | @Callable(i) | |
940 | 940 | func getVotingResultStakedIntegralREADONLY (lpAssetIdStr) = $Tuple2(nil, getVotingResultStakedIntegral(lpAssetIdStr)) | |
941 | 941 | ||
942 | 942 | ||
943 | 943 | ||
944 | 944 | @Callable(i) | |
945 | 945 | func getUserVoteFinalizedREADONLY (lpAssetIdStr,userAddressStr) = $Tuple2(nil, getUserVoteFinalized(lpAssetIdStr, userAddressStr)) | |
946 | 946 | ||
947 | 947 | ||
948 | 948 | ||
949 | 949 | @Callable(i) | |
950 | 950 | func getUserVoteStakedIntegralREADONLY (lpAssetIdStr,userAddressStr) = $Tuple2(nil, getUserVoteStakedIntegral(lpAssetIdStr, userAddressStr)) | |
951 | 951 | ||
952 | 952 | ||
953 | 953 | @Verifier(tx) | |
954 | 954 | func verify () = { | |
955 | 955 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
956 | 956 | case pk: ByteVector => | |
957 | 957 | pk | |
958 | 958 | case _: Unit => | |
959 | 959 | tx.senderPublicKey | |
960 | 960 | case _ => | |
961 | 961 | throw("Match error") | |
962 | 962 | } | |
963 | 963 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
964 | 964 | } | |
965 | 965 |
github/deemru/w8io/169f3d6 115.76 ms ◑