tx · BRfxWS1rqCjfKpqnQ1SD53wKa8twc6iUWjLGnK1HdyHv 3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz: -0.03500000 Waves 2022.06.28 09:55 [2115950] smart account 3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz > SELF 0.00000000 Waves
{ "type": 13, "id": "BRfxWS1rqCjfKpqnQ1SD53wKa8twc6iUWjLGnK1HdyHv", "fee": 3500000, "feeAssetId": null, "timestamp": 1656399341074, "version": 2, "chainId": 84, "sender": "3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz", "senderPublicKey": "D28XoueZWsMfm8Y5pa6C5ZFuYoWgre2Wm8tzJANJgMnq", "proofs": [ "2Dt2oS6vNpie3C6MKfLuxNDKQ5HNvBw9A29RD3tNgBatevY8PSFnqx1bDyySxzstm1yTPNRpaF7AESKRmSLhs46C" ], "script": "base64:AAIFAAAAAAAAACcIAhIDCgEIEgMKAQgSABIAEgQKAggBEgMKAQgSBAoCCAgSBAoCCAgAAABTAAAAAAZTQ0FMRTgAAAAAAAAAAAgAAAAABU1VTFQ4AAAAAAAF9eEAAAAAAAdTQ0FMRTE4AAAAAAAAAAASAAAAAAZNVUxUMTgJAAE2AAAAAQAN4Lazp2QAAAAAAAADU0VQAgAAAAJfXwAAAAAOUE9PTFdFSUdIVE1VTFQFAAAABU1VTFQ4AAAAAAp6ZXJvQmlnSW50CQABNgAAAAEAAAAAAAAAAAAAAAAACW9uZUJpZ0ludAkAATYAAAABAAAAAAAAAAABAQAAAAlhc0FueUxpc3QAAAABAAAAA3ZhbAQAAAAHJG1hdGNoMAUAAAADdmFsAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAlMaXN0W0FueV0EAAAACnZhbEFueUx5c3QFAAAAByRtYXRjaDAFAAAACnZhbEFueUx5c3QJAAACAAAAAQIAAAAbZmFpbCB0byBjYXN0IGludG8gTGlzdFtBbnldAQAAAAVhc0ludAAAAAEAAAADdmFsBAAAAAckbW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AByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAAnBrBQAAAAckbWF0Y2gwBQAAAAJwawMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAEVW5pdAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQkAAAIAAAABAgAAAAtNYXRjaCBlcnJvcgMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAA90YXJnZXRQdWJsaWNLZXkGCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAARbWlncmF0b3JQdWJsaWNLZXlGT8X/", "height": 2115950, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: E6P6cg8PQS81ZrNMkmm1WhuwzpbQhcmNjhxoFUcKkkUX Next: GtacQoYKn31UnnwCikGvmvVQaB14g9sQ8qKLYpKu77em Diff:
Old | New | Differences | |
---|---|---|---|
300 | 300 | let wxToClaimUserNew = (wxToClaimUser + fraction((wxPerLpIntegralNew - wxPerLpIntegralUserLast), toBigInt(stakedByUser), toBigInt(MULT11))) | |
301 | 301 | let wxPerLpIntegralUserLastNew = wxPerLpIntegralNew | |
302 | 302 | let wxPerLpIntegralUserLastUpdHeightNew = height | |
303 | - | let debug = makeString(["wxPerLpInteg", toString(wxPerLpIntegralUserLastUpdHeightOrZero), "this.getString", toString(value(parseBigInt(getStringOrFail(this, wxPerLpIntegralUserLastKEY)))), "wxPerLpIntegralNew", toString(wxPerLpIntegralNew), "wxToClaimUserNew", toString(wxToClaimUserNew), "wxPerLpIntegralUserLast", toString(wxPerLpIntegralUserLast), toString(stakedByUser), "poolDEBUG=", poolDEBUG, "height=", toString(height)], "::") | |
303 | + | let debug = makeString(["wxToClaimUser", toString(wxToClaimUser), "wxPerLpInteg", toString(wxPerLpIntegralUserLastUpdHeightOrZero), "this.getString", toString(value(parseBigInt(getStringOrFail(this, wxPerLpIntegralUserLastKEY)))), "wxPerLpIntegralNew", toString(wxPerLpIntegralNew), "wxToClaimUserNew", toString(wxToClaimUserNew), "wxPerLpIntegralUserLast", toString(wxPerLpIntegralUserLast), toString(stakedByUser), "poolDEBUG=", poolDEBUG, "height=", toString(height)], "::") | |
304 | 304 | $Tuple3(wxToClaimUserNew, (poolIntegralSTATE ++ [StringEntry(wxToClaimUserKEY, toString(wxToClaimUserNew)), IntegerEntry(wxPerLpIntegralUserLastUpdHeightKEY, wxPerLpIntegralUserLastUpdHeightNew), StringEntry(wxPerLpIntegralUserLastKEY, toString(wxPerLpIntegralUserLastNew))]), debug) | |
305 | 305 | } | |
306 | 306 | ||
414 | 414 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
415 | 415 | let stakedByUser = readStaked(stakedByUserKEY) | |
416 | 416 | let stakedTotal = readStaked(stakedTotalKEY) | |
417 | - | let $ | |
418 | - | let wxToClaimUserNew = $ | |
419 | - | let integralSTATE = $ | |
420 | - | let debug = $ | |
417 | + | let $t01661216729 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount) | |
418 | + | let wxToClaimUserNew = $t01661216729._1 | |
419 | + | let integralSTATE = $t01661216729._2 | |
420 | + | let debug = $t01661216729._3 | |
421 | 421 | ([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) | |
422 | 422 | } | |
423 | 423 | ||
438 | 438 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
439 | 439 | let stakedByUser = readStaked(stakedByUserKEY) | |
440 | 440 | let stakedTotal = readStaked(stakedTotalKEY) | |
441 | - | let $ | |
442 | - | let wxToClaimUserNew = $ | |
443 | - | let integralSTATE = $ | |
444 | - | let debug = $ | |
441 | + | let $t01786617984 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount)) | |
442 | + | let wxToClaimUserNew = $t01786617984._1 | |
443 | + | let integralSTATE = $t01786617984._2 | |
444 | + | let debug = $t01786617984._3 | |
445 | 445 | if ((amount > stakedByUser)) | |
446 | 446 | then throw("passed amount is less then available") | |
447 | 447 | else ([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) | |
462 | 462 | let claimedByUserMinReward = toBigInt(getIntOrZero(this, claimedByUserMinRewardKEY)) | |
463 | 463 | let claimedByUserBoostReward = toBigInt(getIntOrZero(this, claimedByUserBoostRewardKEY)) | |
464 | 464 | let claimedTotal = getBigIntFromStringOrZero(this, claimedTotalKEY) | |
465 | - | let $ | |
466 | - | let wxToClaimUserNew = $ | |
467 | - | let integralSTATE = $ | |
468 | - | let debug = $ | |
465 | + | let $t01922219334 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
466 | + | let wxToClaimUserNew = $t01922219334._1 | |
467 | + | let integralSTATE = $t01922219334._2 | |
468 | + | let debug = $t01922219334._3 | |
469 | 469 | let availableToClaim = (wxToClaimUserNew - claimedByUser) | |
470 | 470 | if ((zeroBigInt >= availableToClaim)) | |
471 | 471 | then throw("nothing to claim") | |
506 | 506 | else (height - emissionStartBlock) | |
507 | 507 | let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, POOLWEIGHTMULT) | |
508 | 508 | let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal) | |
509 | - | let $ | |
510 | - | let wxToClaimUserNew = $ | |
511 | - | let integralSTATE = $ | |
512 | - | let debug = $ | |
509 | + | let $t02193422046 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
510 | + | let wxToClaimUserNew = $t02193422046._1 | |
511 | + | let integralSTATE = $t02193422046._2 | |
512 | + | let debug = $t02193422046._3 | |
513 | 513 | let availableToClaim = (wxToClaimUserNew - toBigInt(claimedByUser)) | |
514 | 514 | let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil)) | |
515 | 515 | let wxAmountBoostTotal = asInt(boostInvResult[0]) | |
526 | 526 | func onModifyWeight (lpAssetIdStr,poolAddressStr) = if ((i.caller != factoryContract)) | |
527 | 527 | then throw("permissions denied") | |
528 | 528 | else { | |
529 | - | let $ | |
530 | - | let wxPerLpIntegralNew = $ | |
531 | - | let poolIntegralSTATE = $ | |
532 | - | let poolDEBUG = $ | |
529 | + | let $t02295923069 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0) | |
530 | + | let wxPerLpIntegralNew = $t02295923069._1 | |
531 | + | let poolIntegralSTATE = $t02295923069._2 | |
532 | + | let poolDEBUG = $t02295923069._3 | |
533 | 533 | poolIntegralSTATE | |
534 | 534 | } | |
535 | 535 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
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 | let IdxFactoryCfgStakingDapp = 1 | |
90 | 90 | ||
91 | 91 | let IdxFactoryCfgBoostingDapp = 2 | |
92 | 92 | ||
93 | 93 | let IdxFactoryCfgIdoDapp = 3 | |
94 | 94 | ||
95 | 95 | let IdxFactoryCfgTeamDapp = 4 | |
96 | 96 | ||
97 | 97 | let IdxFactoryCfgEmissionDapp = 5 | |
98 | 98 | ||
99 | 99 | let IdxFactoryCfgRestDapp = 6 | |
100 | 100 | ||
101 | 101 | let IdxFactoryCfgSlippageDapp = 7 | |
102 | 102 | ||
103 | 103 | func keyFactoryCfg () = "%s__factoryConfig" | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func keyMigratorPublicKey () = "%s__migratorPublicKey" | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | func keyStablePoolAddonAddr () = "%s__stablePoolAddonAddr" | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | func keyFactoryLpList () = "%s__lpTokensList" | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP) | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func readLpList (factory) = split(valueOrElse(getString(factory, keyFactoryLpList()), ""), SEP) | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | func readFactoryCfgOrFail (factory) = split(getStringByAddressOrFail(factory, keyFactoryCfg()), SEP) | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp]) | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp]) | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp]) | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current" | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current" | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | func keyEmissionStartBlock () = "%s%s__emission__startBlock" | |
152 | 152 | ||
153 | 153 | ||
154 | 154 | func keyEmissionDurationInBlocks () = "%s%s__emission__duration" | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | func keyEmissionEndBlock () = "%s%s__emission__endBlock" | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s__staked", userAddressStr, lpAssetIdStr], SEP) | |
161 | 161 | ||
162 | 162 | ||
163 | 163 | func keyStakedTotal (lpAssetIdStr) = ("%s%s%s__staked__total__" + lpAssetIdStr) | |
164 | 164 | ||
165 | 165 | ||
166 | 166 | func keyClaimedByUser (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimed", userAddressStr, lpAssetIdStr], SEP) | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | func keyClaimedByUserMinReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedMinReward", userAddressStr, lpAssetIdStr], SEP) | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | func keyClaimedByUserBoostReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedBoostReward", userAddressStr, lpAssetIdStr], SEP) | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | func keyClaimedTotal (lpAssetIdStr) = makeString(["%s%s%s__claimed__total", lpAssetIdStr], SEP) | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func readStaked (key) = valueOrElse(getInteger(this, key), 0) | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | func keyLastTotalLpBalance (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "bal"], SEP) | |
182 | 182 | ||
183 | 183 | ||
184 | 184 | func keyLastUserLpBalance (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "bal"], SEP) | |
185 | 185 | ||
186 | 186 | ||
187 | 187 | func keyTotalLpBalanceIntegral (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "balINT"], SEP) | |
188 | 188 | ||
189 | 189 | ||
190 | 190 | func keyUserLpBalanceIntegral (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "balINT"], SEP) | |
191 | 191 | ||
192 | 192 | ||
193 | 193 | func keyTotalLpBalanceIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "lastUpd"], SEP) | |
194 | 194 | ||
195 | 195 | ||
196 | 196 | func keyUserLpBalanceIntegralLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "lastUpd"], SEP) | |
197 | 197 | ||
198 | 198 | ||
199 | 199 | func keyWxPerLpIntegral (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpInt"], SEP) | |
200 | 200 | ||
201 | 201 | ||
202 | 202 | func keyWxPerLpIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpIntH"], SEP) | |
203 | 203 | ||
204 | 204 | ||
205 | 205 | func keyWxToClaimUser (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpInt"], SEP) | |
206 | 206 | ||
207 | 207 | ||
208 | 208 | func keyWxPerLpIntegralUserLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpIntH"], SEP) | |
209 | 209 | ||
210 | 210 | ||
211 | 211 | func keyWxPerLp (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLp"], SEP) | |
212 | 212 | ||
213 | 213 | ||
214 | 214 | func keyWxPerLpX18 (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLpX18"], SEP) | |
215 | 215 | ||
216 | 216 | ||
217 | 217 | func keyWxPerLpIntegralUserLast (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "uIntL"], SEP) | |
218 | 218 | ||
219 | 219 | ||
220 | 220 | func keyOperationHistoryRecord (type,userAddress,txId58) = makeString(["%s%s%s%s__history", type, userAddress, txId58], SEP) | |
221 | 221 | ||
222 | 222 | ||
223 | 223 | func formatHistoryRecord (userAddress,lpAssetId,type,amount) = makeString(["%s%s%s%d%d%d", userAddress, lpAssetId, type, toString(height), toString(lastBlock.timestamp), toString(amount)], SEP) | |
224 | 224 | ||
225 | 225 | ||
226 | 226 | func OperationHistoryEntry (type,userAddress,lpAssetId,amount,txId) = StringEntry(keyOperationHistoryRecord(type, userAddress, toBase58String(txId)), formatHistoryRecord(userAddress, lpAssetId, type, amount)) | |
227 | 227 | ||
228 | 228 | ||
229 | 229 | let factoryAddress = getStringOrFail(this, keyFactoryAddress()) | |
230 | 230 | ||
231 | 231 | let factoryContract = addressFromStringValue(factoryAddress) | |
232 | 232 | ||
233 | 233 | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
234 | 234 | ||
235 | 235 | let emissionContract = getEmissionAddressOrFail(factoryCfg) | |
236 | 236 | ||
237 | 237 | let boostingContract = getBoostingAddressOrFail(factoryCfg) | |
238 | 238 | ||
239 | 239 | func calcWxPerLpIntegralUserLast (stakedByUser,wxPerLpIntegralUserLastUpdHeightOrZero,wxPerLpIntegralNew,wxPerLpIntegralUserLastKEY) = if (if ((wxPerLpIntegralUserLastUpdHeightOrZero == zeroBigInt)) | |
240 | 240 | then (stakedByUser > zeroBigInt) | |
241 | 241 | else false) | |
242 | 242 | then zeroBigInt | |
243 | 243 | else if ((stakedByUser == zeroBigInt)) | |
244 | 244 | then wxPerLpIntegralNew | |
245 | 245 | else if (if ((wxPerLpIntegralUserLastUpdHeightOrZero > zeroBigInt)) | |
246 | 246 | then (stakedByUser > zeroBigInt) | |
247 | 247 | else false) | |
248 | 248 | then value(parseBigInt(getStringOrFail(this, wxPerLpIntegralUserLastKEY))) | |
249 | 249 | else throw("calcWxPerLpIntegralUserLast: unexpected state") | |
250 | 250 | ||
251 | 251 | ||
252 | 252 | func refreshPoolINTEGRALS (lpAssetIdStr,poolAddressStr,lpDeltaAmount) = { | |
253 | 253 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
254 | 254 | let stakedTotal = toBigInt(readStaked(stakedTotalKEY)) | |
255 | 255 | let nonZeroStakedTotal = if ((stakedTotal == zeroBigInt)) | |
256 | 256 | then oneBigInt | |
257 | 257 | else stakedTotal | |
258 | 258 | let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr)) | |
259 | 259 | let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
260 | 260 | let MULT3 = 1000 | |
261 | 261 | let wxEmissionPerBlockX3 = (getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) * MULT3) | |
262 | 262 | let poolWxEmissionPerBlockX3 = fraction(wxEmissionPerBlockX3, poolWeight, (POOLWEIGHTMULT * 3)) | |
263 | 263 | let wxPerLpIntegralKEY = keyWxPerLpIntegral(lpAssetIdStr) | |
264 | 264 | let wxPerLpIntegralLastUpdHeightKEY = keyWxPerLpIntegralLastUpdHeight(lpAssetIdStr) | |
265 | 265 | let wxPerLpKEY = keyWxPerLp(lpAssetIdStr) | |
266 | 266 | let wxPerLpIntegralLastUpdHeight = getIntOrDefault(this, wxPerLpIntegralLastUpdHeightKEY, emissionStartBlock) | |
267 | 267 | let wxPerLpIntegral = getBigIntFromStringOrZero(this, wxPerLpIntegralKEY) | |
268 | 268 | let wxPerLpOrZeroX3 = 0 | |
269 | 269 | let dh = max([(height - wxPerLpIntegralLastUpdHeight), 0]) | |
270 | 270 | let wxPerLpX3 = if ((wxPerLpOrZeroX3 != 0)) | |
271 | 271 | then toBigInt(wxPerLpOrZeroX3) | |
272 | 272 | else fraction(toBigInt(poolWxEmissionPerBlockX3), toBigInt(MULT8), nonZeroStakedTotal) | |
273 | 273 | let stakedTotalNew = (stakedTotal + toBigInt(lpDeltaAmount)) | |
274 | 274 | let nonZeroStakedTotalNew = if ((stakedTotalNew == zeroBigInt)) | |
275 | 275 | then oneBigInt | |
276 | 276 | else stakedTotalNew | |
277 | 277 | let wxPerLpIntegralNew = (wxPerLpIntegral + (wxPerLpX3 * toBigInt(dh))) | |
278 | 278 | let wxPerLpX3New = (toBigInt(poolWxEmissionPerBlockX3) / nonZeroStakedTotalNew) | |
279 | 279 | let wxPerLpIntegralLastUpdHeightNew = height | |
280 | 280 | let debug = makeString([toString(wxPerLpIntegralNew), "dh=", toString(dh), "wxPerLpX3=", toString(wxPerLpX3), "stakedTotal=", toString(stakedTotal), toString(poolWxEmissionPerBlockX3), toString(wxEmissionPerBlockX3), "poolWeight=", toString(poolWeight)], "::") | |
281 | 281 | $Tuple3(wxPerLpIntegralNew, [StringEntry(wxPerLpIntegralKEY, toString(wxPerLpIntegralNew)), IntegerEntry(wxPerLpIntegralLastUpdHeightKEY, wxPerLpIntegralLastUpdHeightNew), StringEntry(wxPerLpKEY, toString(wxPerLpX3New))], debug) | |
282 | 282 | } | |
283 | 283 | ||
284 | 284 | ||
285 | 285 | func refreshINTEGRALS (lpAssetIdStr,userAddressStr,poolAddressStr,lpDeltaAmount) = { | |
286 | 286 | let $t01176211884 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount) | |
287 | 287 | let wxPerLpIntegralNew = $t01176211884._1 | |
288 | 288 | let poolIntegralSTATE = $t01176211884._2 | |
289 | 289 | let poolDEBUG = $t01176211884._3 | |
290 | 290 | let MULT3 = 1000 | |
291 | 291 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
292 | 292 | let stakedByUser = readStaked(stakedByUserKEY) | |
293 | 293 | let wxToClaimUserKEY = keyWxToClaimUser(lpAssetIdStr, userAddressStr) | |
294 | 294 | let wxPerLpIntegralUserLastUpdHeightKEY = keyWxPerLpIntegralUserLastUpdHeight(lpAssetIdStr, userAddressStr) | |
295 | 295 | let wxPerLpIntegralUserLastKEY = keyWxPerLpIntegralUserLast(lpAssetIdStr, userAddressStr) | |
296 | 296 | let wxToClaimUser = getBigIntFromStringOrZero(this, wxToClaimUserKEY) | |
297 | 297 | let wxPerLpIntegralUserLastUpdHeightOrZero = getIntOrZero(this, wxPerLpIntegralUserLastUpdHeightKEY) | |
298 | 298 | let wxPerLpIntegralUserLast = calcWxPerLpIntegralUserLast(toBigInt(stakedByUser), toBigInt(wxPerLpIntegralUserLastUpdHeightOrZero), wxPerLpIntegralNew, wxPerLpIntegralUserLastKEY) | |
299 | 299 | let MULT11 = (MULT8 * MULT3) | |
300 | 300 | let wxToClaimUserNew = (wxToClaimUser + fraction((wxPerLpIntegralNew - wxPerLpIntegralUserLast), toBigInt(stakedByUser), toBigInt(MULT11))) | |
301 | 301 | let wxPerLpIntegralUserLastNew = wxPerLpIntegralNew | |
302 | 302 | let wxPerLpIntegralUserLastUpdHeightNew = height | |
303 | - | let debug = makeString(["wxPerLpInteg", toString(wxPerLpIntegralUserLastUpdHeightOrZero), "this.getString", toString(value(parseBigInt(getStringOrFail(this, wxPerLpIntegralUserLastKEY)))), "wxPerLpIntegralNew", toString(wxPerLpIntegralNew), "wxToClaimUserNew", toString(wxToClaimUserNew), "wxPerLpIntegralUserLast", toString(wxPerLpIntegralUserLast), toString(stakedByUser), "poolDEBUG=", poolDEBUG, "height=", toString(height)], "::") | |
303 | + | let debug = makeString(["wxToClaimUser", toString(wxToClaimUser), "wxPerLpInteg", toString(wxPerLpIntegralUserLastUpdHeightOrZero), "this.getString", toString(value(parseBigInt(getStringOrFail(this, wxPerLpIntegralUserLastKEY)))), "wxPerLpIntegralNew", toString(wxPerLpIntegralNew), "wxToClaimUserNew", toString(wxToClaimUserNew), "wxPerLpIntegralUserLast", toString(wxPerLpIntegralUserLast), toString(stakedByUser), "poolDEBUG=", poolDEBUG, "height=", toString(height)], "::") | |
304 | 304 | $Tuple3(wxToClaimUserNew, (poolIntegralSTATE ++ [StringEntry(wxToClaimUserKEY, toString(wxToClaimUserNew)), IntegerEntry(wxPerLpIntegralUserLastUpdHeightKEY, wxPerLpIntegralUserLastUpdHeightNew), StringEntry(wxPerLpIntegralUserLastKEY, toString(wxPerLpIntegralUserLastNew))]), debug) | |
305 | 305 | } | |
306 | 306 | ||
307 | 307 | ||
308 | 308 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
309 | 309 | case s: String => | |
310 | 310 | fromBase58String(s) | |
311 | 311 | case _: Unit => | |
312 | 312 | unit | |
313 | 313 | case _ => | |
314 | 314 | throw("Match error") | |
315 | 315 | } | |
316 | 316 | ||
317 | 317 | ||
318 | 318 | func migratorPublicKeyOrUnit () = match getString(keyMigratorPublicKey()) { | |
319 | 319 | case s: String => | |
320 | 320 | fromBase58String(s) | |
321 | 321 | case _: Unit => | |
322 | 322 | unit | |
323 | 323 | case _ => | |
324 | 324 | throw("Match error") | |
325 | 325 | } | |
326 | 326 | ||
327 | 327 | ||
328 | 328 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
329 | 329 | case s: String => | |
330 | 330 | fromBase58String(s) | |
331 | 331 | case _: Unit => | |
332 | 332 | unit | |
333 | 333 | case _ => | |
334 | 334 | throw("Match error") | |
335 | 335 | } | |
336 | 336 | ||
337 | 337 | ||
338 | 338 | func mustManager (i) = { | |
339 | 339 | let pd = throw("Permission denied") | |
340 | 340 | match managerPublicKeyOrUnit() { | |
341 | 341 | case pk: ByteVector => | |
342 | 342 | if ((i.callerPublicKey == pk)) | |
343 | 343 | then true | |
344 | 344 | else pd | |
345 | 345 | case _: Unit => | |
346 | 346 | if ((i.caller == this)) | |
347 | 347 | then true | |
348 | 348 | else pd | |
349 | 349 | case _ => | |
350 | 350 | throw("Match error") | |
351 | 351 | } | |
352 | 352 | } | |
353 | 353 | ||
354 | 354 | ||
355 | 355 | @Callable(i) | |
356 | 356 | func constructor (factoryAddressStr) = { | |
357 | 357 | let checkCaller = mustManager(i) | |
358 | 358 | if ((checkCaller == checkCaller)) | |
359 | 359 | then [StringEntry(keyFactoryAddress(), factoryAddressStr)] | |
360 | 360 | else throw("Strict value is not equal to itself.") | |
361 | 361 | } | |
362 | 362 | ||
363 | 363 | ||
364 | 364 | ||
365 | 365 | @Callable(i) | |
366 | 366 | func setManager (pendingManagerPublicKey) = { | |
367 | 367 | let checkCaller = mustManager(i) | |
368 | 368 | if ((checkCaller == checkCaller)) | |
369 | 369 | then { | |
370 | 370 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
371 | 371 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
372 | 372 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
373 | 373 | else throw("Strict value is not equal to itself.") | |
374 | 374 | } | |
375 | 375 | else throw("Strict value is not equal to itself.") | |
376 | 376 | } | |
377 | 377 | ||
378 | 378 | ||
379 | 379 | ||
380 | 380 | @Callable(i) | |
381 | 381 | func confirmManager () = { | |
382 | 382 | let pm = pendingManagerPublicKeyOrUnit() | |
383 | 383 | let hasPM = if (isDefined(pm)) | |
384 | 384 | then true | |
385 | 385 | else throw("No pending manager") | |
386 | 386 | if ((hasPM == hasPM)) | |
387 | 387 | then { | |
388 | 388 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
389 | 389 | then true | |
390 | 390 | else throw("You are not pending manager") | |
391 | 391 | if ((checkPM == checkPM)) | |
392 | 392 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
393 | 393 | else throw("Strict value is not equal to itself.") | |
394 | 394 | } | |
395 | 395 | else throw("Strict value is not equal to itself.") | |
396 | 396 | } | |
397 | 397 | ||
398 | 398 | ||
399 | 399 | ||
400 | 400 | @Callable(i) | |
401 | 401 | func stake () = if ((size(i.payments) != 1)) | |
402 | 402 | then throw("invalid payment - exact one payment must be attached") | |
403 | 403 | else { | |
404 | 404 | let pmt = i.payments[0] | |
405 | 405 | let lpAssetId = value(pmt.assetId) | |
406 | 406 | let lpAssetIdStr = toBase58String(lpAssetId) | |
407 | 407 | let amount = pmt.amount | |
408 | 408 | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
409 | 409 | let callerStr = toString(i.caller) | |
410 | 410 | let userAddressStr = if ((callerStr == poolAddressStr)) | |
411 | 411 | then toString(i.originCaller) | |
412 | 412 | else callerStr | |
413 | 413 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
414 | 414 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
415 | 415 | let stakedByUser = readStaked(stakedByUserKEY) | |
416 | 416 | let stakedTotal = readStaked(stakedTotalKEY) | |
417 | - | let $ | |
418 | - | let wxToClaimUserNew = $ | |
419 | - | let integralSTATE = $ | |
420 | - | let debug = $ | |
417 | + | let $t01661216729 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount) | |
418 | + | let wxToClaimUserNew = $t01661216729._1 | |
419 | + | let integralSTATE = $t01661216729._2 | |
420 | + | let debug = $t01661216729._3 | |
421 | 421 | ([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) | |
422 | 422 | } | |
423 | 423 | ||
424 | 424 | ||
425 | 425 | ||
426 | 426 | @Callable(i) | |
427 | 427 | func unstake (lpAssetIdStr,amount) = { | |
428 | 428 | let lpAssetId = fromBase58String(lpAssetIdStr) | |
429 | 429 | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
430 | 430 | let poolAddon = valueOrElse(getString(this, keyStablePoolAddonAddr()), poolAddressStr) | |
431 | 431 | let callerStr = toString(i.caller) | |
432 | 432 | let userAddressStr = if (if ((callerStr == poolAddressStr)) | |
433 | 433 | then true | |
434 | 434 | else (callerStr == poolAddon)) | |
435 | 435 | then toString(i.originCaller) | |
436 | 436 | else callerStr | |
437 | 437 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
438 | 438 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
439 | 439 | let stakedByUser = readStaked(stakedByUserKEY) | |
440 | 440 | let stakedTotal = readStaked(stakedTotalKEY) | |
441 | - | let $ | |
442 | - | let wxToClaimUserNew = $ | |
443 | - | let integralSTATE = $ | |
444 | - | let debug = $ | |
441 | + | let $t01786617984 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount)) | |
442 | + | let wxToClaimUserNew = $t01786617984._1 | |
443 | + | let integralSTATE = $t01786617984._2 | |
444 | + | let debug = $t01786617984._3 | |
445 | 445 | if ((amount > stakedByUser)) | |
446 | 446 | then throw("passed amount is less then available") | |
447 | 447 | else ([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) | |
448 | 448 | } | |
449 | 449 | ||
450 | 450 | ||
451 | 451 | ||
452 | 452 | @Callable(i) | |
453 | 453 | func claimWx (lpAssetIdStr) = { | |
454 | 454 | let userAddress = i.caller | |
455 | 455 | let userAddressStr = toString(i.caller) | |
456 | 456 | let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)) | |
457 | 457 | let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr) | |
458 | 458 | let claimedTotalKEY = keyClaimedTotal(lpAssetIdStr) | |
459 | 459 | let claimedByUserMinRewardKEY = keyClaimedByUserMinReward(lpAssetIdStr, userAddressStr) | |
460 | 460 | let claimedByUserBoostRewardKEY = keyClaimedByUserBoostReward(lpAssetIdStr, userAddressStr) | |
461 | 461 | let claimedByUser = toBigInt(getIntOrZero(this, claimedByUserKEY)) | |
462 | 462 | let claimedByUserMinReward = toBigInt(getIntOrZero(this, claimedByUserMinRewardKEY)) | |
463 | 463 | let claimedByUserBoostReward = toBigInt(getIntOrZero(this, claimedByUserBoostRewardKEY)) | |
464 | 464 | let claimedTotal = getBigIntFromStringOrZero(this, claimedTotalKEY) | |
465 | - | let $ | |
466 | - | let wxToClaimUserNew = $ | |
467 | - | let integralSTATE = $ | |
468 | - | let debug = $ | |
465 | + | let $t01922219334 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
466 | + | let wxToClaimUserNew = $t01922219334._1 | |
467 | + | let integralSTATE = $t01922219334._2 | |
468 | + | let debug = $t01922219334._3 | |
469 | 469 | let availableToClaim = (wxToClaimUserNew - claimedByUser) | |
470 | 470 | if ((zeroBigInt >= availableToClaim)) | |
471 | 471 | then throw("nothing to claim") | |
472 | 472 | else { | |
473 | 473 | let wxAmountBoostTotal = asInt(asAnyList(invoke(boostingContract, "claimWxBoost", [lpAssetIdStr, userAddressStr], nil))[0]) | |
474 | 474 | let minRewardPart = availableToClaim | |
475 | 475 | let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)]) | |
476 | 476 | let wxAssetId = asByteVector(asAnyList(invoke(emissionContract, "emit", [toInt(minRewardPart)], nil))[0]) | |
477 | 477 | let emitBoost = asAnyList(invoke(emissionContract, "emit", [toInt(boostRewardPart)], nil)) | |
478 | 478 | if ((emitBoost == emitBoost)) | |
479 | 479 | then { | |
480 | 480 | let claimedByUserValue = (claimedByUser + availableToClaim) | |
481 | 481 | let claimedByUserMinRewardPlusPart = (claimedByUserMinReward + minRewardPart) | |
482 | 482 | let claimedByUserBoostRewardPlusBoostRewardPart = (claimedByUserMinReward + minRewardPart) | |
483 | 483 | let claimedTotalPlusAvailableToClaim = (claimedByUserMinReward + minRewardPart) | |
484 | 484 | [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)] | |
485 | 485 | } | |
486 | 486 | else throw("Strict value is not equal to itself.") | |
487 | 487 | } | |
488 | 488 | } | |
489 | 489 | ||
490 | 490 | ||
491 | 491 | ||
492 | 492 | @Callable(i) | |
493 | 493 | func claimWxREADONLY (lpAssetIdStr,userAddressStr) = { | |
494 | 494 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
495 | 495 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
496 | 496 | let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr) | |
497 | 497 | let stakedByUser = readStaked(stakedByUserKEY) | |
498 | 498 | let stakedTotal = readStaked(stakedTotalKEY) | |
499 | 499 | let claimedByUser = getIntOrZero(this, claimedByUserKEY) | |
500 | 500 | let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)) | |
501 | 501 | let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr)) | |
502 | 502 | let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) | |
503 | 503 | let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
504 | 504 | let passedBlocks = if ((emissionStartBlock > height)) | |
505 | 505 | then 0 | |
506 | 506 | else (height - emissionStartBlock) | |
507 | 507 | let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, POOLWEIGHTMULT) | |
508 | 508 | let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal) | |
509 | - | let $ | |
510 | - | let wxToClaimUserNew = $ | |
511 | - | let integralSTATE = $ | |
512 | - | let debug = $ | |
509 | + | let $t02193422046 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
510 | + | let wxToClaimUserNew = $t02193422046._1 | |
511 | + | let integralSTATE = $t02193422046._2 | |
512 | + | let debug = $t02193422046._3 | |
513 | 513 | let availableToClaim = (wxToClaimUserNew - toBigInt(claimedByUser)) | |
514 | 514 | let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil)) | |
515 | 515 | let wxAmountBoostTotal = asInt(boostInvResult[0]) | |
516 | 516 | let boostDebug = asString(boostInvResult[1]) | |
517 | 517 | let minRewardPart = availableToClaim | |
518 | 518 | let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)]) | |
519 | 519 | let totalReward = (minRewardPart + boostRewardPart) | |
520 | 520 | $Tuple2(nil, makeString(["%s%s%d%d%d%d%s", lpAssetIdStr, userAddressStr, toString(totalReward), toString(claimedByUser), toString(minRewardPart), toString(boostRewardPart), ((((debug + "::") + toString(userWxReward)) + "::BOOSTDEBUG::") + boostDebug)], SEP)) | |
521 | 521 | } | |
522 | 522 | ||
523 | 523 | ||
524 | 524 | ||
525 | 525 | @Callable(i) | |
526 | 526 | func onModifyWeight (lpAssetIdStr,poolAddressStr) = if ((i.caller != factoryContract)) | |
527 | 527 | then throw("permissions denied") | |
528 | 528 | else { | |
529 | - | let $ | |
530 | - | let wxPerLpIntegralNew = $ | |
531 | - | let poolIntegralSTATE = $ | |
532 | - | let poolDEBUG = $ | |
529 | + | let $t02295923069 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0) | |
530 | + | let wxPerLpIntegralNew = $t02295923069._1 | |
531 | + | let poolIntegralSTATE = $t02295923069._2 | |
532 | + | let poolDEBUG = $t02295923069._3 | |
533 | 533 | poolIntegralSTATE | |
534 | 534 | } | |
535 | 535 | ||
536 | 536 | ||
537 | 537 | @Verifier(tx) | |
538 | 538 | func verify () = { | |
539 | 539 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
540 | 540 | case pk: ByteVector => | |
541 | 541 | pk | |
542 | 542 | case _: Unit => | |
543 | 543 | tx.senderPublicKey | |
544 | 544 | case _ => | |
545 | 545 | throw("Match error") | |
546 | 546 | } | |
547 | 547 | let migratorPublicKey = match migratorPublicKeyOrUnit() { | |
548 | 548 | case pk: ByteVector => | |
549 | 549 | pk | |
550 | 550 | case _: Unit => | |
551 | 551 | tx.senderPublicKey | |
552 | 552 | case _ => | |
553 | 553 | throw("Match error") | |
554 | 554 | } | |
555 | 555 | if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)) | |
556 | 556 | then true | |
557 | 557 | else sigVerify(tx.bodyBytes, tx.proofs[0], migratorPublicKey) | |
558 | 558 | } | |
559 | 559 |
github/deemru/w8io/fabc49c 68.26 ms ◑