tx · HBJhyaqdBX29ChSrFq8PSCKyas9biTXsWa2EA3sGdtXo 3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz: -0.03000000 Waves 2022.06.29 15:20 [2117719] smart account 3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz > SELF 0.00000000 Waves
{ "type": 13, "id": "HBJhyaqdBX29ChSrFq8PSCKyas9biTXsWa2EA3sGdtXo", "fee": 3000000, "feeAssetId": null, "timestamp": 1656505260977, "version": 1, "sender": "3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz", "senderPublicKey": "D28XoueZWsMfm8Y5pa6C5ZFuYoWgre2Wm8tzJANJgMnq", "proofs": [ "5VV3bXrkLJQa12SXfH4Dsx2LVQqFotQPxGPCPT3BGBnZVRLKb4wNKqANEtdPMnm5kCQa4KoDoP8hgQKQeNxG5RJc" ], "script": "base64:BgI3CAISAwoBCBIDCgEIEgMKAQgSABIAEgQKAggBEgMKAQgSBAoCCAgSBAoCCAgSAwoBCBIECgIICF8ABlNDQUxFOAAIAAVNVUxUOACAwtcvAAdTQ0FMRTE4ABIABk1VTFQxOAkAtgIBAICAkLu61q3wDQADU0VQAgJfXwAOUE9PTFdFSUdIVE1VTFQFBU1VTFQ4AAp6ZXJvQmlnSW50CQC2AgEAAAAJb25lQmlnSW50CQC2AgEAAQEJYXNBbnlMaXN0AQN2YWwEByRtYXRjaDAFA3ZhbAMJAAECBQckbWF0Y2gwAglMaXN0W0FueV0ECnZhbEFueUx5c3QFByRtYXRjaDAFCnZhbEFueUx5c3QJAAIBAhtmYWlsIHRvIGNhc3QgaW50byBMaXN0W0FueV0BBWFzSW50AQN2YWwEByRtYXRjaDAFA3ZhbAMJAAECBQckbWF0Y2gwAgNJbnQEBnZhbEludAUHJG1hdGNoMAUGdmFsSW50CQACAQIVZmFpbCB0byBjYXN0IGludG8gSW50AQhhc1N0cmluZwEDdmFsBAckbWF0Y2gwBQN2YWwDCQABAgUHJG1hdGNoMAIGU3R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exity": 0 } View: original | compacted Prev: 4ja9B4yvtWjQSx7fWucT3m5KYMRU4g5Mj9ffigvmEpAc Next: Dy5YcNV2JtpZMGARwzYHs5FWLQuS4hqg9JgMcWY7rUCL Diff:
Old | New | Differences | |
---|---|---|---|
524 | 524 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
525 | 525 | let stakedByUser = readStaked(stakedByUserKEY) | |
526 | 526 | let stakedTotal = readStaked(stakedTotalKEY) | |
527 | - | let $t02048620604 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount)) | |
528 | - | let wxToClaimUserNew = $t02048620604._1 | |
529 | - | let integralSTATE = $t02048620604._2 | |
530 | - | let debug = $t02048620604._3 | |
527 | + | let integralSTATE = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))._2 | |
531 | 528 | let listName = getUsersListName(lpAssetIdStr) | |
532 | 529 | let listActions = if (containsNode(listName, userAddressStr)) | |
533 | 530 | then deleteNodeActions(listName, userAddressStr) | |
534 | 531 | else nil | |
535 | - | if ((amount > stakedByUser)) | |
536 | - | then throw("passed amount is less then available") | |
537 | - | else (([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions) | |
532 | + | let claimedByUser = getBigIntFromStringOrZero(this, keyClaimedByUser(lpAssetIdStr, userAddressStr)) | |
533 | + | let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)) | |
534 | + | let wxToClaimUserNew = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddress, 0)._1 | |
535 | + | let availableToClaim = (wxToClaimUserNew - claimedByUser) | |
536 | + | let r = if ((availableToClaim > zeroBigInt)) | |
537 | + | then invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr], nil) | |
538 | + | else unit | |
539 | + | if ((r == r)) | |
540 | + | then if ((amount > stakedByUser)) | |
541 | + | then throw("passed amount is less then available") | |
542 | + | else (([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions) | |
543 | + | else throw("Strict value is not equal to itself.") | |
538 | 544 | } | |
539 | 545 | ||
540 | 546 | ||
563 | 569 | let claimedByUserMinReward = getBigIntFromStringOrZero(this, claimedByUserMinRewardKEY) | |
564 | 570 | let claimedByUserBoostReward = getBigIntFromStringOrZero(this, claimedByUserBoostRewardKEY) | |
565 | 571 | let claimedTotal = getBigIntFromStringOrZero(this, claimedTotalKEY) | |
566 | - | let $ | |
567 | - | let wxToClaimUserNew = $ | |
568 | - | let integralSTATE = $ | |
569 | - | let debug = $ | |
572 | + | let $t02282422936 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
573 | + | let wxToClaimUserNew = $t02282422936._1 | |
574 | + | let integralSTATE = $t02282422936._2 | |
575 | + | let debug = $t02282422936._3 | |
570 | 576 | let availableToClaim = max([(wxToClaimUserNew - claimedByUser), zeroBigInt]) | |
571 | 577 | if ((zeroBigInt >= availableToClaim)) | |
572 | 578 | then throw("nothing to claim") | |
609 | 615 | else (height - emissionStartBlock) | |
610 | 616 | let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, POOLWEIGHTMULT) | |
611 | 617 | let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal) | |
612 | - | let $ | |
613 | - | let wxToClaimUserNew = $ | |
614 | - | let integralSTATE = $ | |
615 | - | let debug = $ | |
618 | + | let $t02557825690 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
619 | + | let wxToClaimUserNew = $t02557825690._1 | |
620 | + | let integralSTATE = $t02557825690._2 | |
621 | + | let debug = $t02557825690._3 | |
616 | 622 | let availableToClaim = max([(wxToClaimUserNew - claimedByUser), zeroBigInt]) | |
617 | 623 | let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil)) | |
618 | 624 | let wxAmountBoostTotal = max([asInt(boostInvResult[0]), 0]) | |
648 | 654 | case userAddress: String => | |
649 | 655 | let claimedByUser = getBigIntFromStringOrZero(this, keyClaimedByUser(lpAssetId, userAddress)) | |
650 | 656 | let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetId)) | |
651 | - | let $t02681326916 = refreshINTEGRALS(lpAssetId, userAddress, poolAddress, 0) | |
652 | - | let wxToClaimUserNew = $t02681326916._1 | |
653 | - | let integralSTATE = $t02681326916._2 | |
654 | - | let debug = $t02681326916._3 | |
657 | + | let wxToClaimUserNew = refreshINTEGRALS(lpAssetId, userAddress, poolAddress, 0)._1 | |
655 | 658 | let availableToClaim = (wxToClaimUserNew - claimedByUser) | |
656 | 659 | let r = if ((availableToClaim > zeroBigInt)) | |
657 | 660 | then invoke(this, "claimWxINTERNAL", [lpAssetId, userAddress], nil) | |
682 | 685 | func onModifyWeight (lpAssetIdStr,poolAddressStr) = if ((i.caller != factoryContract)) | |
683 | 686 | then throw("permissions denied") | |
684 | 687 | else { | |
685 | - | let $ | |
686 | - | let wxPerLpIntegralNew = $ | |
687 | - | let poolIntegralSTATE = $ | |
688 | - | let poolDEBUG = $ | |
688 | + | let $t02804128151 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0) | |
689 | + | let wxPerLpIntegralNew = $t02804128151._1 | |
690 | + | let poolIntegralSTATE = $t02804128151._2 | |
691 | + | let poolDEBUG = $t02804128151._3 | |
689 | 692 | poolIntegralSTATE | |
690 | 693 | } | |
691 | 694 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SCALE8 = 8 | |
5 | 5 | ||
6 | 6 | let MULT8 = 100000000 | |
7 | 7 | ||
8 | 8 | let SCALE18 = 18 | |
9 | 9 | ||
10 | 10 | let MULT18 = toBigInt(1000000000000000000) | |
11 | 11 | ||
12 | 12 | let SEP = "__" | |
13 | 13 | ||
14 | 14 | let POOLWEIGHTMULT = MULT8 | |
15 | 15 | ||
16 | 16 | let zeroBigInt = toBigInt(0) | |
17 | 17 | ||
18 | 18 | let oneBigInt = toBigInt(1) | |
19 | 19 | ||
20 | 20 | func asAnyList (val) = match val { | |
21 | 21 | case valAnyLyst: List[Any] => | |
22 | 22 | valAnyLyst | |
23 | 23 | case _ => | |
24 | 24 | throw("fail to cast into List[Any]") | |
25 | 25 | } | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func asInt (val) = match val { | |
29 | 29 | case valInt: Int => | |
30 | 30 | valInt | |
31 | 31 | case _ => | |
32 | 32 | throw("fail to cast into Int") | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func asString (val) = match val { | |
37 | 37 | case valStr: String => | |
38 | 38 | valStr | |
39 | 39 | case _ => | |
40 | 40 | throw("fail to cast into Int") | |
41 | 41 | } | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func asByteVector (val) = match val { | |
45 | 45 | case valBin: ByteVector => | |
46 | 46 | valBin | |
47 | 47 | case _ => | |
48 | 48 | throw("fail to cast into Int") | |
49 | 49 | } | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (("mandatory this." + key) + " is not defined")) | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func getStringByAddressOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined")) | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func getIntOrZero (address,key) = valueOrElse(getInteger(address, key), 0) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func getIntOrDefault (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined")) | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func getBigIntFromStringOrZero (address,key) = value(parseBigInt(valueOrElse(getString(address, key), "0"))) | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func getBigIntFromStringOrDefault (address,key,defaultVal) = match getString(address, key) { | |
71 | 71 | case s: String => | |
72 | 72 | value(parseBigInt(s)) | |
73 | 73 | case _: Unit => | |
74 | 74 | defaultVal | |
75 | 75 | case _ => | |
76 | 76 | throw("Match error") | |
77 | 77 | } | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), MULT18, toBigInt(origScaleMult)) | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), MULT18)) | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func keyFactoryAddress () = "%s%s__config__factoryAddress" | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func keyVotingEmissionContract () = "%s__votingEmissionContract" | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | let IdxFactoryCfgStakingDapp = 1 | |
93 | 93 | ||
94 | 94 | let IdxFactoryCfgBoostingDapp = 2 | |
95 | 95 | ||
96 | 96 | let IdxFactoryCfgIdoDapp = 3 | |
97 | 97 | ||
98 | 98 | let IdxFactoryCfgTeamDapp = 4 | |
99 | 99 | ||
100 | 100 | let IdxFactoryCfgEmissionDapp = 5 | |
101 | 101 | ||
102 | 102 | let IdxFactoryCfgRestDapp = 6 | |
103 | 103 | ||
104 | 104 | let IdxFactoryCfgSlippageDapp = 7 | |
105 | 105 | ||
106 | 106 | func keyFactoryCfg () = "%s__factoryConfig" | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | func keyMigratorPublicKey () = "%s__migratorPublicKey" | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | func keyStablePoolAddonAddr () = "%s__stablePoolAddonAddr" | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | func keyFactoryLpList () = "%s__lpTokensList" | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP) | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | func readLpList (factory) = split(valueOrElse(getString(factory, keyFactoryLpList()), ""), SEP) | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func readFactoryCfgOrFail (factory) = split(getStringByAddressOrFail(factory, keyFactoryCfg()), SEP) | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp]) | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp]) | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp]) | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current" | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current" | |
152 | 152 | ||
153 | 153 | ||
154 | 154 | func keyEmissionStartBlock () = "%s%s__emission__startBlock" | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | func keyEmissionDurationInBlocks () = "%s%s__emission__duration" | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | func keyEmissionEndBlock () = "%s%s__emission__endBlock" | |
161 | 161 | ||
162 | 162 | ||
163 | 163 | func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s__staked", userAddressStr, lpAssetIdStr], SEP) | |
164 | 164 | ||
165 | 165 | ||
166 | 166 | func keyStakedTotal (lpAssetIdStr) = ("%s%s%s__staked__total__" + lpAssetIdStr) | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | func keyClaimedByUser (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimed", userAddressStr, lpAssetIdStr], SEP) | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | func keyClaimedByUserMinReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedMinReward", userAddressStr, lpAssetIdStr], SEP) | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | func keyClaimedByUserBoostReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedBoostReward", userAddressStr, lpAssetIdStr], SEP) | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func keyClaimedTotal (lpAssetIdStr) = makeString(["%s%s%s__claimed__total", lpAssetIdStr], SEP) | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | func readStaked (key) = valueOrElse(getInteger(this, key), 0) | |
182 | 182 | ||
183 | 183 | ||
184 | 184 | func keyLastTotalLpBalance (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "bal"], SEP) | |
185 | 185 | ||
186 | 186 | ||
187 | 187 | func keyLastUserLpBalance (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "bal"], SEP) | |
188 | 188 | ||
189 | 189 | ||
190 | 190 | func keyTotalLpBalanceIntegral (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "balINT"], SEP) | |
191 | 191 | ||
192 | 192 | ||
193 | 193 | func keyUserLpBalanceIntegral (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "balINT"], SEP) | |
194 | 194 | ||
195 | 195 | ||
196 | 196 | func keyTotalLpBalanceIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "lastUpd"], SEP) | |
197 | 197 | ||
198 | 198 | ||
199 | 199 | func keyUserLpBalanceIntegralLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "lastUpd"], SEP) | |
200 | 200 | ||
201 | 201 | ||
202 | 202 | func keyWxPerLpIntegral (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpInt"], SEP) | |
203 | 203 | ||
204 | 204 | ||
205 | 205 | func keyWxPerLpIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpIntH"], SEP) | |
206 | 206 | ||
207 | 207 | ||
208 | 208 | func keyWxToClaimUser (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpInt"], SEP) | |
209 | 209 | ||
210 | 210 | ||
211 | 211 | func keyWxPerLpIntegralUserLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpIntH"], SEP) | |
212 | 212 | ||
213 | 213 | ||
214 | 214 | func keyWxPerLp (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLp"], SEP) | |
215 | 215 | ||
216 | 216 | ||
217 | 217 | func keyWxPerLpX18 (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLpX18"], SEP) | |
218 | 218 | ||
219 | 219 | ||
220 | 220 | func keyWxPerLpIntegralUserLast (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "uIntL"], SEP) | |
221 | 221 | ||
222 | 222 | ||
223 | 223 | func keyOperationHistoryRecord (type,userAddress,txId58) = makeString(["%s%s%s%s__history", type, userAddress, txId58], SEP) | |
224 | 224 | ||
225 | 225 | ||
226 | 226 | func formatHistoryRecord (userAddress,lpAssetId,type,amount) = makeString(["%s%s%s%d%d%d", userAddress, lpAssetId, type, toString(height), toString(lastBlock.timestamp), toString(amount)], SEP) | |
227 | 227 | ||
228 | 228 | ||
229 | 229 | func OperationHistoryEntry (type,userAddress,lpAssetId,amount,txId) = StringEntry(keyOperationHistoryRecord(type, userAddress, toBase58String(txId)), formatHistoryRecord(userAddress, lpAssetId, type, amount)) | |
230 | 230 | ||
231 | 231 | ||
232 | 232 | let factoryAddress = getStringOrFail(this, keyFactoryAddress()) | |
233 | 233 | ||
234 | 234 | let factoryContract = addressFromStringValue(factoryAddress) | |
235 | 235 | ||
236 | 236 | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
237 | 237 | ||
238 | 238 | let emissionContract = getEmissionAddressOrFail(factoryCfg) | |
239 | 239 | ||
240 | 240 | let boostingContract = getBoostingAddressOrFail(factoryCfg) | |
241 | 241 | ||
242 | 242 | func keyNextUser (lpAssetId) = makeString(["%s%s", lpAssetId, "nextUser"], SEP) | |
243 | 243 | ||
244 | 244 | ||
245 | 245 | func getUsersListName (lpAssetId) = makeString(["users", lpAssetId], SEP) | |
246 | 246 | ||
247 | 247 | ||
248 | 248 | func keyListHead (listName) = makeString(["%s%s%s", listName, "head"], SEP) | |
249 | 249 | ||
250 | 250 | ||
251 | 251 | func keyListSize (listName) = makeString(["%s%s%s", listName, "size"], SEP) | |
252 | 252 | ||
253 | 253 | ||
254 | 254 | func keyListPrev (listName,id) = makeString(["%s%s%s%s", listName, id, "prev"], SEP) | |
255 | 255 | ||
256 | 256 | ||
257 | 257 | func keyListNext (listName,id) = makeString(["%s%s%s%s", listName, id, "next"], SEP) | |
258 | 258 | ||
259 | 259 | ||
260 | 260 | func containsNode (listName,id) = { | |
261 | 261 | let headOrUnit = getString(this, keyListHead(listName)) | |
262 | 262 | let prevOrUnit = getString(this, keyListPrev(listName, id)) | |
263 | 263 | let nextOrUnit = getString(this, keyListNext(listName, id)) | |
264 | 264 | if (if ((id == valueOrElse(headOrUnit, ""))) | |
265 | 265 | then true | |
266 | 266 | else (prevOrUnit != unit)) | |
267 | 267 | then true | |
268 | 268 | else (nextOrUnit != unit) | |
269 | 269 | } | |
270 | 270 | ||
271 | 271 | ||
272 | 272 | func insertNodeActions (listName,id) = { | |
273 | 273 | let headOrUnit = getString(this, keyListHead(listName)) | |
274 | 274 | let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0) | |
275 | 275 | let checkNode = if (!(containsNode(listName, id))) | |
276 | 276 | then true | |
277 | 277 | else throw("Node exists") | |
278 | 278 | if ((checkNode == checkNode)) | |
279 | 279 | then (([IntegerEntry(keyListSize(listName), (listSize + 1))] ++ (if ((headOrUnit != unit)) | |
280 | 280 | then [StringEntry(keyListNext(listName, id), value(headOrUnit)), StringEntry(keyListPrev(listName, value(headOrUnit)), id)] | |
281 | 281 | else nil)) ++ [StringEntry(keyListHead(listName), id)]) | |
282 | 282 | else throw("Strict value is not equal to itself.") | |
283 | 283 | } | |
284 | 284 | ||
285 | 285 | ||
286 | 286 | func deleteNodeActions (listName,id) = { | |
287 | 287 | let headOrUnit = getString(this, keyListHead(listName)) | |
288 | 288 | let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0) | |
289 | 289 | let prevOrUnit = getString(this, keyListPrev(listName, id)) | |
290 | 290 | let nextOrUnit = getString(this, keyListNext(listName, id)) | |
291 | 291 | ([IntegerEntry(keyListSize(listName), (listSize - 1))] ++ (if (if ((prevOrUnit != unit)) | |
292 | 292 | then (nextOrUnit != unit) | |
293 | 293 | else false) | |
294 | 294 | then [StringEntry(keyListNext(listName, value(prevOrUnit)), value(nextOrUnit)), StringEntry(keyListPrev(listName, value(nextOrUnit)), value(prevOrUnit)), DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, id))] | |
295 | 295 | else if ((nextOrUnit != unit)) | |
296 | 296 | then [StringEntry(keyListHead(listName), value(nextOrUnit)), DeleteEntry(keyListNext(listName, id)), DeleteEntry(keyListPrev(listName, value(nextOrUnit)))] | |
297 | 297 | else if ((prevOrUnit != unit)) | |
298 | 298 | then [DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, value(prevOrUnit)))] | |
299 | 299 | else if ((id == valueOrElse(headOrUnit, ""))) | |
300 | 300 | then [DeleteEntry(keyListHead(listName))] | |
301 | 301 | else throw(((("invalid node: " + listName) + ".") + id)))) | |
302 | 302 | } | |
303 | 303 | ||
304 | 304 | ||
305 | 305 | func calcWxPerLpIntegralUserLast (stakedByUser,wxPerLpIntegralUserLastUpdHeightOrZero,wxPerLpIntegralNew,wxPerLpIntegralUserLastKEY) = if (if ((wxPerLpIntegralUserLastUpdHeightOrZero == zeroBigInt)) | |
306 | 306 | then (stakedByUser > zeroBigInt) | |
307 | 307 | else false) | |
308 | 308 | then zeroBigInt | |
309 | 309 | else if ((stakedByUser == zeroBigInt)) | |
310 | 310 | then wxPerLpIntegralNew | |
311 | 311 | else if (if ((wxPerLpIntegralUserLastUpdHeightOrZero > zeroBigInt)) | |
312 | 312 | then (stakedByUser > zeroBigInt) | |
313 | 313 | else false) | |
314 | 314 | then value(parseBigInt(getStringOrFail(this, wxPerLpIntegralUserLastKEY))) | |
315 | 315 | else throw("calcWxPerLpIntegralUserLast: unexpected state") | |
316 | 316 | ||
317 | 317 | ||
318 | 318 | func refreshPoolINTEGRALS (lpAssetIdStr,poolAddressStr,lpDeltaAmount) = { | |
319 | 319 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
320 | 320 | let stakedTotal = toBigInt(readStaked(stakedTotalKEY)) | |
321 | 321 | let nonZeroStakedTotal = if ((stakedTotal == zeroBigInt)) | |
322 | 322 | then oneBigInt | |
323 | 323 | else stakedTotal | |
324 | 324 | let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr)) | |
325 | 325 | let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
326 | 326 | let MULT3 = 1000 | |
327 | 327 | let wxEmissionPerBlockX3 = (getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) * MULT3) | |
328 | 328 | let poolWxEmissionPerBlockX3 = fraction(wxEmissionPerBlockX3, poolWeight, (POOLWEIGHTMULT * 3)) | |
329 | 329 | let wxPerLpIntegralKEY = keyWxPerLpIntegral(lpAssetIdStr) | |
330 | 330 | let wxPerLpIntegralLastUpdHeightKEY = keyWxPerLpIntegralLastUpdHeight(lpAssetIdStr) | |
331 | 331 | let wxPerLpKEY = keyWxPerLp(lpAssetIdStr) | |
332 | 332 | let wxPerLpIntegralLastUpdHeight = getIntOrDefault(this, wxPerLpIntegralLastUpdHeightKEY, emissionStartBlock) | |
333 | 333 | let wxPerLpIntegral = getBigIntFromStringOrZero(this, wxPerLpIntegralKEY) | |
334 | 334 | let wxPerLpOrZeroX3 = 0 | |
335 | 335 | let dh = max([(height - wxPerLpIntegralLastUpdHeight), 0]) | |
336 | 336 | let wxPerLpX3 = if ((wxPerLpOrZeroX3 != 0)) | |
337 | 337 | then toBigInt(wxPerLpOrZeroX3) | |
338 | 338 | else fraction(toBigInt(poolWxEmissionPerBlockX3), toBigInt(MULT8), nonZeroStakedTotal) | |
339 | 339 | let stakedTotalNew = (stakedTotal + toBigInt(lpDeltaAmount)) | |
340 | 340 | let nonZeroStakedTotalNew = if ((stakedTotalNew == zeroBigInt)) | |
341 | 341 | then oneBigInt | |
342 | 342 | else stakedTotalNew | |
343 | 343 | let wxPerLpIntegralNew = (wxPerLpIntegral + (wxPerLpX3 * toBigInt(dh))) | |
344 | 344 | let wxPerLpX3New = (toBigInt(poolWxEmissionPerBlockX3) / nonZeroStakedTotalNew) | |
345 | 345 | let wxPerLpIntegralLastUpdHeightNew = height | |
346 | 346 | let debug = makeString([toString(wxPerLpIntegralNew), toString(dh), toString(wxPerLpX3), toString(stakedTotal), toString(poolWxEmissionPerBlockX3), toString(wxEmissionPerBlockX3), toString(poolWeight)], "::") | |
347 | 347 | $Tuple3(wxPerLpIntegralNew, [StringEntry(wxPerLpIntegralKEY, toString(wxPerLpIntegralNew)), IntegerEntry(wxPerLpIntegralLastUpdHeightKEY, wxPerLpIntegralLastUpdHeightNew), StringEntry(wxPerLpKEY, toString(wxPerLpX3New))], debug) | |
348 | 348 | } | |
349 | 349 | ||
350 | 350 | ||
351 | 351 | func refreshINTEGRALS (lpAssetIdStr,userAddressStr,poolAddressStr,lpDeltaAmount) = { | |
352 | 352 | let $t01430214424 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount) | |
353 | 353 | let wxPerLpIntegralNew = $t01430214424._1 | |
354 | 354 | let poolIntegralSTATE = $t01430214424._2 | |
355 | 355 | let poolDEBUG = $t01430214424._3 | |
356 | 356 | let MULT3 = 1000 | |
357 | 357 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
358 | 358 | let stakedByUser = readStaked(stakedByUserKEY) | |
359 | 359 | let wxToClaimUserKEY = keyWxToClaimUser(lpAssetIdStr, userAddressStr) | |
360 | 360 | let wxPerLpIntegralUserLastUpdHeightKEY = keyWxPerLpIntegralUserLastUpdHeight(lpAssetIdStr, userAddressStr) | |
361 | 361 | let wxPerLpIntegralUserLastKEY = keyWxPerLpIntegralUserLast(lpAssetIdStr, userAddressStr) | |
362 | 362 | let wxToClaimUser = getBigIntFromStringOrZero(this, wxToClaimUserKEY) | |
363 | 363 | let wxPerLpIntegralUserLastUpdHeightOrZero = getIntOrZero(this, wxPerLpIntegralUserLastUpdHeightKEY) | |
364 | 364 | let wxPerLpIntegralUserLast = calcWxPerLpIntegralUserLast(toBigInt(stakedByUser), toBigInt(wxPerLpIntegralUserLastUpdHeightOrZero), wxPerLpIntegralNew, wxPerLpIntegralUserLastKEY) | |
365 | 365 | let MULT11 = (MULT8 * MULT3) | |
366 | 366 | let wxToClaimUserNew = max([(wxToClaimUser + fraction((wxPerLpIntegralNew - wxPerLpIntegralUserLast), toBigInt(stakedByUser), toBigInt(MULT11))), zeroBigInt]) | |
367 | 367 | let wxPerLpIntegralUserLastNew = wxPerLpIntegralNew | |
368 | 368 | let wxPerLpIntegralUserLastUpdHeightNew = height | |
369 | 369 | let debug = makeString([toString(wxToClaimUser), toString(wxPerLpIntegralUserLast), toString(stakedByUser), poolDEBUG, toString(height)], "::") | |
370 | 370 | $Tuple3(wxToClaimUserNew, (poolIntegralSTATE ++ [StringEntry(wxToClaimUserKEY, toString(wxToClaimUserNew)), IntegerEntry(wxPerLpIntegralUserLastUpdHeightKEY, wxPerLpIntegralUserLastUpdHeightNew), StringEntry(wxPerLpIntegralUserLastKEY, toString(wxPerLpIntegralUserLastNew))]), debug) | |
371 | 371 | } | |
372 | 372 | ||
373 | 373 | ||
374 | 374 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
375 | 375 | case s: String => | |
376 | 376 | fromBase58String(s) | |
377 | 377 | case _: Unit => | |
378 | 378 | unit | |
379 | 379 | case _ => | |
380 | 380 | throw("Match error") | |
381 | 381 | } | |
382 | 382 | ||
383 | 383 | ||
384 | 384 | func migratorPublicKeyOrUnit () = match getString(keyMigratorPublicKey()) { | |
385 | 385 | case s: String => | |
386 | 386 | fromBase58String(s) | |
387 | 387 | case _: Unit => | |
388 | 388 | unit | |
389 | 389 | case _ => | |
390 | 390 | throw("Match error") | |
391 | 391 | } | |
392 | 392 | ||
393 | 393 | ||
394 | 394 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
395 | 395 | case s: String => | |
396 | 396 | fromBase58String(s) | |
397 | 397 | case _: Unit => | |
398 | 398 | unit | |
399 | 399 | case _ => | |
400 | 400 | throw("Match error") | |
401 | 401 | } | |
402 | 402 | ||
403 | 403 | ||
404 | 404 | let permissionDeniedError = throw("Permission denied") | |
405 | 405 | ||
406 | 406 | func mustThis (i) = if ((i.caller == this)) | |
407 | 407 | then true | |
408 | 408 | else permissionDeniedError | |
409 | 409 | ||
410 | 410 | ||
411 | 411 | func mustManager (i) = match managerPublicKeyOrUnit() { | |
412 | 412 | case pk: ByteVector => | |
413 | 413 | if ((i.callerPublicKey == pk)) | |
414 | 414 | then true | |
415 | 415 | else permissionDeniedError | |
416 | 416 | case _: Unit => | |
417 | 417 | if ((i.caller == this)) | |
418 | 418 | then true | |
419 | 419 | else permissionDeniedError | |
420 | 420 | case _ => | |
421 | 421 | throw("Match error") | |
422 | 422 | } | |
423 | 423 | ||
424 | 424 | ||
425 | 425 | @Callable(i) | |
426 | 426 | func constructor (factoryAddressStr) = { | |
427 | 427 | let checkCaller = mustManager(i) | |
428 | 428 | if ((checkCaller == checkCaller)) | |
429 | 429 | then [StringEntry(keyFactoryAddress(), factoryAddressStr)] | |
430 | 430 | else throw("Strict value is not equal to itself.") | |
431 | 431 | } | |
432 | 432 | ||
433 | 433 | ||
434 | 434 | ||
435 | 435 | @Callable(i) | |
436 | 436 | func constructorV2 (votingEmissionContract) = { | |
437 | 437 | let cheks = [mustManager(i), if ((addressFromString(votingEmissionContract) != unit)) | |
438 | 438 | then true | |
439 | 439 | else "invalid voting emission contract address"] | |
440 | 440 | if ((cheks == cheks)) | |
441 | 441 | then [StringEntry(keyVotingEmissionContract(), votingEmissionContract)] | |
442 | 442 | else throw("Strict value is not equal to itself.") | |
443 | 443 | } | |
444 | 444 | ||
445 | 445 | ||
446 | 446 | ||
447 | 447 | @Callable(i) | |
448 | 448 | func setManager (pendingManagerPublicKey) = { | |
449 | 449 | let checkCaller = mustManager(i) | |
450 | 450 | if ((checkCaller == checkCaller)) | |
451 | 451 | then { | |
452 | 452 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
453 | 453 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
454 | 454 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
455 | 455 | else throw("Strict value is not equal to itself.") | |
456 | 456 | } | |
457 | 457 | else throw("Strict value is not equal to itself.") | |
458 | 458 | } | |
459 | 459 | ||
460 | 460 | ||
461 | 461 | ||
462 | 462 | @Callable(i) | |
463 | 463 | func confirmManager () = { | |
464 | 464 | let pm = pendingManagerPublicKeyOrUnit() | |
465 | 465 | let hasPM = if (isDefined(pm)) | |
466 | 466 | then true | |
467 | 467 | else throw("No pending manager") | |
468 | 468 | if ((hasPM == hasPM)) | |
469 | 469 | then { | |
470 | 470 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
471 | 471 | then true | |
472 | 472 | else throw("You are not pending manager") | |
473 | 473 | if ((checkPM == checkPM)) | |
474 | 474 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
475 | 475 | else throw("Strict value is not equal to itself.") | |
476 | 476 | } | |
477 | 477 | else throw("Strict value is not equal to itself.") | |
478 | 478 | } | |
479 | 479 | ||
480 | 480 | ||
481 | 481 | ||
482 | 482 | @Callable(i) | |
483 | 483 | func stake () = if ((size(i.payments) != 1)) | |
484 | 484 | then throw("invalid payment - exact one payment must be attached") | |
485 | 485 | else { | |
486 | 486 | let pmt = i.payments[0] | |
487 | 487 | let lpAssetId = value(pmt.assetId) | |
488 | 488 | let lpAssetIdStr = toBase58String(lpAssetId) | |
489 | 489 | let amount = pmt.amount | |
490 | 490 | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
491 | 491 | let callerStr = toString(i.caller) | |
492 | 492 | let userAddressStr = if ((callerStr == poolAddressStr)) | |
493 | 493 | then toString(i.originCaller) | |
494 | 494 | else callerStr | |
495 | 495 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
496 | 496 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
497 | 497 | let stakedByUser = readStaked(stakedByUserKEY) | |
498 | 498 | let stakedTotal = readStaked(stakedTotalKEY) | |
499 | 499 | let $t01903419151 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount) | |
500 | 500 | let wxToClaimUserNew = $t01903419151._1 | |
501 | 501 | let integralSTATE = $t01903419151._2 | |
502 | 502 | let debug = $t01903419151._3 | |
503 | 503 | let listName = getUsersListName(lpAssetIdStr) | |
504 | 504 | let listActions = if (containsNode(listName, userAddressStr)) | |
505 | 505 | then nil | |
506 | 506 | else insertNodeActions(listName, userAddressStr) | |
507 | 507 | (([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions) | |
508 | 508 | } | |
509 | 509 | ||
510 | 510 | ||
511 | 511 | ||
512 | 512 | @Callable(i) | |
513 | 513 | func unstake (lpAssetIdStr,amount) = { | |
514 | 514 | let lpAssetId = fromBase58String(lpAssetIdStr) | |
515 | 515 | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
516 | 516 | let poolAddon = valueOrElse(getString(this, keyStablePoolAddonAddr()), poolAddressStr) | |
517 | 517 | let callerStr = toString(i.caller) | |
518 | 518 | let userAddressStr = if (if ((callerStr == poolAddressStr)) | |
519 | 519 | then true | |
520 | 520 | else (callerStr == poolAddon)) | |
521 | 521 | then toString(i.originCaller) | |
522 | 522 | else callerStr | |
523 | 523 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
524 | 524 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
525 | 525 | let stakedByUser = readStaked(stakedByUserKEY) | |
526 | 526 | let stakedTotal = readStaked(stakedTotalKEY) | |
527 | - | let $t02048620604 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount)) | |
528 | - | let wxToClaimUserNew = $t02048620604._1 | |
529 | - | let integralSTATE = $t02048620604._2 | |
530 | - | let debug = $t02048620604._3 | |
527 | + | let integralSTATE = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))._2 | |
531 | 528 | let listName = getUsersListName(lpAssetIdStr) | |
532 | 529 | let listActions = if (containsNode(listName, userAddressStr)) | |
533 | 530 | then deleteNodeActions(listName, userAddressStr) | |
534 | 531 | else nil | |
535 | - | if ((amount > stakedByUser)) | |
536 | - | then throw("passed amount is less then available") | |
537 | - | else (([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions) | |
532 | + | let claimedByUser = getBigIntFromStringOrZero(this, keyClaimedByUser(lpAssetIdStr, userAddressStr)) | |
533 | + | let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)) | |
534 | + | let wxToClaimUserNew = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddress, 0)._1 | |
535 | + | let availableToClaim = (wxToClaimUserNew - claimedByUser) | |
536 | + | let r = if ((availableToClaim > zeroBigInt)) | |
537 | + | then invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr], nil) | |
538 | + | else unit | |
539 | + | if ((r == r)) | |
540 | + | then if ((amount > stakedByUser)) | |
541 | + | then throw("passed amount is less then available") | |
542 | + | else (([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions) | |
543 | + | else throw("Strict value is not equal to itself.") | |
538 | 544 | } | |
539 | 545 | ||
540 | 546 | ||
541 | 547 | ||
542 | 548 | @Callable(i) | |
543 | 549 | func claimWx (lpAssetIdStr) = { | |
544 | 550 | let userAddressStr = toString(i.caller) | |
545 | 551 | let result = invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr], nil) | |
546 | 552 | $Tuple2(nil, result) | |
547 | 553 | } | |
548 | 554 | ||
549 | 555 | ||
550 | 556 | ||
551 | 557 | @Callable(i) | |
552 | 558 | func claimWxINTERNAL (lpAssetIdStr,userAddressStr) = { | |
553 | 559 | let checkCaller = mustThis(i) | |
554 | 560 | if ((checkCaller == checkCaller)) | |
555 | 561 | then { | |
556 | 562 | let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), "claimWxINTERNAL: invalid user address") | |
557 | 563 | let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)) | |
558 | 564 | let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr) | |
559 | 565 | let claimedTotalKEY = keyClaimedTotal(lpAssetIdStr) | |
560 | 566 | let claimedByUserMinRewardKEY = keyClaimedByUserMinReward(lpAssetIdStr, userAddressStr) | |
561 | 567 | let claimedByUserBoostRewardKEY = keyClaimedByUserBoostReward(lpAssetIdStr, userAddressStr) | |
562 | 568 | let claimedByUser = getBigIntFromStringOrZero(this, claimedByUserKEY) | |
563 | 569 | let claimedByUserMinReward = getBigIntFromStringOrZero(this, claimedByUserMinRewardKEY) | |
564 | 570 | let claimedByUserBoostReward = getBigIntFromStringOrZero(this, claimedByUserBoostRewardKEY) | |
565 | 571 | let claimedTotal = getBigIntFromStringOrZero(this, claimedTotalKEY) | |
566 | - | let $ | |
567 | - | let wxToClaimUserNew = $ | |
568 | - | let integralSTATE = $ | |
569 | - | let debug = $ | |
572 | + | let $t02282422936 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
573 | + | let wxToClaimUserNew = $t02282422936._1 | |
574 | + | let integralSTATE = $t02282422936._2 | |
575 | + | let debug = $t02282422936._3 | |
570 | 576 | let availableToClaim = max([(wxToClaimUserNew - claimedByUser), zeroBigInt]) | |
571 | 577 | if ((zeroBigInt >= availableToClaim)) | |
572 | 578 | then throw("nothing to claim") | |
573 | 579 | else { | |
574 | 580 | let wxAmountBoostTotal = max([asInt(asAnyList(invoke(boostingContract, "claimWxBoost", [lpAssetIdStr, userAddressStr], nil))[0]), 0]) | |
575 | 581 | let minRewardPart = availableToClaim | |
576 | 582 | let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)]) | |
577 | 583 | let wxAssetId = asByteVector(asAnyList(invoke(emissionContract, "emit", [toInt(minRewardPart)], nil))[0]) | |
578 | 584 | let emitBoost = asAnyList(invoke(emissionContract, "emit", [toInt(boostRewardPart)], nil)) | |
579 | 585 | if ((emitBoost == emitBoost)) | |
580 | 586 | then { | |
581 | 587 | let claimedByUserValue = (claimedByUser + availableToClaim) | |
582 | 588 | let claimedByUserMinRewardPlusPart = (claimedByUserMinReward + minRewardPart) | |
583 | 589 | let claimedByUserBoostRewardPlusBoostRewardPart = (claimedByUserMinReward + minRewardPart) | |
584 | 590 | let claimedTotalPlusAvailableToClaim = (claimedByUserMinReward + minRewardPart) | |
585 | 591 | [StringEntry(claimedByUserKEY, toString(claimedByUserValue)), StringEntry(claimedByUserMinRewardKEY, toString(claimedByUserMinRewardPlusPart)), StringEntry(claimedByUserBoostRewardKEY, toString(claimedByUserBoostRewardPlusBoostRewardPart)), StringEntry(claimedTotalKEY, toString(claimedTotalPlusAvailableToClaim)), ScriptTransfer(userAddress, toInt(minRewardPart), wxAssetId), ScriptTransfer(userAddress, toInt(boostRewardPart), wxAssetId), OperationHistoryEntry("claim", userAddressStr, lpAssetIdStr, toInt(availableToClaim), i.transactionId)] | |
586 | 592 | } | |
587 | 593 | else throw("Strict value is not equal to itself.") | |
588 | 594 | } | |
589 | 595 | } | |
590 | 596 | else throw("Strict value is not equal to itself.") | |
591 | 597 | } | |
592 | 598 | ||
593 | 599 | ||
594 | 600 | ||
595 | 601 | @Callable(i) | |
596 | 602 | func claimWxREADONLY (lpAssetIdStr,userAddressStr) = { | |
597 | 603 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
598 | 604 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
599 | 605 | let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr) | |
600 | 606 | let stakedByUser = readStaked(stakedByUserKEY) | |
601 | 607 | let stakedTotal = readStaked(stakedTotalKEY) | |
602 | 608 | let claimedByUser = getBigIntFromStringOrZero(this, claimedByUserKEY) | |
603 | 609 | let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)) | |
604 | 610 | let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr)) | |
605 | 611 | let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) | |
606 | 612 | let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
607 | 613 | let passedBlocks = if ((emissionStartBlock > height)) | |
608 | 614 | then 0 | |
609 | 615 | else (height - emissionStartBlock) | |
610 | 616 | let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, POOLWEIGHTMULT) | |
611 | 617 | let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal) | |
612 | - | let $ | |
613 | - | let wxToClaimUserNew = $ | |
614 | - | let integralSTATE = $ | |
615 | - | let debug = $ | |
618 | + | let $t02557825690 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
619 | + | let wxToClaimUserNew = $t02557825690._1 | |
620 | + | let integralSTATE = $t02557825690._2 | |
621 | + | let debug = $t02557825690._3 | |
616 | 622 | let availableToClaim = max([(wxToClaimUserNew - claimedByUser), zeroBigInt]) | |
617 | 623 | let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil)) | |
618 | 624 | let wxAmountBoostTotal = max([asInt(boostInvResult[0]), 0]) | |
619 | 625 | let boostDebug = asString(boostInvResult[1]) | |
620 | 626 | let minRewardPart = availableToClaim | |
621 | 627 | let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)]) | |
622 | 628 | let totalReward = (minRewardPart + boostRewardPart) | |
623 | 629 | $Tuple2(nil, makeString(["%s%s%d%d%d%d%s", lpAssetIdStr, userAddressStr, toString(totalReward), toString(claimedByUser), toString(minRewardPart), toString(boostRewardPart), ((((debug + "::") + toString(userWxReward)) + "::BOOST::") + boostDebug)], SEP)) | |
624 | 630 | } | |
625 | 631 | ||
626 | 632 | ||
627 | 633 | ||
628 | 634 | @Callable(i) | |
629 | 635 | func usersListTraversal (lpAssetId) = { | |
630 | 636 | let checkCaller = if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionContract()), ""))) | |
631 | 637 | then true | |
632 | 638 | else mustManager(i) | |
633 | 639 | if ((checkCaller == checkCaller)) | |
634 | 640 | then { | |
635 | 641 | let listName = getUsersListName(lpAssetId) | |
636 | 642 | let userOrUnit = getString(keyNextUser(lpAssetId)) | |
637 | 643 | let headOrUnit = getString(keyListHead(listName)) | |
638 | 644 | match userOrUnit { | |
639 | 645 | case _: Unit => | |
640 | 646 | match headOrUnit { | |
641 | 647 | case _: Unit => | |
642 | 648 | $Tuple2(nil, false) | |
643 | 649 | case head: String => | |
644 | 650 | $Tuple2([StringEntry(keyNextUser(lpAssetId), head)], true) | |
645 | 651 | case _ => | |
646 | 652 | throw("Match error") | |
647 | 653 | } | |
648 | 654 | case userAddress: String => | |
649 | 655 | let claimedByUser = getBigIntFromStringOrZero(this, keyClaimedByUser(lpAssetId, userAddress)) | |
650 | 656 | let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetId)) | |
651 | - | let $t02681326916 = refreshINTEGRALS(lpAssetId, userAddress, poolAddress, 0) | |
652 | - | let wxToClaimUserNew = $t02681326916._1 | |
653 | - | let integralSTATE = $t02681326916._2 | |
654 | - | let debug = $t02681326916._3 | |
657 | + | let wxToClaimUserNew = refreshINTEGRALS(lpAssetId, userAddress, poolAddress, 0)._1 | |
655 | 658 | let availableToClaim = (wxToClaimUserNew - claimedByUser) | |
656 | 659 | let r = if ((availableToClaim > zeroBigInt)) | |
657 | 660 | then invoke(this, "claimWxINTERNAL", [lpAssetId, userAddress], nil) | |
658 | 661 | else unit | |
659 | 662 | if ((r == r)) | |
660 | 663 | then { | |
661 | 664 | let nextUserOrUnit = getString(keyListNext(listName, userAddress)) | |
662 | 665 | match nextUserOrUnit { | |
663 | 666 | case _: Unit => | |
664 | 667 | $Tuple2([DeleteEntry(keyNextUser(lpAssetId))], false) | |
665 | 668 | case nextUser: String => | |
666 | 669 | $Tuple2([StringEntry(keyNextUser(lpAssetId), nextUser)], true) | |
667 | 670 | case _ => | |
668 | 671 | throw("Match error") | |
669 | 672 | } | |
670 | 673 | } | |
671 | 674 | else throw("Strict value is not equal to itself.") | |
672 | 675 | case _ => | |
673 | 676 | throw("Match error") | |
674 | 677 | } | |
675 | 678 | } | |
676 | 679 | else throw("Strict value is not equal to itself.") | |
677 | 680 | } | |
678 | 681 | ||
679 | 682 | ||
680 | 683 | ||
681 | 684 | @Callable(i) | |
682 | 685 | func onModifyWeight (lpAssetIdStr,poolAddressStr) = if ((i.caller != factoryContract)) | |
683 | 686 | then throw("permissions denied") | |
684 | 687 | else { | |
685 | - | let $ | |
686 | - | let wxPerLpIntegralNew = $ | |
687 | - | let poolIntegralSTATE = $ | |
688 | - | let poolDEBUG = $ | |
688 | + | let $t02804128151 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0) | |
689 | + | let wxPerLpIntegralNew = $t02804128151._1 | |
690 | + | let poolIntegralSTATE = $t02804128151._2 | |
691 | + | let poolDEBUG = $t02804128151._3 | |
689 | 692 | poolIntegralSTATE | |
690 | 693 | } | |
691 | 694 | ||
692 | 695 | ||
693 | 696 | @Verifier(tx) | |
694 | 697 | func verify () = { | |
695 | 698 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
696 | 699 | case pk: ByteVector => | |
697 | 700 | pk | |
698 | 701 | case _: Unit => | |
699 | 702 | tx.senderPublicKey | |
700 | 703 | case _ => | |
701 | 704 | throw("Match error") | |
702 | 705 | } | |
703 | 706 | let migratorPublicKey = match migratorPublicKeyOrUnit() { | |
704 | 707 | case pk: ByteVector => | |
705 | 708 | pk | |
706 | 709 | case _: Unit => | |
707 | 710 | tx.senderPublicKey | |
708 | 711 | case _ => | |
709 | 712 | throw("Match error") | |
710 | 713 | } | |
711 | 714 | if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)) | |
712 | 715 | then true | |
713 | 716 | else sigVerify(tx.bodyBytes, tx.proofs[0], migratorPublicKey) | |
714 | 717 | } | |
715 | 718 |
github/deemru/w8io/fabc49c 67.08 ms ◑