tx · 29kLyGqKGF54HV98QuddhUWmpRnPVGDxkPJCeYVMoHhT

3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy:  -0.01700000 Waves

2023.09.07 19:14 [2745197] smart account 3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy > SELF 0.00000000 Waves

{ "type": 13, "id": "29kLyGqKGF54HV98QuddhUWmpRnPVGDxkPJCeYVMoHhT", "fee": 1700000, "feeAssetId": null, "timestamp": 1694103340544, "version": 2, "chainId": 84, "sender": "3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy", "senderPublicKey": "FsR18761ZAsUqsTd7TK3XmR6bhihs1UXVmpHYxz5JzQ1", "proofs": [ "3qwAhk5WiW4WqL48uERTXVth7bhYoaKJwkkzMBoJXufkQ1sgTevbA8jZ16BYYFZfamEteECdVkk1FuBbWZKes1cx" ], "script": "base64:BgIiCAISBgoECAgICBIDCgEBEgMKAQESABIDCgEIEgUKAwgIAVYAAk02AMCEPQACTTgAgMLXLwAITUlMTElPTjYAgIDpg7HeFgAOTUFSS0VUSU5HU0hBUkUAoI0GAAlURUFNU0hBUkUAwJoMAA1BQ1RJVklUWVNIQVJFAKCNBgALUExBWUVSU0hBUkUAgLUYAApZRUFSTUlMTElTAICG68d1AAlDSEVDS1RJTUUAgMngq7ABAANEQVkAgLiZKQAQbWFya2V0aW5nQWRkcktleQINbWFya2V0aW5nQWRkcgALdGVhbUFkZHJLZXkCCHRlYW1BZGRyABRsYXN0TWFya2V0aW5nVGltZUtleQIZbGFzdENsYWltZWRUaW1lX21hcmtldGluZwAWbWFya2V0aW5nQW1vdW50TGVmdEtleQITbWFya2V0aW5nQW1vdW50TGVmdAAPbGFzdFRlYW1UaW1lS2V5AhRsYXN0Q2xhaW1lZFRpbWVfdGVhbQARdGVhbUFtb3VudExlZnRLZXkCDnRlYW1BbW91bnRMZWZ0ABVsYXN0QWN0aXZpdGllc1RpbWVLZXkCGmxhc3RDbGFpbWVkVGltZV9hY3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m9wb3J0aW9uNgkAlAoCCQDNCAIIBQFyAl8xCQEOU2NyaXB0VHJhbnNmZXIDCQERQGV4dHJOYXRpdmUoMTA2MikBBQZyb2JiZXIJAGUCCAgFAXICXzICXzIICAUBcgJfMgJfMQUKd2xnQXNzZXRJZAgFAXICXzIA4mQOig==", "height": 2745197, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2N8dgcbk4scJ8RiCvtRv9S5wD7C8wgyXfvRYovmWqLwU Next: 9VQuDGFLUrBnd7APVrPU87TzweDG9s16mdxpEYBkoRwF Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let M6 = 1000000
55
66 let M8 = 100000000
77
88 let MILLION6 = 100000000000000
99
1010 let MARKETINGSHARE = 100000
1111
1212 let TEAMSHARE = 200000
1313
1414 let ACTIVITYSHARE = 100000
1515
1616 let PLAYERSHARE = 400000
1717
1818 let YEARMILLIS = 31557600000
1919
2020 let CHECKTIME = 47336400000
2121
2222 let DAY = 86400000
2323
2424 let marketingAddrKey = "marketingAddr"
2525
2626 let teamAddrKey = "teamAddr"
2727
2828 let lastMarketingTimeKey = "lastClaimedTime_marketing"
2929
3030 let marketingAmountLeftKey = "marketingAmountLeft"
3131
3232 let lastTeamTimeKey = "lastClaimedTime_team"
3333
3434 let teamAmountLeftKey = "teamAmountLeft"
3535
3636 let lastActivitiesTimeKey = "lastClaimedTime_activities"
3737
3838 let actAmountLeftKey = "activitiesAmountLeft"
3939
4040 let stakersAmountLeftKey = "stakersAmountLeft"
4141
4242 func keyLastClaimedTimeByUser (addr) = ("lastClaimedTimeUser_" + addr)
4343
4444
4545 func keyLastArbTimeByUser (addr) = ("lastArbTimeUser_" + addr)
4646
4747
4848 func distributionByPeriod (period) = fraction(MILLION6, (PLAYERSHARE * (period + 1)), (6 * M6))
4949
5050
5151 let wlgIssueTimeKey = "wlg_issueTime"
5252
5353 let wlgIssuedAmountKey = "wlg_issuedAmount"
5454
5555 let zbIssuedAmountKey = "zbill_issuedAmount"
5656
5757 let idxWlgAmount = 0
5858
5959 let idxWlgPrice = 1
6060
6161 let idxWlgFunds = 2
6262
6363 let idxWlgIssueTime = 7
6464
6565 let idxWlgMarketingAmLeft = 10
6666
6767 let idxWlgMarketingAmAvailNow = 11
6868
6969 let idxWlgTeamAmLeft = 14
7070
7171 let idxWlgTeamAmAvailNow = 15
7272
7373 let idxWlgActAmLeft = 18
7474
7575 let idxWlgActAmAvailNow = 19
7676
7777 let idxWlgAmLeftTotal = 22
7878
7979 let idxWlgUserAmAvailNow = 25
8080
8181 let idxWlgUserTotalAvail = 28
8282
8383 let idxWlgEffUserTime = 29
8484
8585 let dappRest = 0
8686
8787 let dappStaking = 1
8888
8989 let dappEconomy = 2
9090
9191 let dappWlg = 3
9292
9393 let dappPuzzle = 4
9494
9595 let dappInvestFund = 5
9696
9797 func getPieces (userAddrStrOrEmpty,stakingContract) = {
9898 let props = split(valueOrElse(getString(stakingContract, "resTypesProportions"), "0_0_0_0_0_0"), "_")
9999 func adder (acc,item) = (acc + parseIntValue(item))
100100
101101 let totalPower = {
102102 let $l = props
103103 let $s = size($l)
104104 let $acc0 = 0
105105 func $f0_1 ($a,$i) = if (($i >= $s))
106106 then $a
107107 else adder($a, $l[$i])
108108
109109 func $f0_2 ($a,$i) = if (($i >= $s))
110110 then $a
111111 else throw("List size exceeds 6")
112112
113113 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
114114 }
115115 let usersPower = valueOrElse(getInteger(stakingContract, ("stakedPiecesByOwner_" + userAddrStrOrEmpty)), 0)
116116 [totalPower, usersPower]
117117 }
118118
119119
120120 func getWlgStats (userAddrOpt,contracts,usdtId,usdtBalanceCorrection,userProportion6) = {
121121 let issuedAmount = valueOrErrorMessage(getInteger(contracts[dappWlg], wlgIssuedAmountKey), "WLGOLD is not issued yet")
122122 let economyUsd = assetBalance(contracts[dappEconomy], usdtId)
123123 let restUsd = assetBalance(contracts[dappRest], usdtId)
124124 let wlgUsd = (assetBalance(contracts[dappWlg], usdtId) - usdtBalanceCorrection)
125125 let puzzleUsd = assetBalance(contracts[dappPuzzle], usdtId)
126126 let investFundContract = contracts[dappInvestFund]
127127 let investFundTotal = (assetBalance(investFundContract, usdtId) + valueOrElse(getInteger(investFundContract, zbIssuedAmountKey), 0))
128128 let totalFundsUsd = ((economyUsd + wlgUsd) + investFundTotal)
129129 let wlgId = valueOrErrorMessage(getBinary(contracts[dappWlg], "wlg_assetId"), "Not initialized yet")
130130 let now = lastBlock.timestamp
131131 let issueTime = valueOrErrorMessage(getInteger(contracts[dappWlg], wlgIssueTimeKey), "Not initialized")
132132 let marketingTotal = fraction(MILLION6, MARKETINGSHARE, M6)
133133 let marketingAmountLeft = valueOrElse(getInteger(contracts[dappWlg], marketingAmountLeftKey), marketingTotal)
134134 let lastMarketingTime = valueOrElse(getInteger(contracts[dappWlg], lastMarketingTimeKey), issueTime)
135135 let marketingAddr = addressFromStringValue(value(getString(contracts[dappWlg], marketingAddrKey)))
136136 let marketingAmountAvailableNow = min([fraction(marketingTotal, (now - lastMarketingTime), YEARMILLIS), marketingAmountLeft])
137137 let marketingWlgold = assetBalance(marketingAddr, wlgId)
138138 let teamTotal = fraction(MILLION6, TEAMSHARE, M6)
139139 let teamAmountLeft = valueOrElse(getInteger(contracts[dappWlg], teamAmountLeftKey), teamTotal)
140140 let lastTeamTime = valueOrElse(getInteger(contracts[dappWlg], lastTeamTimeKey), issueTime)
141141 let teamAddr = addressFromStringValue(value(getString(contracts[dappWlg], teamAddrKey)))
142142 let teamAmountAvailableNow = min([fraction(teamTotal, (now - lastTeamTime), (3 * YEARMILLIS)), teamAmountLeft])
143143 let teamWlgold = assetBalance(teamAddr, wlgId)
144144 let actTotal = fraction(MILLION6, ACTIVITYSHARE, M6)
145145 let actAmountLeft = valueOrElse(getInteger(contracts[dappWlg], actAmountLeftKey), actTotal)
146146 let lastActivitiesTime = valueOrElse(getInteger(contracts[dappWlg], lastActivitiesTimeKey), issueTime)
147147 let actAmountAvailableNow = min([fraction(actTotal, (now - lastActivitiesTime), (3 * YEARMILLIS)), actAmountLeft])
148148 let actWlgold = assetBalance(contracts[dappRest], wlgId)
149149 let lastUserTime = valueOrElse(getInteger(contracts[dappWlg], keyLastClaimedTimeByUser(userAddrOpt)), issueTime)
150150 let lastUserPeriod = ((lastUserTime - issueTime) / YEARMILLIS)
151151 let nowLimited = min([now, (issueTime + (3 * YEARMILLIS))])
152152 let curPeriod = min([((now - issueTime) / YEARMILLIS), 2])
153153 let eff = getPieces(userAddrOpt, contracts[dappStaking])
154154 let curPeriodDistribution = distributionByPeriod(curPeriod)
155155 let $t079142 = if ((lastUserPeriod == curPeriod))
156156 then {
157157 let a0 = fraction(curPeriodDistribution, (nowLimited - lastUserTime), YEARMILLIS)
158158 let userPart = fraction(a0, userProportion6, M6)
159159 let effTime = (lastUserTime + fraction((nowLimited - lastUserTime), userProportion6, M6))
160160 $Tuple3(userPart, a0, effTime)
161161 }
162162 else if ((lastUserPeriod == (curPeriod - 1)))
163163 then {
164164 let a1 = fraction(distributionByPeriod((curPeriod - 1)), ((issueTime + (YEARMILLIS * curPeriod)) - lastUserTime), YEARMILLIS)
165165 let a0 = fraction(curPeriodDistribution, (nowLimited - (issueTime + (YEARMILLIS * curPeriod))), YEARMILLIS)
166166 let avail = (a1 + a0)
167167 let userPart = fraction(avail, userProportion6, M6)
168168 let effTime = if ((a1 >= userPart))
169169 then (lastUserTime + fraction(YEARMILLIS, userPart, distributionByPeriod((curPeriod - 1))))
170170 else ((issueTime + (YEARMILLIS * curPeriod)) + fraction(YEARMILLIS, (userPart - a1), curPeriodDistribution))
171171 $Tuple3(userPart, avail, effTime)
172172 }
173173 else {
174174 let a2 = fraction(distributionByPeriod((curPeriod - 2)), ((issueTime + (YEARMILLIS * (curPeriod - 1))) - lastUserTime), YEARMILLIS)
175175 let a1 = distributionByPeriod((curPeriod - 1))
176176 let a0 = fraction(curPeriodDistribution, (nowLimited - (issueTime + (YEARMILLIS * curPeriod))), YEARMILLIS)
177177 let avail = ((a2 + a1) + a0)
178178 let userPart = fraction(avail, userProportion6, M6)
179179 let effTime = if ((a2 >= userPart))
180180 then (lastUserTime + fraction(YEARMILLIS, userPart, distributionByPeriod((curPeriod - 2))))
181181 else if (((a2 + a1) >= userPart))
182182 then ((issueTime + (YEARMILLIS * (curPeriod - 1))) + fraction(YEARMILLIS, (userPart - a2), distributionByPeriod((curPeriod - 1))))
183183 else ((issueTime + (YEARMILLIS * curPeriod)) + fraction(YEARMILLIS, ((userPart - a2) - a1), curPeriodDistribution))
184184 $Tuple3(userPart, avail, effTime)
185185 }
186186 let userAmount = $t079142._1
187187 let userAvailable = $t079142._2
188188 let effLastTime = $t079142._3
189189 let sLandDailyAmount = fraction(fraction(curPeriodDistribution, DAY, YEARMILLIS), 25, eff[0])
190190 let amountLeftTotal = valueOrElse(getInteger(contracts[dappWlg], stakersAmountLeftKey), 0)
191191 [issuedAmount, fraction(totalFundsUsd, M8, issuedAmount), totalFundsUsd, economyUsd, restUsd, wlgUsd, puzzleUsd, issueTime, lastMarketingTime, marketingTotal, marketingAmountLeft, marketingAmountAvailableNow, marketingWlgold, teamTotal, teamAmountLeft, teamAmountAvailableNow, teamWlgold, actTotal, actAmountLeft, actAmountAvailableNow, actWlgold, curPeriod, amountLeftTotal, curPeriodDistribution, lastUserTime, fraction(userAmount, eff[1], eff[0]), sLandDailyAmount, investFundTotal, fraction(userAvailable, eff[1], eff[0]), effLastTime]
192192 }
193193
194194
195195 let chain = take(drop(this.bytes, 1), 1)
196196
197197 let usdtAssetId = match chain {
198198 case _ =>
199199 if ((base58'2W' == $match0))
200200 then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi'
201201 else if ((base58'2T' == $match0))
202202 then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63'
203203 else throw("Unknown chain")
204204 }
205205
206206 let defaultRestAddressStr = match chain {
207207 case _ =>
208208 if ((base58'2W' == $match0))
209209 then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv"
210210 else if ((base58'2T' == $match0))
211211 then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy"
212212 else throw("Unknown chain")
213213 }
214214
215215 let arbitrageDelay = match chain {
216216 case _ =>
217217 if ((base58'2W' == $match0))
218218 then 86400000
219219 else if ((base58'2T' == $match0))
220220 then 60000
221221 else throw("Unknown chain")
222222 }
223223
224224 let SEP = "__"
225225
226226 let MULT6 = 1000000
227227
228228 let MULT8 = 100000000
229229
230230 let MINSHOPPAYMENT = 100000
231231
232232 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
233233
234234
235235 let IdxCfgStakingDapp = 1
236236
237237 let IdxCfgEconomyDapp = 2
238238
239239 let IdxCfgWlgDapp = 4
240240
241241 let IdxCfgPuzzlePoolDapp = 5
242242
243243 let IdxCfgInvestFundDapp = 6
244244
245245 func keyRestCfg () = "%s__restConfig"
246246
247247
248248 func keyRestAddress () = "%s__restAddr"
249249
250250
251251 func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP)
252252
253253
254254 func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx)))
255255
256256
257257 let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr))
258258
259259 let restCfg = readRestCfgOrFail(restContract)
260260
261261 let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp)
262262
263263 let economyContract = getContractAddressOrFail(restCfg, IdxCfgEconomyDapp)
264264
265265 let wlgContract = getContractAddressOrFail(restCfg, IdxCfgWlgDapp)
266266
267267 let puzzlePoolContract = getContractAddressOrFail(restCfg, IdxCfgPuzzlePoolDapp)
268268
269269 let investFundContract = getContractAddressOrFail(restCfg, IdxCfgInvestFundDapp)
270270
271271 let wlgAssetIdKey = "wlg_assetId"
272272
273273 let wlgAssetId = valueOrErrorMessage(getBinary(wlgContract, wlgAssetIdKey), "Not initialized yet")
274274
275275 let IdxEffUser = 1
276276
277277 func keyResProportions () = "resTypesProportions"
278278
279279
280280 func keyStakedPiecesByOwner (ownerAddr) = ("stakedPiecesByOwner_" + ownerAddr)
281281
282282
283283 func asInt (v) = match v {
284284 case n: Int =>
285285 n
286286 case _ =>
287287 throw("fail to cast into Int")
288288 }
289289
290290
291291 func getVotingPower (userAddrStrOrEmpty) = {
292292 let props = split(valueOrElse(getString(stakingContract, keyResProportions()), "0_0_0_0_0_0"), "_")
293293 func adder (acc,item) = (acc + parseIntValue(item))
294294
295295 let totalPower = {
296296 let $l = props
297297 let $s = size($l)
298298 let $acc0 = 0
299299 func $f0_1 ($a,$i) = if (($i >= $s))
300300 then $a
301301 else adder($a, $l[$i])
302302
303303 func $f0_2 ($a,$i) = if (($i >= $s))
304304 then $a
305305 else throw("List size exceeds 6")
306306
307307 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
308308 }
309309 let usersPower = valueOrElse(getInteger(stakingContract, keyStakedPiecesByOwner(userAddrStrOrEmpty)), 0)
310310 [totalPower, usersPower]
311311 }
312312
313313
314314 func fixedPoint (val,decimals) = {
315315 let tenPow = pow(10, 0, decimals, 0, 0, DOWN)
316316 let lowPart = toString((val % tenPow))
317317 let zeroes = drop(toString(tenPow), (1 + size(lowPart)))
318318 (((toString((val / tenPow)) + ".") + zeroes) + lowPart)
319319 }
320320
321321
322322 let profitAddrKey = "profitAddr"
323323
324324 let stakersAmountPaidTotalKey = "stakersAmountPaidTotal"
325325
326326 func keyStakersAmountPaidUser (addr) = ("stakersAmountPaidUser_" + addr)
327327
328328
329329 func prolog () = asInt(invoke(stakingContract, "saveLastTx", nil, nil))
330330
331331
332332 func getSwapLimitWlg (addr) = {
333333 let lastTime = valueOrElse(getInteger(keyLastArbTimeByUser(addr)), 0)
334334 let now = lastBlock.timestamp
335335 if ((arbitrageDelay > (now - lastTime)))
336336 then throw((("Arbitrages are possible once a " + toString((arbitrageDelay / 60000))) + "min"))
337337 else {
338338 let pieces = getVotingPower(addr)[IdxEffUser]
339339 (pieces * MULT8)
340340 }
341341 }
342342
343343
344344 func claimInternal (addr,proportion6) = {
345345 let caller = addressFromStringValue(addr)
346346 let curStats = getWlgStats(addr, [restContract, stakingContract, economyContract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0, proportion6)
347347 let now = lastBlock.timestamp
348348 let issueTime = curStats[idxWlgIssueTime]
349349 let marketingAmountLeft = curStats[idxWlgMarketingAmLeft]
350350 let marketingAmount = curStats[idxWlgMarketingAmAvailNow]
351351 let teamAmountLeft = curStats[idxWlgTeamAmLeft]
352352 let teamAmount = curStats[idxWlgTeamAmAvailNow]
353353 let actAmountLeft = curStats[idxWlgActAmLeft]
354354 let actAmount = curStats[idxWlgActAmAvailNow]
355355 if (((now - issueTime) > CHECKTIME))
356356 then throw("Please modify contract for next 1.5 years, according to stats")
357357 else {
358358 let userAmount = curStats[idxWlgUserAmAvailNow]
359359 let userKey = keyStakersAmountPaidUser(addr)
360360 let userTotal = curStats[idxWlgUserTotalAvail]
361361 let userEffTime = curStats[idxWlgEffUserTime]
362362 $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, userTotal))
363363 }
364364 }
365365
366366
367367 @Callable(i)
368368 func constructorV1 (restAddr,marketingAddr,teamAddr,profitAddr) = if ((i.caller != this))
369369 then throw("Permission denied")
370370 else if (isDefined(getBinary(wlgAssetIdKey)))
371371 then throw("Already initialized")
372372 else {
373373 let issuedAmount = MILLION6
374374 let issue = Issue("WLGOLD", "WavesLands Gold investment token", issuedAmount, 8, true, unit, 0)
375375 let assetId = calculateAssetId(issue)
376376 [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)]
377377 }
378378
379379
380380
381381 @Callable(i)
382382 func buyWlg (minAmount) = {
383383 let prologResult = prolog()
384384 if ((size(i.payments) != 1))
385385 then throw("exactly 1 payment must be attached")
386386 else {
387387 let pmt = i.payments[0]
388388 let usdtAmt = pmt.amount
389389 let pmtAssetId = valueOrErrorMessage(pmt.assetId, "USDT payments only!")
390390 if ((pmtAssetId != usdtAssetId))
391391 then throw("USDT payments only!")
392392 else {
393393 let caller = i.caller
394394 let addr = toString(caller)
395395 if ((MINSHOPPAYMENT > usdtAmt))
396396 then throw((("You can trade min " + fixedPoint(MINSHOPPAYMENT, 6)) + " USDT"))
397397 else {
398398 let curStats = getWlgStats("", [restContract, stakingContract, economyContract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, usdtAmt, MULT6)
399399 let curWlgAmount = curStats[idxWlgAmount]
400400 let fundsUsd = curStats[idxWlgFunds]
401401 let wlgPrice = fraction(fundsUsd, MULT8, curWlgAmount)
402402 let buyPrice = fraction(wlgPrice, 6, 5)
403403 let wlgAmount = fraction(usdtAmt, MULT8, buyPrice)
404404 let maxWlg = getSwapLimitWlg(addr)
405405 if ((wlgAmount > maxWlg))
406406 then throw((("You can get max " + fixedPoint(maxWlg, 8)) + " WLGOLD"))
407407 else if ((minAmount > wlgAmount))
408408 then throw("Price changed during operation, please try again")
409409 else {
410410 let profitAmount = (usdtAmt / 6)
411411 let deltaFunds = (usdtAmt - profitAmount)
412412 let reissued = fraction(curWlgAmount, deltaFunds, fundsUsd)
413413 $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)
414414 }
415415 }
416416 }
417417 }
418418 }
419419
420420
421421
422422 @Callable(i)
423423 func sellWlg (minAmount) = {
424424 let prologResult = prolog()
425425 if ((size(i.payments) != 1))
426426 then throw("exactly 1 payment must be attached")
427427 else {
428428 let pmt = i.payments[0]
429429 let wlgAmt = pmt.amount
430430 let caller = i.caller
431431 let addr = toString(caller)
432432 let maxWlg = getSwapLimitWlg(addr)
433433 if ((wlgAmt > maxWlg))
434434 then throw((("You can spend max " + fixedPoint(maxWlg, 8)) + " WLGOLD"))
435435 else {
436436 let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WLGOLD payments only!")
437437 if ((pmtAssetId != wlgAssetId))
438438 then throw("WLGOLD payments only!")
439439 else {
440440 let curStats = getWlgStats("", [restContract, stakingContract, economyContract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0, MULT6)
441441 let curWlgAmount = curStats[idxWlgAmount]
442442 let sellPrice = fraction(curStats[idxWlgPrice], 4, 5)
443443 let usdtAmt = fraction(wlgAmt, sellPrice, MULT8)
444444 if ((MINSHOPPAYMENT > usdtAmt))
445445 then throw((("You can trade min " + fixedPoint(MINSHOPPAYMENT, 6)) + " USDT"))
446446 else if ((minAmount > usdtAmt))
447447 then throw("Price changed during operation, please try again")
448448 else {
449449 let profitAmount = (usdtAmt / 4)
450450 let burned = fraction((usdtAmt + profitAmount), curWlgAmount, curStats[idxWlgFunds])
451451 $Tuple2([Burn(wlgAssetId, burned), IntegerEntry(wlgIssuedAmountKey, (curWlgAmount - burned)), IntegerEntry(keyLastArbTimeByUser(addr), lastBlock.timestamp), ScriptTransfer(addressFromStringValue(value(getString(profitAddrKey))), profitAmount, usdtAssetId), ScriptTransfer(caller, usdtAmt, usdtAssetId)], prologResult)
452452 }
453453 }
454454 }
455455 }
456456 }
457457
458458
459459
460460 @Callable(i)
461461 func claim () = {
462462 let prologResult = prolog()
463463 if ((size(i.payments) != 0))
464464 then throw("No payments required")
465465 else {
466466 let r = claimInternal(toString(i.caller), MULT6)
467467 let actions = r._1
468468 $Tuple2((actions :+ ScriptTransfer(i.caller, r._2._1, wlgAssetId)), prologResult)
469469 }
470470 }
471471
472472
473473
474474 @Callable(i)
475475 func onStakeUnstakeLand (addr) = if ((i.caller != stakingContract))
476476 then throw("Permission denied")
477477 else {
478478 let r = claimInternal(addr, MULT6)
479479 let actions = r._1
480480 $Tuple2((actions :+ ScriptTransfer(i.caller, r._2._1, wlgAssetId)), r._2)
481481 }
482482
483483
484484
485485 @Callable(i)
486486 func claimRob (owner,robber,ownerProportion6) = if ((i.caller != stakingContract))
487487 then throw("Permission denied")
488488 else {
489489 let r = claimInternal(owner, ownerProportion6)
490490 $Tuple2((r._1 :+ ScriptTransfer(addressFromStringValue(robber), (r._2._2 - r._2._1), wlgAssetId)), r._2)
491491 }
492492
493493

github/deemru/w8io/026f985 
49.86 ms