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