tx · DF52xJm5AuQYyAk7Un1sthMcPYNCprLbw2XkVAapD9RU

3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy:  -0.01600000 Waves

2023.08.26 19:18 [2727852] smart account 3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy > SELF 0.00000000 Waves

{ "type": 13, "id": "DF52xJm5AuQYyAk7Un1sthMcPYNCprLbw2XkVAapD9RU", "fee": 1600000, "feeAssetId": null, "timestamp": 1693066683567, "version": 2, "chainId": 84, "sender": "3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy", "senderPublicKey": "FsR18761ZAsUqsTd7TK3XmR6bhihs1UXVmpHYxz5JzQ1", "proofs": [ "4cneYhRK4nZWZFuzUnMQykTQjm6VrksAAWAEYd6qk7UTmeARSUEa97sf4sA9H7vEmHfXVg3DVfPKms2AzXmH5hB2" ], "script": "base64:BgIiCAISBgoECAgICBIDCgEBEgMKAQESABIDCgEIEgUKAwgIAVYAAk02AMCEPQACTTgAgMLXLwAITUlMTElPTjYAgIDpg7HeFgAOTUFSS0VUSU5HU0hBUkUAoI0GAAlURUFNU0hBUkUAwJoMAA1BQ1RJVklUWVNIQVJFAKCNBgALUExBWUVSU0hBUkUAgLUYAApZRUFSTUlMTElTAICG68d1AAlDSEVDS1RJTUUAgMngq7ABAANEQVkAgLiZKQAQbWFya2V0aW5nQWRkcktleQINbWFya2V0aW5nQWRkcgALdGVhbUFkZHJLZXkCCHRlYW1BZGRyABRsYXN0TWFya2V0aW5nVGltZUtleQIZbGFzdENsYWltZWRUaW1lX21hcmtldGluZwAWbWFya2V0aW5nQW1vdW50TGVmdEtleQITbWFya2V0aW5nQW1vdW50TGVmdAAPbGFzdFRlYW1UaW1lS2V5AhRsYXN0Q2xhaW1lZFRpbWVfdGVhbQARdGVhbUFtb3VudExlZnRLZXkCDnRlYW1BbW91bnRMZWZ0ABVsYXN0QWN0aXZpdGllc1RpbWVLZXkCGmxhc3RDbGFpbWVkVGltZV9hY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RJZAgFAXICXzIARL6sCA==", "height": 2727852, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AZpenSdpDEr3T6NYRLJeAx6biDs47JvLuB2kCBBssEHQ Next: HnZ8TwPbpjFMkJLnsATeuvNoNp36vTnGsWTzhBggQQER Diff:
OldNewDifferences
7878
7979 let idxWlgUserAmAvailNow = 25
8080
81+let idxWlgUserTotalAvail = 28
82+
83+let idxWlgEffUserTime = 29
84+
8185 let dappRest = 0
8286
8387 let dappStaking = 1
8488
8589 let dappEconomy = 2
8690
87-let dappWlg = 4
91+let dappWlg = 3
8892
89-let dappPuzzle = 5
93+let dappPuzzle = 4
9094
91-let dappInvestFund = 6
95+let dappInvestFund = 5
9296
9397 func getPieces (userAddrStrOrEmpty,stakingContract) = {
9498 let props = split(valueOrElse(getString(stakingContract, "resTypesProportions"), "0_0_0_0_0_0"), "_")
113117 }
114118
115119
116-func getWlgStats (userAddrOpt,contracts,usdtId,usdtBalanceCorrection) = {
120+func getWlgStats (userAddrOpt,contracts,usdtId,usdtBalanceCorrection,userProportion6) = {
117121 let issuedAmount = valueOrErrorMessage(getInteger(contracts[dappWlg], wlgIssuedAmountKey), "WLGOLD is not issued yet")
118122 let economyUsd = assetBalance(contracts[dappEconomy], usdtId)
119123 let restUsd = assetBalance(contracts[dappRest], usdtId)
148152 let curPeriod = min([((now - issueTime) / YEARMILLIS), 2])
149153 let eff = getPieces(userAddrOpt, contracts[dappStaking])
150154 let curPeriodDistribution = distributionByPeriod(curPeriod)
151- let userAmount = fraction(if ((lastUserPeriod == curPeriod))
152- then fraction(curPeriodDistribution, (nowLimited - lastUserTime), YEARMILLIS)
155+ let $t079142 = if ((lastUserPeriod == curPeriod))
156+ then {
157+ let a0 = fraction(curPeriodDistribution, (nowLimited - lastUserTime), YEARMILLIS)
158+ let userPart = fraction(a0, userProportion6, M6)
159+ let effTime = (lastUserTime + fraction((nowLimited - lastUserTime), userProportion6, M6))
160+ $Tuple3(userPart, a0, effTime)
161+ }
153162 else if ((lastUserPeriod == (curPeriod - 1)))
154- then (fraction(distributionByPeriod((curPeriod - 1)), ((issueTime + (YEARMILLIS * curPeriod)) - lastUserTime), YEARMILLIS) + fraction(curPeriodDistribution, (nowLimited - (issueTime + (YEARMILLIS * curPeriod))), YEARMILLIS))
155- else ((fraction(distributionByPeriod((curPeriod - 2)), ((issueTime + (YEARMILLIS * (curPeriod - 1))) - lastUserTime), YEARMILLIS) + distributionByPeriod((curPeriod - 1))) + fraction(curPeriodDistribution, (nowLimited - (issueTime + (YEARMILLIS * curPeriod))), YEARMILLIS)), eff[1], eff[0])
163+ then {
164+ let a1 = fraction(distributionByPeriod((curPeriod - 1)), ((issueTime + (YEARMILLIS * curPeriod)) - lastUserTime), YEARMILLIS)
165+ let a0 = fraction(curPeriodDistribution, (nowLimited - (issueTime + (YEARMILLIS * curPeriod))), YEARMILLIS)
166+ let avail = (a1 + a0)
167+ let userPart = fraction(avail, userProportion6, M6)
168+ let effTime = if ((a1 >= userPart))
169+ then (lastUserTime + fraction(YEARMILLIS, userPart, distributionByPeriod((curPeriod - 1))))
170+ else ((issueTime + (YEARMILLIS * curPeriod)) + fraction(YEARMILLIS, (userPart - a1), curPeriodDistribution))
171+ $Tuple3(userPart, avail, effTime)
172+ }
173+ else {
174+ let a2 = fraction(distributionByPeriod((curPeriod - 2)), ((issueTime + (YEARMILLIS * (curPeriod - 1))) - lastUserTime), YEARMILLIS)
175+ let a1 = distributionByPeriod((curPeriod - 1))
176+ let a0 = fraction(curPeriodDistribution, (nowLimited - (issueTime + (YEARMILLIS * curPeriod))), YEARMILLIS)
177+ let avail = ((a2 + a1) + a0)
178+ let userPart = fraction(avail, userProportion6, M6)
179+ let effTime = if ((a2 >= userPart))
180+ then (lastUserTime + fraction(YEARMILLIS, userPart, distributionByPeriod((curPeriod - 2))))
181+ else if (((a2 + a1) >= userPart))
182+ then ((issueTime + (YEARMILLIS * (curPeriod - 1))) + fraction(YEARMILLIS, (userPart - a2), distributionByPeriod((curPeriod - 1))))
183+ else ((issueTime + (YEARMILLIS * curPeriod)) + fraction(YEARMILLIS, ((userPart - a2) - a1), curPeriodDistribution))
184+ $Tuple3(userPart, avail, effTime)
185+ }
186+ let userAmount = $t079142._1
187+ let userAvailable = $t079142._2
188+ let effLastTime = $t079142._3
156189 let sLandDailyAmount = fraction(fraction(curPeriodDistribution, DAY, YEARMILLIS), 25, eff[0])
157190 let amountLeftTotal = valueOrElse(getInteger(contracts[dappWlg], stakersAmountLeftKey), 0)
158-[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, userAmount, sLandDailyAmount, investFundTotal]
191+[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]
159192 }
160193
161194
203236
204237 let IdxCfgEconomyDapp = 2
205238
206-let IdxCfgGovernanceDapp = 3
207-
208239 let IdxCfgWlgDapp = 4
209240
210241 let IdxCfgPuzzlePoolDapp = 5
230261 let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp)
231262
232263 let economyContract = getContractAddressOrFail(restCfg, IdxCfgEconomyDapp)
233-
234-let govContract = getContractAddressOrFail(restCfg, IdxCfgGovernanceDapp)
235264
236265 let wlgContract = getContractAddressOrFail(restCfg, IdxCfgWlgDapp)
237266
312341 }
313342
314343
315-func claimInternal (addr) = {
344+func claimInternal (addr,proportion6) = {
316345 let caller = addressFromStringValue(addr)
317- let curStats = getWlgStats(addr, [restContract, stakingContract, economyContract, govContract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0)
346+ let curStats = getWlgStats(addr, [restContract, stakingContract, economyContract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0, proportion6)
318347 let now = lastBlock.timestamp
319348 let issueTime = curStats[idxWlgIssueTime]
320349 let marketingAmountLeft = curStats[idxWlgMarketingAmLeft]
328357 else {
329358 let userAmount = curStats[idxWlgUserAmAvailNow]
330359 let userKey = keyStakersAmountPaidUser(addr)
331- $Tuple2([ScriptTransfer(addressFromStringValue(value(getString(marketingAddrKey))), marketingAmount, wlgAssetId), ScriptTransfer(addressFromStringValue(value(getString(teamAddrKey))), teamAmount, wlgAssetId), ScriptTransfer(restContract, actAmount, wlgAssetId), ScriptTransfer(caller, userAmount, wlgAssetId), IntegerEntry(userKey, (valueOrElse(getInteger(userKey), 0) + userAmount)), IntegerEntry(stakersAmountPaidTotalKey, (valueOrElse(getInteger(stakersAmountPaidTotalKey), 0) + userAmount)), IntegerEntry(stakersAmountLeftKey, (curStats[idxWlgAmLeftTotal] - userAmount)), IntegerEntry(marketingAmountLeftKey, (marketingAmountLeft - marketingAmount)), IntegerEntry(lastMarketingTimeKey, now), IntegerEntry(teamAmountLeftKey, (teamAmountLeft - teamAmount)), IntegerEntry(lastTeamTimeKey, now), IntegerEntry(actAmountLeftKey, (actAmountLeft - actAmount)), IntegerEntry(lastActivitiesTimeKey, now), IntegerEntry(keyLastClaimedTimeByUser(addr), now)], userAmount)
360+ let userTotal = curStats[idxWlgUserTotalAvail]
361+ let userEffTime = curStats[idxWlgEffUserTime]
362+ $Tuple2([ScriptTransfer(addressFromStringValue(value(getString(marketingAddrKey))), marketingAmount, wlgAssetId), ScriptTransfer(addressFromStringValue(value(getString(teamAddrKey))), teamAmount, wlgAssetId), ScriptTransfer(restContract, actAmount, wlgAssetId), ScriptTransfer(caller, userAmount, 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))
332363 }
333364 }
334365
364395 if ((MINSHOPPAYMENT > usdtAmt))
365396 then throw((("You can trade min " + fixedPoint(MINSHOPPAYMENT, 6)) + " USDT"))
366397 else {
367- let curStats = getWlgStats("", [restContract, stakingContract, economyContract, govContract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, usdtAmt)
398+ let curStats = getWlgStats("", [restContract, stakingContract, economyContract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, usdtAmt, MULT6)
368399 let curWlgAmount = curStats[idxWlgAmount]
369400 let fundsUsd = curStats[idxWlgFunds]
370401 let wlgPrice = fraction(fundsUsd, MULT8, curWlgAmount)
406437 if ((pmtAssetId != wlgAssetId))
407438 then throw("WLGOLD payments only!")
408439 else {
409- let curStats = getWlgStats("", [restContract, stakingContract, economyContract, govContract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0)
440+ let curStats = getWlgStats("", [restContract, stakingContract, economyContract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0, MULT6)
410441 let curWlgAmount = curStats[idxWlgAmount]
411442 let sellPrice = fraction(curStats[idxWlgPrice], 4, 5)
412443 let usdtAmt = fraction(wlgAmt, sellPrice, MULT8)
432463 if ((size(i.payments) != 0))
433464 then throw("No payments required")
434465 else {
435- let actions = claimInternal(toString(i.caller))._1
466+ let actions = claimInternal(toString(i.caller), MULT6)._1
436467 $Tuple2(actions, prologResult)
437468 }
438469 }
442473 @Callable(i)
443474 func onStakeUnstakeLand (addr) = if ((i.caller != stakingContract))
444475 then throw("Permission denied")
445- else claimInternal(addr)
476+ else claimInternal(addr, MULT6)
477+
478+
479+
480+@Callable(i)
481+func claimRob (owner,robber,ownerProportion6) = if ((i.caller != stakingContract))
482+ then throw("Permission denied")
483+ else {
484+ let r = claimInternal(owner, ownerProportion6)
485+ $Tuple2((r._1 :+ ScriptTransfer(addressFromStringValue(robber), (r._2._2 - r._2._1), wlgAssetId)), r._2)
486+ }
446487
447488
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
81+let idxWlgUserTotalAvail = 28
82+
83+let idxWlgEffUserTime = 29
84+
8185 let dappRest = 0
8286
8387 let dappStaking = 1
8488
8589 let dappEconomy = 2
8690
87-let dappWlg = 4
91+let dappWlg = 3
8892
89-let dappPuzzle = 5
93+let dappPuzzle = 4
9094
91-let dappInvestFund = 6
95+let dappInvestFund = 5
9296
9397 func getPieces (userAddrStrOrEmpty,stakingContract) = {
9498 let props = split(valueOrElse(getString(stakingContract, "resTypesProportions"), "0_0_0_0_0_0"), "_")
9599 func adder (acc,item) = (acc + parseIntValue(item))
96100
97101 let totalPower = {
98102 let $l = props
99103 let $s = size($l)
100104 let $acc0 = 0
101105 func $f0_1 ($a,$i) = if (($i >= $s))
102106 then $a
103107 else adder($a, $l[$i])
104108
105109 func $f0_2 ($a,$i) = if (($i >= $s))
106110 then $a
107111 else throw("List size exceeds 6")
108112
109113 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
110114 }
111115 let usersPower = valueOrElse(getInteger(stakingContract, ("stakedPiecesByOwner_" + userAddrStrOrEmpty)), 0)
112116 [totalPower, usersPower]
113117 }
114118
115119
116-func getWlgStats (userAddrOpt,contracts,usdtId,usdtBalanceCorrection) = {
120+func getWlgStats (userAddrOpt,contracts,usdtId,usdtBalanceCorrection,userProportion6) = {
117121 let issuedAmount = valueOrErrorMessage(getInteger(contracts[dappWlg], wlgIssuedAmountKey), "WLGOLD is not issued yet")
118122 let economyUsd = assetBalance(contracts[dappEconomy], usdtId)
119123 let restUsd = assetBalance(contracts[dappRest], usdtId)
120124 let wlgUsd = (assetBalance(contracts[dappWlg], usdtId) - usdtBalanceCorrection)
121125 let puzzleUsd = assetBalance(contracts[dappPuzzle], usdtId)
122126 let investFundContract = contracts[dappInvestFund]
123127 let investFundTotal = (assetBalance(investFundContract, usdtId) + valueOrElse(getInteger(investFundContract, zbIssuedAmountKey), 0))
124128 let totalFundsUsd = ((economyUsd + wlgUsd) + investFundTotal)
125129 let wlgId = valueOrErrorMessage(getBinary(contracts[dappWlg], "wlg_assetId"), "Not initialized yet")
126130 let now = lastBlock.timestamp
127131 let issueTime = valueOrErrorMessage(getInteger(contracts[dappWlg], wlgIssueTimeKey), "Not initialized")
128132 let marketingTotal = fraction(MILLION6, MARKETINGSHARE, M6)
129133 let marketingAmountLeft = valueOrElse(getInteger(contracts[dappWlg], marketingAmountLeftKey), marketingTotal)
130134 let lastMarketingTime = valueOrElse(getInteger(contracts[dappWlg], lastMarketingTimeKey), issueTime)
131135 let marketingAddr = addressFromStringValue(value(getString(contracts[dappWlg], marketingAddrKey)))
132136 let marketingAmountAvailableNow = min([fraction(marketingTotal, (now - lastMarketingTime), YEARMILLIS), marketingAmountLeft])
133137 let marketingWlgold = assetBalance(marketingAddr, wlgId)
134138 let teamTotal = fraction(MILLION6, TEAMSHARE, M6)
135139 let teamAmountLeft = valueOrElse(getInteger(contracts[dappWlg], teamAmountLeftKey), teamTotal)
136140 let lastTeamTime = valueOrElse(getInteger(contracts[dappWlg], lastTeamTimeKey), issueTime)
137141 let teamAddr = addressFromStringValue(value(getString(contracts[dappWlg], teamAddrKey)))
138142 let teamAmountAvailableNow = min([fraction(teamTotal, (now - lastTeamTime), (3 * YEARMILLIS)), teamAmountLeft])
139143 let teamWlgold = assetBalance(teamAddr, wlgId)
140144 let actTotal = fraction(MILLION6, ACTIVITYSHARE, M6)
141145 let actAmountLeft = valueOrElse(getInteger(contracts[dappWlg], actAmountLeftKey), actTotal)
142146 let lastActivitiesTime = valueOrElse(getInteger(contracts[dappWlg], lastActivitiesTimeKey), issueTime)
143147 let actAmountAvailableNow = min([fraction(actTotal, (now - lastActivitiesTime), (3 * YEARMILLIS)), actAmountLeft])
144148 let actWlgold = assetBalance(contracts[dappRest], wlgId)
145149 let lastUserTime = valueOrElse(getInteger(contracts[dappWlg], keyLastClaimedTimeByUser(userAddrOpt)), issueTime)
146150 let lastUserPeriod = ((lastUserTime - issueTime) / YEARMILLIS)
147151 let nowLimited = min([now, (issueTime + (3 * YEARMILLIS))])
148152 let curPeriod = min([((now - issueTime) / YEARMILLIS), 2])
149153 let eff = getPieces(userAddrOpt, contracts[dappStaking])
150154 let curPeriodDistribution = distributionByPeriod(curPeriod)
151- let userAmount = fraction(if ((lastUserPeriod == curPeriod))
152- then fraction(curPeriodDistribution, (nowLimited - lastUserTime), YEARMILLIS)
155+ let $t079142 = if ((lastUserPeriod == curPeriod))
156+ then {
157+ let a0 = fraction(curPeriodDistribution, (nowLimited - lastUserTime), YEARMILLIS)
158+ let userPart = fraction(a0, userProportion6, M6)
159+ let effTime = (lastUserTime + fraction((nowLimited - lastUserTime), userProportion6, M6))
160+ $Tuple3(userPart, a0, effTime)
161+ }
153162 else if ((lastUserPeriod == (curPeriod - 1)))
154- then (fraction(distributionByPeriod((curPeriod - 1)), ((issueTime + (YEARMILLIS * curPeriod)) - lastUserTime), YEARMILLIS) + fraction(curPeriodDistribution, (nowLimited - (issueTime + (YEARMILLIS * curPeriod))), YEARMILLIS))
155- else ((fraction(distributionByPeriod((curPeriod - 2)), ((issueTime + (YEARMILLIS * (curPeriod - 1))) - lastUserTime), YEARMILLIS) + distributionByPeriod((curPeriod - 1))) + fraction(curPeriodDistribution, (nowLimited - (issueTime + (YEARMILLIS * curPeriod))), YEARMILLIS)), eff[1], eff[0])
163+ then {
164+ let a1 = fraction(distributionByPeriod((curPeriod - 1)), ((issueTime + (YEARMILLIS * curPeriod)) - lastUserTime), YEARMILLIS)
165+ let a0 = fraction(curPeriodDistribution, (nowLimited - (issueTime + (YEARMILLIS * curPeriod))), YEARMILLIS)
166+ let avail = (a1 + a0)
167+ let userPart = fraction(avail, userProportion6, M6)
168+ let effTime = if ((a1 >= userPart))
169+ then (lastUserTime + fraction(YEARMILLIS, userPart, distributionByPeriod((curPeriod - 1))))
170+ else ((issueTime + (YEARMILLIS * curPeriod)) + fraction(YEARMILLIS, (userPart - a1), curPeriodDistribution))
171+ $Tuple3(userPart, avail, effTime)
172+ }
173+ else {
174+ let a2 = fraction(distributionByPeriod((curPeriod - 2)), ((issueTime + (YEARMILLIS * (curPeriod - 1))) - lastUserTime), YEARMILLIS)
175+ let a1 = distributionByPeriod((curPeriod - 1))
176+ let a0 = fraction(curPeriodDistribution, (nowLimited - (issueTime + (YEARMILLIS * curPeriod))), YEARMILLIS)
177+ let avail = ((a2 + a1) + a0)
178+ let userPart = fraction(avail, userProportion6, M6)
179+ let effTime = if ((a2 >= userPart))
180+ then (lastUserTime + fraction(YEARMILLIS, userPart, distributionByPeriod((curPeriod - 2))))
181+ else if (((a2 + a1) >= userPart))
182+ then ((issueTime + (YEARMILLIS * (curPeriod - 1))) + fraction(YEARMILLIS, (userPart - a2), distributionByPeriod((curPeriod - 1))))
183+ else ((issueTime + (YEARMILLIS * curPeriod)) + fraction(YEARMILLIS, ((userPart - a2) - a1), curPeriodDistribution))
184+ $Tuple3(userPart, avail, effTime)
185+ }
186+ let userAmount = $t079142._1
187+ let userAvailable = $t079142._2
188+ let effLastTime = $t079142._3
156189 let sLandDailyAmount = fraction(fraction(curPeriodDistribution, DAY, YEARMILLIS), 25, eff[0])
157190 let amountLeftTotal = valueOrElse(getInteger(contracts[dappWlg], stakersAmountLeftKey), 0)
158-[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, userAmount, sLandDailyAmount, investFundTotal]
191+[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]
159192 }
160193
161194
162195 let chain = take(drop(this.bytes, 1), 1)
163196
164197 let usdtAssetId = match chain {
165198 case _ =>
166199 if ((base58'2W' == $match0))
167200 then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi'
168201 else if ((base58'2T' == $match0))
169202 then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63'
170203 else throw("Unknown chain")
171204 }
172205
173206 let defaultRestAddressStr = match chain {
174207 case _ =>
175208 if ((base58'2W' == $match0))
176209 then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv"
177210 else if ((base58'2T' == $match0))
178211 then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy"
179212 else throw("Unknown chain")
180213 }
181214
182215 let arbitrageDelay = match chain {
183216 case _ =>
184217 if ((base58'2W' == $match0))
185218 then 86400000
186219 else if ((base58'2T' == $match0))
187220 then 60000
188221 else throw("Unknown chain")
189222 }
190223
191224 let SEP = "__"
192225
193226 let MULT6 = 1000000
194227
195228 let MULT8 = 100000000
196229
197230 let MINSHOPPAYMENT = 100000
198231
199232 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
200233
201234
202235 let IdxCfgStakingDapp = 1
203236
204237 let IdxCfgEconomyDapp = 2
205238
206-let IdxCfgGovernanceDapp = 3
207-
208239 let IdxCfgWlgDapp = 4
209240
210241 let IdxCfgPuzzlePoolDapp = 5
211242
212243 let IdxCfgInvestFundDapp = 6
213244
214245 func keyRestCfg () = "%s__restConfig"
215246
216247
217248 func keyRestAddress () = "%s__restAddr"
218249
219250
220251 func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP)
221252
222253
223254 func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx)))
224255
225256
226257 let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr))
227258
228259 let restCfg = readRestCfgOrFail(restContract)
229260
230261 let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp)
231262
232263 let economyContract = getContractAddressOrFail(restCfg, IdxCfgEconomyDapp)
233-
234-let govContract = getContractAddressOrFail(restCfg, IdxCfgGovernanceDapp)
235264
236265 let wlgContract = getContractAddressOrFail(restCfg, IdxCfgWlgDapp)
237266
238267 let puzzlePoolContract = getContractAddressOrFail(restCfg, IdxCfgPuzzlePoolDapp)
239268
240269 let investFundContract = getContractAddressOrFail(restCfg, IdxCfgInvestFundDapp)
241270
242271 let wlgAssetIdKey = "wlg_assetId"
243272
244273 let wlgAssetId = valueOrErrorMessage(getBinary(wlgContract, wlgAssetIdKey), "Not initialized yet")
245274
246275 let IdxEffUser = 1
247276
248277 func keyResProportions () = "resTypesProportions"
249278
250279
251280 func keyStakedPiecesByOwner (ownerAddr) = ("stakedPiecesByOwner_" + ownerAddr)
252281
253282
254283 func asInt (v) = match v {
255284 case n: Int =>
256285 n
257286 case _ =>
258287 throw("fail to cast into Int")
259288 }
260289
261290
262291 func getVotingPower (userAddrStrOrEmpty) = {
263292 let props = split(valueOrElse(getString(stakingContract, keyResProportions()), "0_0_0_0_0_0"), "_")
264293 func adder (acc,item) = (acc + parseIntValue(item))
265294
266295 let totalPower = {
267296 let $l = props
268297 let $s = size($l)
269298 let $acc0 = 0
270299 func $f0_1 ($a,$i) = if (($i >= $s))
271300 then $a
272301 else adder($a, $l[$i])
273302
274303 func $f0_2 ($a,$i) = if (($i >= $s))
275304 then $a
276305 else throw("List size exceeds 6")
277306
278307 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
279308 }
280309 let usersPower = valueOrElse(getInteger(stakingContract, keyStakedPiecesByOwner(userAddrStrOrEmpty)), 0)
281310 [totalPower, usersPower]
282311 }
283312
284313
285314 func fixedPoint (val,decimals) = {
286315 let tenPow = pow(10, 0, decimals, 0, 0, DOWN)
287316 let lowPart = toString((val % tenPow))
288317 let zeroes = drop(toString(tenPow), (1 + size(lowPart)))
289318 (((toString((val / tenPow)) + ".") + zeroes) + lowPart)
290319 }
291320
292321
293322 let profitAddrKey = "profitAddr"
294323
295324 let stakersAmountPaidTotalKey = "stakersAmountPaidTotal"
296325
297326 func keyStakersAmountPaidUser (addr) = ("stakersAmountPaidUser_" + addr)
298327
299328
300329 func prolog () = asInt(invoke(stakingContract, "saveLastTx", nil, nil))
301330
302331
303332 func getSwapLimitWlg (addr) = {
304333 let lastTime = valueOrElse(getInteger(keyLastArbTimeByUser(addr)), 0)
305334 let now = lastBlock.timestamp
306335 if ((arbitrageDelay > (now - lastTime)))
307336 then throw((("Arbitrages are possible once a " + toString((arbitrageDelay / 60000))) + "min"))
308337 else {
309338 let pieces = getVotingPower(addr)[IdxEffUser]
310339 (pieces * MULT8)
311340 }
312341 }
313342
314343
315-func claimInternal (addr) = {
344+func claimInternal (addr,proportion6) = {
316345 let caller = addressFromStringValue(addr)
317- let curStats = getWlgStats(addr, [restContract, stakingContract, economyContract, govContract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0)
346+ let curStats = getWlgStats(addr, [restContract, stakingContract, economyContract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0, proportion6)
318347 let now = lastBlock.timestamp
319348 let issueTime = curStats[idxWlgIssueTime]
320349 let marketingAmountLeft = curStats[idxWlgMarketingAmLeft]
321350 let marketingAmount = curStats[idxWlgMarketingAmAvailNow]
322351 let teamAmountLeft = curStats[idxWlgTeamAmLeft]
323352 let teamAmount = curStats[idxWlgTeamAmAvailNow]
324353 let actAmountLeft = curStats[idxWlgActAmLeft]
325354 let actAmount = curStats[idxWlgActAmAvailNow]
326355 if (((now - issueTime) > CHECKTIME))
327356 then throw("Please modify contract for next 1.5 years, according to stats")
328357 else {
329358 let userAmount = curStats[idxWlgUserAmAvailNow]
330359 let userKey = keyStakersAmountPaidUser(addr)
331- $Tuple2([ScriptTransfer(addressFromStringValue(value(getString(marketingAddrKey))), marketingAmount, wlgAssetId), ScriptTransfer(addressFromStringValue(value(getString(teamAddrKey))), teamAmount, wlgAssetId), ScriptTransfer(restContract, actAmount, wlgAssetId), ScriptTransfer(caller, userAmount, wlgAssetId), IntegerEntry(userKey, (valueOrElse(getInteger(userKey), 0) + userAmount)), IntegerEntry(stakersAmountPaidTotalKey, (valueOrElse(getInteger(stakersAmountPaidTotalKey), 0) + userAmount)), IntegerEntry(stakersAmountLeftKey, (curStats[idxWlgAmLeftTotal] - userAmount)), IntegerEntry(marketingAmountLeftKey, (marketingAmountLeft - marketingAmount)), IntegerEntry(lastMarketingTimeKey, now), IntegerEntry(teamAmountLeftKey, (teamAmountLeft - teamAmount)), IntegerEntry(lastTeamTimeKey, now), IntegerEntry(actAmountLeftKey, (actAmountLeft - actAmount)), IntegerEntry(lastActivitiesTimeKey, now), IntegerEntry(keyLastClaimedTimeByUser(addr), now)], userAmount)
360+ let userTotal = curStats[idxWlgUserTotalAvail]
361+ let userEffTime = curStats[idxWlgEffUserTime]
362+ $Tuple2([ScriptTransfer(addressFromStringValue(value(getString(marketingAddrKey))), marketingAmount, wlgAssetId), ScriptTransfer(addressFromStringValue(value(getString(teamAddrKey))), teamAmount, wlgAssetId), ScriptTransfer(restContract, actAmount, wlgAssetId), ScriptTransfer(caller, userAmount, 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))
332363 }
333364 }
334365
335366
336367 @Callable(i)
337368 func constructorV1 (restAddr,marketingAddr,teamAddr,profitAddr) = if ((i.caller != this))
338369 then throw("Permission denied")
339370 else if (isDefined(getBinary(wlgAssetIdKey)))
340371 then throw("Already initialized")
341372 else {
342373 let issuedAmount = MILLION6
343374 let issue = Issue("WLGOLD", "WavesLands Gold investment token", issuedAmount, 8, true, unit, 0)
344375 let assetId = calculateAssetId(issue)
345376 [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)]
346377 }
347378
348379
349380
350381 @Callable(i)
351382 func buyWlg (minAmount) = {
352383 let prologResult = prolog()
353384 if ((size(i.payments) != 1))
354385 then throw("exactly 1 payment must be attached")
355386 else {
356387 let pmt = i.payments[0]
357388 let usdtAmt = pmt.amount
358389 let pmtAssetId = valueOrErrorMessage(pmt.assetId, "USDT payments only!")
359390 if ((pmtAssetId != usdtAssetId))
360391 then throw("USDT payments only!")
361392 else {
362393 let caller = i.caller
363394 let addr = toString(caller)
364395 if ((MINSHOPPAYMENT > usdtAmt))
365396 then throw((("You can trade min " + fixedPoint(MINSHOPPAYMENT, 6)) + " USDT"))
366397 else {
367- let curStats = getWlgStats("", [restContract, stakingContract, economyContract, govContract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, usdtAmt)
398+ let curStats = getWlgStats("", [restContract, stakingContract, economyContract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, usdtAmt, MULT6)
368399 let curWlgAmount = curStats[idxWlgAmount]
369400 let fundsUsd = curStats[idxWlgFunds]
370401 let wlgPrice = fraction(fundsUsd, MULT8, curWlgAmount)
371402 let buyPrice = fraction(wlgPrice, 6, 5)
372403 let wlgAmount = fraction(usdtAmt, MULT8, buyPrice)
373404 let maxWlg = getSwapLimitWlg(addr)
374405 if ((wlgAmount > maxWlg))
375406 then throw((("You can get max " + fixedPoint(maxWlg, 8)) + " WLGOLD"))
376407 else if ((minAmount > wlgAmount))
377408 then throw("Price changed during operation, please try again")
378409 else {
379410 let profitAmount = (usdtAmt / 6)
380411 let deltaFunds = (usdtAmt - profitAmount)
381412 let reissued = fraction(curWlgAmount, deltaFunds, fundsUsd)
382413 $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)
383414 }
384415 }
385416 }
386417 }
387418 }
388419
389420
390421
391422 @Callable(i)
392423 func sellWlg (minAmount) = {
393424 let prologResult = prolog()
394425 if ((size(i.payments) != 1))
395426 then throw("exactly 1 payment must be attached")
396427 else {
397428 let pmt = i.payments[0]
398429 let wlgAmt = pmt.amount
399430 let caller = i.caller
400431 let addr = toString(caller)
401432 let maxWlg = getSwapLimitWlg(addr)
402433 if ((wlgAmt > maxWlg))
403434 then throw((("You can spend max " + fixedPoint(maxWlg, 8)) + " WLGOLD"))
404435 else {
405436 let pmtAssetId = valueOrErrorMessage(pmt.assetId, "WLGOLD payments only!")
406437 if ((pmtAssetId != wlgAssetId))
407438 then throw("WLGOLD payments only!")
408439 else {
409- let curStats = getWlgStats("", [restContract, stakingContract, economyContract, govContract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0)
440+ let curStats = getWlgStats("", [restContract, stakingContract, economyContract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0, MULT6)
410441 let curWlgAmount = curStats[idxWlgAmount]
411442 let sellPrice = fraction(curStats[idxWlgPrice], 4, 5)
412443 let usdtAmt = fraction(wlgAmt, sellPrice, MULT8)
413444 if ((MINSHOPPAYMENT > usdtAmt))
414445 then throw((("You can trade min " + fixedPoint(MINSHOPPAYMENT, 6)) + " USDT"))
415446 else if ((minAmount > usdtAmt))
416447 then throw("Price changed during operation, please try again")
417448 else {
418449 let profitAmount = (usdtAmt / 4)
419450 let burned = fraction((usdtAmt + profitAmount), curWlgAmount, curStats[idxWlgFunds])
420451 $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)
421452 }
422453 }
423454 }
424455 }
425456 }
426457
427458
428459
429460 @Callable(i)
430461 func claim () = {
431462 let prologResult = prolog()
432463 if ((size(i.payments) != 0))
433464 then throw("No payments required")
434465 else {
435- let actions = claimInternal(toString(i.caller))._1
466+ let actions = claimInternal(toString(i.caller), MULT6)._1
436467 $Tuple2(actions, prologResult)
437468 }
438469 }
439470
440471
441472
442473 @Callable(i)
443474 func onStakeUnstakeLand (addr) = if ((i.caller != stakingContract))
444475 then throw("Permission denied")
445- else claimInternal(addr)
476+ else claimInternal(addr, MULT6)
477+
478+
479+
480+@Callable(i)
481+func claimRob (owner,robber,ownerProportion6) = if ((i.caller != stakingContract))
482+ then throw("Permission denied")
483+ else {
484+ let r = claimInternal(owner, ownerProportion6)
485+ $Tuple2((r._1 :+ ScriptTransfer(addressFromStringValue(robber), (r._2._2 - r._2._1), wlgAssetId)), r._2)
486+ }
446487
447488

github/deemru/w8io/026f985 
58.31 ms