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