tx · 3LBWi3NoargvPCRarwy2edDaabb4VzLkFCrKvpwZqpwA 3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy: -0.01800000 Waves 2024.09.13 05:01 [3281226] smart account 3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy > SELF 0.00000000 Waves
{ "type": 13, "id": "3LBWi3NoargvPCRarwy2edDaabb4VzLkFCrKvpwZqpwA", "fee": 1800000, "feeAssetId": null, "timestamp": 1726192950663, "version": 2, "chainId": 84, "sender": "3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy", "senderPublicKey": "FsR18761ZAsUqsTd7TK3XmR6bhihs1UXVmpHYxz5JzQ1", "proofs": [ "2E6QUJ3rriwZxpTG1kXRKkx6UxAASsN9tYXBvjtZDFpSkmZA4BWU4VYiTqmewokSuQXixoS1cncy9HfqY7Hmmuh6" ], "script": "base64:BgIsCAISBgoECAgICBIDCgEIEgMKAQESAwoBARIAEgMKAQgSABIDCgEIEgMKAQhzAApEQVlfTUlMTElTAIC4mSkABWNoYWluCQDJAQIJAMoBAggFBHRoaXMFYnl0ZXMAAQABAAt1c2R0QXNzZXRJZAQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMAEghNp6sggDP07Ru8qO7ouTvMmC3Qtd+geWqNQj+agP/7kDCQAAAgEBVAUHJG1hdGNoMAEgVbHYn3KHgu/l41uNrAWrZd6aQ6EvFrsF8xq3h6XxxRgJAAIBAg1Vbmtub3duIGNoYWluABVkZWZhdWx0UmVzdEFkZHJlc3NTdHIEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDACIzNQUUN1dkZidmg0TGtQVW5yblUxejNqbmJBMXA5bTNXTmh2AwkAAAIBAVQFByRtYXRjaDACIzNNdW1rR0d6dENLQVhwV0RxeGtkZG9mcVhTVWJxUWt2U0p5CQACAQINVW5rbm93biBjaGFpbgAQYWNyZXMyQWRkcmVzc1N0cgQHJG1hdGNoMAUFY2hha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dsZ1hwAQRhZGRyAwkBAiE9AggFAWkGY2FsbGVyBQ9zdGFraW5nQ29udHJhY3QJAAIBAhFQZXJtaXNzaW9uIGRlbmllZAQNJHQwMTMxNjMxMzIwNgkBDnRha2VYcEludGVybmFsAgUEYWRkcgAABAdhY3Rpb25zCAUNJHQwMTMxNjMxMzIwNgJfMQQCeHAIBQ0kdDAxMzE2MzEzMjA2Al8yCQCUCgIFB2FjdGlvbnMFAnhwAWkBEmNoZWNrV2xnWHBSRUFET05MWQEEYWRkcgQNJHQwMTMyODMxMzMzMQkBDnRha2VYcEludGVybmFsAgUEYWRkcgAABAdpZ25vcmVkCAUNJHQwMTMyODMxMzMzMQJfMQQHZGVsdGFYUAgFDSR0MDEzMjgzMTMzMzECXzIEBW5ld1hQCQBkAgkBC3ZhbHVlT3JFbHNlAgkAmggCBQ9zdGFraW5nQ29udHJhY3QJAQlrZXlVc2VyWFABBQRhZGRyAAAFB2RlbHRhWFAECWx2bFBvaW50cwkBB2xldmVsVXACCQELdmFsdWVPckVsc2UCCQCaCAIFD3N0YWtpbmdDb250cmFjdAkBDGtleVVzZXJMZXZlbAEFBGFkZHIAAAUFbmV3WFAJAJQKAgUDbmlsCQDNCAIFCWx2bFBvaW50cwUFbmV3WFAAsV675A==", "height": 3281226, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FrggMfs6QLRkDrUVXQuvh2ve2y8ajdJQMxy6BvGLWcja Next: CGFVXtKMtfaVtUDrytrDBEfPjcvyTazp1nAyZ4YodnRG Diff:
Old | New | Differences | |
---|---|---|---|
364 | 364 | let userAvailable = $t079142._1 | |
365 | 365 | let effLastTime = $t079142._2 | |
366 | 366 | let amountLeftTotal = valueOrElse(getInteger(contracts[dapp2Wlg], stakersAmtLeftKey), 0) | |
367 | - | let unrobbedUser = fraction(userAvailable, eff[idxUserFP], eff[idxTotalFP]) | |
367 | + | let unrobbedUser = if ((eff[idxTotalFP] != 0)) | |
368 | + | then fraction(userAvailable, eff[idxUserFP], eff[idxTotalFP]) | |
369 | + | else 0 | |
368 | 370 | [issuedAmount, fraction((totalFundsUsd - USDT_TVL_CORR), M8_, issuedAmount), totalFundsUsd, restUsd, wlgUsd, puzzleUsd, issueTime, lastTeamTime, teamTotal, teamAmountLeft, teamAmountAvailableNow, teamWlgold, actTotal, actAmountLeft, actAmountAvailableNow, actWlgold, curPeriod, amountLeftTotal, curPeriodDistribution, lastUserTime, investFundTotal, unrobbedUser, effLastTime] | |
369 | 371 | } | |
370 | 372 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let DAY_MILLIS = 86400000 | |
5 | 5 | ||
6 | 6 | let chain = take(drop(this.bytes, 1), 1) | |
7 | 7 | ||
8 | 8 | let usdtAssetId = match chain { | |
9 | 9 | case _ => | |
10 | 10 | if ((base58'2W' == $match0)) | |
11 | 11 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
12 | 12 | else if ((base58'2T' == $match0)) | |
13 | 13 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
14 | 14 | else throw("Unknown chain") | |
15 | 15 | } | |
16 | 16 | ||
17 | 17 | let defaultRestAddressStr = match chain { | |
18 | 18 | case _ => | |
19 | 19 | if ((base58'2W' == $match0)) | |
20 | 20 | then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv" | |
21 | 21 | else if ((base58'2T' == $match0)) | |
22 | 22 | then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy" | |
23 | 23 | else throw("Unknown chain") | |
24 | 24 | } | |
25 | 25 | ||
26 | 26 | let acres2AddressStr = match chain { | |
27 | 27 | case _ => | |
28 | 28 | if ((base58'2W' == $match0)) | |
29 | 29 | then "3P4UH3T9nXpMNpUmSmQjPmEz3G85t3zn6eA" | |
30 | 30 | else if ((base58'2T' == $match0)) | |
31 | 31 | then "3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh" | |
32 | 32 | else throw("Unknown chain") | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | let arbitrageDelay = match chain { | |
36 | 36 | case _ => | |
37 | 37 | if ((base58'2W' == $match0)) | |
38 | 38 | then DAY_MILLIS | |
39 | 39 | else if ((base58'2T' == $match0)) | |
40 | 40 | then 60000 | |
41 | 41 | else throw("Unknown chain") | |
42 | 42 | } | |
43 | 43 | ||
44 | 44 | let SEP = "__" | |
45 | 45 | ||
46 | 46 | let MULT6 = 1000000 | |
47 | 47 | ||
48 | 48 | let MULT8 = 100000000 | |
49 | 49 | ||
50 | 50 | let MINSHOPPAYMENT = 100000 | |
51 | 51 | ||
52 | 52 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | let IdxCfgStakingDapp = 1 | |
56 | 56 | ||
57 | 57 | let IdxCfgWlgDapp = 4 | |
58 | 58 | ||
59 | 59 | let IdxCfgPuzzlePoolDapp = 5 | |
60 | 60 | ||
61 | 61 | let IdxCfgInvestFundDapp = 6 | |
62 | 62 | ||
63 | 63 | let IdxCfgAcresDapp = 8 | |
64 | 64 | ||
65 | 65 | func keyRestCfg () = "%s__restConfig" | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func keyRestAddress () = "%s__restAddr" | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func keyRest2Address () = "%s__rest2Addr" | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP) | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx))) | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr)) | |
81 | 81 | ||
82 | 82 | let restCfg = readRestCfgOrFail(restContract) | |
83 | 83 | ||
84 | 84 | let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp) | |
85 | 85 | ||
86 | 86 | let wlgContract = getContractAddressOrFail(restCfg, IdxCfgWlgDapp) | |
87 | 87 | ||
88 | 88 | let puzzlePoolContract = getContractAddressOrFail(restCfg, IdxCfgPuzzlePoolDapp) | |
89 | 89 | ||
90 | 90 | let investFundContract = getContractAddressOrFail(restCfg, IdxCfgInvestFundDapp) | |
91 | 91 | ||
92 | 92 | let acresContract = getContractAddressOrFail(restCfg, IdxCfgAcresDapp) | |
93 | 93 | ||
94 | 94 | let wlgAssetIdKey = "wlg_assetId" | |
95 | 95 | ||
96 | 96 | let wlgAssetId = valueOrErrorMessage(getBinary(wlgContract, wlgAssetIdKey), "WLGOLD is not issued yet") | |
97 | 97 | ||
98 | 98 | func asInt (v) = match v { | |
99 | 99 | case n: Int => | |
100 | 100 | n | |
101 | 101 | case _ => | |
102 | 102 | throw("fail to cast into Int") | |
103 | 103 | } | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func fixedPoint (val,decimals) = { | |
107 | 107 | let tenPow = pow(10, 0, decimals, 0, 0, DOWN) | |
108 | 108 | let lowPart = toString((val % tenPow)) | |
109 | 109 | let zeroes = drop(toString(tenPow), (1 + size(lowPart))) | |
110 | 110 | (((toString((val / tenPow)) + ".") + zeroes) + lowPart) | |
111 | 111 | } | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | let SCALE8 = 100000000 | |
115 | 115 | ||
116 | 116 | let xpLevelScale = 3200 | |
117 | 117 | ||
118 | 118 | let xpLevelRecipPow = 4000 | |
119 | 119 | ||
120 | 120 | let numPointsOnLevelUp = 3 | |
121 | 121 | ||
122 | 122 | let wlgBaseAmountXp = 100000000000 | |
123 | 123 | ||
124 | 124 | func keyUserXP (addr) = ("userXP_" + addr) | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func keyUserLevel (addr) = ("userLevel_" + addr) | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | let xpWlg = 10000 | |
131 | 131 | ||
132 | 132 | func levelByXP (xp) = fraction(xpLevelScale, pow(xp, 4, xpLevelRecipPow, 4, 4, DOWN), SCALE8) | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func levelUp (currLevel,newXP) = { | |
136 | 136 | let newLevel = levelByXP(newXP) | |
137 | 137 | [newLevel, (numPointsOnLevelUp * (newLevel - currLevel))] | |
138 | 138 | } | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | let MILLION6 = 100000000000000 | |
142 | 142 | ||
143 | 143 | let PLAYERSHARE = 400000 | |
144 | 144 | ||
145 | 145 | let DAYMILLIS = 86400000 | |
146 | 146 | ||
147 | 147 | let teamAddrKey = "teamAddr" | |
148 | 148 | ||
149 | 149 | let lastTeamTimeKey = "lastClaimedTime_team" | |
150 | 150 | ||
151 | 151 | let teamAmountLeftKey = "teamAmountLeft" | |
152 | 152 | ||
153 | 153 | let lastActivitiesTimeKey = "lastClaimedTime_activities" | |
154 | 154 | ||
155 | 155 | let actAmountLeftKey = "activitiesAmountLeft" | |
156 | 156 | ||
157 | 157 | let stakersAmountLeftKey = "stakersAmountLeft" | |
158 | 158 | ||
159 | 159 | func keyLastClaimedTimeByUser (addr) = ("lastClaimedTimeUser_" + addr) | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func keyLastArbTimeByUser (addr) = ("lastArbTimeUser_" + addr) | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | let wlgIssueTimeKey = "wlg_issueTime" | |
166 | 166 | ||
167 | 167 | let wlgIssuedAmountKey = "wlg_issuedAmount" | |
168 | 168 | ||
169 | 169 | func keyAcresStakedAmountByUser (addr) = ("acresStakedAmountByUser_" + addr) | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | func keyWlgStakedAmountByUser (addr) = ("wlgStakedAmountByUser_" + addr) | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | let wlgStakedTotalKey = "wlgStakedAmountTotal" | |
176 | 176 | ||
177 | 177 | func keyWlgStakedTimeByUser (addr) = ("wlgStakedTimeByUser_" + addr) | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | let M6_ = 1000000 | |
181 | 181 | ||
182 | 182 | let M8_ = 100000000 | |
183 | 183 | ||
184 | 184 | let MILL6 = 100000000000000 | |
185 | 185 | ||
186 | 186 | let TEAM_SHARE = 200000 | |
187 | 187 | ||
188 | 188 | let ACTIVITY_SHARE = 100000 | |
189 | 189 | ||
190 | 190 | let PLAYER_SHARE = 400000 | |
191 | 191 | ||
192 | 192 | let YEAR_MILLIS = 31557600000 | |
193 | 193 | ||
194 | 194 | let chn = take(drop(this.bytes, 1), 1) | |
195 | 195 | ||
196 | 196 | let USDT_TVL_CORR = match chn { | |
197 | 197 | case _ => | |
198 | 198 | if ((base58'2W' == $match0)) | |
199 | 199 | then 1208630000 | |
200 | 200 | else if ((base58'2T' == $match0)) | |
201 | 201 | then 0 | |
202 | 202 | else throw("Unknown chain") | |
203 | 203 | } | |
204 | 204 | ||
205 | 205 | let teamAdrKey = "teamAddr" | |
206 | 206 | ||
207 | 207 | let lastTeamTimKey = "lastClaimedTime_team" | |
208 | 208 | ||
209 | 209 | let teamAmtLeftKey = "teamAmountLeft" | |
210 | 210 | ||
211 | 211 | let lastActivitiesTimKey = "lastClaimedTime_activities" | |
212 | 212 | ||
213 | 213 | let actAmtLeftKey = "activitiesAmountLeft" | |
214 | 214 | ||
215 | 215 | let stakersAmtLeftKey = "stakersAmountLeft" | |
216 | 216 | ||
217 | 217 | func keyLastClaimTimeByUser (addr) = ("lastClaimedTimeUser_" + addr) | |
218 | 218 | ||
219 | 219 | ||
220 | 220 | func distrByPeriod (period) = fraction(MILL6, (PLAYER_SHARE * (period + 1)), (6 * M6_)) | |
221 | 221 | ||
222 | 222 | ||
223 | 223 | let wlgIssueTimKey = "wlg_issueTime" | |
224 | 224 | ||
225 | 225 | let wlgIssuedAmtKey = "wlg_issuedAmount" | |
226 | 226 | ||
227 | 227 | let zbIssuedAmtKey = "zbill_issuedAmount" | |
228 | 228 | ||
229 | 229 | func keyAcresStakedAmtByUser (addr) = ("acresStakedAmountByUser_" + addr) | |
230 | 230 | ||
231 | 231 | ||
232 | 232 | let acresStakdTotalKey = "acresStakedAmountTotal" | |
233 | 233 | ||
234 | 234 | let dapp2Rest = 0 | |
235 | 235 | ||
236 | 236 | let dapp2Staking = 1 | |
237 | 237 | ||
238 | 238 | let dapp2Wlg = 2 | |
239 | 239 | ||
240 | 240 | let dapp2Puzzle = 3 | |
241 | 241 | ||
242 | 242 | let dapp2InvestFund = 4 | |
243 | 243 | ||
244 | 244 | let levels = [10, 20, 40, 80, 150, 250, 400, 700, 1000] | |
245 | 245 | ||
246 | 246 | func getLevelByAcres (acres) = { | |
247 | 247 | let acr = (acres / M8_) | |
248 | 248 | func checker (acc,item) = if ((item > acr)) | |
249 | 249 | then acc | |
250 | 250 | else (acc + 1) | |
251 | 251 | ||
252 | 252 | let idx = { | |
253 | 253 | let $l = levels | |
254 | 254 | let $s = size($l) | |
255 | 255 | let $acc0 = 0 | |
256 | 256 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
257 | 257 | then $a | |
258 | 258 | else checker($a, $l[$i]) | |
259 | 259 | ||
260 | 260 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
261 | 261 | then $a | |
262 | 262 | else throw("List size exceeds 10") | |
263 | 263 | ||
264 | 264 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
265 | 265 | } | |
266 | 266 | (idx + 1) | |
267 | 267 | } | |
268 | 268 | ||
269 | 269 | ||
270 | 270 | func getFarmingPowerByAcres (acres) = ((acres * 20) * (getLevelByAcres(acres) + 4)) | |
271 | 271 | ||
272 | 272 | ||
273 | 273 | func getFarmingPowers (userAddrStrOrEmpty,stakingContract) = { | |
274 | 274 | let totalAcres = valueOrElse(getInteger(stakingContract, acresStakdTotalKey), 0) | |
275 | 275 | let totalFP = getFarmingPowerByAcres(totalAcres) | |
276 | 276 | let userAcres = valueOrElse(getInteger(stakingContract, keyAcresStakedAmtByUser(userAddrStrOrEmpty)), 0) | |
277 | 277 | let userFP = getFarmingPowerByAcres(userAcres) | |
278 | 278 | [totalFP, userFP] | |
279 | 279 | } | |
280 | 280 | ||
281 | 281 | ||
282 | 282 | let idxTotalFP = 0 | |
283 | 283 | ||
284 | 284 | let idxUserFP = 1 | |
285 | 285 | ||
286 | 286 | let ixWlgAmount = 0 | |
287 | 287 | ||
288 | 288 | let ixWlgPrice = 1 | |
289 | 289 | ||
290 | 290 | let ixWlgFunds = 2 | |
291 | 291 | ||
292 | 292 | let ixWlgIssueTime = 6 | |
293 | 293 | ||
294 | 294 | let ixWlgTeamAmLeft = 9 | |
295 | 295 | ||
296 | 296 | let ixWlgTeamAmAvailNow = 10 | |
297 | 297 | ||
298 | 298 | let ixWlgActAmLeft = 13 | |
299 | 299 | ||
300 | 300 | let ixWlgActAmAvailNow = 14 | |
301 | 301 | ||
302 | 302 | let ixWlgAmLeftTotal = 17 | |
303 | 303 | ||
304 | 304 | let ixWlgUserAmAvailNow = 21 | |
305 | 305 | ||
306 | 306 | let ixWlgEffUserTime = 22 | |
307 | 307 | ||
308 | 308 | func getWlgStats2 (userAddrOpt,contracts,usdtId,usdtBalanceCorrection) = { | |
309 | 309 | let issuedAmount = valueOrErrorMessage(getInteger(contracts[dapp2Wlg], wlgIssuedAmtKey), "WLGOLD is not issued yet") | |
310 | 310 | let restUsd = assetBalance(contracts[dapp2Rest], usdtId) | |
311 | 311 | let wlgUsd = (assetBalance(contracts[dapp2Wlg], usdtId) - usdtBalanceCorrection) | |
312 | 312 | let puzzleUsd = assetBalance(contracts[dapp2Puzzle], usdtId) | |
313 | 313 | let investFndContract = contracts[dapp2InvestFund] | |
314 | 314 | let investFundTotal = (assetBalance(investFndContract, usdtId) + valueOrElse(getInteger(investFndContract, zbIssuedAmtKey), 0)) | |
315 | 315 | let totalFundsUsd = (wlgUsd + investFundTotal) | |
316 | 316 | let wlgId = valueOrErrorMessage(getBinary(contracts[dapp2Wlg], "wlg_assetId"), "Not initialized yet") | |
317 | 317 | let now = lastBlock.timestamp | |
318 | 318 | let issueTime = valueOrErrorMessage(getInteger(contracts[dapp2Wlg], wlgIssueTimKey), "Not initialized") | |
319 | 319 | let teamTotal = fraction(MILL6, TEAM_SHARE, M6_) | |
320 | 320 | let teamAmountLeft = valueOrElse(getInteger(contracts[dapp2Wlg], teamAmtLeftKey), teamTotal) | |
321 | 321 | let lastTeamTime = valueOrElse(getInteger(contracts[dapp2Wlg], lastTeamTimKey), issueTime) | |
322 | 322 | let teamAddr = addressFromStringValue(value(getString(contracts[dapp2Wlg], teamAdrKey))) | |
323 | 323 | let teamAmountAvailableNow = min([fraction(teamTotal, (now - lastTeamTime), (3 * YEAR_MILLIS)), teamAmountLeft]) | |
324 | 324 | let teamWlgold = assetBalance(teamAddr, wlgId) | |
325 | 325 | let actTotal = fraction(MILL6, ACTIVITY_SHARE, M6_) | |
326 | 326 | let actAmountLeft = valueOrElse(getInteger(contracts[dapp2Wlg], actAmtLeftKey), actTotal) | |
327 | 327 | let lastActivitiesTime = valueOrElse(getInteger(contracts[dapp2Wlg], lastActivitiesTimKey), issueTime) | |
328 | 328 | let actAmountAvailableNow = min([fraction(actTotal, (now - lastActivitiesTime), (3 * YEAR_MILLIS)), actAmountLeft]) | |
329 | 329 | let actWlgold = assetBalance(contracts[dapp2Rest], wlgId) | |
330 | 330 | let lastUserTime = valueOrElse(getInteger(contracts[dapp2Wlg], keyLastClaimTimeByUser(userAddrOpt)), issueTime) | |
331 | 331 | let lastUserPeriod = ((lastUserTime - issueTime) / YEAR_MILLIS) | |
332 | 332 | let nowLimited = min([now, (issueTime + (3 * YEAR_MILLIS))]) | |
333 | 333 | let curPeriod = min([((now - issueTime) / YEAR_MILLIS), 2]) | |
334 | 334 | let eff = getFarmingPowers(userAddrOpt, contracts[dapp2Staking]) | |
335 | 335 | let curPeriodDistribution = distrByPeriod(curPeriod) | |
336 | 336 | let $t079142 = if ((lastUserPeriod == curPeriod)) | |
337 | 337 | then { | |
338 | 338 | let a0 = fraction(curPeriodDistribution, (nowLimited - lastUserTime), YEAR_MILLIS) | |
339 | 339 | let effTime = ((lastUserTime + nowLimited) - lastUserTime) | |
340 | 340 | $Tuple2(a0, effTime) | |
341 | 341 | } | |
342 | 342 | else if ((lastUserPeriod == (curPeriod - 1))) | |
343 | 343 | then { | |
344 | 344 | let a1 = fraction(distrByPeriod((curPeriod - 1)), ((issueTime + (YEAR_MILLIS * curPeriod)) - lastUserTime), YEAR_MILLIS) | |
345 | 345 | let a0 = fraction(curPeriodDistribution, (nowLimited - (issueTime + (YEAR_MILLIS * curPeriod))), YEAR_MILLIS) | |
346 | 346 | let avail = (a1 + a0) | |
347 | 347 | let effTime = if ((a1 >= avail)) | |
348 | 348 | then (lastUserTime + fraction(YEAR_MILLIS, avail, distrByPeriod((curPeriod - 1)))) | |
349 | 349 | else ((issueTime + (YEAR_MILLIS * curPeriod)) + fraction(YEAR_MILLIS, (avail - a1), curPeriodDistribution)) | |
350 | 350 | $Tuple2(avail, effTime) | |
351 | 351 | } | |
352 | 352 | else { | |
353 | 353 | let a2 = fraction(distrByPeriod((curPeriod - 2)), ((issueTime + (YEAR_MILLIS * (curPeriod - 1))) - lastUserTime), YEAR_MILLIS) | |
354 | 354 | let a1 = distrByPeriod((curPeriod - 1)) | |
355 | 355 | let a0 = fraction(curPeriodDistribution, (nowLimited - (issueTime + (YEAR_MILLIS * curPeriod))), YEAR_MILLIS) | |
356 | 356 | let avail = ((a2 + a1) + a0) | |
357 | 357 | let effTime = if ((a2 >= avail)) | |
358 | 358 | then (lastUserTime + fraction(YEAR_MILLIS, avail, distrByPeriod((curPeriod - 2)))) | |
359 | 359 | else if (((a2 + a1) >= avail)) | |
360 | 360 | then ((issueTime + (YEAR_MILLIS * (curPeriod - 1))) + fraction(YEAR_MILLIS, (avail - a2), distrByPeriod((curPeriod - 1)))) | |
361 | 361 | else ((issueTime + (YEAR_MILLIS * curPeriod)) + fraction(YEAR_MILLIS, ((avail - a2) - a1), curPeriodDistribution)) | |
362 | 362 | $Tuple2(avail, effTime) | |
363 | 363 | } | |
364 | 364 | let userAvailable = $t079142._1 | |
365 | 365 | let effLastTime = $t079142._2 | |
366 | 366 | let amountLeftTotal = valueOrElse(getInteger(contracts[dapp2Wlg], stakersAmtLeftKey), 0) | |
367 | - | let unrobbedUser = fraction(userAvailable, eff[idxUserFP], eff[idxTotalFP]) | |
367 | + | let unrobbedUser = if ((eff[idxTotalFP] != 0)) | |
368 | + | then fraction(userAvailable, eff[idxUserFP], eff[idxTotalFP]) | |
369 | + | else 0 | |
368 | 370 | [issuedAmount, fraction((totalFundsUsd - USDT_TVL_CORR), M8_, issuedAmount), totalFundsUsd, restUsd, wlgUsd, puzzleUsd, issueTime, lastTeamTime, teamTotal, teamAmountLeft, teamAmountAvailableNow, teamWlgold, actTotal, actAmountLeft, actAmountAvailableNow, actWlgold, curPeriod, amountLeftTotal, curPeriodDistribution, lastUserTime, investFundTotal, unrobbedUser, effLastTime] | |
369 | 371 | } | |
370 | 372 | ||
371 | 373 | ||
372 | 374 | let net = take(drop(this.bytes, 1), 1) | |
373 | 375 | ||
374 | 376 | let defaultRest2AddressStr = match net { | |
375 | 377 | case _ => | |
376 | 378 | if ((base58'2W' == $match0)) | |
377 | 379 | then "3PFwYta8biEz31zpeFe5DJK8wE5trSpQVF8" | |
378 | 380 | else if ((base58'2T' == $match0)) | |
379 | 381 | then "3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv" | |
380 | 382 | else throw("Unknown chain") | |
381 | 383 | } | |
382 | 384 | ||
383 | 385 | let profitAddrKey = "profitAddr" | |
384 | 386 | ||
385 | 387 | let stakersAmountPaidTotalKey = "stakersAmountPaidTotal" | |
386 | 388 | ||
387 | 389 | func keyStakersAmountPaidUser (addr) = ("stakersAmountPaidUser_" + addr) | |
388 | 390 | ||
389 | 391 | ||
390 | 392 | let rest2Contract = addressFromStringValue(valueOrElse(getString(this, keyRest2Address()), defaultRest2AddressStr)) | |
391 | 393 | ||
392 | 394 | let acres2Contract = addressFromStringValue(acres2AddressStr) | |
393 | 395 | ||
394 | 396 | func prolog2 () = asInt(reentrantInvoke(acres2Contract, "saveLastTx", nil, nil)) | |
395 | 397 | ||
396 | 398 | ||
397 | 399 | func getSwapLimitWlg (addr) = { | |
398 | 400 | let lastTime = valueOrElse(getInteger(keyLastArbTimeByUser(addr)), 0) | |
399 | 401 | let now = lastBlock.timestamp | |
400 | 402 | if ((arbitrageDelay > (now - lastTime))) | |
401 | 403 | then throw((("Arbitrages are possible once a " + toString((arbitrageDelay / 60000))) + "min")) | |
402 | 404 | else valueOrElse(getInteger(acres2Contract, keyAcresStakedAmountByUser(addr)), 0) | |
403 | 405 | } | |
404 | 406 | ||
405 | 407 | ||
406 | 408 | func claimInternal2 (addr) = { | |
407 | 409 | let caller = addressFromStringValue(addr) | |
408 | 410 | let curStats = getWlgStats2(addr, [rest2Contract, acres2Contract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0) | |
409 | 411 | let now = lastBlock.timestamp | |
410 | 412 | let issueTime = curStats[ixWlgIssueTime] | |
411 | 413 | let teamAmountLeft = curStats[ixWlgTeamAmLeft] | |
412 | 414 | let teamAmount = curStats[ixWlgTeamAmAvailNow] | |
413 | 415 | let actAmountLeft = curStats[ixWlgActAmLeft] | |
414 | 416 | let actAmount = curStats[ixWlgActAmAvailNow] | |
415 | 417 | let userAmount = curStats[ixWlgUserAmAvailNow] | |
416 | 418 | let userKey = keyStakersAmountPaidUser(addr) | |
417 | 419 | let userTotal = curStats[ixWlgUserAmAvailNow] | |
418 | 420 | let userEffTime = curStats[ixWlgEffUserTime] | |
419 | 421 | $Tuple2([ScriptTransfer(addressFromStringValue(value(getString(teamAddrKey))), teamAmount, wlgAssetId), ScriptTransfer(restContract, actAmount, wlgAssetId), IntegerEntry(userKey, (valueOrElse(getInteger(userKey), 0) + userAmount)), IntegerEntry(stakersAmountPaidTotalKey, (valueOrElse(getInteger(stakersAmountPaidTotalKey), 0) + userTotal)), IntegerEntry(stakersAmountLeftKey, (curStats[ixWlgAmLeftTotal] - userTotal)), IntegerEntry(teamAmountLeftKey, (teamAmountLeft - teamAmount)), IntegerEntry(lastTeamTimeKey, now), IntegerEntry(actAmountLeftKey, (actAmountLeft - actAmount)), IntegerEntry(lastActivitiesTimeKey, now), IntegerEntry(keyLastClaimedTimeByUser(addr), userEffTime)], userAmount) | |
420 | 422 | } | |
421 | 423 | ||
422 | 424 | ||
423 | 425 | func takeXpInternal (addr,delta) = { | |
424 | 426 | let now = lastBlock.timestamp | |
425 | 427 | let timeKey = keyWlgStakedTimeByUser(addr) | |
426 | 428 | let amountKey = keyWlgStakedAmountByUser(addr) | |
427 | 429 | let lastTime = valueOrElse(getInteger(timeKey), 0) | |
428 | 430 | let oldUser = valueOrElse(getInteger(amountKey), 0) | |
429 | 431 | let oldTotal = valueOrElse(getInteger(wlgStakedTotalKey), 0) | |
430 | 432 | let xp = fraction(fraction(xpWlg, oldUser, wlgBaseAmountXp), (lastTime - now), DAYMILLIS) | |
431 | 433 | $Tuple3([IntegerEntry(timeKey, now), IntegerEntry(amountKey, (oldUser + delta)), IntegerEntry(wlgStakedTotalKey, (oldTotal + delta))], xp, oldUser) | |
432 | 434 | } | |
433 | 435 | ||
434 | 436 | ||
435 | 437 | @Callable(i) | |
436 | 438 | func constructorV1 (restAddr,marketingAddr,teamAddr,profitAddr) = if ((i.caller != this)) | |
437 | 439 | then throw("Permission denied") | |
438 | 440 | else if (isDefined(getBinary(wlgAssetIdKey))) | |
439 | 441 | then throw("Already initialized") | |
440 | 442 | else { | |
441 | 443 | let issuedAmount = MILLION6 | |
442 | 444 | let issue = Issue("WLGOLD", "WavesLands Gold investment token", issuedAmount, 8, true, unit, 0) | |
443 | 445 | let assetId = calculateAssetId(issue) | |
444 | 446 | [issue, IntegerEntry(wlgIssueTimeKey, lastBlock.timestamp), IntegerEntry(wlgIssuedAmountKey, issuedAmount), IntegerEntry(stakersAmountPaidTotalKey, 0), IntegerEntry(stakersAmountLeftKey, fraction(MILLION6, PLAYERSHARE, MULT6)), BinaryEntry(wlgAssetIdKey, assetId), StringEntry(keyRestAddress(), restAddr), StringEntry(teamAddrKey, teamAddr), StringEntry(profitAddrKey, profitAddr)] | |
445 | 447 | } | |
446 | 448 | ||
447 | 449 | ||
448 | 450 | ||
449 | 451 | @Callable(i) | |
450 | 452 | func constructorV2 (rest2Addr) = if ((i.caller != this)) | |
451 | 453 | then throw("Permission denied") | |
452 | 454 | else [StringEntry(keyRest2Address(), rest2Addr)] | |
453 | 455 | ||
454 | 456 | ||
455 | 457 | ||
456 | 458 | @Callable(i) | |
457 | 459 | func buyWlg (minAmount) = { | |
458 | 460 | let prologResult = prolog2() | |
459 | 461 | if ((prologResult == prologResult)) | |
460 | 462 | then if ((size(i.payments) != 1)) | |
461 | 463 | then throw("exactly 1 payment must be attached") | |
462 | 464 | else { | |
463 | 465 | let pmt = i.payments[0] | |
464 | 466 | let usdtAmt = pmt.amount | |
465 | 467 | if (if (!(isDefined(pmt.assetId))) | |
466 | 468 | then true | |
467 | 469 | else (value(pmt.assetId) != usdtAssetId)) | |
468 | 470 | then throw("USDT payments only!") | |
469 | 471 | else { | |
470 | 472 | let caller = i.caller | |
471 | 473 | let addr = toString(caller) | |
472 | 474 | if ((MINSHOPPAYMENT > usdtAmt)) | |
473 | 475 | then throw((("You can trade min " + fixedPoint(MINSHOPPAYMENT, 6)) + " USDT")) | |
474 | 476 | else { | |
475 | 477 | let curStats = getWlgStats2("", [rest2Contract, acres2Contract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, usdtAmt) | |
476 | 478 | let curWlgAmount = curStats[ixWlgAmount] | |
477 | 479 | let fundsUsd = curStats[ixWlgFunds] | |
478 | 480 | let wlgPrice = fraction(fundsUsd, MULT8, curWlgAmount) | |
479 | 481 | let buyPrice = fraction(wlgPrice, 6, 5) | |
480 | 482 | let wlgAmount = fraction(usdtAmt, MULT8, buyPrice) | |
481 | 483 | let maxWlg = getSwapLimitWlg(addr) | |
482 | 484 | if ((wlgAmount > maxWlg)) | |
483 | 485 | then throw((("You can get max " + fixedPoint(maxWlg, 8)) + " WLGOLD")) | |
484 | 486 | else if ((minAmount > wlgAmount)) | |
485 | 487 | then throw("Price changed during operation, please try again") | |
486 | 488 | else { | |
487 | 489 | let profitAmount = (usdtAmt / 6) | |
488 | 490 | let deltaFunds = (usdtAmt - profitAmount) | |
489 | 491 | let reissued = fraction(curWlgAmount, deltaFunds, fundsUsd) | |
490 | 492 | $Tuple2([Reissue(wlgAssetId, reissued, true), IntegerEntry(wlgIssuedAmountKey, (curWlgAmount + reissued)), IntegerEntry(keyLastArbTimeByUser(addr), lastBlock.timestamp), ScriptTransfer(addressFromStringValue(value(getString(profitAddrKey))), profitAmount, usdtAssetId), ScriptTransfer(caller, wlgAmount, wlgAssetId)], prologResult) | |
491 | 493 | } | |
492 | 494 | } | |
493 | 495 | } | |
494 | 496 | } | |
495 | 497 | else throw("Strict value is not equal to itself.") | |
496 | 498 | } | |
497 | 499 | ||
498 | 500 | ||
499 | 501 | ||
500 | 502 | @Callable(i) | |
501 | 503 | func sellWlg (minAmount) = { | |
502 | 504 | let prologResult = prolog2() | |
503 | 505 | if ((prologResult == prologResult)) | |
504 | 506 | then if ((size(i.payments) != 1)) | |
505 | 507 | then throw("exactly 1 payment must be attached") | |
506 | 508 | else { | |
507 | 509 | let pmt = i.payments[0] | |
508 | 510 | let wlgAmt = pmt.amount | |
509 | 511 | let caller = i.caller | |
510 | 512 | let addr = toString(caller) | |
511 | 513 | let maxWlg = getSwapLimitWlg(addr) | |
512 | 514 | if ((wlgAmt > maxWlg)) | |
513 | 515 | then throw((("You can spend max " + fixedPoint(maxWlg, 8)) + " WLGOLD")) | |
514 | 516 | else if (if (!(isDefined(pmt.assetId))) | |
515 | 517 | then true | |
516 | 518 | else (value(pmt.assetId) != wlgAssetId)) | |
517 | 519 | then throw("WLGOLD payments only!") | |
518 | 520 | else { | |
519 | 521 | let curStats = getWlgStats2("", [rest2Contract, acres2Contract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0) | |
520 | 522 | let curWlgAmount = curStats[ixWlgAmount] | |
521 | 523 | let sellPrice = fraction(curStats[ixWlgPrice], 4, 5) | |
522 | 524 | let usdtAmt = fraction(wlgAmt, sellPrice, MULT8) | |
523 | 525 | if ((MINSHOPPAYMENT > usdtAmt)) | |
524 | 526 | then throw((("You can trade min " + fixedPoint(MINSHOPPAYMENT, 6)) + " USDT")) | |
525 | 527 | else if ((minAmount > usdtAmt)) | |
526 | 528 | then throw("Price changed during operation, please try again") | |
527 | 529 | else { | |
528 | 530 | let profitAmount = (usdtAmt / 4) | |
529 | 531 | $Tuple2([Burn(wlgAssetId, wlgAmt), IntegerEntry(wlgIssuedAmountKey, (curWlgAmount - wlgAmt)), IntegerEntry(keyLastArbTimeByUser(addr), lastBlock.timestamp), ScriptTransfer(addressFromStringValue(value(getString(profitAddrKey))), profitAmount, usdtAssetId), ScriptTransfer(caller, usdtAmt, usdtAssetId)], prologResult) | |
530 | 532 | } | |
531 | 533 | } | |
532 | 534 | } | |
533 | 535 | else throw("Strict value is not equal to itself.") | |
534 | 536 | } | |
535 | 537 | ||
536 | 538 | ||
537 | 539 | ||
538 | 540 | @Callable(i) | |
539 | 541 | func claim () = { | |
540 | 542 | let prologResult = prolog2() | |
541 | 543 | if ((prologResult == prologResult)) | |
542 | 544 | then if ((size(i.payments) != 0)) | |
543 | 545 | then throw("No payments required") | |
544 | 546 | else { | |
545 | 547 | let r = claimInternal2(toString(i.caller)) | |
546 | 548 | let actions = r._1 | |
547 | 549 | $Tuple2((actions :+ ScriptTransfer(i.caller, r._2, wlgAssetId)), prologResult) | |
548 | 550 | } | |
549 | 551 | else throw("Strict value is not equal to itself.") | |
550 | 552 | } | |
551 | 553 | ||
552 | 554 | ||
553 | 555 | ||
554 | 556 | @Callable(i) | |
555 | 557 | func onStakeUnstakeLand (addr) = if (if (if ((i.caller != stakingContract)) | |
556 | 558 | then (i.caller != acresContract) | |
557 | 559 | else false) | |
558 | 560 | then (i.caller != acres2Contract) | |
559 | 561 | else false) | |
560 | 562 | then throw("Permission denied") | |
561 | 563 | else { | |
562 | 564 | let $t01083810892 = claimInternal2(addr) | |
563 | 565 | let actions = $t01083810892._1 | |
564 | 566 | let wlgClaimedAmount = $t01083810892._2 | |
565 | 567 | $Tuple2((actions :+ ScriptTransfer(addressFromStringValue(addr), wlgClaimedAmount, wlgAssetId)), wlgClaimedAmount) | |
566 | 568 | } | |
567 | 569 | ||
568 | 570 | ||
569 | 571 | ||
570 | 572 | @Callable(i) | |
571 | 573 | func burnWlgold () = if ((i.caller != acres2Contract)) | |
572 | 574 | then throw("Permission denied") | |
573 | 575 | else { | |
574 | 576 | let wlgAmt = i.payments[0].amount | |
575 | 577 | let curStats = getWlgStats2("", [rest2Contract, acres2Contract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0) | |
576 | 578 | let wlgAmountLeft = (curStats[ixWlgAmount] - wlgAmt) | |
577 | 579 | $Tuple2([Burn(wlgAssetId, wlgAmt), IntegerEntry(wlgIssuedAmountKey, wlgAmountLeft)], wlgAmountLeft) | |
578 | 580 | } | |
579 | 581 | ||
580 | 582 | ||
581 | 583 | ||
582 | 584 | @Callable(i) | |
583 | 585 | func takeWlgXp (addr) = if ((i.caller != stakingContract)) | |
584 | 586 | then throw("Permission denied") | |
585 | 587 | else { | |
586 | 588 | let $t01316313206 = takeXpInternal(addr, 0) | |
587 | 589 | let actions = $t01316313206._1 | |
588 | 590 | let xp = $t01316313206._2 | |
589 | 591 | $Tuple2(actions, xp) | |
590 | 592 | } | |
591 | 593 | ||
592 | 594 | ||
593 | 595 | ||
594 | 596 | @Callable(i) | |
595 | 597 | func checkWlgXpREADONLY (addr) = { | |
596 | 598 | let $t01328313331 = takeXpInternal(addr, 0) | |
597 | 599 | let ignored = $t01328313331._1 | |
598 | 600 | let deltaXP = $t01328313331._2 | |
599 | 601 | let newXP = (valueOrElse(getInteger(stakingContract, keyUserXP(addr)), 0) + deltaXP) | |
600 | 602 | let lvlPoints = levelUp(valueOrElse(getInteger(stakingContract, keyUserLevel(addr)), 0), newXP) | |
601 | 603 | $Tuple2(nil, (lvlPoints :+ newXP)) | |
602 | 604 | } | |
603 | 605 | ||
604 | 606 |
github/deemru/w8io/169f3d6 232.61 ms ◑