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