tx · 5eTMVtCYSrwvhFganzLDzpJPPP6PpvjvD6D7VZEP15GY 3NCGjbgqZVk7eaqrLMEnEnqRhozNm1KTG5z: -0.01600000 Waves 2024.09.01 21:13 [3264839] smart account 3NCGjbgqZVk7eaqrLMEnEnqRhozNm1KTG5z > SELF 0.00000000 Waves
{ "type": 13, "id": "5eTMVtCYSrwvhFganzLDzpJPPP6PpvjvD6D7VZEP15GY", "fee": 1600000, "feeAssetId": null, "timestamp": 1725214401813, "version": 2, "chainId": 84, "sender": "3NCGjbgqZVk7eaqrLMEnEnqRhozNm1KTG5z", "senderPublicKey": "5CoDbXxoqnvJpx9GrS6M4G5GYJXh9rcoiXJz7RYTPVkL", "proofs": [ "4Nbi9JmhsdKsB9E1BvvvD15vRTXdHToJqjGBQfseLnZ2na3EfL9sqhePufxH3h6ABcHySMSpRX4w6b1aYSUnEpqM" ], "script": "base64:BgIbCAISBgoECAgICBIDCgEBEgMKAQESABIDCgEIVgADU0VQAgJfXwAFTVVMVDYAwIQ9AAVNVUxUOACAwtcvAA5NSU5TSE9QUEFZTUVOVACgjQYACkRBWV9NSUxMSVMAgLiZKQAFY2hhaW4JAMkBAgkAygECCAUEdGhpcwVieXRlcwABAAEAC3VzZHRBc3NldElkBAckbWF0Y2gwBQVjaGFpbgMJAAACAQFXBQckbWF0Y2gwASCE2nqyCAM/TtG7yo7ui5O8yYLdC136B5ao1CP5qA//uQMJAAACAQFUBQckbWF0Y2gwASBVsdifcoeC7+XjW42sBatl3ppDoS8WuwXzGreHpfHFGAkAAgECDVVua25vd24gY2hhaW4AFWRlZmF1bHRSZXN0QWRkcmVzc1N0cgQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMAIFM1AuLi4DCQAAAgEBVAUHJG1hdGNoMAIFM00uLi4JAAIBAg1Vbmtub3duIGNoYWluAA5hcmJpdHJhZ2VEZWxheQQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMAUKREFZX01JTExJUw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cgJfMQkAlAoCCQDNCAIJAM0IAgUHYWN0aW9ucwkBDlNjcmlwdFRyYW5zZmVyAwkBEUBleHRyTmF0aXZlKDEwNjIpAQUEYWRkcggIBQFyAl8yAl8xBQp3bGdBc3NldElkCQEOU2NyaXB0VHJhbnNmZXIDBQ9zdGFraW5nQ29udHJhY3QICAUBcgJfMgJfMgUKd2xnQXNzZXRJZAgFAXICXzIAGx+2ZQ==", "height": 3264839, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: CsvaN7nd1PhE4TZyprVtGKPsbQaM1mcC8tET4Yho4UmT 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 MULT6 = 1000000 | |
7 | + | ||
8 | + | let MULT8 = 100000000 | |
9 | + | ||
10 | + | let MINSHOPPAYMENT = 100000 | |
11 | + | ||
12 | + | let DAY_MILLIS = 86400000 | |
13 | + | ||
14 | + | let chain = take(drop(this.bytes, 1), 1) | |
15 | + | ||
16 | + | let usdtAssetId = match chain { | |
17 | + | case _ => | |
18 | + | if ((base58'2W' == $match0)) | |
19 | + | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
20 | + | else if ((base58'2T' == $match0)) | |
21 | + | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
22 | + | else throw("Unknown chain") | |
23 | + | } | |
24 | + | ||
25 | + | let defaultRestAddressStr = match chain { | |
26 | + | case _ => | |
27 | + | if ((base58'2W' == $match0)) | |
28 | + | then "3P..." | |
29 | + | else if ((base58'2T' == $match0)) | |
30 | + | then "3M..." | |
31 | + | else throw("Unknown chain") | |
32 | + | } | |
33 | + | ||
34 | + | let arbitrageDelay = match chain { | |
35 | + | case _ => | |
36 | + | if ((base58'2W' == $match0)) | |
37 | + | then DAY_MILLIS | |
38 | + | else if ((base58'2T' == $match0)) | |
39 | + | then 60000 | |
40 | + | else throw("Unknown chain") | |
41 | + | } | |
42 | + | ||
43 | + | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
44 | + | ||
45 | + | ||
46 | + | let IdxCfgAcresDapp = 1 | |
47 | + | ||
48 | + | let IdxCfgWlgDapp = 2 | |
49 | + | ||
50 | + | let IdxCfgPuzzlePoolDapp = 4 | |
51 | + | ||
52 | + | let IdxCfgInvestFundDapp = 5 | |
53 | + | ||
54 | + | func keyRestCfg () = "%s__restConfig" | |
55 | + | ||
56 | + | ||
57 | + | func keyRestAddress () = "%s__restAddr" | |
58 | + | ||
59 | + | ||
60 | + | func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP) | |
61 | + | ||
62 | + | ||
63 | + | func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx))) | |
64 | + | ||
65 | + | ||
66 | + | let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr)) | |
67 | + | ||
68 | + | let restCfg = readRestCfgOrFail(restContract) | |
69 | + | ||
70 | + | let stakingContract = getContractAddressOrFail(restCfg, IdxCfgAcresDapp) | |
71 | + | ||
72 | + | let wlgContract = getContractAddressOrFail(restCfg, IdxCfgWlgDapp) | |
73 | + | ||
74 | + | let puzzlePoolContract = getContractAddressOrFail(restCfg, IdxCfgPuzzlePoolDapp) | |
75 | + | ||
76 | + | let investFundContract = getContractAddressOrFail(restCfg, IdxCfgInvestFundDapp) | |
77 | + | ||
78 | + | let wlgAssetIdKey = "wlg_assetId" | |
79 | + | ||
80 | + | let wlgAssetId = valueOrErrorMessage(getBinary(wlgContract, wlgAssetIdKey), "WLGOLD is not issued yet") | |
81 | + | ||
82 | + | func asInt (v) = match v { | |
83 | + | case n: Int => | |
84 | + | n | |
85 | + | case _ => | |
86 | + | throw("fail to cast into Int") | |
87 | + | } | |
88 | + | ||
89 | + | ||
90 | + | let idxWlgAmount = 0 | |
91 | + | ||
92 | + | let idxWlgPrice = 1 | |
93 | + | ||
94 | + | let idxWlgFunds = 2 | |
95 | + | ||
96 | + | let idxWlgIssueTime = 6 | |
97 | + | ||
98 | + | let idxWlgMarketingAmLeft = 9 | |
99 | + | ||
100 | + | let idxWlgMarketingAmAvailNow = 10 | |
101 | + | ||
102 | + | let idxWlgTeamAmLeft = 13 | |
103 | + | ||
104 | + | let idxWlgTeamAmAvailNow = 14 | |
105 | + | ||
106 | + | let idxWlgActAmLeft = 17 | |
107 | + | ||
108 | + | let idxWlgActAmAvailNow = 18 | |
109 | + | ||
110 | + | let idxWlgAmLeftTotal = 21 | |
111 | + | ||
112 | + | let idxWlgUserAmAvailNow = 24 | |
113 | + | ||
114 | + | let idxWlgUserTotalAvail = 26 | |
115 | + | ||
116 | + | let idxWlgEffUserTime = 27 | |
117 | + | ||
118 | + | let idxWlgBankAvailNow = 28 | |
119 | + | ||
120 | + | func fixedPoint (val,decimals) = { | |
121 | + | let tenPow = pow(10, 0, decimals, 0, 0, DOWN) | |
122 | + | let lowPart = toString((val % tenPow)) | |
123 | + | let zeroes = drop(toString(tenPow), (1 + size(lowPart))) | |
124 | + | (((toString((val / tenPow)) + ".") + zeroes) + lowPart) | |
125 | + | } | |
126 | + | ||
127 | + | ||
128 | + | let M6 = 1000000 | |
129 | + | ||
130 | + | let M8 = 100000000 | |
131 | + | ||
132 | + | let MILLION6 = 100000000000000 | |
133 | + | ||
134 | + | let MARKETINGSHARE = 100000 | |
135 | + | ||
136 | + | let TEAMSHARE = 200000 | |
137 | + | ||
138 | + | let ACTIVITYSHARE = 100000 | |
139 | + | ||
140 | + | let PLAYERSHARE = 400000 | |
141 | + | ||
142 | + | let YEARMILLIS = 31557600000 | |
143 | + | ||
144 | + | let BANK_FEE = 50000 | |
145 | + | ||
146 | + | let ch = take(drop(this.bytes, 1), 1) | |
147 | + | ||
148 | + | let USDT_TVL_CORRECTION = match ch { | |
149 | + | case _ => | |
150 | + | if ((base58'2W' == $match0)) | |
151 | + | then 1208630000 | |
152 | + | else if ((base58'2T' == $match0)) | |
153 | + | then 0 | |
154 | + | else throw("Unknown chain") | |
155 | + | } | |
156 | + | ||
157 | + | let marketingAddrKey = "marketingAddr" | |
158 | + | ||
159 | + | let teamAddrKey = "teamAddr" | |
160 | + | ||
161 | + | let lastMarketingTimeKey = "lastClaimedTime_marketing" | |
162 | + | ||
163 | + | let marketingAmountLeftKey = "marketingAmountLeft" | |
164 | + | ||
165 | + | let lastTeamTimeKey = "lastClaimedTime_team" | |
166 | + | ||
167 | + | let teamAmountLeftKey = "teamAmountLeft" | |
168 | + | ||
169 | + | let lastActivitiesTimeKey = "lastClaimedTime_activities" | |
170 | + | ||
171 | + | let actAmountLeftKey = "activitiesAmountLeft" | |
172 | + | ||
173 | + | let stakersAmountLeftKey = "stakersAmountLeft" | |
174 | + | ||
175 | + | func keyLastClaimedTimeByUser (addr) = ("lastClaimedTimeUser_" + addr) | |
176 | + | ||
177 | + | ||
178 | + | func keyLastArbTimeByUser (addr) = ("lastArbTimeUser_" + addr) | |
179 | + | ||
180 | + | ||
181 | + | func distributionByPeriod (period) = fraction(MILLION6, (PLAYERSHARE * (period + 1)), (6 * M6)) | |
182 | + | ||
183 | + | ||
184 | + | let wlgIssueTimeKey = "wlg_issueTime" | |
185 | + | ||
186 | + | let wlgIssuedAmountKey = "wlg_issuedAmount" | |
187 | + | ||
188 | + | let zbIssuedAmountKey = "zbill_issuedAmount" | |
189 | + | ||
190 | + | func keyAcresStakedAmountByUser (addr) = ("acresStakedAmountByUser_" + addr) | |
191 | + | ||
192 | + | ||
193 | + | let acresStakedTotalKey = "acresStakedAmountTotal" | |
194 | + | ||
195 | + | let dappRest = 0 | |
196 | + | ||
197 | + | let dappStaking = 1 | |
198 | + | ||
199 | + | let dappWlg = 2 | |
200 | + | ||
201 | + | let dappPuzzle = 3 | |
202 | + | ||
203 | + | let dappInvestFund = 4 | |
204 | + | ||
205 | + | func getLands (userAddrStrOrEmpty,stakingContract) = { | |
206 | + | let totalAcres = valueOrElse(getInteger(stakingContract, acresStakedTotalKey), 0) | |
207 | + | let userAcres = valueOrElse(getInteger(stakingContract, keyAcresStakedAmountByUser(userAddrStrOrEmpty)), 0) | |
208 | + | [totalAcres, userAcres] | |
209 | + | } | |
210 | + | ||
211 | + | ||
212 | + | let idxTotalAcres = 0 | |
213 | + | ||
214 | + | let idxUserAcres = 1 | |
215 | + | ||
216 | + | func getWlgStats (userAddrOpt,contracts,usdtId,usdtBalanceCorrection,userProportion6) = { | |
217 | + | let issuedAmount = valueOrErrorMessage(getInteger(contracts[dappWlg], wlgIssuedAmountKey), "WLGOLD is not issued yet") | |
218 | + | let restUsd = assetBalance(contracts[dappRest], usdtId) | |
219 | + | let wlgUsd = (assetBalance(contracts[dappWlg], usdtId) - usdtBalanceCorrection) | |
220 | + | let puzzleUsd = assetBalance(contracts[dappPuzzle], usdtId) | |
221 | + | let investFndContract = contracts[dappInvestFund] | |
222 | + | let investFundTotal = (assetBalance(investFndContract, usdtId) + valueOrElse(getInteger(investFndContract, zbIssuedAmountKey), 0)) | |
223 | + | let totalFundsUsd = (wlgUsd + investFundTotal) | |
224 | + | let wlgId = valueOrErrorMessage(getBinary(contracts[dappWlg], "wlg_assetId"), "Not initialized yet") | |
225 | + | let now = lastBlock.timestamp | |
226 | + | let issueTime = valueOrErrorMessage(getInteger(contracts[dappWlg], wlgIssueTimeKey), "Not initialized") | |
227 | + | let marketingTotal = fraction(MILLION6, MARKETINGSHARE, M6) | |
228 | + | let marketingAmountLeft = valueOrElse(getInteger(contracts[dappWlg], marketingAmountLeftKey), marketingTotal) | |
229 | + | let lastMarketingTime = valueOrElse(getInteger(contracts[dappWlg], lastMarketingTimeKey), issueTime) | |
230 | + | let marketingAddr = addressFromStringValue(value(getString(contracts[dappWlg], marketingAddrKey))) | |
231 | + | let marketingTemp = min([fraction(marketingTotal, (now - lastMarketingTime), YEARMILLIS), marketingAmountLeft]) | |
232 | + | let bankFromMarketing = fraction(marketingTemp, BANK_FEE, M6) | |
233 | + | let marketingAmountAvailableNow = (marketingTemp - bankFromMarketing) | |
234 | + | let marketingWlgold = assetBalance(marketingAddr, wlgId) | |
235 | + | let bankWlgold = assetBalance(contracts[dappStaking], wlgId) | |
236 | + | let teamTotal = fraction(MILLION6, TEAMSHARE, M6) | |
237 | + | let teamAmountLeft = valueOrElse(getInteger(contracts[dappWlg], teamAmountLeftKey), teamTotal) | |
238 | + | let lastTeamTime = valueOrElse(getInteger(contracts[dappWlg], lastTeamTimeKey), issueTime) | |
239 | + | let teamAddr = addressFromStringValue(value(getString(contracts[dappWlg], teamAddrKey))) | |
240 | + | let teamAmountAvailableNow = min([fraction(teamTotal, (now - lastTeamTime), (3 * YEARMILLIS)), teamAmountLeft]) | |
241 | + | let teamWlgold = assetBalance(teamAddr, wlgId) | |
242 | + | let actTotal = fraction(MILLION6, ACTIVITYSHARE, M6) | |
243 | + | let actAmountLeft = valueOrElse(getInteger(contracts[dappWlg], actAmountLeftKey), actTotal) | |
244 | + | let lastActivitiesTime = valueOrElse(getInteger(contracts[dappWlg], lastActivitiesTimeKey), issueTime) | |
245 | + | let actAmountAvailableNow = min([fraction(actTotal, (now - lastActivitiesTime), (3 * YEARMILLIS)), actAmountLeft]) | |
246 | + | let actWlgold = assetBalance(contracts[dappRest], wlgId) | |
247 | + | let lastUserTime = valueOrElse(getInteger(contracts[dappWlg], keyLastClaimedTimeByUser(userAddrOpt)), issueTime) | |
248 | + | let lastUserPeriod = ((lastUserTime - issueTime) / YEARMILLIS) | |
249 | + | let nowLimited = min([now, (issueTime + (3 * YEARMILLIS))]) | |
250 | + | let curPeriod = min([((now - issueTime) / YEARMILLIS), 2]) | |
251 | + | let eff = getLands(userAddrOpt, contracts[dappStaking]) | |
252 | + | let curPeriodDistribution = distributionByPeriod(curPeriod) | |
253 | + | let $t079119 = if ((lastUserPeriod == curPeriod)) | |
254 | + | then { | |
255 | + | let a0 = fraction(curPeriodDistribution, (nowLimited - lastUserTime), YEARMILLIS) | |
256 | + | let userPart = fraction(a0, userProportion6, M6) | |
257 | + | let effTime = (lastUserTime + fraction((nowLimited - lastUserTime), userProportion6, M6)) | |
258 | + | $Tuple3(userPart, a0, effTime) | |
259 | + | } | |
260 | + | else if ((lastUserPeriod == (curPeriod - 1))) | |
261 | + | then { | |
262 | + | let a1 = fraction(distributionByPeriod((curPeriod - 1)), ((issueTime + (YEARMILLIS * curPeriod)) - lastUserTime), YEARMILLIS) | |
263 | + | let a0 = fraction(curPeriodDistribution, (nowLimited - (issueTime + (YEARMILLIS * curPeriod))), YEARMILLIS) | |
264 | + | let avail = (a1 + a0) | |
265 | + | let userPart = fraction(avail, userProportion6, M6) | |
266 | + | let effTime = if ((a1 >= userPart)) | |
267 | + | then (lastUserTime + fraction(YEARMILLIS, userPart, distributionByPeriod((curPeriod - 1)))) | |
268 | + | else ((issueTime + (YEARMILLIS * curPeriod)) + fraction(YEARMILLIS, (userPart - a1), curPeriodDistribution)) | |
269 | + | $Tuple3(userPart, avail, effTime) | |
270 | + | } | |
271 | + | else { | |
272 | + | let a2 = fraction(distributionByPeriod((curPeriod - 2)), ((issueTime + (YEARMILLIS * (curPeriod - 1))) - lastUserTime), YEARMILLIS) | |
273 | + | let a1 = distributionByPeriod((curPeriod - 1)) | |
274 | + | let a0 = fraction(curPeriodDistribution, (nowLimited - (issueTime + (YEARMILLIS * curPeriod))), YEARMILLIS) | |
275 | + | let avail = ((a2 + a1) + a0) | |
276 | + | let userPart = fraction(avail, userProportion6, M6) | |
277 | + | let effTime = if ((a2 >= userPart)) | |
278 | + | then (lastUserTime + fraction(YEARMILLIS, userPart, distributionByPeriod((curPeriod - 2)))) | |
279 | + | else if (((a2 + a1) >= userPart)) | |
280 | + | then ((issueTime + (YEARMILLIS * (curPeriod - 1))) + fraction(YEARMILLIS, (userPart - a2), distributionByPeriod((curPeriod - 1)))) | |
281 | + | else ((issueTime + (YEARMILLIS * curPeriod)) + fraction(YEARMILLIS, ((userPart - a2) - a1), curPeriodDistribution)) | |
282 | + | $Tuple3(userPart, avail, effTime) | |
283 | + | } | |
284 | + | let userAmount = $t079119._1 | |
285 | + | let userAvailable = $t079119._2 | |
286 | + | let effLastTime = $t079119._3 | |
287 | + | let amountLeftTotal = valueOrElse(getInteger(contracts[dappWlg], stakersAmountLeftKey), 0) | |
288 | + | let userTemp = fraction(userAmount, eff[idxUserAcres], eff[idxTotalAcres]) | |
289 | + | let bankFromUser = fraction(userTemp, BANK_FEE, M6) | |
290 | + | let robbedUser = (userTemp - bankFromUser) | |
291 | + | let unrobbedUser = fraction(userAvailable, eff[idxUserAcres], eff[idxTotalAcres]) | |
292 | + | [issuedAmount, fraction((totalFundsUsd - USDT_TVL_CORRECTION), M8, issuedAmount), totalFundsUsd, restUsd, wlgUsd, puzzleUsd, issueTime, lastMarketingTime, marketingTotal, marketingAmountLeft, marketingAmountAvailableNow, marketingWlgold, teamTotal, teamAmountLeft, teamAmountAvailableNow, teamWlgold, actTotal, actAmountLeft, actAmountAvailableNow, actWlgold, curPeriod, amountLeftTotal, curPeriodDistribution, lastUserTime, robbedUser, investFundTotal, unrobbedUser, effLastTime, (bankFromMarketing + bankFromUser), bankWlgold] | |
293 | + | } | |
294 | + | ||
295 | + | ||
296 | + | let profitAddrKey = "profitAddr" | |
297 | + | ||
298 | + | let stakersAmountPaidTotalKey = "stakersAmountPaidTotal" | |
299 | + | ||
300 | + | func keyStakersAmountPaidUser (addr) = ("stakersAmountPaidUser_" + addr) | |
301 | + | ||
302 | + | ||
303 | + | func prolog () = asInt(reentrantInvoke(stakingContract, "saveLastTx", nil, nil)) | |
304 | + | ||
305 | + | ||
306 | + | func getSwapLimitWlg (addr) = { | |
307 | + | let lastTime = valueOrElse(getInteger(keyLastArbTimeByUser(addr)), 0) | |
308 | + | let now = lastBlock.timestamp | |
309 | + | if ((arbitrageDelay > (now - lastTime))) | |
310 | + | then throw((("Arbitrages are possible once a " + toString((arbitrageDelay / 60000))) + "min")) | |
311 | + | else { | |
312 | + | let acresAmount = valueOrElse(getInteger(stakingContract, keyAcresStakedAmountByUser(addr)), 0) | |
313 | + | acresAmount | |
314 | + | } | |
315 | + | } | |
316 | + | ||
317 | + | ||
318 | + | func claimInternal (addr,proportion6) = { | |
319 | + | let caller = addressFromStringValue(addr) | |
320 | + | let curStats = getWlgStats(addr, [restContract, stakingContract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0, proportion6) | |
321 | + | let now = lastBlock.timestamp | |
322 | + | let issueTime = curStats[idxWlgIssueTime] | |
323 | + | let marketingAmountLeft = curStats[idxWlgMarketingAmLeft] | |
324 | + | let marketingAmount = curStats[idxWlgMarketingAmAvailNow] | |
325 | + | let teamAmountLeft = curStats[idxWlgTeamAmLeft] | |
326 | + | let teamAmount = curStats[idxWlgTeamAmAvailNow] | |
327 | + | let actAmountLeft = curStats[idxWlgActAmLeft] | |
328 | + | let actAmount = curStats[idxWlgActAmAvailNow] | |
329 | + | let userAmount = curStats[idxWlgUserAmAvailNow] | |
330 | + | let userKey = keyStakersAmountPaidUser(addr) | |
331 | + | let userTotal = curStats[idxWlgUserTotalAvail] | |
332 | + | let userEffTime = curStats[idxWlgEffUserTime] | |
333 | + | let bankAmount = curStats[idxWlgBankAvailNow] | |
334 | + | $Tuple2([ScriptTransfer(addressFromStringValue(value(getString(marketingAddrKey))), marketingAmount, wlgAssetId), 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[idxWlgAmLeftTotal] - userTotal)), IntegerEntry(marketingAmountLeftKey, (marketingAmountLeft - marketingAmount)), IntegerEntry(lastMarketingTimeKey, now), IntegerEntry(teamAmountLeftKey, (teamAmountLeft - teamAmount)), IntegerEntry(lastTeamTimeKey, now), IntegerEntry(actAmountLeftKey, (actAmountLeft - actAmount)), IntegerEntry(lastActivitiesTimeKey, now), IntegerEntry(keyLastClaimedTimeByUser(addr), userEffTime)], $Tuple2(userAmount, bankAmount)) | |
335 | + | } | |
336 | + | ||
337 | + | ||
338 | + | @Callable(i) | |
339 | + | func constructorV1 (restAddr,marketingAddr,teamAddr,profitAddr) = if ((i.caller != this)) | |
340 | + | then throw("Permission denied") | |
341 | + | else if (isDefined(getBinary(wlgAssetIdKey))) | |
342 | + | then throw("Already initialized") | |
343 | + | else { | |
344 | + | let issuedAmount = MILLION6 | |
345 | + | let issue = Issue("WLGOLD", "WavesLands Gold investment token", issuedAmount, 8, true, unit, 0) | |
346 | + | let assetId = calculateAssetId(issue) | |
347 | + | [issue, IntegerEntry(wlgIssueTimeKey, lastBlock.timestamp), IntegerEntry(wlgIssuedAmountKey, issuedAmount), IntegerEntry(stakersAmountPaidTotalKey, 0), IntegerEntry(stakersAmountLeftKey, fraction(MILLION6, PLAYERSHARE, MULT6)), BinaryEntry(wlgAssetIdKey, assetId), StringEntry(keyRestAddress(), restAddr), StringEntry(marketingAddrKey, marketingAddr), StringEntry(teamAddrKey, teamAddr), StringEntry(profitAddrKey, profitAddr)] | |
348 | + | } | |
349 | + | ||
350 | + | ||
351 | + | ||
352 | + | @Callable(i) | |
353 | + | func buyWlg (minAmount) = { | |
354 | + | let prologResult = prolog() | |
355 | + | if ((prologResult == prologResult)) | |
356 | + | then if ((size(i.payments) != 1)) | |
357 | + | then throw("exactly 1 payment must be attached") | |
358 | + | else { | |
359 | + | let pmt = i.payments[0] | |
360 | + | let usdtAmt = pmt.amount | |
361 | + | if (if (!(isDefined(pmt.assetId))) | |
362 | + | then true | |
363 | + | else (value(pmt.assetId) != usdtAssetId)) | |
364 | + | then throw("USDT payments only!") | |
365 | + | else { | |
366 | + | let caller = i.caller | |
367 | + | let addr = toString(caller) | |
368 | + | if ((MINSHOPPAYMENT > usdtAmt)) | |
369 | + | then throw((("You can trade min " + fixedPoint(MINSHOPPAYMENT, 6)) + " USDT")) | |
370 | + | else { | |
371 | + | let curStats = getWlgStats("", [restContract, stakingContract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, usdtAmt, MULT6) | |
372 | + | let curWlgAmount = curStats[idxWlgAmount] | |
373 | + | let fundsUsd = curStats[idxWlgFunds] | |
374 | + | let wlgPrice = fraction(fundsUsd, MULT8, curWlgAmount) | |
375 | + | let buyPrice = fraction(wlgPrice, 6, 5) | |
376 | + | let wlgAmount = fraction(usdtAmt, MULT8, buyPrice) | |
377 | + | let maxWlg = getSwapLimitWlg(addr) | |
378 | + | if ((wlgAmount > maxWlg)) | |
379 | + | then throw((("You can get max " + fixedPoint(maxWlg, 8)) + " WLGOLD")) | |
380 | + | else if ((minAmount > wlgAmount)) | |
381 | + | then throw("Price changed during operation, please try again") | |
382 | + | else { | |
383 | + | let profitAmount = (usdtAmt / 6) | |
384 | + | let deltaFunds = (usdtAmt - profitAmount) | |
385 | + | let reissued = fraction(curWlgAmount, deltaFunds, fundsUsd) | |
386 | + | $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) | |
387 | + | } | |
388 | + | } | |
389 | + | } | |
390 | + | } | |
391 | + | else throw("Strict value is not equal to itself.") | |
392 | + | } | |
393 | + | ||
394 | + | ||
395 | + | ||
396 | + | @Callable(i) | |
397 | + | func sellWlg (minAmount) = { | |
398 | + | let prologResult = prolog() | |
399 | + | if ((prologResult == prologResult)) | |
400 | + | then if ((size(i.payments) != 1)) | |
401 | + | then throw("exactly 1 payment must be attached") | |
402 | + | else { | |
403 | + | let pmt = i.payments[0] | |
404 | + | let wlgAmt = pmt.amount | |
405 | + | let caller = i.caller | |
406 | + | let addr = toString(caller) | |
407 | + | let maxWlg = getSwapLimitWlg(addr) | |
408 | + | if ((wlgAmt > maxWlg)) | |
409 | + | then throw((("You can spend max " + fixedPoint(maxWlg, 8)) + " WLGOLD")) | |
410 | + | else if (if (!(isDefined(pmt.assetId))) | |
411 | + | then true | |
412 | + | else (value(pmt.assetId) != wlgAssetId)) | |
413 | + | then throw("WLGOLD payments only!") | |
414 | + | else { | |
415 | + | let curStats = getWlgStats("", [restContract, stakingContract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0, MULT6) | |
416 | + | let curWlgAmount = curStats[idxWlgAmount] | |
417 | + | let sellPrice = fraction(curStats[idxWlgPrice], 4, 5) | |
418 | + | let usdtAmt = fraction(wlgAmt, sellPrice, MULT8) | |
419 | + | if ((MINSHOPPAYMENT > usdtAmt)) | |
420 | + | then throw((("You can trade min " + fixedPoint(MINSHOPPAYMENT, 6)) + " USDT")) | |
421 | + | else if ((minAmount > usdtAmt)) | |
422 | + | then throw("Price changed during operation, please try again") | |
423 | + | else { | |
424 | + | let profitAmount = (usdtAmt / 4) | |
425 | + | $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) | |
426 | + | } | |
427 | + | } | |
428 | + | } | |
429 | + | else throw("Strict value is not equal to itself.") | |
430 | + | } | |
431 | + | ||
432 | + | ||
433 | + | ||
434 | + | @Callable(i) | |
435 | + | func claim () = { | |
436 | + | let prologResult = prolog() | |
437 | + | if ((prologResult == prologResult)) | |
438 | + | then if ((size(i.payments) != 0)) | |
439 | + | then throw("No payments required") | |
440 | + | else { | |
441 | + | let r = claimInternal(toString(i.caller), MULT6) | |
442 | + | let actions = r._1 | |
443 | + | $Tuple2(((actions :+ ScriptTransfer(i.caller, r._2._1, wlgAssetId)) :+ ScriptTransfer(stakingContract, r._2._2, wlgAssetId)), prologResult) | |
444 | + | } | |
445 | + | else throw("Strict value is not equal to itself.") | |
446 | + | } | |
447 | + | ||
448 | + | ||
449 | + | ||
450 | + | @Callable(i) | |
451 | + | func onStakeUnstakeLand (addr) = if ((i.caller != stakingContract)) | |
452 | + | then throw("Permission denied") | |
453 | + | else { | |
454 | + | let r = claimInternal(addr, MULT6) | |
455 | + | let actions = r._1 | |
456 | + | $Tuple2(((actions :+ ScriptTransfer(addressFromStringValue(addr), r._2._1, wlgAssetId)) :+ ScriptTransfer(stakingContract, r._2._2, wlgAssetId)), r._2) | |
457 | + | } | |
458 | + | ||
459 | + |
github/deemru/w8io/169f3d6 36.40 ms ◑