tx · 3agbCTkq8uU8ARo4JwbEPUdghLkfQbDYyEqFMuZPGajY 3N9GCiuQ6yRx1nb4YGSj3W7KYSJUNrw7dZf: -0.03100000 Waves 2023.02.22 15:37 [2460865] smart account 3N9GCiuQ6yRx1nb4YGSj3W7KYSJUNrw7dZf > SELF 0.00000000 Waves
{ "type": 13, "id": "3agbCTkq8uU8ARo4JwbEPUdghLkfQbDYyEqFMuZPGajY", "fee": 3100000, "feeAssetId": null, "timestamp": 1677069451148, "version": 2, "chainId": 84, "sender": "3N9GCiuQ6yRx1nb4YGSj3W7KYSJUNrw7dZf", "senderPublicKey": "HWNh3pPUeb27hjqQcsyEmytEmj122ru2SaDrMsquiiiz", "proofs": [ "2tVPxye28GCdBZRfntmzFgBe1rXXGDuGKitPZDkkqrxik7RUuC3hDHzS9cmJazk4XkX8FJW1Sa1mU911JyW1PWub" ], "script": "base64:BgJCCAISCAoGCAgBAQEIEgUKAwEIAhIDCgEBEgMKAQESBAoCCAgSBAoCCAgSAwoBCBIDCgEIEgQKAggBEgASAwoBCBIAbgADU0VQAgJfXwAGU0NBTEU4AAgABU1VTFQ4AIDC1y8ADlBPT0xXRUlHSFRNVUxUBQVNVUxUOAEEc3RyZgIHYWRkcmVzcwNrZXkJARN2YWx1ZU9yRXJyb3JNZXNzYWdlAgkAnQgCBQdhZGRyZXNzBQNrZXkJAKwCAgkArAICAg9tYW5kYXRvcnkgdGhpcy4FA2tleQIPIGlzIG5vdCBkZWZpbmVkAQNpb3oCB2FkZHJlc3MDa2V5CQELdmFsdWVPckVsc2UCCQCaCAIFB2FkZHJlc3MFA2tleQAAAQNpb2QDB2FkZHJlc3MDa2V5CmRlZmF1bHRWYWwJAQt2YWx1ZU9yRWxzZQIJAJoIAgUHYWRkcmVzcwUDa2V5BQpkZWZhdWx0VmFsAQNpb2YCB2FkZHJlc3MDa2V5CQETdmFsdWVPckVycm9yTWVzc2FnZQIJAJoIAgUHYWRkcmVzcwUDa2V5CQCsAgIJAKwCAgIPbW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lPclVuaXQABAVoYXNQTQMJAQlpc0RlZmluZWQBBQJwbQYJAAIBAhJObyBwZW5kaW5nIG1hbmFnZXIDCQAAAgUFaGFzUE0FBWhhc1BNBAdjaGVja1BNAwkAAAIIBQFpD2NhbGxlclB1YmxpY0tleQkBBXZhbHVlAQUCcG0GCQACAQIbWW91IGFyZSBub3QgcGVuZGluZyBtYW5hZ2VyAwkAAAIFB2NoZWNrUE0FB2NoZWNrUE0JAMwIAgkBC1N0cmluZ0VudHJ5AgkBE2tleU1hbmFnZXJQdWJsaWNLZXkACQDYBAEJAQV2YWx1ZQEFAnBtCQDMCAIJAQtEZWxldGVFbnRyeQEJARprZXlQZW5kaW5nTWFuYWdlclB1YmxpY0tleQAFA25pbAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECdHgBBnZlcmlmeQAED3RhcmdldFB1YmxpY0tleQQHJG1hdGNoMAkBFm1hbmFnZXJQdWJsaWNLZXlPclVuaXQAAwkAAQIFByRtYXRjaDACCkJ5dGVWZWN0b3IEAnBrBQckbWF0Y2gwBQJwawMJAAECBQckbWF0Y2gwAgRVbml0CAUCdHgPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFD3RhcmdldFB1YmxpY0tleUfYpbQ=", "height": 2460865, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GW7DhJdLwpgt8eyMYJAMF61S6qM4ZJTxkEmZFxbsCN5R Next: 5HYAYb4BVVuyAiESqp4rkZAwC1owz9TW7HRFGXxprrd6 Diff:
Old | New | Differences | |
---|---|---|---|
403 | 403 | let userNumStr = userRecordArray[IdxLockUserNum] | |
404 | 404 | let gwxRewardEmissionStartHeight = valueOrElse(getInteger(gwxRewardContract, keyGwxRewardEmissionStartHeight()), 0) | |
405 | 405 | let EMPTYSTR = "empty" | |
406 | - | let $ | |
406 | + | let $t01496515533 = if ((lpAssetIdStr != EMPTYSTR)) | |
407 | 407 | then { | |
408 | 408 | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
409 | 409 | let pw1 = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr)) | |
413 | 413 | else if (readOnly) | |
414 | 414 | then $Tuple2(0, 0) | |
415 | 415 | else throw(("not readonly mode: unsupported lp asset " + lpAssetIdStr)) | |
416 | - | let poolWeight0 = $ | |
417 | - | let poolWeight1 = $ | |
416 | + | let poolWeight0 = $t01496515533._1 | |
417 | + | let poolWeight1 = $t01496515533._2 | |
418 | 418 | let wxEmissionPerBlock = iof(emissionContract, keyEmissionRatePerBlockCurrent()) | |
419 | 419 | let emissionStart = iof(emissionContract, keyEmissionStartBlock()) | |
420 | 420 | let emissionEnd = iof(emissionContract, keyEmissionEndBlock()) | |
557 | 557 | ||
558 | 558 | @Callable(i) | |
559 | 559 | func lockRef (duration,referrerAddress,signature) = { | |
560 | - | let $ | |
561 | - | let lockActionsResult = $ | |
562 | - | let gWxAmountStart = $ | |
560 | + | let $t02389223957 = lockActions(i, duration) | |
561 | + | let lockActionsResult = $t02389223957._1 | |
562 | + | let gWxAmountStart = $t02389223957._2 | |
563 | 563 | let referralAddress = toString(i.caller) | |
564 | 564 | let refInv = if (if ((referrerAddress == "")) | |
565 | 565 | then true | |
580 | 580 | ||
581 | 581 | @Callable(i) | |
582 | 582 | func lock (duration) = { | |
583 | - | let $ | |
584 | - | let lockActionsResult = $ | |
585 | - | let gWxAmountStart = $ | |
583 | + | let $t02441524480 = lockActions(i, duration) | |
584 | + | let lockActionsResult = $t02441524480._1 | |
585 | + | let gWxAmountStart = $t02441524480._2 | |
586 | 586 | let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil) | |
587 | 587 | if ((updateRefActivity == updateRefActivity)) | |
588 | 588 | then $Tuple2(lockActionsResult, unit) | |
671 | 671 | func claimWxBoost (lpAssetIdStr,userAddressStr) = if ((stakingContract != i.caller)) | |
672 | 672 | then throw("permissions denied") | |
673 | 673 | else { | |
674 | - | let $ | |
675 | - | let userBoostAvailable = $ | |
676 | - | let dataState = $ | |
677 | - | let debug = $ | |
674 | + | let $t02946129563 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false) | |
675 | + | let userBoostAvailable = $t02946129563._1 | |
676 | + | let dataState = $t02946129563._2 | |
677 | + | let debug = $t02946129563._3 | |
678 | 678 | $Tuple2(dataState, [userBoostAvailable]) | |
679 | 679 | } | |
680 | 680 | ||
682 | 682 | ||
683 | 683 | @Callable(i) | |
684 | 684 | func claimWxBoostREADONLY (lpAssetIdStr,userAddressStr) = { | |
685 | - | let $ | |
686 | - | let userBoostAvailable = $ | |
687 | - | let dataState = $ | |
688 | - | let debug = $ | |
685 | + | let $t02969529796 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true) | |
686 | + | let userBoostAvailable = $t02969529796._1 | |
687 | + | let dataState = $t02969529796._2 | |
688 | + | let debug = $t02969529796._3 | |
689 | 689 | $Tuple2(nil, [userBoostAvailable, debug]) | |
690 | 690 | } | |
691 | 691 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | let SCALE8 = 8 | |
7 | 7 | ||
8 | 8 | let MULT8 = 100000000 | |
9 | 9 | ||
10 | 10 | let POOLWEIGHTMULT = MULT8 | |
11 | 11 | ||
12 | 12 | func strf (address,key) = valueOrErrorMessage(getString(address, key), (("mandatory this." + key) + " is not defined")) | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func ioz (address,key) = valueOrElse(getInteger(address, key), 0) | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | func iod (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal) | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func iof (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined")) | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | func abs (val) = if ((0 > val)) | |
25 | 25 | then -(val) | |
26 | 26 | else val | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | func aal (val) = match val { | |
30 | 30 | case valAnyLyst: List[Any] => | |
31 | 31 | valAnyLyst | |
32 | 32 | case _ => | |
33 | 33 | throw("fail to cast into List[Any]") | |
34 | 34 | } | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func ai (val) = match val { | |
38 | 38 | case valInt: Int => | |
39 | 39 | valInt | |
40 | 40 | case _ => | |
41 | 41 | throw("fail to cast into Int") | |
42 | 42 | } | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func keyReferralsContractAddress () = makeString(["%s%s", "config", "referralsContractAddress"], SEP) | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | let referralsContractAddressOrFail = addressFromStringValue(strf(this, keyReferralsContractAddress())) | |
49 | 49 | ||
50 | 50 | let keyReferralProgramName = makeString(["%s%s", "referral", "programName"], SEP) | |
51 | 51 | ||
52 | 52 | let referralProgramNameDefault = "wxlock" | |
53 | 53 | ||
54 | 54 | let referralProgramName = valueOrElse(getString(this, keyReferralProgramName), referralProgramNameDefault) | |
55 | 55 | ||
56 | 56 | func keyFactoryAddress () = "%s%s__config__factoryAddress" | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | let IdxFactoryCfgStakingDapp = 1 | |
60 | 60 | ||
61 | 61 | let IdxFactoryCfgBoostingDapp = 2 | |
62 | 62 | ||
63 | 63 | let IdxFactoryCfgIdoDapp = 3 | |
64 | 64 | ||
65 | 65 | let IdxFactoryCfgTeamDapp = 4 | |
66 | 66 | ||
67 | 67 | let IdxFactoryCfgEmissionDapp = 5 | |
68 | 68 | ||
69 | 69 | let IdxFactoryCfgRestDapp = 6 | |
70 | 70 | ||
71 | 71 | let IdxFactoryCfgSlippageDapp = 7 | |
72 | 72 | ||
73 | 73 | let IdxFactoryCfgDaoDapp = 8 | |
74 | 74 | ||
75 | 75 | let IdxFactoryCfgMarketingDapp = 9 | |
76 | 76 | ||
77 | 77 | let IdxFactoryCfgGwxRewardDapp = 10 | |
78 | 78 | ||
79 | 79 | let IdxFactoryCfgBirdsDapp = 11 | |
80 | 80 | ||
81 | 81 | func keyFactoryCfg () = "%s__factoryConfig" | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func keyFactoryLpList () = "%s__lpTokensList" | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP) | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func keyFactoryPoolWeightHistory (poolAddress,num) = ((("%s%s__poolWeight__" + poolAddress) + "__") + toString(num)) | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func readFactoryAddressOrFail () = addressFromStringValue(strf(this, keyFactoryAddress())) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func readLpList () = split(valueOrElse(getString(readFactoryAddressOrFail(), keyFactoryLpList()), ""), SEP) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func readFactoryCfgOrFail (factory) = split(strf(factory, keyFactoryCfg()), SEP) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp]) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp]) | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp]) | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp]) | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current" | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current" | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | func keyEmissionStartBlock () = "%s%s__emission__startBlock" | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func keyEmissionDurationInBlocks () = "%s%s__emission__duration" | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func keyEmissionEndBlock () = "%s%s__emission__endBlock" | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func keyNextPeriod () = "%s__nextPeriod" | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func keyGwxRewardEmissionStartHeight () = "%s%s__gwxRewardEmissionPart__startHeight" | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | let IdxCfgAssetId = 1 | |
148 | 148 | ||
149 | 149 | let IdxCfgMinLockAmount = 2 | |
150 | 150 | ||
151 | 151 | let IdxCfgMinLockDuration = 3 | |
152 | 152 | ||
153 | 153 | let IdxCfgMaxLockDuration = 4 | |
154 | 154 | ||
155 | 155 | let IdxCfgMathContract = 5 | |
156 | 156 | ||
157 | 157 | func keyConfig () = "%s__config" | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | func readConfigArrayOrFail () = split(strf(this, keyConfig()), SEP) | |
161 | 161 | ||
162 | 162 | ||
163 | 163 | let mathContract = addressFromStringValue(readConfigArrayOrFail()[IdxCfgMathContract]) | |
164 | 164 | ||
165 | 165 | func formatConfigS (assetId,minLockAmount,minLockDuration,maxLockDuration,mathContract) = makeString(["%s%d%d%d", assetId, minLockAmount, minLockDuration, maxLockDuration, mathContract], SEP) | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | func formatConfig (assetId,minLockAmount,minLockDuration,maxLockDuration,mathContract) = formatConfigS(assetId, toString(minLockAmount), toString(minLockDuration), toString(maxLockDuration), mathContract) | |
169 | 169 | ||
170 | 170 | ||
171 | 171 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
172 | 172 | case s: String => | |
173 | 173 | fromBase58String(s) | |
174 | 174 | case _: Unit => | |
175 | 175 | unit | |
176 | 176 | case _ => | |
177 | 177 | throw("Match error") | |
178 | 178 | } | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
182 | 182 | case s: String => | |
183 | 183 | fromBase58String(s) | |
184 | 184 | case _: Unit => | |
185 | 185 | unit | |
186 | 186 | case _ => | |
187 | 187 | throw("Match error") | |
188 | 188 | } | |
189 | 189 | ||
190 | 190 | ||
191 | 191 | func mustManager (i) = { | |
192 | 192 | let pd = throw("Permission denied") | |
193 | 193 | match managerPublicKeyOrUnit() { | |
194 | 194 | case pk: ByteVector => | |
195 | 195 | if ((i.callerPublicKey == pk)) | |
196 | 196 | then true | |
197 | 197 | else pd | |
198 | 198 | case _: Unit => | |
199 | 199 | if ((i.caller == this)) | |
200 | 200 | then true | |
201 | 201 | else pd | |
202 | 202 | case _ => | |
203 | 203 | throw("Match error") | |
204 | 204 | } | |
205 | 205 | } | |
206 | 206 | ||
207 | 207 | ||
208 | 208 | let IdxLockUserNum = 1 | |
209 | 209 | ||
210 | 210 | let IdxLockAmount = 2 | |
211 | 211 | ||
212 | 212 | let IdxLockStart = 3 | |
213 | 213 | ||
214 | 214 | let IdxLockDuration = 4 | |
215 | 215 | ||
216 | 216 | let IdxLockParamK = 5 | |
217 | 217 | ||
218 | 218 | let IdxLockParamB = 6 | |
219 | 219 | ||
220 | 220 | func keyLockParamsRecord (userAddress) = makeString(["%s%s__lock", userAddress], SEP) | |
221 | 221 | ||
222 | 222 | ||
223 | 223 | func readLockParamsRecordOrFail (userAddress) = split(strf(this, keyLockParamsRecord(userAddress)), SEP) | |
224 | 224 | ||
225 | 225 | ||
226 | 226 | 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) | |
227 | 227 | ||
228 | 228 | ||
229 | 229 | 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)) | |
230 | 230 | ||
231 | 231 | ||
232 | 232 | func keyNextUserNum () = "%s__nextUserNum" | |
233 | 233 | ||
234 | 234 | ||
235 | 235 | func keyUser2NumMapping (userAddress) = makeString(["%s%s%s__mapping__user2num", userAddress], SEP) | |
236 | 236 | ||
237 | 237 | ||
238 | 238 | func keyNum2UserMapping (num) = makeString(["%s%s%s__mapping__num2user", num], SEP) | |
239 | 239 | ||
240 | 240 | ||
241 | 241 | func keyLockParamUserAmount (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "amount"], SEP) | |
242 | 242 | ||
243 | 243 | ||
244 | 244 | func keyLockParamStartBlock (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "start"], SEP) | |
245 | 245 | ||
246 | 246 | ||
247 | 247 | func keyLockParamDuration (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "duration"], SEP) | |
248 | 248 | ||
249 | 249 | ||
250 | 250 | func keyLockParamK (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "k"], SEP) | |
251 | 251 | ||
252 | 252 | ||
253 | 253 | func keyLockParamB (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "b"], SEP) | |
254 | 254 | ||
255 | 255 | ||
256 | 256 | func keyLockParamByPeriodK (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "k", period], SEP) | |
257 | 257 | ||
258 | 258 | ||
259 | 259 | func keyLockParamByPeriodB (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "b", period], SEP) | |
260 | 260 | ||
261 | 261 | ||
262 | 262 | func keyLockParamTotalAmount () = "%s%s__stats__activeTotalLocked" | |
263 | 263 | ||
264 | 264 | ||
265 | 265 | func keyStatsLocksDurationSumInBlocks () = "%s%s__stats__locksDurationSumInBlocks" | |
266 | 266 | ||
267 | 267 | ||
268 | 268 | func keyStatsLocksCount () = "%s%s__stats__locksCount" | |
269 | 269 | ||
270 | 270 | ||
271 | 271 | func keyStatsUsersCount () = "%s%s__stats__activeUsersCount" | |
272 | 272 | ||
273 | 273 | ||
274 | 274 | func keyUserBoostEmissionLastINTEGRAL (userNum) = makeString(["%s%d__userBoostEmissionLastInt", userNum], SEP) | |
275 | 275 | ||
276 | 276 | ||
277 | 277 | func keyUserLpBoostEmissionLastINTEGRAL (userNum,lpAssetId) = makeString(["%s%d__userBoostEmissionLastInt", userNum, lpAssetId], SEP) | |
278 | 278 | ||
279 | 279 | ||
280 | 280 | func keyUserMaxBoostINTEGRAL (userNum) = makeString(["%s%d__maxBoostInt", userNum], SEP) | |
281 | 281 | ||
282 | 282 | ||
283 | 283 | func keyTotalMaxBoostINTEGRAL () = "%s%s__maxBoostInt__total" | |
284 | 284 | ||
285 | 285 | ||
286 | 286 | func keyUserBoostAvalaibleToClaimTotal (userNum) = makeString(["%s%d__userBoostAvaliableToClaimTotal", userNum], SEP) | |
287 | 287 | ||
288 | 288 | ||
289 | 289 | func keyUserBoostClaimed (userNum) = makeString(["%s%d__userBoostClaimed", userNum], SEP) | |
290 | 290 | ||
291 | 291 | ||
292 | 292 | func keyTotalCachedGwx () = "%s%s__gwxCached__total" | |
293 | 293 | ||
294 | 294 | ||
295 | 295 | func keyTotalCachedGwxCorrective () = "%s__gwxCachedTotalCorrective" | |
296 | 296 | ||
297 | 297 | ||
298 | 298 | let factoryContract = readFactoryAddressOrFail() | |
299 | 299 | ||
300 | 300 | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
301 | 301 | ||
302 | 302 | let emissionContract = getEmissionAddressOrFail(factoryCfg) | |
303 | 303 | ||
304 | 304 | let stakingContract = getStakingAddressOrFail(factoryCfg) | |
305 | 305 | ||
306 | 306 | let gwxRewardContract = getGwxRewardAddressOrFail(factoryCfg) | |
307 | 307 | ||
308 | 308 | func getTotalCachedGwx (correct) = { | |
309 | 309 | let keyVotingEmissionContract = makeString(["%s", "votingEmissionContract"], SEP) | |
310 | 310 | let votingEmissionContract = addressFromStringValue(getStringValue(factoryContract, keyVotingEmissionContract)) | |
311 | 311 | let keyCurrentEpochUi = makeString(["%s", "currentEpochUi"], SEP) | |
312 | 312 | let currentEpochUi = getIntegerValue(votingEmissionContract, keyCurrentEpochUi) | |
313 | 313 | let keyTargetEpoch = makeString(["%s%s", "totalCachedGwxCorrection__activationEpoch"], SEP) | |
314 | 314 | let targetEpochOption = getInteger(this, keyTargetEpoch) | |
315 | 315 | let totalCachedGwxRaw = valueOrElse(getInteger(this, keyTotalCachedGwx()), 0) | |
316 | 316 | let isCorrectionActivated = if (isDefined(targetEpochOption)) | |
317 | 317 | then (currentEpochUi >= value(targetEpochOption)) | |
318 | 318 | else false | |
319 | 319 | let corrective = if (if (isCorrectionActivated) | |
320 | 320 | then correct | |
321 | 321 | else false) | |
322 | 322 | then valueOrElse(getInteger(this, keyTotalCachedGwxCorrective()), 0) | |
323 | 323 | else 0 | |
324 | 324 | max([0, (totalCachedGwxRaw + corrective)]) | |
325 | 325 | } | |
326 | 326 | ||
327 | 327 | ||
328 | 328 | func HistoryEntry (type,user,amount,lockStart,duration,k,b,i) = { | |
329 | 329 | let historyKEY = makeString(["%s%s%s%s__history", type, user, toBase58String(i.transactionId)], SEP) | |
330 | 330 | 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) | |
331 | 331 | StringEntry(historyKEY, historyDATA) | |
332 | 332 | } | |
333 | 333 | ||
334 | 334 | ||
335 | 335 | func StatsEntry (totalLockedInc,durationInc,lockCountInc,usersCountInc) = { | |
336 | 336 | let locksDurationSumInBlocksKEY = keyStatsLocksDurationSumInBlocks() | |
337 | 337 | let locksCountKEY = keyStatsLocksCount() | |
338 | 338 | let usersCountKEY = keyStatsUsersCount() | |
339 | 339 | let totalAmountKEY = keyLockParamTotalAmount() | |
340 | 340 | let locksDurationSumInBlocks = ioz(this, locksDurationSumInBlocksKEY) | |
341 | 341 | let locksCount = ioz(this, locksCountKEY) | |
342 | 342 | let usersCount = ioz(this, usersCountKEY) | |
343 | 343 | let totalAmount = ioz(this, totalAmountKEY) | |
344 | 344 | [IntegerEntry(locksDurationSumInBlocksKEY, (locksDurationSumInBlocks + durationInc)), IntegerEntry(locksCountKEY, (locksCount + lockCountInc)), IntegerEntry(usersCountKEY, (usersCount + usersCountInc)), IntegerEntry(totalAmountKEY, (totalAmount + totalLockedInc))] | |
345 | 345 | } | |
346 | 346 | ||
347 | 347 | ||
348 | 348 | func calcGwxAmount (kRaw,bRaw,h) = { | |
349 | 349 | let SCALE = 1000 | |
350 | 350 | (((kRaw * h) + bRaw) / SCALE) | |
351 | 351 | } | |
352 | 352 | ||
353 | 353 | ||
354 | 354 | func LockParamsEntry (userAddress,userNum,amount,start,duration,k,b,period) = { | |
355 | 355 | let userAmountKEY = keyLockParamUserAmount(userNum) | |
356 | 356 | let startBlockKEY = keyLockParamStartBlock(userNum) | |
357 | 357 | let durationKEY = keyLockParamDuration(userNum) | |
358 | 358 | let kKEY = keyLockParamK(userNum) | |
359 | 359 | let bKEY = keyLockParamB(userNum) | |
360 | 360 | let kByPeriodKEY = keyLockParamByPeriodK(userNum, period) | |
361 | 361 | let bByPeriodKEY = keyLockParamByPeriodB(userNum, period) | |
362 | 362 | let gwxAmount = calcGwxAmount(k, b, height) | |
363 | 363 | [IntegerEntry(userAmountKEY, amount), IntegerEntry(startBlockKEY, start), IntegerEntry(durationKEY, duration), IntegerEntry(kKEY, k), IntegerEntry(bKEY, b), IntegerEntry(kByPeriodKEY, k), IntegerEntry(bByPeriodKEY, b), StringEntry(keyLockParamsRecord(userAddress), formatLockParamsRecord(userNum, amount, start, duration, k, b, gwxAmount))] | |
364 | 364 | } | |
365 | 365 | ||
366 | 366 | ||
367 | 367 | func extractOptionalPaymentAmountOrFail (i,expectedAssetId) = if ((size(i.payments) > 1)) | |
368 | 368 | then throw("only one payment is allowed") | |
369 | 369 | else if ((size(i.payments) == 0)) | |
370 | 370 | then 0 | |
371 | 371 | else { | |
372 | 372 | let pmt = i.payments[0] | |
373 | 373 | if ((value(pmt.assetId) != expectedAssetId)) | |
374 | 374 | then throw("invalid asset id in payment") | |
375 | 375 | else pmt.amount | |
376 | 376 | } | |
377 | 377 | ||
378 | 378 | ||
379 | 379 | func calcUserGwxAmountAtHeight (userAddress,targetHeight) = { | |
380 | 380 | let EMPTY = "empty" | |
381 | 381 | let user2NumMappingKEY = keyUser2NumMapping(userAddress) | |
382 | 382 | let userNum = valueOrElse(getString(user2NumMappingKEY), EMPTY) | |
383 | 383 | let k = valueOrElse(getInteger(keyLockParamK(userNum)), 0) | |
384 | 384 | let b = valueOrElse(getInteger(keyLockParamB(userNum)), 0) | |
385 | 385 | let gwxAmountCalc = calcGwxAmount(k, b, targetHeight) | |
386 | 386 | let gwxAmount = if ((0 > gwxAmountCalc)) | |
387 | 387 | then 0 | |
388 | 388 | else gwxAmountCalc | |
389 | 389 | gwxAmount | |
390 | 390 | } | |
391 | 391 | ||
392 | 392 | ||
393 | 393 | func calcCurrentGwxAmount (userAddress) = calcUserGwxAmountAtHeight(userAddress, height) | |
394 | 394 | ||
395 | 395 | ||
396 | 396 | func internalClaimWxBoost (lpAssetIdStr,userAddressStr,readOnly) = { | |
397 | 397 | let EMPTY = "EMPTY" | |
398 | 398 | let userRecordOrEmpty = valueOrElse(getString(this, keyLockParamsRecord(userAddressStr)), EMPTY) | |
399 | 399 | if ((userRecordOrEmpty == EMPTY)) | |
400 | 400 | then $Tuple3(0, nil, "userRecord::is::empty") | |
401 | 401 | else { | |
402 | 402 | let userRecordArray = split(userRecordOrEmpty, SEP) | |
403 | 403 | let userNumStr = userRecordArray[IdxLockUserNum] | |
404 | 404 | let gwxRewardEmissionStartHeight = valueOrElse(getInteger(gwxRewardContract, keyGwxRewardEmissionStartHeight()), 0) | |
405 | 405 | let EMPTYSTR = "empty" | |
406 | - | let $ | |
406 | + | let $t01496515533 = if ((lpAssetIdStr != EMPTYSTR)) | |
407 | 407 | then { | |
408 | 408 | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
409 | 409 | let pw1 = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr)) | |
410 | 410 | let pw0 = valueOrElse(getInteger(factoryContract, keyFactoryPoolWeightHistory(poolAddressStr, 0)), pw1) | |
411 | 411 | $Tuple2(pw0, pw1) | |
412 | 412 | } | |
413 | 413 | else if (readOnly) | |
414 | 414 | then $Tuple2(0, 0) | |
415 | 415 | else throw(("not readonly mode: unsupported lp asset " + lpAssetIdStr)) | |
416 | - | let poolWeight0 = $ | |
417 | - | let poolWeight1 = $ | |
416 | + | let poolWeight0 = $t01496515533._1 | |
417 | + | let poolWeight1 = $t01496515533._2 | |
418 | 418 | let wxEmissionPerBlock = iof(emissionContract, keyEmissionRatePerBlockCurrent()) | |
419 | 419 | let emissionStart = iof(emissionContract, keyEmissionStartBlock()) | |
420 | 420 | let emissionEnd = iof(emissionContract, keyEmissionEndBlock()) | |
421 | 421 | let h = if ((height > emissionEnd)) | |
422 | 422 | then emissionEnd | |
423 | 423 | else height | |
424 | 424 | let dh = max([(h - emissionStart), 0]) | |
425 | 425 | let userLpBoostEmissionLastIntegralKEY = keyUserLpBoostEmissionLastINTEGRAL(userNumStr, lpAssetIdStr) | |
426 | 426 | let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNumStr) | |
427 | 427 | let userBoostEmissionLastIntegral = valueOrElse(getInteger(this, userLpBoostEmissionLastIntegralKEY), ioz(this, userBoostEmissionLastIntegralKEY)) | |
428 | 428 | let boostEmissionIntegral = (((wxEmissionPerBlock * dh) * 2) / 3) | |
429 | 429 | let userBoostEmissionIntegral = (boostEmissionIntegral - userBoostEmissionLastIntegral) | |
430 | 430 | let udh = fraction(userBoostEmissionIntegral, 3, (2 * wxEmissionPerBlock)) | |
431 | 431 | let uLastH = (h - udh) | |
432 | 432 | let udh0 = max([(gwxRewardEmissionStartHeight - uLastH), 0]) | |
433 | 433 | let udh1 = ((h - uLastH) - udh0) | |
434 | 434 | if (if (if ((0 > uLastH)) | |
435 | 435 | then true | |
436 | 436 | else (0 > udh1)) | |
437 | 437 | then true | |
438 | 438 | else (abs(((udh0 + udh1) - udh)) >= 1)) | |
439 | 439 | then throw(((((((("invalid udh calc: udh=" + toString(udh)) + " uLastH=") + toString(uLastH)) + " udh0=") + toString(udh0)) + " udh1=") + toString(udh1))) | |
440 | 440 | else if ((0 > userBoostEmissionIntegral)) | |
441 | 441 | then throw("wrong calculations") | |
442 | 442 | else { | |
443 | 443 | let userMaxBoostIntegralKEY = keyUserMaxBoostINTEGRAL(userNumStr) | |
444 | 444 | let totalMaxBoostIntegralKEY = keyTotalMaxBoostINTEGRAL() | |
445 | 445 | let userMaxBoostInt = ioz(this, userMaxBoostIntegralKEY) | |
446 | 446 | let totalMaxBoostInt = ioz(this, totalMaxBoostIntegralKEY) | |
447 | 447 | let totalCachedGwxCorrected = getTotalCachedGwx(true) | |
448 | 448 | let userCurrGwx = calcCurrentGwxAmount(userAddressStr) | |
449 | 449 | let userBoostAvalaibleToClaimTotalKEY = keyUserBoostAvalaibleToClaimTotal(userNumStr) | |
450 | 450 | let userBoostAvaliableToClaimTotal = ioz(this, userBoostAvalaibleToClaimTotalKEY) | |
451 | 451 | let userBoostEmissionIntegral0 = if ((udh == 0)) | |
452 | 452 | then 0 | |
453 | 453 | else fraction(userBoostEmissionIntegral, udh0, udh) | |
454 | 454 | let userBoostEmissionIntegral1 = if ((udh == 0)) | |
455 | 455 | then 0 | |
456 | 456 | else fraction(userBoostEmissionIntegral, udh1, udh) | |
457 | 457 | let poolUserBoostEmissionIntegral0 = fraction(userBoostEmissionIntegral0, poolWeight0, POOLWEIGHTMULT) | |
458 | 458 | let poolUserBoostEmissionIntegral1 = fraction(userBoostEmissionIntegral1, poolWeight1, POOLWEIGHTMULT) | |
459 | 459 | let userBoostAvaliableToClaimTotalNew0 = if ((totalCachedGwxCorrected == 0)) | |
460 | 460 | then 0 | |
461 | 461 | else fraction(poolUserBoostEmissionIntegral0, userCurrGwx, totalCachedGwxCorrected) | |
462 | 462 | let userBoostAvaliableToClaimTotalNew1 = if ((totalCachedGwxCorrected == 0)) | |
463 | 463 | then 0 | |
464 | 464 | else fraction(poolUserBoostEmissionIntegral1, userCurrGwx, totalCachedGwxCorrected) | |
465 | 465 | let userBoostAvaliableToClaimTotalNew = (userBoostAvaliableToClaimTotalNew0 + userBoostAvaliableToClaimTotalNew1) | |
466 | 466 | let userBoostClaimedKEY = keyUserBoostClaimed(userNumStr) | |
467 | 467 | let userBoostClaimed = ioz(this, userBoostClaimedKEY) | |
468 | 468 | let userBoostAvailable = (userBoostAvaliableToClaimTotalNew - userBoostClaimed) | |
469 | 469 | let dataState = [IntegerEntry(userLpBoostEmissionLastIntegralKEY, boostEmissionIntegral)] | |
470 | 470 | let debug = makeString([toString(userBoostEmissionLastIntegral), toString(userBoostEmissionIntegral), toString(userBoostClaimed), toString(userBoostAvailable), toString(poolWeight0), toString(poolWeight1), toString(h), toString(udh), toString(uLastH), toString(udh0), toString(udh1), toString(userCurrGwx), toString(totalCachedGwxCorrected)], ":") | |
471 | 471 | $Tuple3(userBoostAvaliableToClaimTotalNew, dataState, debug) | |
472 | 472 | } | |
473 | 473 | } | |
474 | 474 | } | |
475 | 475 | ||
476 | 476 | ||
477 | 477 | func lockActions (i,duration) = { | |
478 | 478 | let cfgArray = readConfigArrayOrFail() | |
479 | 479 | let assetIdStr = cfgArray[IdxCfgAssetId] | |
480 | 480 | let assetId = fromBase58String(assetIdStr) | |
481 | 481 | let minLockAmount = parseIntValue(cfgArray[IdxCfgMinLockAmount]) | |
482 | 482 | let minLockDuration = parseIntValue(cfgArray[IdxCfgMinLockDuration]) | |
483 | 483 | let maxLockDuration = parseIntValue(cfgArray[IdxCfgMaxLockDuration]) | |
484 | 484 | if ((size(i.payments) != 1)) | |
485 | 485 | then throw("invalid payment - exact one payment must be attached") | |
486 | 486 | else { | |
487 | 487 | let pmt = i.payments[0] | |
488 | 488 | let pmtAmount = pmt.amount | |
489 | 489 | if ((assetId != value(pmt.assetId))) | |
490 | 490 | then throw((("invalid asset is in payment - " + assetIdStr) + " is expected")) | |
491 | 491 | else { | |
492 | 492 | let nextUserNumKEY = keyNextUserNum() | |
493 | 493 | let userAddressStr = toString(i.caller) | |
494 | 494 | let userIsExisting = isDefined(getString(keyUser2NumMapping(userAddressStr))) | |
495 | 495 | let userNumStr = if (userIsExisting) | |
496 | 496 | then value(getString(keyUser2NumMapping(userAddressStr))) | |
497 | 497 | else toString(iof(this, nextUserNumKEY)) | |
498 | 498 | let userNum = parseIntValue(userNumStr) | |
499 | 499 | let lockStart = height | |
500 | 500 | let startBlockKEY = keyLockParamStartBlock(userNumStr) | |
501 | 501 | let durationKEY = keyLockParamDuration(userNumStr) | |
502 | 502 | let userAmountKEY = keyLockParamUserAmount(userNumStr) | |
503 | 503 | if ((minLockAmount > pmtAmount)) | |
504 | 504 | then throw(("amount is less then minLockAmount=" + toString(minLockAmount))) | |
505 | 505 | else if ((minLockDuration > duration)) | |
506 | 506 | then throw(("passed duration is less then minLockDuration=" + toString(minLockDuration))) | |
507 | 507 | else if ((duration > maxLockDuration)) | |
508 | 508 | then throw(("passed duration is greater then maxLockDuration=" + toString(maxLockDuration))) | |
509 | 509 | else if (if (userIsExisting) | |
510 | 510 | then ((iof(this, startBlockKEY) + iof(this, durationKEY)) >= lockStart) | |
511 | 511 | else false) | |
512 | 512 | then throw("there is an active lock - consider to use increaseLock") | |
513 | 513 | else if ((ioz(this, userAmountKEY) > 0)) | |
514 | 514 | then throw(("there are locked WXs - consider to use increaseLock " + userAmountKEY)) | |
515 | 515 | else { | |
516 | 516 | let coeffX8 = fraction(duration, MULT8, maxLockDuration) | |
517 | 517 | let gWxAmountStart = fraction(pmtAmount, coeffX8, MULT8) | |
518 | 518 | let gWxParamsResultList = aal(invoke(mathContract, "calcGwxParamsREADONLY", [gWxAmountStart, lockStart, duration], nil)) | |
519 | 519 | let k = ai(gWxParamsResultList[0]) | |
520 | 520 | let b = ai(gWxParamsResultList[1]) | |
521 | 521 | let period = toString(ai(gWxParamsResultList[2])) | |
522 | 522 | let wxEmissionPerBlock = iof(emissionContract, keyEmissionRatePerBlockCurrent()) | |
523 | 523 | let emissionStart = iof(emissionContract, keyEmissionStartBlock()) | |
524 | 524 | let emissionEnd = iof(emissionContract, keyEmissionEndBlock()) | |
525 | 525 | let h = if ((height > emissionEnd)) | |
526 | 526 | then emissionEnd | |
527 | 527 | else height | |
528 | 528 | let dh = max([(h - emissionStart), 0]) | |
529 | 529 | let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNumStr) | |
530 | 530 | let boostEmissionIntegral = (((wxEmissionPerBlock * dh) * 2) / 3) | |
531 | 531 | let userMaxBoostIntegralKEY = keyUserMaxBoostINTEGRAL(userNumStr) | |
532 | 532 | let totalMaxBoostIntegralKEY = keyTotalMaxBoostINTEGRAL() | |
533 | 533 | let userMaxBoostInt = ((gWxAmountStart * duration) / 2) | |
534 | 534 | let totalMaxBoostInt = ioz(this, totalMaxBoostIntegralKEY) | |
535 | 535 | let totalCachedGwxRaw = getTotalCachedGwx(false) | |
536 | 536 | let arr = if (userIsExisting) | |
537 | 537 | then nil | |
538 | 538 | else [IntegerEntry(nextUserNumKEY, (userNum + 1)), StringEntry(keyUser2NumMapping(userAddressStr), userNumStr), StringEntry(keyNum2UserMapping(userNumStr), userAddressStr)] | |
539 | 539 | $Tuple2(((((arr ++ LockParamsEntry(userAddressStr, userNumStr, pmtAmount, lockStart, duration, k, b, period)) ++ StatsEntry(pmtAmount, duration, 1, if (userIsExisting) | |
540 | 540 | then 0 | |
541 | 541 | else 1)) :+ HistoryEntry("lock", userAddressStr, pmtAmount, lockStart, duration, k, b, i)) ++ [IntegerEntry(userBoostEmissionLastIntegralKEY, boostEmissionIntegral), IntegerEntry(keyTotalCachedGwx(), (totalCachedGwxRaw + gWxAmountStart))]), gWxAmountStart) | |
542 | 542 | } | |
543 | 543 | } | |
544 | 544 | } | |
545 | 545 | } | |
546 | 546 | ||
547 | 547 | ||
548 | 548 | @Callable(i) | |
549 | 549 | func constructor (factoryAddressStr,lockAssetIdStr,minLockAmount,minDuration,maxDuration,mathContract) = { | |
550 | 550 | let checkCaller = mustManager(i) | |
551 | 551 | if ((checkCaller == checkCaller)) | |
552 | 552 | then ([IntegerEntry(keyNextUserNum(), 0), StringEntry(keyConfig(), formatConfig(lockAssetIdStr, minLockAmount, minDuration, maxDuration, mathContract)), StringEntry(keyFactoryAddress(), factoryAddressStr)] ++ StatsEntry(0, 0, 0, 0)) | |
553 | 553 | else throw("Strict value is not equal to itself.") | |
554 | 554 | } | |
555 | 555 | ||
556 | 556 | ||
557 | 557 | ||
558 | 558 | @Callable(i) | |
559 | 559 | func lockRef (duration,referrerAddress,signature) = { | |
560 | - | let $ | |
561 | - | let lockActionsResult = $ | |
562 | - | let gWxAmountStart = $ | |
560 | + | let $t02389223957 = lockActions(i, duration) | |
561 | + | let lockActionsResult = $t02389223957._1 | |
562 | + | let gWxAmountStart = $t02389223957._2 | |
563 | 563 | let referralAddress = toString(i.caller) | |
564 | 564 | let refInv = if (if ((referrerAddress == "")) | |
565 | 565 | then true | |
566 | 566 | else (signature == base58'')) | |
567 | 567 | then unit | |
568 | 568 | else invoke(referralsContractAddressOrFail, "createPair", [referralProgramName, referrerAddress, referralAddress, signature], nil) | |
569 | 569 | if ((refInv == refInv)) | |
570 | 570 | then { | |
571 | 571 | let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil) | |
572 | 572 | if ((updateRefActivity == updateRefActivity)) | |
573 | 573 | then $Tuple2(lockActionsResult, unit) | |
574 | 574 | else throw("Strict value is not equal to itself.") | |
575 | 575 | } | |
576 | 576 | else throw("Strict value is not equal to itself.") | |
577 | 577 | } | |
578 | 578 | ||
579 | 579 | ||
580 | 580 | ||
581 | 581 | @Callable(i) | |
582 | 582 | func lock (duration) = { | |
583 | - | let $ | |
584 | - | let lockActionsResult = $ | |
585 | - | let gWxAmountStart = $ | |
583 | + | let $t02441524480 = lockActions(i, duration) | |
584 | + | let lockActionsResult = $t02441524480._1 | |
585 | + | let gWxAmountStart = $t02441524480._2 | |
586 | 586 | let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil) | |
587 | 587 | if ((updateRefActivity == updateRefActivity)) | |
588 | 588 | then $Tuple2(lockActionsResult, unit) | |
589 | 589 | else throw("Strict value is not equal to itself.") | |
590 | 590 | } | |
591 | 591 | ||
592 | 592 | ||
593 | 593 | ||
594 | 594 | @Callable(i) | |
595 | 595 | func increaseLock (deltaDuration) = { | |
596 | 596 | let cfgArray = readConfigArrayOrFail() | |
597 | 597 | let assetIdStr = cfgArray[IdxCfgAssetId] | |
598 | 598 | let assetId = fromBase58String(assetIdStr) | |
599 | 599 | let minLockDuration = parseIntValue(cfgArray[IdxCfgMinLockDuration]) | |
600 | 600 | let maxLockDuration = parseIntValue(cfgArray[IdxCfgMaxLockDuration]) | |
601 | 601 | let pmtAmount = extractOptionalPaymentAmountOrFail(i, assetId) | |
602 | 602 | let userAddressStr = toString(i.caller) | |
603 | 603 | let userRecordArray = readLockParamsRecordOrFail(userAddressStr) | |
604 | 604 | let userNumStr = userRecordArray[IdxLockUserNum] | |
605 | 605 | let userAmount = parseIntValue(userRecordArray[IdxLockAmount]) | |
606 | 606 | let lockStart = parseIntValue(userRecordArray[IdxLockStart]) | |
607 | 607 | let lockDuration = parseIntValue(userRecordArray[IdxLockDuration]) | |
608 | 608 | let lockEnd = (lockStart + lockDuration) | |
609 | 609 | let remainingDuration = max([(lockEnd - height), 0]) | |
610 | 610 | let userAmountNew = (userAmount + pmtAmount) | |
611 | 611 | let lockDurationNew = (remainingDuration + deltaDuration) | |
612 | 612 | if ((0 > deltaDuration)) | |
613 | 613 | then throw("duration is less then zero") | |
614 | 614 | else if ((minLockDuration > lockDurationNew)) | |
615 | 615 | then throw(("lockDurationNew is less then minLockDuration=" + toString(minLockDuration))) | |
616 | 616 | else if ((lockDurationNew > maxLockDuration)) | |
617 | 617 | then throw(("deltaDuration + existedLockDuration is greater then maxLockDuration=" + toString(maxLockDuration))) | |
618 | 618 | else { | |
619 | 619 | let coeffX8 = fraction(lockDurationNew, MULT8, maxLockDuration) | |
620 | 620 | let gWxAmountStart = fraction(userAmountNew, coeffX8, MULT8) | |
621 | 621 | let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil) | |
622 | 622 | if ((updateRefActivity == updateRefActivity)) | |
623 | 623 | then { | |
624 | 624 | let lockStartNew = height | |
625 | 625 | let gWxParamsResultList = aal(invoke(mathContract, "calcGwxParamsREADONLY", [gWxAmountStart, lockStartNew, lockDurationNew], nil)) | |
626 | 626 | let k = ai(gWxParamsResultList[0]) | |
627 | 627 | let b = ai(gWxParamsResultList[1]) | |
628 | 628 | let period = toString(ai(gWxParamsResultList[2])) | |
629 | 629 | let wxEmissionPerBlock = iof(emissionContract, keyEmissionRatePerBlockCurrent()) | |
630 | 630 | let emissionStart = iof(emissionContract, keyEmissionStartBlock()) | |
631 | 631 | let emissionEnd = iof(emissionContract, keyEmissionEndBlock()) | |
632 | 632 | let h = if ((height > emissionEnd)) | |
633 | 633 | then emissionEnd | |
634 | 634 | else height | |
635 | 635 | let dh = max([(h - emissionStart), 0]) | |
636 | 636 | let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNumStr) | |
637 | 637 | let userBoostEmissionLastIntegral = ioz(this, userBoostEmissionLastIntegralKEY) | |
638 | 638 | let boostEmissionIntegral = (((wxEmissionPerBlock * dh) * 2) / 3) | |
639 | 639 | let userBoostEmissionIntegral = (boostEmissionIntegral - userBoostEmissionLastIntegral) | |
640 | 640 | if ((0 > userBoostEmissionIntegral)) | |
641 | 641 | then throw("wrong calculations") | |
642 | 642 | else { | |
643 | 643 | let userMaxBoostIntegralKEY = keyUserMaxBoostINTEGRAL(userNumStr) | |
644 | 644 | let totalMaxBoostIntegralKEY = keyTotalMaxBoostINTEGRAL() | |
645 | 645 | let userMaxBoostInt = ioz(this, userMaxBoostIntegralKEY) | |
646 | 646 | let totalMaxBoostInt = ioz(this, totalMaxBoostIntegralKEY) | |
647 | 647 | let currUserGwx = calcCurrentGwxAmount(userAddressStr) | |
648 | 648 | let gwxDiff = (gWxAmountStart - currUserGwx) | |
649 | 649 | if ((0 > gwxDiff)) | |
650 | 650 | then throw(("gwxDiff is less then 0: " + toString(gwxDiff))) | |
651 | 651 | else { | |
652 | 652 | let totalCachedGwxRaw = getTotalCachedGwx(false) | |
653 | 653 | let totalCachedGwxCorrected = getTotalCachedGwx(true) | |
654 | 654 | let userBoostAvalaibleToClaimTotalKEY = keyUserBoostAvalaibleToClaimTotal(userNumStr) | |
655 | 655 | let userBoostAvaliableToClaimTotal = ioz(this, userBoostAvalaibleToClaimTotalKEY) | |
656 | 656 | let userBoostAvaliableToClaimTotalNew = fraction(userBoostEmissionIntegral, currUserGwx, totalCachedGwxCorrected) | |
657 | 657 | let userMaxBoostIntNew = ((gWxAmountStart * lockDurationNew) / 2) | |
658 | 658 | let remainingUserMaxBoostInt = ((currUserGwx * remainingDuration) / 2) | |
659 | 659 | let userMaxBoostIntDiff = (userMaxBoostIntNew - remainingUserMaxBoostInt) | |
660 | 660 | (((LockParamsEntry(userAddressStr, userNumStr, userAmountNew, lockStartNew, lockDurationNew, k, b, period) ++ StatsEntry(pmtAmount, deltaDuration, 0, 0)) :+ HistoryEntry("lock", userAddressStr, pmtAmount, lockStart, lockDurationNew, k, b, i)) ++ [IntegerEntry(keyTotalCachedGwx(), (totalCachedGwxRaw + gwxDiff))]) | |
661 | 661 | } | |
662 | 662 | } | |
663 | 663 | } | |
664 | 664 | else throw("Strict value is not equal to itself.") | |
665 | 665 | } | |
666 | 666 | } | |
667 | 667 | ||
668 | 668 | ||
669 | 669 | ||
670 | 670 | @Callable(i) | |
671 | 671 | func claimWxBoost (lpAssetIdStr,userAddressStr) = if ((stakingContract != i.caller)) | |
672 | 672 | then throw("permissions denied") | |
673 | 673 | else { | |
674 | - | let $ | |
675 | - | let userBoostAvailable = $ | |
676 | - | let dataState = $ | |
677 | - | let debug = $ | |
674 | + | let $t02946129563 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false) | |
675 | + | let userBoostAvailable = $t02946129563._1 | |
676 | + | let dataState = $t02946129563._2 | |
677 | + | let debug = $t02946129563._3 | |
678 | 678 | $Tuple2(dataState, [userBoostAvailable]) | |
679 | 679 | } | |
680 | 680 | ||
681 | 681 | ||
682 | 682 | ||
683 | 683 | @Callable(i) | |
684 | 684 | func claimWxBoostREADONLY (lpAssetIdStr,userAddressStr) = { | |
685 | - | let $ | |
686 | - | let userBoostAvailable = $ | |
687 | - | let dataState = $ | |
688 | - | let debug = $ | |
685 | + | let $t02969529796 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true) | |
686 | + | let userBoostAvailable = $t02969529796._1 | |
687 | + | let dataState = $t02969529796._2 | |
688 | + | let debug = $t02969529796._3 | |
689 | 689 | $Tuple2(nil, [userBoostAvailable, debug]) | |
690 | 690 | } | |
691 | 691 | ||
692 | 692 | ||
693 | 693 | ||
694 | 694 | @Callable(i) | |
695 | 695 | func unlock (userAddress) = { | |
696 | 696 | let userRecordArray = readLockParamsRecordOrFail(userAddress) | |
697 | 697 | let userNumStr = userRecordArray[IdxLockUserNum] | |
698 | 698 | let userAmount = parseIntValue(userRecordArray[IdxLockAmount]) | |
699 | 699 | let lockStart = parseIntValue(userRecordArray[IdxLockStart]) | |
700 | 700 | let lockDuration = parseIntValue(userRecordArray[IdxLockDuration]) | |
701 | 701 | let lockEnd = (lockStart + lockDuration) | |
702 | 702 | let cfgArray = readConfigArrayOrFail() | |
703 | 703 | let assetId = fromBase58String(cfgArray[IdxCfgAssetId]) | |
704 | 704 | if ((lockEnd >= height)) | |
705 | 705 | then throw((("wait " + toString(lockEnd)) + " to unlock")) | |
706 | 706 | else if ((0 >= userAmount)) | |
707 | 707 | then throw("nothing to unlock") | |
708 | 708 | else { | |
709 | 709 | let period = valueOrElse(getInteger(mathContract, keyNextPeriod()), 0) | |
710 | 710 | (((LockParamsEntry(userAddress, userNumStr, 0, lockStart, lockDuration, 0, 0, toString(period)) ++ StatsEntry(-(userAmount), 0, 0, -1)) :+ HistoryEntry("unlock", userAddress, userAmount, lockStart, lockDuration, 0, 0, i)) :+ ScriptTransfer(addressFromStringValue(userAddress), userAmount, assetId)) | |
711 | 711 | } | |
712 | 712 | } | |
713 | 713 | ||
714 | 714 | ||
715 | 715 | ||
716 | 716 | @Callable(i) | |
717 | 717 | func gwxUserInfoREADONLY (userAddress) = { | |
718 | 718 | let gwxAmount = calcCurrentGwxAmount(userAddress) | |
719 | 719 | $Tuple2(nil, [gwxAmount]) | |
720 | 720 | } | |
721 | 721 | ||
722 | 722 | ||
723 | 723 | ||
724 | 724 | @Callable(i) | |
725 | 725 | func getUserGwxAmountAtHeightREADONLY (userAddress,targetHeight) = { | |
726 | 726 | let gwxAmount = calcUserGwxAmountAtHeight(userAddress, targetHeight) | |
727 | 727 | $Tuple2(nil, gwxAmount) | |
728 | 728 | } | |
729 | 729 | ||
730 | 730 | ||
731 | 731 | ||
732 | 732 | @Callable(i) | |
733 | 733 | func getTotalCachedGwxREADONLY () = $Tuple2(nil, getTotalCachedGwx(true)) | |
734 | 734 | ||
735 | 735 | ||
736 | 736 | ||
737 | 737 | @Callable(i) | |
738 | 738 | func setManager (pendingManagerPublicKey) = { | |
739 | 739 | let checkCaller = mustManager(i) | |
740 | 740 | if ((checkCaller == checkCaller)) | |
741 | 741 | then { | |
742 | 742 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
743 | 743 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
744 | 744 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
745 | 745 | else throw("Strict value is not equal to itself.") | |
746 | 746 | } | |
747 | 747 | else throw("Strict value is not equal to itself.") | |
748 | 748 | } | |
749 | 749 | ||
750 | 750 | ||
751 | 751 | ||
752 | 752 | @Callable(i) | |
753 | 753 | func confirmManager () = { | |
754 | 754 | let pm = pendingManagerPublicKeyOrUnit() | |
755 | 755 | let hasPM = if (isDefined(pm)) | |
756 | 756 | then true | |
757 | 757 | else throw("No pending manager") | |
758 | 758 | if ((hasPM == hasPM)) | |
759 | 759 | then { | |
760 | 760 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
761 | 761 | then true | |
762 | 762 | else throw("You are not pending manager") | |
763 | 763 | if ((checkPM == checkPM)) | |
764 | 764 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
765 | 765 | else throw("Strict value is not equal to itself.") | |
766 | 766 | } | |
767 | 767 | else throw("Strict value is not equal to itself.") | |
768 | 768 | } | |
769 | 769 | ||
770 | 770 | ||
771 | 771 | @Verifier(tx) | |
772 | 772 | func verify () = { | |
773 | 773 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
774 | 774 | case pk: ByteVector => | |
775 | 775 | pk | |
776 | 776 | case _: Unit => | |
777 | 777 | tx.senderPublicKey | |
778 | 778 | case _ => | |
779 | 779 | throw("Match error") | |
780 | 780 | } | |
781 | 781 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
782 | 782 | } | |
783 | 783 |
github/deemru/w8io/026f985 76.37 ms ◑