tx · 8w41bRzvhyZYtB1Ut9KpurHJGDg2yHjss8wdRXMkEM3A 3N7RomXigNDnyPchLBkCPNfzGVdxLFpnepV: -0.02200000 Waves 2023.03.02 11:21 [2472190] smart account 3N7RomXigNDnyPchLBkCPNfzGVdxLFpnepV > SELF 0.00000000 Waves
{ "type": 13, "id": "8w41bRzvhyZYtB1Ut9KpurHJGDg2yHjss8wdRXMkEM3A", "fee": 2200000, "feeAssetId": null, "timestamp": 1677745376280, "version": 1, "sender": "3N7RomXigNDnyPchLBkCPNfzGVdxLFpnepV", "senderPublicKey": "HyjGjr8x59chdfQ1KT6K4AWc2xx5np2EJgs9gT16GTPK", "proofs": [ "2sTSjg2quLYwvsAHK5jeXgmRzEJ3yc8SHRJgcFG4cNom4S7iogsvqpJiRHGbrZtKBA1MYaNdLno85Yk9J6q62mcx" ], "script": "base64:BgJJCAISBAoCCAESABIDCgEBEgASABIAEgMKAQgSAwoBCBIDCgEIEgUKAwEBARIFCgMBAQESABIDCgEIEgcKBQgICAgIEgMKAQgSAE8AA1NFUAICX18ABVNDQUxFAOgHAAVNVUxUOACAwtcvAAp6ZXJvQmlnSW50CQC2AgEAAAAUcHJvY2Vzc2luZ1N0YWdlVG90YWwAAAAVcHJvY2Vzc2luZ1N0YWdlU2hhcmVzAAEBDmdldE51bWJlckJ5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJoIAgUEdGhpcwUDa2V5AAABD2dldE51bWJlck9yRmFpbAEDa2V5CQETdmFsdWVPckVycm9yTWVzc2FnZQIJAJoIAgUEdGhpcwUDa2V5CQCsAgIJAKwCAgIPbWFuZGF0b3J5IHRoaXMuBQNrZXkCDyBpcyBub3QgZGVmaW5lZAEOZ2V0U3RyaW5nQnlLZXkBA2tleQkBC3ZhbHVlT3JFbHNlAgkAnQgCBQR0aGlzBQNrZXkCAAEPZ2V0U3RyaW5nT3JGYWlsAQNrZXkJARN2YWx1ZU9yRXJyb3JNZXNzYWdlAgkAnQgCBQR0aGlzBQ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CB0byBpdHNlbGYuAWkBDmNvbmZpcm1NYW5hZ2VyAAQCcG0JAR1wZW5kaW5nTWFuYWdlclB1YmxpY0tleU9yVW5pdAAEBWhhc1BNAwkBCWlzRGVmaW5lZAEFAnBtBgkAAgECEk5vIHBlbmRpbmcgbWFuYWdlcgMJAAACBQVoYXNQTQUFaGFzUE0EB2NoZWNrUE0DCQAAAggFAWkPY2FsbGVyUHVibGljS2V5CQEFdmFsdWUBBQJwbQYJAAIBAhtZb3UgYXJlIG5vdCBwZW5kaW5nIG1hbmFnZXIDCQAAAgUHY2hlY2tQTQUHY2hlY2tQTQkAzAgCCQELU3RyaW5nRW50cnkCCQETa2V5TWFuYWdlclB1YmxpY0tleQAJANgEAQkBBXZhbHVlAQUCcG0JAMwIAgkBC0RlbGV0ZUVudHJ5AQkBGmtleVBlbmRpbmdNYW5hZ2VyUHVibGljS2V5AAUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJ0eAEGdmVyaWZ5AAQPdGFyZ2V0UHVibGljS2V5BAckbWF0Y2gwCQEWbWFuYWdlclB1YmxpY0tleU9yVW5pdAADCQABAgUHJG1hdGNoMAIKQnl0ZVZlY3RvcgQCcGsFByRtYXRjaDAFAnBrAwkAAQIFByRtYXRjaDACBFVuaXQIBQJ0eA9zZW5kZXJQdWJsaWNLZXkJAAIBAgtNYXRjaCBlcnJvcgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUPdGFyZ2V0UHVibGljS2V5eU5v6Q==", "chainId": 84, "height": 2472190, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: BvcM2141eckxiyrPSnWtGKTXtR7TX1xe44cRRPEz3Ukn Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let SEP = "__" | |
5 | + | ||
6 | + | let SCALE = 1000 | |
7 | + | ||
8 | + | let MULT8 = 100000000 | |
9 | + | ||
10 | + | let zeroBigInt = toBigInt(0) | |
11 | + | ||
12 | + | let processingStageTotal = 0 | |
13 | + | ||
14 | + | let processingStageShares = 1 | |
15 | + | ||
16 | + | func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0) | |
17 | + | ||
18 | + | ||
19 | + | func getNumberOrFail (key) = valueOrErrorMessage(getInteger(this, key), (("mandatory this." + key) + " is not defined")) | |
20 | + | ||
21 | + | ||
22 | + | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
23 | + | ||
24 | + | ||
25 | + | func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (("mandatory this." + key) + " is not defined")) | |
26 | + | ||
27 | + | ||
28 | + | func abs (val) = if ((0 > val)) | |
29 | + | then -(val) | |
30 | + | else val | |
31 | + | ||
32 | + | ||
33 | + | func absBigInt (val) = if ((zeroBigInt > val)) | |
34 | + | then -(val) | |
35 | + | else val | |
36 | + | ||
37 | + | ||
38 | + | let keyMaxDepth = "%s__maxDepth" | |
39 | + | ||
40 | + | let maxDepthDefault = 30 | |
41 | + | ||
42 | + | let maxDepth = valueOrElse(getInteger(this, keyMaxDepth), maxDepthDefault) | |
43 | + | ||
44 | + | func keyFactoryAddress () = "%s%s__config__factoryAddress" | |
45 | + | ||
46 | + | ||
47 | + | let factoryAddressStr = getStringOrFail(keyFactoryAddress()) | |
48 | + | ||
49 | + | let factoryContract = addressFromStringValue(factoryAddressStr) | |
50 | + | ||
51 | + | func keyEmissionAddress () = "%s%s__config__emissionAddress" | |
52 | + | ||
53 | + | ||
54 | + | func keyNumToUserMapping (num) = makeString(["%s%s%s", "mapping", "num2user", toString(num)], SEP) | |
55 | + | ||
56 | + | ||
57 | + | let keyReferralProgramName = makeString(["%s%s", "referral", "programName"], SEP) | |
58 | + | ||
59 | + | let referralProgramNameDefault = "wxlock" | |
60 | + | ||
61 | + | let referralProgramName = valueOrElse(getString(this, keyReferralProgramName), referralProgramNameDefault) | |
62 | + | ||
63 | + | let keyReferralMinGWxAmount = makeString(["%s%s", "referral", "minGWxAmount"], SEP) | |
64 | + | ||
65 | + | let referralMinGWxAmountDefault = (500 * MULT8) | |
66 | + | ||
67 | + | let referralMinGWxAmount = valueOrElse(getInteger(this, keyReferralMinGWxAmount), referralMinGWxAmountDefault) | |
68 | + | ||
69 | + | let keyReferrerRewardPermille = makeString(["%s%s", "referral", "referrerRewardPermille"], SEP) | |
70 | + | ||
71 | + | let referrerRewardPermilleDefault = 50 | |
72 | + | ||
73 | + | let referrerRewardPermille = valueOrElse(getInteger(this, keyReferrerRewardPermille), referrerRewardPermilleDefault) | |
74 | + | ||
75 | + | let keyReferralRewardPermille = makeString(["%s%s", "referral", "referralRewardPermille"], SEP) | |
76 | + | ||
77 | + | let referralRewardPermilleDefault = 50 | |
78 | + | ||
79 | + | let referralRewardPermille = valueOrElse(getInteger(this, keyReferralRewardPermille), referralRewardPermilleDefault) | |
80 | + | ||
81 | + | func keyReferrer (referralAddress) = makeString(["%s%s%s", "referrer", referralProgramName, referralAddress], SEP) | |
82 | + | ||
83 | + | ||
84 | + | func keyUnclaimedReferral (programName,claimerAddress) = makeString(["%s%s%s", "unclaimedReferral", programName, claimerAddress], SEP) | |
85 | + | ||
86 | + | ||
87 | + | let emissionAddressStr = getStringOrFail(keyEmissionAddress()) | |
88 | + | ||
89 | + | let emissionContract = addressFromStringValue(emissionAddressStr) | |
90 | + | ||
91 | + | let IdxCfgAssetId = 1 | |
92 | + | ||
93 | + | let IdxCfgPacemakerAddress = 2 | |
94 | + | ||
95 | + | let IdxCfgBoostingContract = 3 | |
96 | + | ||
97 | + | let IdxCfgMaxDepth = 4 | |
98 | + | ||
99 | + | func keyConfig () = "%s__config" | |
100 | + | ||
101 | + | ||
102 | + | func readConfigArrayOrFail () = split(getStringOrFail(keyConfig()), SEP) | |
103 | + | ||
104 | + | ||
105 | + | func formatConfig (wxAssetIdStr,matcherPacemakerAddressStr,boostingContractAddressStr,maxDepth) = makeString(["%s%s%s%d", wxAssetIdStr, matcherPacemakerAddressStr, boostingContractAddressStr, toString(maxDepth)], SEP) | |
106 | + | ||
107 | + | ||
108 | + | func boostingContractOrFail () = { | |
109 | + | let cfgArray = readConfigArrayOrFail() | |
110 | + | valueOrErrorMessage(addressFromString(cfgArray[IdxCfgBoostingContract]), "boosting contract address is not defined") | |
111 | + | } | |
112 | + | ||
113 | + | ||
114 | + | func keyGwxRewardEmissionStartHeight () = "%s%s__gwxRewardEmissionPart__startHeight" | |
115 | + | ||
116 | + | ||
117 | + | func keyUsersCount () = "%s__nextUserNum" | |
118 | + | ||
119 | + | ||
120 | + | func keyRatePerBlockCurrent () = "%s%s__ratePerBlock__current" | |
121 | + | ||
122 | + | ||
123 | + | func keyPoolWeightVirtual () = "%s%s__poolWeight__GWXvirtualPOOL" | |
124 | + | ||
125 | + | ||
126 | + | func keyNextProcessedUser () = "%s__nextProcessedUser" | |
127 | + | ||
128 | + | ||
129 | + | func keyLatestPeriod () = "%s__latestPeriod" | |
130 | + | ||
131 | + | ||
132 | + | func keyNextPeriod () = "%s__nextPeriod" | |
133 | + | ||
134 | + | ||
135 | + | func keyProcessingStage () = "%s__processingStage" | |
136 | + | ||
137 | + | ||
138 | + | func keyNextProcessedPeriod () = "%s__nextProcessedPeriod" | |
139 | + | ||
140 | + | ||
141 | + | func keyUserUnclaimed (userIndex) = makeString(["%s%d", "userUnclaimed", toString(userIndex)], SEP) | |
142 | + | ||
143 | + | ||
144 | + | func keyNextUnlaimedPeriodOfUser (userIndex) = makeString(["%s%d__nextClaimedPeriod", toString(userIndex)], SEP) | |
145 | + | ||
146 | + | ||
147 | + | func keyLastProcessedPeriodOfUser (userIndex) = makeString(["%s%d__lastProcessedPeriod", toString(userIndex)], SEP) | |
148 | + | ||
149 | + | ||
150 | + | func keyHeightForPeriod (period) = makeString(["%s%d__startHeightForPeriod", toString(period)], SEP) | |
151 | + | ||
152 | + | ||
153 | + | func keyAuxEmissionRewardForPeriod (period) = makeString(["%s%d__auxEmissionReward", toString(period)], SEP) | |
154 | + | ||
155 | + | ||
156 | + | func keyTotalAmountForPeriod (period) = makeString(["%s%d__totalAmountForPeriod", toString(period)], SEP) | |
157 | + | ||
158 | + | ||
159 | + | func keyLastPayoutInfo () = "%s__lastPayoutInfo" | |
160 | + | ||
161 | + | ||
162 | + | func PeriodPayoutInfo (period,matcherReward,emissionReward) = makeString(["%d%d%d", toString(period), toString(matcherReward), toString(emissionReward)], SEP) | |
163 | + | ||
164 | + | ||
165 | + | func keyPayoutHistoryInfo (period) = makeString(["%s%s%d__payouts__history", toString(period)], SEP) | |
166 | + | ||
167 | + | ||
168 | + | func keyTotalWeightForPeriod (period) = makeString(["%s%d__totalWeightForPeriod", toString(period)], SEP) | |
169 | + | ||
170 | + | ||
171 | + | func keyUserKValueForPeriod (period,userIndex) = makeString(["%s%d%s%d__paramByPeriod", toString(userIndex), "k", toString(period)], SEP) | |
172 | + | ||
173 | + | ||
174 | + | func keyUserBValueForPeriod (period,userIndex) = makeString(["%s%d%s%d__paramByPeriod", toString(userIndex), "b", toString(period)], SEP) | |
175 | + | ||
176 | + | ||
177 | + | func keyUserWeightForPeriod (period,userIndex) = makeString(["%s%d%s%d__paramByPeriod", toString(userIndex), "weight", toString(period)], SEP) | |
178 | + | ||
179 | + | ||
180 | + | func keyReferralsContractAddress () = makeString(["%s%s", "config", "referralsContractAddress"], SEP) | |
181 | + | ||
182 | + | ||
183 | + | let referralsContractAddressOrFail = addressFromStringValue(getStringOrFail(keyReferralsContractAddress())) | |
184 | + | ||
185 | + | func HistoryEntry (type,user,amount,i) = { | |
186 | + | let historyKEY = makeString(["%s%s%s%s__history", type, user, toBase58String(i.transactionId)], SEP) | |
187 | + | let historyDATA = makeString(["%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(amount)], SEP) | |
188 | + | StringEntry(historyKEY, historyDATA) | |
189 | + | } | |
190 | + | ||
191 | + | ||
192 | + | func keyManagerPublicKey () = "%s__managerPublicKey" | |
193 | + | ||
194 | + | ||
195 | + | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
196 | + | ||
197 | + | ||
198 | + | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
199 | + | case s: String => | |
200 | + | fromBase58String(s) | |
201 | + | case _: Unit => | |
202 | + | unit | |
203 | + | case _ => | |
204 | + | throw("Match error") | |
205 | + | } | |
206 | + | ||
207 | + | ||
208 | + | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
209 | + | case s: String => | |
210 | + | fromBase58String(s) | |
211 | + | case _: Unit => | |
212 | + | unit | |
213 | + | case _ => | |
214 | + | throw("Match error") | |
215 | + | } | |
216 | + | ||
217 | + | ||
218 | + | func mustManager (i) = { | |
219 | + | let pd = throw("Permission denied") | |
220 | + | match managerPublicKeyOrUnit() { | |
221 | + | case pk: ByteVector => | |
222 | + | if ((i.callerPublicKey == pk)) | |
223 | + | then true | |
224 | + | else pd | |
225 | + | case _: Unit => | |
226 | + | if ((i.caller == this)) | |
227 | + | then true | |
228 | + | else pd | |
229 | + | case _ => | |
230 | + | throw("Match error") | |
231 | + | } | |
232 | + | } | |
233 | + | ||
234 | + | ||
235 | + | func calcUserWeight (boostingContractAddress,heightForPeriod,period,userIndex) = { | |
236 | + | let kLast = keyLastProcessedPeriodOfUser(userIndex) | |
237 | + | let kKey = keyUserKValueForPeriod(period, userIndex) | |
238 | + | let kRaw = getInteger(boostingContractAddress, kKey) | |
239 | + | let kUserWeight = keyUserWeightForPeriod(period, userIndex) | |
240 | + | if (isDefined(kRaw)) | |
241 | + | then { | |
242 | + | let k = value(kRaw) | |
243 | + | let b = value(getInteger(boostingContractAddress, keyUserBValueForPeriod(period, userIndex))) | |
244 | + | let w = ((k * heightForPeriod) + b) | |
245 | + | if ((w > 0)) | |
246 | + | then $Tuple2((w / SCALE), [IntegerEntry(kLast, period), IntegerEntry(kUserWeight, w)]) | |
247 | + | else $Tuple2(0, nil) | |
248 | + | } | |
249 | + | else { | |
250 | + | let p = getInteger(this, kLast) | |
251 | + | if (if (isDefined(p)) | |
252 | + | then (period >= value(p)) | |
253 | + | else false) | |
254 | + | then { | |
255 | + | let pv = value(p) | |
256 | + | let k = value(getInteger(boostingContractAddress, keyUserKValueForPeriod(pv, userIndex))) | |
257 | + | let b = value(getInteger(boostingContractAddress, keyUserBValueForPeriod(pv, userIndex))) | |
258 | + | let w = ((k * heightForPeriod) + b) | |
259 | + | if ((w > 0)) | |
260 | + | then $Tuple2((w / SCALE), [IntegerEntry(kUserWeight, w)]) | |
261 | + | else $Tuple2(0, nil) | |
262 | + | } | |
263 | + | else $Tuple2(0, nil) | |
264 | + | } | |
265 | + | } | |
266 | + | ||
267 | + | ||
268 | + | func calcUserWeightForClaim (boostingContractAddress,heightForPeriod,period,userIndex) = { | |
269 | + | let kUserWeight = keyUserWeightForPeriod(period, userIndex) | |
270 | + | let userWeightOrUnit = getInteger(kUserWeight) | |
271 | + | match userWeightOrUnit { | |
272 | + | case _: Unit => | |
273 | + | 0 | |
274 | + | case w: Int => | |
275 | + | (w / SCALE) | |
276 | + | case _ => | |
277 | + | throw("Match error") | |
278 | + | } | |
279 | + | } | |
280 | + | ||
281 | + | ||
282 | + | func getUserIndexByAddress (boostingContractAddressStr,userAddress) = { | |
283 | + | let key = makeString(["%s%s%s", "mapping", "user2num", userAddress], SEP) | |
284 | + | parseIntValue(valueOrErrorMessage(getString(Address(fromBase58String(boostingContractAddressStr)), key), ((("User address " + userAddress) + " is not found in boosting contract data, key=") + key))) | |
285 | + | } | |
286 | + | ||
287 | + | ||
288 | + | func nextPeriod () = getNumberByKey(keyNextPeriod()) | |
289 | + | ||
290 | + | ||
291 | + | func commonClaimReward (userAddress) = { | |
292 | + | let cfgArray = readConfigArrayOrFail() | |
293 | + | let userIdx = getUserIndexByAddress(cfgArray[IdxCfgBoostingContract], userAddress) | |
294 | + | let userUnclaimedOption = getInteger(keyUserUnclaimed(userIdx)) | |
295 | + | match userUnclaimedOption { | |
296 | + | case _: Unit => | |
297 | + | $Tuple2(0, nil) | |
298 | + | case u: Int => | |
299 | + | $Tuple2(u, [IntegerEntry(keyUserUnclaimed(userIdx), 0)]) | |
300 | + | case _ => | |
301 | + | throw("Match error") | |
302 | + | } | |
303 | + | } | |
304 | + | ||
305 | + | ||
306 | + | @Callable(i) | |
307 | + | func updateReferralActivity (userAddress,gWxAmountStart) = { | |
308 | + | let referrer = getString(referralsContractAddressOrFail, keyReferrer(userAddress)) | |
309 | + | let activeReferralInv = if ((referrer == unit)) | |
310 | + | then unit | |
311 | + | else invoke(referralsContractAddressOrFail, "updateReferralActivity", [referralProgramName, userAddress, (gWxAmountStart >= referralMinGWxAmount)], nil) | |
312 | + | if ((activeReferralInv == activeReferralInv)) | |
313 | + | then $Tuple2(nil, unit) | |
314 | + | else throw("Strict value is not equal to itself.") | |
315 | + | } | |
316 | + | ||
317 | + | ||
318 | + | ||
319 | + | @Callable(i) | |
320 | + | func finalizeHelper () = { | |
321 | + | let processingStage = valueOrElse(getInteger(keyProcessingStage()), processingStageTotal) | |
322 | + | let currentPeriod = getNumberByKey(keyNextProcessedPeriod()) | |
323 | + | let currentUser = getNumberByKey(keyNextProcessedUser()) | |
324 | + | let latestPeriod = getNumberByKey(keyLatestPeriod()) | |
325 | + | let usersCount = valueOrElse(getInteger(boostingContractOrFail(), keyUsersCount()), 0) | |
326 | + | let totalWeightKey = keyTotalWeightForPeriod(currentPeriod) | |
327 | + | let totalWeight = getNumberByKey(keyTotalWeightForPeriod(currentPeriod)) | |
328 | + | let heightForPeriod = getNumberByKey(keyHeightForPeriod(currentPeriod)) | |
329 | + | if ((currentPeriod > latestPeriod)) | |
330 | + | then $Tuple2(nil, false) | |
331 | + | else if ((processingStage == processingStageTotal)) | |
332 | + | then { | |
333 | + | let $t01238212498 = calcUserWeight(boostingContractOrFail(), heightForPeriod, currentPeriod, currentUser) | |
334 | + | let userWeight = $t01238212498._1 | |
335 | + | let userActions = $t01238212498._2 | |
336 | + | let totalWeightNew = (totalWeight + userWeight) | |
337 | + | let processingActions = if (((usersCount - 1) > currentUser)) | |
338 | + | then [IntegerEntry(keyNextProcessedUser(), (currentUser + 1))] | |
339 | + | else [IntegerEntry(keyProcessingStage(), processingStageShares), IntegerEntry(keyNextProcessedUser(), 0)] | |
340 | + | $Tuple2((([IntegerEntry(totalWeightKey, totalWeightNew)] ++ processingActions) ++ userActions), true) | |
341 | + | } | |
342 | + | else if ((processingStage == processingStageShares)) | |
343 | + | then { | |
344 | + | let userWeight = calcUserWeightForClaim(boostingContractOrFail(), heightForPeriod, currentPeriod, currentUser) | |
345 | + | let userAmountMatcherForPeriod = fraction(getNumberByKey(keyTotalAmountForPeriod(currentPeriod)), userWeight, totalWeight) | |
346 | + | let userAmountEmissionForPeriod = fraction(getNumberByKey(keyAuxEmissionRewardForPeriod(currentPeriod)), userWeight, totalWeight) | |
347 | + | let userTotalAmount = (userAmountEmissionForPeriod + userAmountMatcherForPeriod) | |
348 | + | let userUnclaimedOption = getInteger(keyUserUnclaimed(currentUser)) | |
349 | + | let userAddress = getStringValue(boostingContractOrFail(), keyNumToUserMapping(currentUser)) | |
350 | + | let referrer = getString(referralsContractAddressOrFail, keyReferrer(userAddress)) | |
351 | + | let activeReferralInv = if ((referrer == unit)) | |
352 | + | then unit | |
353 | + | else invoke(referralsContractAddressOrFail, "updateReferralActivity", [referralProgramName, userAddress, (userWeight >= referralMinGWxAmount)], nil) | |
354 | + | if ((activeReferralInv == activeReferralInv)) | |
355 | + | then { | |
356 | + | let referralInv = if (if ((referrer == unit)) | |
357 | + | then true | |
358 | + | else (referralMinGWxAmount > userWeight)) | |
359 | + | then unit | |
360 | + | else { | |
361 | + | let referrerReward = fraction(userTotalAmount, referrerRewardPermille, SCALE) | |
362 | + | let referralReward = fraction(userTotalAmount, referralRewardPermille, SCALE) | |
363 | + | invoke(referralsContractAddressOrFail, "incUnclaimed", [referralProgramName, userAddress, referrerReward, referralReward], nil) | |
364 | + | } | |
365 | + | if ((referralInv == referralInv)) | |
366 | + | then { | |
367 | + | let unclaimedActions = [IntegerEntry(keyUserUnclaimed(currentUser), (valueOrElse(userUnclaimedOption, 0) + userTotalAmount))] | |
368 | + | let processingActions = if (((usersCount - 1) > currentUser)) | |
369 | + | then [IntegerEntry(keyNextProcessedUser(), (currentUser + 1))] | |
370 | + | else [IntegerEntry(keyNextProcessedPeriod(), (currentPeriod + 1)), IntegerEntry(keyNextProcessedUser(), 0), DeleteEntry(keyProcessingStage())] | |
371 | + | $Tuple2((unclaimedActions ++ processingActions), true) | |
372 | + | } | |
373 | + | else throw("Strict value is not equal to itself.") | |
374 | + | } | |
375 | + | else throw("Strict value is not equal to itself.") | |
376 | + | } | |
377 | + | else throw("invalid processing stage") | |
378 | + | } | |
379 | + | ||
380 | + | ||
381 | + | ||
382 | + | @Callable(i) | |
383 | + | func finalizeWrapper (counter) = { | |
384 | + | let result = { | |
385 | + | let @ = invoke(this, "finalizeHelper", nil, nil) | |
386 | + | if ($isInstanceOf(@, "Boolean")) | |
387 | + | then @ | |
388 | + | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
389 | + | } | |
390 | + | if ((result == result)) | |
391 | + | then if (!(result)) | |
392 | + | then if ((counter == maxDepth)) | |
393 | + | then throw("Nothing to process") | |
394 | + | else $Tuple2(nil, unit) | |
395 | + | else if ((counter > 0)) | |
396 | + | then $Tuple2(nil, invoke(this, "finalizeWrapper", [(counter - 1)], nil)) | |
397 | + | else $Tuple2(nil, unit) | |
398 | + | else throw("Strict value is not equal to itself.") | |
399 | + | } | |
400 | + | ||
401 | + | ||
402 | + | ||
403 | + | @Callable(i) | |
404 | + | func processPendingPeriodsAndUsers () = $Tuple2(nil, invoke(this, "finalizeWrapper", [maxDepth], nil)) | |
405 | + | ||
406 | + | ||
407 | + | ||
408 | + | @Callable(i) | |
409 | + | func deposit () = { | |
410 | + | let cfgArray = readConfigArrayOrFail() | |
411 | + | if ((i.caller != Address(fromBase58String(cfgArray[IdxCfgPacemakerAddress])))) | |
412 | + | then throw("Wrong caller address") | |
413 | + | else { | |
414 | + | let assetId = value(value(i.payments[0]).assetId) | |
415 | + | if ((assetId != fromBase58String(cfgArray[IdxCfgAssetId]))) | |
416 | + | then throw("Wrong payment asset") | |
417 | + | else { | |
418 | + | let period = nextPeriod() | |
419 | + | let deltaH = (height - getNumberOrFail(keyGwxRewardEmissionStartHeight())) | |
420 | + | let emissionRate = valueOrErrorMessage(getInteger(emissionContract, keyRatePerBlockCurrent()), (("mandatory emission_contract." + keyRatePerBlockCurrent()) + " is not defined")) | |
421 | + | let weight = valueOrErrorMessage(getInteger(factoryContract, keyPoolWeightVirtual()), (("mandatory factory_contract." + keyPoolWeightVirtual()) + " is not defined")) | |
422 | + | let auxAmount = fraction((deltaH * weight), emissionRate, MULT8) | |
423 | + | let em = invoke(emissionContract, "emit", [auxAmount], nil) | |
424 | + | if ((em == em)) | |
425 | + | then { | |
426 | + | let matcherPart = value(i.payments[0]).amount | |
427 | + | let payoutInfo = PeriodPayoutInfo(period, matcherPart, auxAmount) | |
428 | + | [IntegerEntry(keyLatestPeriod(), period), IntegerEntry(keyHeightForPeriod(period), height), IntegerEntry(keyAuxEmissionRewardForPeriod(period), auxAmount), IntegerEntry(keyGwxRewardEmissionStartHeight(), height), IntegerEntry(keyTotalAmountForPeriod(period), matcherPart), IntegerEntry(keyNextPeriod(), (period + 1)), StringEntry(keyLastPayoutInfo(), payoutInfo), StringEntry(keyPayoutHistoryInfo(period), payoutInfo)] | |
429 | + | } | |
430 | + | else throw("Strict value is not equal to itself.") | |
431 | + | } | |
432 | + | } | |
433 | + | } | |
434 | + | ||
435 | + | ||
436 | + | ||
437 | + | @Callable(i) | |
438 | + | func claimReward () = { | |
439 | + | let cfgArray = readConfigArrayOrFail() | |
440 | + | let address = toString(i.caller) | |
441 | + | let $t01795118001 = commonClaimReward(address) | |
442 | + | let amount = $t01795118001._1 | |
443 | + | let actions = $t01795118001._2 | |
444 | + | let checkAmount = if ((amount > 0)) | |
445 | + | then true | |
446 | + | else throw("Nothing to claim") | |
447 | + | if ((checkAmount == checkAmount)) | |
448 | + | then { | |
449 | + | let amountFromEmission = 0 | |
450 | + | let claimedReferral = { | |
451 | + | let @ = invoke(referralsContractAddressOrFail, "claim", [referralProgramName], nil) | |
452 | + | if ($isInstanceOf(@, "Int")) | |
453 | + | then @ | |
454 | + | else throw(($getType(@) + " couldn't be cast to Int")) | |
455 | + | } | |
456 | + | let totalAmount = (amount + claimedReferral) | |
457 | + | $Tuple2(([ScriptTransfer(i.caller, totalAmount, fromBase58String(cfgArray[IdxCfgAssetId])), HistoryEntry("claim", address, amount, i)] ++ actions), [totalAmount, amountFromEmission]) | |
458 | + | } | |
459 | + | else throw("Strict value is not equal to itself.") | |
460 | + | } | |
461 | + | ||
462 | + | ||
463 | + | ||
464 | + | @Callable(i) | |
465 | + | func claimRewardREADONLY (address) = { | |
466 | + | let $t01858918639 = commonClaimReward(address) | |
467 | + | let amount = $t01858918639._1 | |
468 | + | let actions = $t01858918639._2 | |
469 | + | let referralUnclaimed = valueOrElse(getInteger(referralsContractAddressOrFail, keyUnclaimedReferral(referralProgramName, address)), 0) | |
470 | + | let totalAmount = (amount + referralUnclaimed) | |
471 | + | $Tuple2(nil, totalAmount) | |
472 | + | } | |
473 | + | ||
474 | + | ||
475 | + | ||
476 | + | @Callable(i) | |
477 | + | func latestFinalizedPeriodREADONLY (address) = $Tuple2(nil, valueOrElse(getInteger(this, keyLatestPeriod()), -1)) | |
478 | + | ||
479 | + | ||
480 | + | ||
481 | + | @Callable(i) | |
482 | + | func latestFinalizedPeriodInfoREADONLY (address) = $Tuple2(nil, getStringByKey(keyLastPayoutInfo())) | |
483 | + | ||
484 | + | ||
485 | + | ||
486 | + | @Callable(i) | |
487 | + | func calcGwxParamsREADONLY (gwxAmountStart,lockStartHeight,lockDurationBlocks) = { | |
488 | + | let lockEndHeight = (lockStartHeight + lockDurationBlocks) | |
489 | + | let scale8ParamK = -(fraction(gwxAmountStart, SCALE, lockDurationBlocks)) | |
490 | + | let scale8ParamB = (fraction(gwxAmountStart, SCALE, lockDurationBlocks) * lockEndHeight) | |
491 | + | $Tuple2(nil, [scale8ParamK, scale8ParamB, nextPeriod()]) | |
492 | + | } | |
493 | + | ||
494 | + | ||
495 | + | ||
496 | + | @Callable(i) | |
497 | + | func calcGwxAmountStartREADONLY (wxLockAmount,lockDuration,maxLockDuration) = { | |
498 | + | let coeffX8 = fraction(lockDuration, MULT8, maxLockDuration) | |
499 | + | let gWxAmountStart = fraction(wxLockAmount, coeffX8, MULT8) | |
500 | + | $Tuple2(nil, [gWxAmountStart]) | |
501 | + | } | |
502 | + | ||
503 | + | ||
504 | + | ||
505 | + | @Callable(i) | |
506 | + | func onEmissionForGwxStart () = if ((i.caller != factoryContract)) | |
507 | + | then throw("permissions denied") | |
508 | + | else [IntegerEntry(keyGwxRewardEmissionStartHeight(), height)] | |
509 | + | ||
510 | + | ||
511 | + | ||
512 | + | @Callable(i) | |
513 | + | func latestPeriodEmissionRewardsREADONLY (address) = { | |
514 | + | let period = nextPeriod() | |
515 | + | $Tuple2(nil, [getNumberByKey(keyAuxEmissionRewardForPeriod(period))]) | |
516 | + | } | |
517 | + | ||
518 | + | ||
519 | + | ||
520 | + | @Callable(i) | |
521 | + | func calcD (x1BigIntStr,x2BigIntStr,ampBigIntStr,aPrecisionBigIntStr,targetPrecisionBigIntStr) = { | |
522 | + | let nCoins = toBigInt(2) | |
523 | + | let aPrecision = parseBigIntValue(aPrecisionBigIntStr) | |
524 | + | let targetPrecision = parseBigIntValue(targetPrecisionBigIntStr) | |
525 | + | let x1 = parseBigIntValue(x1BigIntStr) | |
526 | + | let x2 = parseBigIntValue(x2BigIntStr) | |
527 | + | let amp = (parseBigIntValue(ampBigIntStr) * aPrecision) | |
528 | + | let s = (x1 + x2) | |
529 | + | if ((s == zeroBigInt)) | |
530 | + | then $Tuple2(nil, toString(zeroBigInt)) | |
531 | + | else { | |
532 | + | let ann = (amp * nCoins) | |
533 | + | let arr = [0, 1, 2, 3, 4, 5, 6] | |
534 | + | func calc (acc,cur) = { | |
535 | + | let $t02135121378 = acc | |
536 | + | let d = $t02135121378._1 | |
537 | + | let dPrev = $t02135121378._2 | |
538 | + | let found = $t02135121378._3 | |
539 | + | if ((found != unit)) | |
540 | + | then acc | |
541 | + | else { | |
542 | + | let dp = (((d * d) * d) / (((x1 * x2) * nCoins) * nCoins)) | |
543 | + | let dNext = (((((ann * s) / aPrecision) + (dp * nCoins)) * d) / ((((ann - aPrecision) * d) / aPrecision) + ((nCoins + toBigInt(1)) * dp))) | |
544 | + | let dDiff = absBigInt((dNext - value(d))) | |
545 | + | if ((targetPrecision >= dDiff)) | |
546 | + | then $Tuple3(dNext, d, cur) | |
547 | + | else $Tuple3(dNext, d, unit) | |
548 | + | } | |
549 | + | } | |
550 | + | ||
551 | + | let $t02199122054 = { | |
552 | + | let $l = arr | |
553 | + | let $s = size($l) | |
554 | + | let $acc0 = $Tuple3(s, unit, unit) | |
555 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
556 | + | then $a | |
557 | + | else calc($a, $l[$i]) | |
558 | + | ||
559 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
560 | + | then $a | |
561 | + | else throw("List size exceeds 7") | |
562 | + | ||
563 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7) | |
564 | + | } | |
565 | + | let dNext = $t02199122054._1 | |
566 | + | let dPrev = $t02199122054._2 | |
567 | + | let found = $t02199122054._3 | |
568 | + | if ((found != unit)) | |
569 | + | then $Tuple2(nil, toString(dNext)) | |
570 | + | else { | |
571 | + | let dDiff = absBigInt((dNext - value(dPrev))) | |
572 | + | throw(("D calculation error, dDiff = " + toString(dDiff))) | |
573 | + | } | |
574 | + | } | |
575 | + | } | |
576 | + | ||
577 | + | ||
578 | + | ||
579 | + | @Callable(i) | |
580 | + | func setManager (pendingManagerPublicKey) = { | |
581 | + | let checkCaller = mustManager(i) | |
582 | + | if ((checkCaller == checkCaller)) | |
583 | + | then { | |
584 | + | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
585 | + | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
586 | + | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
587 | + | else throw("Strict value is not equal to itself.") | |
588 | + | } | |
589 | + | else throw("Strict value is not equal to itself.") | |
590 | + | } | |
591 | + | ||
592 | + | ||
593 | + | ||
594 | + | @Callable(i) | |
595 | + | func confirmManager () = { | |
596 | + | let pm = pendingManagerPublicKeyOrUnit() | |
597 | + | let hasPM = if (isDefined(pm)) | |
598 | + | then true | |
599 | + | else throw("No pending manager") | |
600 | + | if ((hasPM == hasPM)) | |
601 | + | then { | |
602 | + | let checkPM = if ((i.callerPublicKey == value(pm))) | |
603 | + | then true | |
604 | + | else throw("You are not pending manager") | |
605 | + | if ((checkPM == checkPM)) | |
606 | + | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
607 | + | else throw("Strict value is not equal to itself.") | |
608 | + | } | |
609 | + | else throw("Strict value is not equal to itself.") | |
610 | + | } | |
611 | + | ||
612 | + | ||
613 | + | @Verifier(tx) | |
614 | + | func verify () = { | |
615 | + | let targetPublicKey = match managerPublicKeyOrUnit() { | |
616 | + | case pk: ByteVector => | |
617 | + | pk | |
618 | + | case _: Unit => | |
619 | + | tx.senderPublicKey | |
620 | + | case _ => | |
621 | + | throw("Match error") | |
622 | + | } | |
623 | + | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
624 | + | } | |
625 | + |
github/deemru/w8io/026f985 91.67 ms ◑