tx · AkxFVWFQrYPSAVPouQo5m9z3aXGP4AatVbMDh4iNxcyo 3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy: -0.01000000 Waves 2021.12.02 10:24 [1816352] smart account 3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy > SELF 0.00000000 Waves
{ "type": 13, "id": "AkxFVWFQrYPSAVPouQo5m9z3aXGP4AatVbMDh4iNxcyo", "fee": 1000000, "feeAssetId": null, "timestamp": 1638429880245, "version": 1, "sender": "3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy", "senderPublicKey": "9W33iCCNfmFxUbiC6XZcH5x7f6xfwC7Jb3BoExT5q2PV", "proofs": [ "2TXK7UFBsg7FTMzTdu6Vnns1hyggzPBmJiQAtarUzw6new9w7LYMgHzYGjMN1dvZoYBmEkCVWZjKKAUe9aRbK2FC" ], "script": "base64:AAIFAAAAAAAAACwIAhIICgYICAEBAQgSAwoBARIDCgEBEgQKAggIEgQKAggIEgMKAQgSAwoBCAAAAFQAAAAAA1NFUAIAAAACX18AAAAABlNDQUxFOAAAAAAAAAAACAAAAAAFTVVMVDgAAAAAAAX14QAAAAAADlBPT0xXRUlHSFRNVUxUBQAAAAVNVUxUOAEAAAAPZ2V0U3RyaW5nT3JGYWlsAAAAAgAAAAdhZGRyZXNzAAAAA2tleQkBAAAAE3ZhbHVlT3JFcnJvck1lc3NhZ2UAAAACCQAEHQAAAAIFAAAAB2FkZHJlc3MFAAAAA2tleQkAASwAAAACCQABLAAAAAICAAAAD21hbmRhdG9yeSB0aGlzLgUAAAADa2V5AgAAAA8gaXMgbm90IGRlZmluZWQBAAAADGdldEludE9yWmVybwAAAAIAAAAHYWRkcmVzcwAAAANrZXkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQaAAAAAgUAAAAHYWRkcmVzcwUAAAADa2V5AAAAAAAAAAAAAQAAAA9nZXRJbnRPckRlZmF1bHQAAAADAAAAB2FkZHJlc3MAAAADa2V5AAAACmRlZmF1b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RQAAAACBQAAAANuaWwJAARMAAAAAgUAAAAJZ3d4QW1vdW50BQAAAANuaWwAAAAAk3mwkA==", "chainId": 84, "height": 1816352, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EJUHr7jSppSwQkf45TYcWhLryTd7J2dLckt1u7kcp85r Next: 2eS9b612jnPujdq6fhiQ6a4MZvhPnJ8mqivpgKZ6Ub5y Diff:
Old | New | Differences | |
---|---|---|---|
6 | 6 | let SCALE8 = 8 | |
7 | 7 | ||
8 | 8 | let MULT8 = 100000000 | |
9 | + | ||
10 | + | let POOLWEIGHTMULT = MULT8 | |
9 | 11 | ||
10 | 12 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (("mandatory this." + key) + " is not defined")) | |
11 | 13 | ||
279 | 281 | } | |
280 | 282 | ||
281 | 283 | ||
282 | - | func internalClaimWxBoost (userAddressStr) = { | |
284 | + | func internalClaimWxBoost (lpAssetIdStr,userAddressStr,readOnly) = { | |
283 | 285 | let EMPTY = "EMPTY" | |
284 | 286 | let userRecordOrEmpty = valueOrElse(getString(this, keyLockParamsRecord(userAddressStr)), EMPTY) | |
285 | 287 | if ((userRecordOrEmpty == EMPTY)) | |
287 | 289 | else { | |
288 | 290 | let userRecordArray = split(userRecordOrEmpty, SEP) | |
289 | 291 | let userNumStr = userRecordArray[IdxLockUserNum] | |
292 | + | let EMPTYSTR = "empty" | |
293 | + | let poolWeight = if ((lpAssetIdStr != EMPTYSTR)) | |
294 | + | then { | |
295 | + | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
296 | + | getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr)) | |
297 | + | } | |
298 | + | else if (readOnly) | |
299 | + | then 0 | |
300 | + | else throw(("not readonly mode: unsupported lp asset " + lpAssetIdStr)) | |
290 | 301 | let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) | |
291 | 302 | let emissionStart = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
292 | 303 | let emissionEnd = getIntOrFail(emissionContract, keyEmissionEndBlock()) | |
310 | 321 | let userCurrGwx = calcCurrentGwxAmount(userAddressStr) | |
311 | 322 | let userBoostAvalaibleToClaimTotalKEY = keyUserBoostAvalaibleToClaimTotal(userNumStr) | |
312 | 323 | let userBoostAvaliableToClaimTotal = getIntOrZero(this, userBoostAvalaibleToClaimTotalKEY) | |
324 | + | let poolUserBoostEmissionIntegral = fraction(userBoostEmissionIntegral, poolWeight, POOLWEIGHTMULT) | |
313 | 325 | let userBoostAvaliableToClaimTotalNew = (userBoostAvaliableToClaimTotal + (if ((totalCachedGwx == 0)) | |
314 | 326 | then 0 | |
315 | - | else fraction( | |
327 | + | else fraction(poolUserBoostEmissionIntegral, userCurrGwx, totalCachedGwx))) | |
316 | 328 | let userBoostClaimedKEY = keyUserBoostClaimed(userNumStr) | |
317 | 329 | let userBoostClaimed = getIntOrZero(this, userBoostClaimedKEY) | |
318 | 330 | let userBoostAvailable = (userBoostAvaliableToClaimTotalNew - userBoostClaimed) | |
484 | 496 | ||
485 | 497 | ||
486 | 498 | @Callable(i) | |
487 | - | func claimWxBoost (userAddressStr) = if ((stakingContract != i.caller)) | |
499 | + | func claimWxBoost (lpAssetIdStr,userAddressStr) = if ((stakingContract != i.caller)) | |
488 | 500 | then throw("permissions denied") | |
489 | 501 | else { | |
490 | - | let $ | |
491 | - | let userBoostAvailable = $ | |
492 | - | let dataState = $ | |
493 | - | let debug = $ | |
502 | + | let $t02409824200 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false) | |
503 | + | let userBoostAvailable = $t02409824200._1 | |
504 | + | let dataState = $t02409824200._2 | |
505 | + | let debug = $t02409824200._3 | |
494 | 506 | $Tuple2(dataState, [userBoostAvailable]) | |
495 | 507 | } | |
496 | 508 | ||
497 | 509 | ||
498 | 510 | ||
499 | 511 | @Callable(i) | |
500 | - | func claimWxBoostREADONLY (userAddressStr) = { | |
501 | - | let $ | |
502 | - | let userBoostAvailable = $ | |
503 | - | let dataState = $ | |
504 | - | let debug = $ | |
512 | + | func claimWxBoostREADONLY (lpAssetIdStr,userAddressStr) = { | |
513 | + | let $t02433224433 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true) | |
514 | + | let userBoostAvailable = $t02433224433._1 | |
515 | + | let dataState = $t02433224433._2 | |
516 | + | let debug = $t02433224433._3 | |
505 | 517 | $Tuple2(nil, [userBoostAvailable, debug]) | |
506 | 518 | } | |
507 | 519 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
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 | + | ||
10 | + | let POOLWEIGHTMULT = MULT8 | |
9 | 11 | ||
10 | 12 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (("mandatory this." + key) + " is not defined")) | |
11 | 13 | ||
12 | 14 | ||
13 | 15 | func getIntOrZero (address,key) = valueOrElse(getInteger(address, key), 0) | |
14 | 16 | ||
15 | 17 | ||
16 | 18 | func getIntOrDefault (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal) | |
17 | 19 | ||
18 | 20 | ||
19 | 21 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined")) | |
20 | 22 | ||
21 | 23 | ||
22 | 24 | func asAnyList (val) = match val { | |
23 | 25 | case valAnyLyst: List[Any] => | |
24 | 26 | valAnyLyst | |
25 | 27 | case _ => | |
26 | 28 | throw("fail to cast into List[Any]") | |
27 | 29 | } | |
28 | 30 | ||
29 | 31 | ||
30 | 32 | func asInt (val) = match val { | |
31 | 33 | case valInt: Int => | |
32 | 34 | valInt | |
33 | 35 | case _ => | |
34 | 36 | throw("fail to cast into Int") | |
35 | 37 | } | |
36 | 38 | ||
37 | 39 | ||
38 | 40 | func keyFactoryAddress () = "%s%s__config__factoryAddress" | |
39 | 41 | ||
40 | 42 | ||
41 | 43 | let IdxFactoryCfgStakingDapp = 1 | |
42 | 44 | ||
43 | 45 | let IdxFactoryCfgBoostingDapp = 2 | |
44 | 46 | ||
45 | 47 | let IdxFactoryCfgIdoDapp = 3 | |
46 | 48 | ||
47 | 49 | let IdxFactoryCfgTeamDapp = 4 | |
48 | 50 | ||
49 | 51 | let IdxFactoryCfgEmissionDapp = 5 | |
50 | 52 | ||
51 | 53 | let IdxFactoryCfgRestDapp = 6 | |
52 | 54 | ||
53 | 55 | let IdxFactoryCfgSlippageDapp = 7 | |
54 | 56 | ||
55 | 57 | func keyFactoryCfg () = "%s__factoryConfig" | |
56 | 58 | ||
57 | 59 | ||
58 | 60 | func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
59 | 61 | ||
60 | 62 | ||
61 | 63 | func keyFactoryLpList () = "%s__lpTokensList" | |
62 | 64 | ||
63 | 65 | ||
64 | 66 | func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
65 | 67 | ||
66 | 68 | ||
67 | 69 | func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP) | |
68 | 70 | ||
69 | 71 | ||
70 | 72 | func readFactoryAddressOrFail () = addressFromStringValue(getStringOrFail(this, keyFactoryAddress())) | |
71 | 73 | ||
72 | 74 | ||
73 | 75 | func readLpList () = split(valueOrElse(getString(readFactoryAddressOrFail(), keyFactoryLpList()), ""), SEP) | |
74 | 76 | ||
75 | 77 | ||
76 | 78 | func readFactoryCfgOrFail (factory) = split(getStringOrFail(factory, keyFactoryCfg()), SEP) | |
77 | 79 | ||
78 | 80 | ||
79 | 81 | func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp]) | |
80 | 82 | ||
81 | 83 | ||
82 | 84 | func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp]) | |
83 | 85 | ||
84 | 86 | ||
85 | 87 | func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp]) | |
86 | 88 | ||
87 | 89 | ||
88 | 90 | func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current" | |
89 | 91 | ||
90 | 92 | ||
91 | 93 | func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current" | |
92 | 94 | ||
93 | 95 | ||
94 | 96 | func keyEmissionStartBlock () = "%s%s__emission__startBlock" | |
95 | 97 | ||
96 | 98 | ||
97 | 99 | func keyEmissionDurationInBlocks () = "%s%s__emission__duration" | |
98 | 100 | ||
99 | 101 | ||
100 | 102 | func keyEmissionEndBlock () = "%s%s__emission__endBlock" | |
101 | 103 | ||
102 | 104 | ||
103 | 105 | let IdxCfgAssetId = 1 | |
104 | 106 | ||
105 | 107 | let IdxCfgMinLockAmount = 2 | |
106 | 108 | ||
107 | 109 | let IdxCfgMinLockDuration = 3 | |
108 | 110 | ||
109 | 111 | let IdxCfgMaxLockDuration = 4 | |
110 | 112 | ||
111 | 113 | let IdxCfgMathContract = 5 | |
112 | 114 | ||
113 | 115 | func keyConfig () = "%s__config" | |
114 | 116 | ||
115 | 117 | ||
116 | 118 | func readConfigArrayOrFail () = split(getStringOrFail(this, keyConfig()), SEP) | |
117 | 119 | ||
118 | 120 | ||
119 | 121 | func formatConfigS (assetId,minLockAmount,minLockDuration,maxLockDuration,mathContract) = makeString(["%s%d%d%d", assetId, minLockAmount, minLockDuration, maxLockDuration, mathContract], SEP) | |
120 | 122 | ||
121 | 123 | ||
122 | 124 | func formatConfig (assetId,minLockAmount,minLockDuration,maxLockDuration,mathContract) = formatConfigS(assetId, toString(minLockAmount), toString(minLockDuration), toString(maxLockDuration), mathContract) | |
123 | 125 | ||
124 | 126 | ||
125 | 127 | let IdxLockUserNum = 1 | |
126 | 128 | ||
127 | 129 | let IdxLockAmount = 2 | |
128 | 130 | ||
129 | 131 | let IdxLockStart = 3 | |
130 | 132 | ||
131 | 133 | let IdxLockDuration = 4 | |
132 | 134 | ||
133 | 135 | let IdxLockParamK = 5 | |
134 | 136 | ||
135 | 137 | let IdxLockParamB = 6 | |
136 | 138 | ||
137 | 139 | func keyLockParamsRecord (userAddress) = makeString(["%s%s__lock", userAddress], SEP) | |
138 | 140 | ||
139 | 141 | ||
140 | 142 | func readLockParamsRecordOrFail (userAddress) = split(getStringOrFail(this, keyLockParamsRecord(userAddress)), SEP) | |
141 | 143 | ||
142 | 144 | ||
143 | 145 | 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) | |
144 | 146 | ||
145 | 147 | ||
146 | 148 | 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)) | |
147 | 149 | ||
148 | 150 | ||
149 | 151 | func keyNextUserNum () = "%s__nextUserNum" | |
150 | 152 | ||
151 | 153 | ||
152 | 154 | func keyUser2NumMapping (userAddress) = makeString(["%s%s%s__mapping__user2num", userAddress], SEP) | |
153 | 155 | ||
154 | 156 | ||
155 | 157 | func keyNum2UserMapping (num) = makeString(["%s%s%s__mapping__num2user", num], SEP) | |
156 | 158 | ||
157 | 159 | ||
158 | 160 | func keyLockParamUserAmount (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "amount"], SEP) | |
159 | 161 | ||
160 | 162 | ||
161 | 163 | func keyLockParamStartBlock (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "start"], SEP) | |
162 | 164 | ||
163 | 165 | ||
164 | 166 | func keyLockParamDuration (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "duration"], SEP) | |
165 | 167 | ||
166 | 168 | ||
167 | 169 | func keyLockParamK (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "k"], SEP) | |
168 | 170 | ||
169 | 171 | ||
170 | 172 | func keyLockParamB (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "b"], SEP) | |
171 | 173 | ||
172 | 174 | ||
173 | 175 | func keyLockParamByPeriodK (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "k", period], SEP) | |
174 | 176 | ||
175 | 177 | ||
176 | 178 | func keyLockParamByPeriodB (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "b", period], SEP) | |
177 | 179 | ||
178 | 180 | ||
179 | 181 | func keyLockParamTotalAmount () = "%s%s__stats__activeTotalLocked" | |
180 | 182 | ||
181 | 183 | ||
182 | 184 | func keyStatsLocksDurationSumInBlocks () = "%s%s__stats__locksDurationSumInBlocks" | |
183 | 185 | ||
184 | 186 | ||
185 | 187 | func keyStatsLocksCount () = "%s%s__stats__locksCount" | |
186 | 188 | ||
187 | 189 | ||
188 | 190 | func keyStatsUsersCount () = "%s%s__stats__activeUsersCount" | |
189 | 191 | ||
190 | 192 | ||
191 | 193 | func keyUserBoostEmissionLastINTEGRAL (userNum) = makeString(["%s%d__userBoostEmissionLastInt", userNum], SEP) | |
192 | 194 | ||
193 | 195 | ||
194 | 196 | func keyUserMaxBoostINTEGRAL (userNum) = makeString(["%s%d__maxBoostInt", userNum], SEP) | |
195 | 197 | ||
196 | 198 | ||
197 | 199 | func keyTotalMaxBoostINTEGRAL () = "%s%s__maxBoostInt__total" | |
198 | 200 | ||
199 | 201 | ||
200 | 202 | func keyUserBoostAvalaibleToClaimTotal (userNum) = makeString(["%s%d__userBoostAvaliableToClaimTotal", userNum], SEP) | |
201 | 203 | ||
202 | 204 | ||
203 | 205 | func keyUserBoostClaimed (userNum) = makeString(["%s%d__userBoostClaimed", userNum], SEP) | |
204 | 206 | ||
205 | 207 | ||
206 | 208 | func keyTotalCachedGwx () = "%s%s__gwxCached__total" | |
207 | 209 | ||
208 | 210 | ||
209 | 211 | let factoryContract = readFactoryAddressOrFail() | |
210 | 212 | ||
211 | 213 | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
212 | 214 | ||
213 | 215 | let emissionContract = getEmissionAddressOrFail(factoryCfg) | |
214 | 216 | ||
215 | 217 | let stakingContract = getStakingAddressOrFail(factoryCfg) | |
216 | 218 | ||
217 | 219 | func HistoryEntry (type,user,amount,lockStart,duration,k,b,i) = { | |
218 | 220 | let historyKEY = makeString(["%s%s%s%s__history", type, user, toBase58String(i.transactionId)], SEP) | |
219 | 221 | 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) | |
220 | 222 | StringEntry(historyKEY, historyDATA) | |
221 | 223 | } | |
222 | 224 | ||
223 | 225 | ||
224 | 226 | func StatsEntry (totalLockedInc,durationInc,lockCountInc,usersCountInc) = { | |
225 | 227 | let locksDurationSumInBlocksKEY = keyStatsLocksDurationSumInBlocks() | |
226 | 228 | let locksCountKEY = keyStatsLocksCount() | |
227 | 229 | let usersCountKEY = keyStatsUsersCount() | |
228 | 230 | let totalAmountKEY = keyLockParamTotalAmount() | |
229 | 231 | let locksDurationSumInBlocks = getIntOrZero(this, locksDurationSumInBlocksKEY) | |
230 | 232 | let locksCount = getIntOrZero(this, locksCountKEY) | |
231 | 233 | let usersCount = getIntOrZero(this, usersCountKEY) | |
232 | 234 | let totalAmount = getIntOrZero(this, totalAmountKEY) | |
233 | 235 | [IntegerEntry(locksDurationSumInBlocksKEY, (locksDurationSumInBlocks + durationInc)), IntegerEntry(locksCountKEY, (locksCount + lockCountInc)), IntegerEntry(usersCountKEY, (usersCount + usersCountInc)), IntegerEntry(totalAmountKEY, (totalAmount + totalLockedInc))] | |
234 | 236 | } | |
235 | 237 | ||
236 | 238 | ||
237 | 239 | func calcGwxAmount (kRaw,bRaw,h) = { | |
238 | 240 | let SCALE = 1000 | |
239 | 241 | (((kRaw * h) + bRaw) / SCALE) | |
240 | 242 | } | |
241 | 243 | ||
242 | 244 | ||
243 | 245 | func LockParamsEntry (userAddress,userNum,amount,start,duration,k,b,period) = { | |
244 | 246 | let userAmountKEY = keyLockParamUserAmount(userNum) | |
245 | 247 | let startBlockKEY = keyLockParamStartBlock(userNum) | |
246 | 248 | let durationKEY = keyLockParamDuration(userNum) | |
247 | 249 | let kKEY = keyLockParamK(userNum) | |
248 | 250 | let bKEY = keyLockParamB(userNum) | |
249 | 251 | let kByPerioKEY = keyLockParamByPeriodK(userNum, period) | |
250 | 252 | let bByPeriodKEY = keyLockParamByPeriodB(userNum, period) | |
251 | 253 | let gwxAmount = calcGwxAmount(k, b, height) | |
252 | 254 | [IntegerEntry(userAmountKEY, amount), IntegerEntry(startBlockKEY, start), IntegerEntry(durationKEY, duration), IntegerEntry(kKEY, k), IntegerEntry(bKEY, b), IntegerEntry(kByPerioKEY, k), IntegerEntry(bByPeriodKEY, b), StringEntry(keyLockParamsRecord(userAddress), formatLockParamsRecord(userNum, amount, start, duration, k, b, gwxAmount))] | |
253 | 255 | } | |
254 | 256 | ||
255 | 257 | ||
256 | 258 | func extractOptionalPaymentAmountOrFail (i,expectedAssetId) = if ((size(i.payments) > 1)) | |
257 | 259 | then throw("only one payment is allowed") | |
258 | 260 | else if ((size(i.payments) == 0)) | |
259 | 261 | then 0 | |
260 | 262 | else { | |
261 | 263 | let pmt = i.payments[0] | |
262 | 264 | if ((value(pmt.assetId) != expectedAssetId)) | |
263 | 265 | then throw("invalid asset id in payment") | |
264 | 266 | else pmt.amount | |
265 | 267 | } | |
266 | 268 | ||
267 | 269 | ||
268 | 270 | func calcCurrentGwxAmount (userAddress) = { | |
269 | 271 | let EMPTY = "empty" | |
270 | 272 | let user2NumMappingKEY = keyUser2NumMapping(userAddress) | |
271 | 273 | let userNum = valueOrElse(getString(user2NumMappingKEY), EMPTY) | |
272 | 274 | let k = valueOrElse(getInteger(keyLockParamK(userNum)), 0) | |
273 | 275 | let b = valueOrElse(getInteger(keyLockParamB(userNum)), 0) | |
274 | 276 | let gwxAmountCalc = calcGwxAmount(k, b, height) | |
275 | 277 | let gwxAmount = if ((0 > gwxAmountCalc)) | |
276 | 278 | then 0 | |
277 | 279 | else gwxAmountCalc | |
278 | 280 | gwxAmount | |
279 | 281 | } | |
280 | 282 | ||
281 | 283 | ||
282 | - | func internalClaimWxBoost (userAddressStr) = { | |
284 | + | func internalClaimWxBoost (lpAssetIdStr,userAddressStr,readOnly) = { | |
283 | 285 | let EMPTY = "EMPTY" | |
284 | 286 | let userRecordOrEmpty = valueOrElse(getString(this, keyLockParamsRecord(userAddressStr)), EMPTY) | |
285 | 287 | if ((userRecordOrEmpty == EMPTY)) | |
286 | 288 | then $Tuple3(0, nil, "userRecord::is::empty") | |
287 | 289 | else { | |
288 | 290 | let userRecordArray = split(userRecordOrEmpty, SEP) | |
289 | 291 | let userNumStr = userRecordArray[IdxLockUserNum] | |
292 | + | let EMPTYSTR = "empty" | |
293 | + | let poolWeight = if ((lpAssetIdStr != EMPTYSTR)) | |
294 | + | then { | |
295 | + | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
296 | + | getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr)) | |
297 | + | } | |
298 | + | else if (readOnly) | |
299 | + | then 0 | |
300 | + | else throw(("not readonly mode: unsupported lp asset " + lpAssetIdStr)) | |
290 | 301 | let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) | |
291 | 302 | let emissionStart = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
292 | 303 | let emissionEnd = getIntOrFail(emissionContract, keyEmissionEndBlock()) | |
293 | 304 | let h = if ((height > emissionEnd)) | |
294 | 305 | then emissionEnd | |
295 | 306 | else height | |
296 | 307 | let dh = max([(h - emissionStart), 0]) | |
297 | 308 | let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNumStr) | |
298 | 309 | let userBoostEmissionLastIntegral = getIntOrZero(this, userBoostEmissionLastIntegralKEY) | |
299 | 310 | let boostEmissionIntegral = (((wxEmissionPerBlock * dh) * 2) / 3) | |
300 | 311 | let userBoostEmissionIntegral = (boostEmissionIntegral - userBoostEmissionLastIntegral) | |
301 | 312 | if ((0 > userBoostEmissionIntegral)) | |
302 | 313 | then throw("wrong calculations") | |
303 | 314 | else { | |
304 | 315 | let userMaxBoostIntegralKEY = keyUserMaxBoostINTEGRAL(userNumStr) | |
305 | 316 | let totalMaxBoostIntegralKEY = keyTotalMaxBoostINTEGRAL() | |
306 | 317 | let userMaxBoostInt = getIntOrZero(this, userMaxBoostIntegralKEY) | |
307 | 318 | let totalMaxBoostInt = getIntOrZero(this, totalMaxBoostIntegralKEY) | |
308 | 319 | let totalCachedGwxKEY = keyTotalCachedGwx() | |
309 | 320 | let totalCachedGwx = valueOrElse(getInteger(this, totalCachedGwxKEY), 0) | |
310 | 321 | let userCurrGwx = calcCurrentGwxAmount(userAddressStr) | |
311 | 322 | let userBoostAvalaibleToClaimTotalKEY = keyUserBoostAvalaibleToClaimTotal(userNumStr) | |
312 | 323 | let userBoostAvaliableToClaimTotal = getIntOrZero(this, userBoostAvalaibleToClaimTotalKEY) | |
324 | + | let poolUserBoostEmissionIntegral = fraction(userBoostEmissionIntegral, poolWeight, POOLWEIGHTMULT) | |
313 | 325 | let userBoostAvaliableToClaimTotalNew = (userBoostAvaliableToClaimTotal + (if ((totalCachedGwx == 0)) | |
314 | 326 | then 0 | |
315 | - | else fraction( | |
327 | + | else fraction(poolUserBoostEmissionIntegral, userCurrGwx, totalCachedGwx))) | |
316 | 328 | let userBoostClaimedKEY = keyUserBoostClaimed(userNumStr) | |
317 | 329 | let userBoostClaimed = getIntOrZero(this, userBoostClaimedKEY) | |
318 | 330 | let userBoostAvailable = (userBoostAvaliableToClaimTotalNew - userBoostClaimed) | |
319 | 331 | let dataState = [IntegerEntry(userBoostAvalaibleToClaimTotalKEY, userBoostAvaliableToClaimTotalNew), IntegerEntry(userBoostEmissionLastIntegralKEY, boostEmissionIntegral)] | |
320 | 332 | let debug = makeString([("userBoostEmissionLastIntegral=" + toString(userBoostEmissionLastIntegral)), ("userBoostEmissionIntegral=" + toString(userBoostEmissionIntegral)), ("userMaxBoostInt=" + toString(userMaxBoostInt)), ("totalMaxBoostInt=" + toString(totalMaxBoostInt)), ("userBoostAvaliableToClaimTotal=" + toString(userBoostAvaliableToClaimTotal)), ("userBoostAvaliableToClaimTotalNew=" + toString(userBoostAvaliableToClaimTotalNew)), ("userBoostClaimed=" + toString(userBoostClaimed)), ("userBoostAvailable=" + toString(userBoostAvailable))], "::") | |
321 | 333 | $Tuple3(userBoostAvailable, dataState, debug) | |
322 | 334 | } | |
323 | 335 | } | |
324 | 336 | } | |
325 | 337 | ||
326 | 338 | ||
327 | 339 | @Callable(i) | |
328 | 340 | func constructor (factoryAddressStr,lockAssetIdStr,minLockAmount,minDuration,maxDuration,mathContract) = if ((this != i.caller)) | |
329 | 341 | then throw("not authorized") | |
330 | 342 | else ([IntegerEntry(keyNextUserNum(), 0), StringEntry(keyConfig(), formatConfig(lockAssetIdStr, minLockAmount, minDuration, maxDuration, mathContract)), StringEntry(keyFactoryAddress(), factoryAddressStr)] ++ StatsEntry(0, 0, 0, 0)) | |
331 | 343 | ||
332 | 344 | ||
333 | 345 | ||
334 | 346 | @Callable(i) | |
335 | 347 | func lock (duration) = { | |
336 | 348 | let cfgArray = readConfigArrayOrFail() | |
337 | 349 | let assetIdStr = cfgArray[IdxCfgAssetId] | |
338 | 350 | let assetId = fromBase58String(assetIdStr) | |
339 | 351 | let minLockAmount = parseIntValue(cfgArray[IdxCfgMinLockAmount]) | |
340 | 352 | let minLockDuration = parseIntValue(cfgArray[IdxCfgMinLockDuration]) | |
341 | 353 | let maxLockDuration = parseIntValue(cfgArray[IdxCfgMaxLockDuration]) | |
342 | 354 | let mathContract = addressFromStringValue(cfgArray[IdxCfgMathContract]) | |
343 | 355 | if ((size(i.payments) != 1)) | |
344 | 356 | then throw("invalid payment - exact one payment must be attached") | |
345 | 357 | else { | |
346 | 358 | let pmt = i.payments[0] | |
347 | 359 | let pmtAmount = pmt.amount | |
348 | 360 | if ((assetId != value(pmt.assetId))) | |
349 | 361 | then throw((("invalid asset is in payment - " + assetIdStr) + " is expected")) | |
350 | 362 | else { | |
351 | 363 | let nextUserNumKEY = keyNextUserNum() | |
352 | 364 | let userAddressStr = toString(i.caller) | |
353 | 365 | let userIsExisting = isDefined(getString(keyUser2NumMapping(userAddressStr))) | |
354 | 366 | let userNumStr = if (userIsExisting) | |
355 | 367 | then value(getString(keyUser2NumMapping(userAddressStr))) | |
356 | 368 | else toString(getIntOrFail(this, nextUserNumKEY)) | |
357 | 369 | let userNum = parseIntValue(userNumStr) | |
358 | 370 | let lockStart = height | |
359 | 371 | let startBlockKEY = keyLockParamStartBlock(userNumStr) | |
360 | 372 | let durationKEY = keyLockParamDuration(userNumStr) | |
361 | 373 | let userAmountKEY = keyLockParamUserAmount(userNumStr) | |
362 | 374 | if ((minLockAmount > pmtAmount)) | |
363 | 375 | then throw(("amount is less then minLockAmount=" + toString(minLockAmount))) | |
364 | 376 | else if ((minLockDuration > duration)) | |
365 | 377 | then throw(("passed duration is less then minLockDuration=" + toString(minLockDuration))) | |
366 | 378 | else if ((duration > maxLockDuration)) | |
367 | 379 | then throw(("passed duration is greater then maxLockDuration=" + toString(maxLockDuration))) | |
368 | 380 | else if (if (userIsExisting) | |
369 | 381 | then ((getIntOrFail(this, startBlockKEY) + getIntOrFail(this, durationKEY)) >= lockStart) | |
370 | 382 | else false) | |
371 | 383 | then throw("there is an active lock - consider to use increaseLock") | |
372 | 384 | else { | |
373 | 385 | let coeffX8 = fraction(duration, MULT8, maxLockDuration) | |
374 | 386 | let gWxAmountStart = fraction(pmtAmount, coeffX8, MULT8) | |
375 | 387 | let gWxParamsResultList = asAnyList(invoke(mathContract, "calcGwxParamsREADONLY", [gWxAmountStart, lockStart, duration], nil)) | |
376 | 388 | let k = asInt(gWxParamsResultList[0]) | |
377 | 389 | let b = asInt(gWxParamsResultList[1]) | |
378 | 390 | let period = toString(asInt(gWxParamsResultList[2])) | |
379 | 391 | let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) | |
380 | 392 | let emissionStart = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
381 | 393 | let emissionEnd = getIntOrFail(emissionContract, keyEmissionEndBlock()) | |
382 | 394 | let h = if ((height > emissionEnd)) | |
383 | 395 | then emissionEnd | |
384 | 396 | else height | |
385 | 397 | let dh = max([(h - emissionStart), 0]) | |
386 | 398 | let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNumStr) | |
387 | 399 | let boostEmissionIntegral = (((wxEmissionPerBlock * dh) * 2) / 3) | |
388 | 400 | let userMaxBoostIntegralKEY = keyUserMaxBoostINTEGRAL(userNumStr) | |
389 | 401 | let totalMaxBoostIntegralKEY = keyTotalMaxBoostINTEGRAL() | |
390 | 402 | let userMaxBoostInt = ((gWxAmountStart * duration) / 2) | |
391 | 403 | let totalMaxBoostInt = getIntOrZero(this, totalMaxBoostIntegralKEY) | |
392 | 404 | let totalCachedGwxKEY = keyTotalCachedGwx() | |
393 | 405 | let totalCachedGwx = valueOrElse(getInteger(this, totalCachedGwxKEY), 0) | |
394 | 406 | let arr = if (userIsExisting) | |
395 | 407 | then nil | |
396 | 408 | else [IntegerEntry(nextUserNumKEY, (userNum + 1)), StringEntry(keyUser2NumMapping(userAddressStr), userNumStr), StringEntry(keyNum2UserMapping(userNumStr), userAddressStr)] | |
397 | 409 | ((((arr ++ LockParamsEntry(userAddressStr, userNumStr, pmtAmount, lockStart, duration, k, b, period)) ++ StatsEntry(pmtAmount, duration, 1, if (userIsExisting) | |
398 | 410 | then 0 | |
399 | 411 | else 1)) :+ HistoryEntry("lock", userAddressStr, pmtAmount, lockStart, duration, k, b, i)) ++ [IntegerEntry(userBoostEmissionLastIntegralKEY, boostEmissionIntegral), IntegerEntry(totalCachedGwxKEY, (totalCachedGwx + gWxAmountStart))]) | |
400 | 412 | } | |
401 | 413 | } | |
402 | 414 | } | |
403 | 415 | } | |
404 | 416 | ||
405 | 417 | ||
406 | 418 | ||
407 | 419 | @Callable(i) | |
408 | 420 | func increaseLock (deltaDuration) = { | |
409 | 421 | let cfgArray = readConfigArrayOrFail() | |
410 | 422 | let assetIdStr = cfgArray[IdxCfgAssetId] | |
411 | 423 | let assetId = fromBase58String(assetIdStr) | |
412 | 424 | let minLockDuration = parseIntValue(cfgArray[IdxCfgMinLockDuration]) | |
413 | 425 | let maxLockDuration = parseIntValue(cfgArray[IdxCfgMaxLockDuration]) | |
414 | 426 | let mathContract = addressFromStringValue(cfgArray[IdxCfgMathContract]) | |
415 | 427 | let pmtAmount = extractOptionalPaymentAmountOrFail(i, assetId) | |
416 | 428 | let userAddressStr = toString(i.caller) | |
417 | 429 | let userRecordArray = readLockParamsRecordOrFail(userAddressStr) | |
418 | 430 | let userNumStr = userRecordArray[IdxLockUserNum] | |
419 | 431 | let userAmount = parseIntValue(userRecordArray[IdxLockAmount]) | |
420 | 432 | let lockStart = parseIntValue(userRecordArray[IdxLockStart]) | |
421 | 433 | let lockDuration = parseIntValue(userRecordArray[IdxLockDuration]) | |
422 | 434 | let lockEnd = (lockStart + lockDuration) | |
423 | 435 | let remainingDuration = max([(lockEnd - height), 0]) | |
424 | 436 | let userAmountNew = (userAmount + pmtAmount) | |
425 | 437 | let lockDurationNew = (remainingDuration + deltaDuration) | |
426 | 438 | if ((0 > deltaDuration)) | |
427 | 439 | then throw("duration is less then zero") | |
428 | 440 | else if ((minLockDuration > lockDurationNew)) | |
429 | 441 | then throw(("lockDurationNew is less then minLockDuration=" + toString(minLockDuration))) | |
430 | 442 | else if ((lockDurationNew > maxLockDuration)) | |
431 | 443 | then throw(("deltaDuration + existedLockDuration is greater then maxLockDuration=" + toString(maxLockDuration))) | |
432 | 444 | else if (if ((height >= lockEnd)) | |
433 | 445 | then (userAmount > 0) | |
434 | 446 | else false) | |
435 | 447 | then throw("there is an expired lock - need to unlock before new lock") | |
436 | 448 | else { | |
437 | 449 | let coeffX8 = fraction(lockDurationNew, MULT8, maxLockDuration) | |
438 | 450 | let gWxAmountStart = fraction(userAmountNew, coeffX8, MULT8) | |
439 | 451 | let gWxParamsResultList = asAnyList(invoke(mathContract, "calcGwxParamsREADONLY", [gWxAmountStart, height, lockDurationNew], nil)) | |
440 | 452 | let k = asInt(gWxParamsResultList[0]) | |
441 | 453 | let b = asInt(gWxParamsResultList[1]) | |
442 | 454 | let period = toString(asInt(gWxParamsResultList[2])) | |
443 | 455 | let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) | |
444 | 456 | let emissionStart = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
445 | 457 | let emissionEnd = getIntOrFail(emissionContract, keyEmissionEndBlock()) | |
446 | 458 | let h = if ((height > emissionEnd)) | |
447 | 459 | then emissionEnd | |
448 | 460 | else height | |
449 | 461 | let dh = max([(h - emissionStart), 0]) | |
450 | 462 | let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNumStr) | |
451 | 463 | let userBoostEmissionLastIntegral = getIntOrZero(this, userBoostEmissionLastIntegralKEY) | |
452 | 464 | let boostEmissionIntegral = (((wxEmissionPerBlock * dh) * 2) / 3) | |
453 | 465 | let userBoostEmissionIntegral = (boostEmissionIntegral - userBoostEmissionLastIntegral) | |
454 | 466 | if ((0 > userBoostEmissionIntegral)) | |
455 | 467 | then throw("wrong calculations") | |
456 | 468 | else { | |
457 | 469 | let userMaxBoostIntegralKEY = keyUserMaxBoostINTEGRAL(userNumStr) | |
458 | 470 | let totalMaxBoostIntegralKEY = keyTotalMaxBoostINTEGRAL() | |
459 | 471 | let userBoostAvalaibleToClaimTotalKEY = keyUserBoostAvalaibleToClaimTotal(userNumStr) | |
460 | 472 | let userMaxBoostInt = getIntOrZero(this, userMaxBoostIntegralKEY) | |
461 | 473 | let totalMaxBoostInt = getIntOrZero(this, totalMaxBoostIntegralKEY) | |
462 | 474 | let userBoostAvaliableToClaimTotal = getIntOrZero(this, userBoostAvalaibleToClaimTotalKEY) | |
463 | 475 | let userBoostAvaliableToClaimTotalNew = (userBoostAvaliableToClaimTotal + fraction(userBoostEmissionIntegral, userMaxBoostInt, totalMaxBoostInt)) | |
464 | 476 | let userMaxBoostIntNew = ((gWxAmountStart * lockDurationNew) / 2) | |
465 | 477 | let currUserGwx = calcCurrentGwxAmount(userAddressStr) | |
466 | 478 | let remainingUserMaxBoostInt = ((currUserGwx * remainingDuration) / 2) | |
467 | 479 | let userMaxBoostIntDiff = (userMaxBoostIntNew - remainingUserMaxBoostInt) | |
468 | 480 | if ((0 > userMaxBoostIntDiff)) | |
469 | 481 | then throw("wrong calculations") | |
470 | 482 | else { | |
471 | 483 | let gwxDiff = (gWxAmountStart - currUserGwx) | |
472 | 484 | if ((0 > gwxDiff)) | |
473 | 485 | then throw("gwxDiff is less then 0") | |
474 | 486 | else { | |
475 | 487 | let totalCachedGwxKEY = keyTotalCachedGwx() | |
476 | 488 | let totalCachedGwx = valueOrElse(getInteger(this, totalCachedGwxKEY), 0) | |
477 | 489 | (((LockParamsEntry(userAddressStr, userNumStr, userAmountNew, lockStart, lockDurationNew, k, b, period) ++ StatsEntry(pmtAmount, deltaDuration, 0, 0)) :+ HistoryEntry("lock", userAddressStr, pmtAmount, lockStart, lockDurationNew, k, b, i)) ++ [IntegerEntry(userBoostAvalaibleToClaimTotalKEY, userBoostAvaliableToClaimTotalNew), IntegerEntry(userBoostEmissionLastIntegralKEY, boostEmissionIntegral), IntegerEntry(totalCachedGwxKEY, (totalCachedGwx + gwxDiff))]) | |
478 | 490 | } | |
479 | 491 | } | |
480 | 492 | } | |
481 | 493 | } | |
482 | 494 | } | |
483 | 495 | ||
484 | 496 | ||
485 | 497 | ||
486 | 498 | @Callable(i) | |
487 | - | func claimWxBoost (userAddressStr) = if ((stakingContract != i.caller)) | |
499 | + | func claimWxBoost (lpAssetIdStr,userAddressStr) = if ((stakingContract != i.caller)) | |
488 | 500 | then throw("permissions denied") | |
489 | 501 | else { | |
490 | - | let $ | |
491 | - | let userBoostAvailable = $ | |
492 | - | let dataState = $ | |
493 | - | let debug = $ | |
502 | + | let $t02409824200 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false) | |
503 | + | let userBoostAvailable = $t02409824200._1 | |
504 | + | let dataState = $t02409824200._2 | |
505 | + | let debug = $t02409824200._3 | |
494 | 506 | $Tuple2(dataState, [userBoostAvailable]) | |
495 | 507 | } | |
496 | 508 | ||
497 | 509 | ||
498 | 510 | ||
499 | 511 | @Callable(i) | |
500 | - | func claimWxBoostREADONLY (userAddressStr) = { | |
501 | - | let $ | |
502 | - | let userBoostAvailable = $ | |
503 | - | let dataState = $ | |
504 | - | let debug = $ | |
512 | + | func claimWxBoostREADONLY (lpAssetIdStr,userAddressStr) = { | |
513 | + | let $t02433224433 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true) | |
514 | + | let userBoostAvailable = $t02433224433._1 | |
515 | + | let dataState = $t02433224433._2 | |
516 | + | let debug = $t02433224433._3 | |
505 | 517 | $Tuple2(nil, [userBoostAvailable, debug]) | |
506 | 518 | } | |
507 | 519 | ||
508 | 520 | ||
509 | 521 | ||
510 | 522 | @Callable(i) | |
511 | 523 | func unlock (userAddress) = { | |
512 | 524 | let userRecordArray = readLockParamsRecordOrFail(userAddress) | |
513 | 525 | let userNumStr = userRecordArray[IdxLockUserNum] | |
514 | 526 | let userAmount = parseIntValue(userRecordArray[IdxLockAmount]) | |
515 | 527 | let lockStart = parseIntValue(userRecordArray[IdxLockStart]) | |
516 | 528 | let lockDuration = parseIntValue(userRecordArray[IdxLockDuration]) | |
517 | 529 | let lockEnd = (lockStart + lockDuration) | |
518 | 530 | let cfgArray = readConfigArrayOrFail() | |
519 | 531 | let assetId = fromBase58String(cfgArray[IdxCfgAssetId]) | |
520 | 532 | if ((lockEnd >= height)) | |
521 | 533 | then throw((("wait " + toString(lockEnd)) + " to unlock")) | |
522 | 534 | else if ((0 >= userAmount)) | |
523 | 535 | then throw("nothing to unlock") | |
524 | 536 | else { | |
525 | 537 | let period = "0" | |
526 | 538 | (((LockParamsEntry(userAddress, userNumStr, 0, lockStart, lockDuration, 0, 0, period) ++ StatsEntry(-(userAmount), 0, 0, -1)) :+ HistoryEntry("unlock", userAddress, userAmount, lockStart, lockDuration, 0, 0, i)) :+ ScriptTransfer(addressFromStringValue(userAddress), userAmount, assetId)) | |
527 | 539 | } | |
528 | 540 | } | |
529 | 541 | ||
530 | 542 | ||
531 | 543 | ||
532 | 544 | @Callable(i) | |
533 | 545 | func gwxUserInfoREADONLY (userAddress) = { | |
534 | 546 | let gwxAmount = calcCurrentGwxAmount(userAddress) | |
535 | 547 | $Tuple2(nil, [gwxAmount]) | |
536 | 548 | } | |
537 | 549 | ||
538 | 550 |
github/deemru/w8io/169f3d6 118.60 ms ◑