tx · 7msmA9MHdsZhdfn9vX9HijVCNtpp5sj1WcS2CFPPCRJ 3Mzy7y5ocKESrPFt7kKocSTGnBWXkADKtTs: -0.01400000 Waves 2021.04.11 15:45 [1477812] smart account 3Mzy7y5ocKESrPFt7kKocSTGnBWXkADKtTs > SELF 0.00000000 Waves
{ "type": 13, "id": "7msmA9MHdsZhdfn9vX9HijVCNtpp5sj1WcS2CFPPCRJ", "fee": 1400000, "feeAssetId": null, "timestamp": 1618145136942, "version": 1, "sender": "3Mzy7y5ocKESrPFt7kKocSTGnBWXkADKtTs", "senderPublicKey": "6PKUtKfj3F2QRmiKEwsq27W3qxGsNy9i5yGdWSBhLU4r", "proofs": [ "4oB2czd7MVKR3EVHNyMegHsn7TkF3Gb1ra1ZYZHR64J6KKRvgoqTP2oid2o9G5FgKoaLbgHZJrxzWnV1UnPs8hYj" ], "script": "base64:AAIEAAAAAAAAAAgIAhIECgIIAQAAAB0AAAAADGFkbWluUHViS2V5MQEAAAAgugnXO4lZpNFdoP/xuzPQquE5aQ/L4r2R1jvuT16o4BMAAAAADGFkbWluUHViS2V5MgEAAAAgwpFEmbPSsLQNIqWRWL2IvKE3uwjL/92M5pTvWxYOfkAAAAAADGFkbWluUHViS2V5MwEAAAAgjh4XLnixBzv0SE56Myhgdih3/JnlkjCjIMLPqKvpDlUAAAAAEWtVc2VyUG9vbFZvdGVTV09QAgAAAAVfdm90ZQAAAAATa1VzZXJQb29sQWN0aXZlU1dPUAIAAAAMX2FjdGl2ZV92b3RlAAAAABNrVXNlclBvb2xGcmVlemVTV09QAgAAAAxfZnJlZXplX3ZvdGUAAAAAEmtVc2VyVG90YWxWb3RlU1dPUAIAAAAVX3VzZXJfdG90YWxfU1dPUF92b3RlAAAAABNrVXNlclBvb2xWb3RlUGVyaW9kAgAAAAdfcGVyaW9kAAAAAAxrVXNlclVudm90ZWQCAAAACF91bnZvdGVkAAAAABJrVXNlclVudm90ZWRQZXJpb2QCAAAAD191bnZvdGVkX3BlcmlvZAA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GVTV09QBQAAAA90b3RhbEZyZWV6ZVNXT1AEAAAACnRvdGFsRW50cnkJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIFAAAADGtUb3RhbFBlcmlvZAUAAAAKY3VyclBlcmlvZAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgUAAAAQa1RvdGFsRnJlZXplU1dPUAUAAAASdG90YWxGcmVlemVTV09QbmV3CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACBQAAABBrVG90YWxBY3RpdmVTV09QBQAAABZ0b3RhbEFjdGl2ZVZvdGVTV09QbmV3CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACBQAAAA5rVG90YWxWb3RlU1dPUAUAAAAQdG90YWxWb3RlU1dPUG5ldwUAAAADbmlsCQAETgAAAAIJAAROAAAAAgUAAAAJdXNlckVudHJ5BQAAAAlwb29sRW50cnkFAAAACnRvdGFsRW50cnkAAAAAeyJytQ==", "chainId": 84, "height": 1477812, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 4 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let adminPubKey1 = base58'DXDY2itiEcYBtGkVLnkpHtDFyWQUkoLJz79uJ7ECbMrA' | |
5 | + | ||
6 | + | let adminPubKey2 = base58'E6Wa1SGoktYcjHjsKrvjMiqJY3SWmGKcD8Q5L8kxSPS7' | |
7 | + | ||
8 | + | let adminPubKey3 = base58'AZmWJtuy4GeVrMmJH4hfFBRApe1StvhJSk4jcbT6bArQ' | |
9 | + | ||
10 | + | let kUserPoolVoteSWOP = "_vote" | |
11 | + | ||
12 | + | let kUserPoolActiveSWOP = "_active_vote" | |
13 | + | ||
14 | + | let kUserPoolFreezeSWOP = "_freeze_vote" | |
15 | + | ||
16 | + | let kUserTotalVoteSWOP = "_user_total_SWOP_vote" | |
17 | + | ||
18 | + | let kUserPoolVotePeriod = "_period" | |
19 | + | ||
20 | + | let kUserUnvoted = "_unvoted" | |
21 | + | ||
22 | + | let kUserUnvotedPeriod = "_unvoted_period" | |
23 | + | ||
24 | + | let kPoolVoteSWOP = "_vote_SWOP" | |
25 | + | ||
26 | + | let kPoolActiveSWOP = "_active_vote_SWOP" | |
27 | + | ||
28 | + | let kPoolFreezeSWOP = "_vote_SWOP_freeze" | |
29 | + | ||
30 | + | let kPoolPeriod = "_pool_period" | |
31 | + | ||
32 | + | let kTotalVoteSWOP = "total_vote_SWOP" | |
33 | + | ||
34 | + | let kTotalActiveSWOP = "total_active_vote_SWOP" | |
35 | + | ||
36 | + | let kTotalFreezeSWOP = "total_vote_SWOP_freeze" | |
37 | + | ||
38 | + | let kTotalPeriod = "total_pool_period" | |
39 | + | ||
40 | + | let basePeriod = 0 | |
41 | + | ||
42 | + | let startHeight = 1477809 | |
43 | + | ||
44 | + | let periodLength = 10102 | |
45 | + | ||
46 | + | let scale8 = 100000000 | |
47 | + | ||
48 | + | let durationFullVote = 2880 | |
49 | + | ||
50 | + | let minVoteCoeff = 10000000 | |
51 | + | ||
52 | + | let govAddr = Address(base58'3N8gfDJc5N53ePx2qBn3oQXbnhbz3Z7WFNj') | |
53 | + | ||
54 | + | let currPeriod = (basePeriod + ((height - startHeight) / periodLength)) | |
55 | + | ||
56 | + | func isCallerInGovernance (user) = if (if ((valueOrElse(getInteger(govAddr, (toString(user) + "_SWOP_amount")), 0) > 0)) | |
57 | + | then true | |
58 | + | else (valueOrElse(getInteger(this, (toString(user) + kUserTotalVoteSWOP)), 0) > 0)) | |
59 | + | then true | |
60 | + | else false | |
61 | + | ||
62 | + | ||
63 | + | func isPoolInGovernance (poolAddress) = isDefined(getInteger(govAddr, (poolAddress + "_current_pool_fraction_reward"))) | |
64 | + | ||
65 | + | ||
66 | + | func votingCoef () = { | |
67 | + | let votingDuration = (height - (startHeight + (currPeriod * periodLength))) | |
68 | + | if ((durationFullVote > votingDuration)) | |
69 | + | then scale8 | |
70 | + | else { | |
71 | + | let x1 = durationFullVote | |
72 | + | let y1 = scale8 | |
73 | + | let x2 = periodLength | |
74 | + | let y2 = minVoteCoeff | |
75 | + | let k = (((y2 - y1) * scale8) / (x2 - x1)) | |
76 | + | let b = ((y1 * scale8) - (k * x1)) | |
77 | + | (((votingDuration * k) / scale8) + (b / scale8)) | |
78 | + | } | |
79 | + | } | |
80 | + | ||
81 | + | ||
82 | + | @Callable(i) | |
83 | + | func votePoolWeight (poolAddress,userPoolVoteSWOPnew) = { | |
84 | + | let userTotalVoteSWOP = valueOrElse(getInteger(this, (toString(i.caller) + kUserTotalVoteSWOP)), 0) | |
85 | + | let userPoolVoteSWOP = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolVoteSWOP)), 0) | |
86 | + | let userPoolVotePeriod = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolVotePeriod)), 0) | |
87 | + | let userPoolActiveVoteSWOP = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolActiveSWOP)), 0) | |
88 | + | let userPoolFreezeSWOP = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolFreezeSWOP)), 0) | |
89 | + | let userUnvoted = valueOrElse(getInteger(this, ((toString(i.caller) + "_") + kUserUnvoted)), 0) | |
90 | + | let userUnvotedPeriod = valueOrElse(getInteger(this, ((toString(i.caller) + "_") + kUserUnvotedPeriod)), 0) | |
91 | + | let userSWOPinGovernance = getIntegerValue(govAddr, (toString(i.caller) + "_SWOP_amount")) | |
92 | + | let poolVoteSWOP = valueOrElse(getInteger(this, (poolAddress + kPoolVoteSWOP)), 0) | |
93 | + | let poolActiveSWOP = valueOrElse(getInteger(this, (poolAddress + kPoolActiveSWOP)), 0) | |
94 | + | let poolFreezeSWOP = valueOrElse(getInteger(this, (poolAddress + kPoolFreezeSWOP)), 0) | |
95 | + | let poolPeriod = valueOrElse(getInteger(this, (poolAddress + kPoolPeriod)), 0) | |
96 | + | let totalVoteSWOP = valueOrElse(getInteger(this, kTotalVoteSWOP), 0) | |
97 | + | let totalActiveSWOP = valueOrElse(getInteger(this, kTotalActiveSWOP), 0) | |
98 | + | let totalFreezeSWOP = valueOrElse(getInteger(this, kTotalFreezeSWOP), 0) | |
99 | + | let totalPeriod = valueOrElse(getInteger(this, kTotalPeriod), 0) | |
100 | + | let poolVoteDiffSWOP = (userPoolVoteSWOPnew - userPoolVoteSWOP) | |
101 | + | let userTotalVoteSWOPnew = (totalVoteSWOP + poolVoteDiffSWOP) | |
102 | + | if (!(isCallerInGovernance(i.caller))) | |
103 | + | then throw("This address has 0 SWOP in Governance dApp") | |
104 | + | else if ((userTotalVoteSWOPnew > userSWOPinGovernance)) | |
105 | + | then throw(((((toString(this) + " has ") + toString(userSWOPinGovernance)) + " SWOP in governance. New SWOP in voting ") + toString(userTotalVoteSWOPnew))) | |
106 | + | else if ((userPoolVoteSWOPnew >= userPoolVoteSWOP)) | |
107 | + | then { | |
108 | + | let coef = votingCoef() | |
109 | + | let userPoolActiveVoteSWOPnew = if ((userPoolVotePeriod == currPeriod)) | |
110 | + | then (userPoolActiveVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8)) | |
111 | + | else (userPoolVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8)) | |
112 | + | let userPoolFreezeSWOPnew = if ((userPoolVotePeriod == currPeriod)) | |
113 | + | then userPoolFreezeSWOP | |
114 | + | else userPoolVoteSWOP | |
115 | + | let userUnvotedNew = if ((userUnvoted == currPeriod)) | |
116 | + | then userUnvoted | |
117 | + | else max([0, (userUnvoted - poolVoteDiffSWOP)]) | |
118 | + | let userEntry = [IntegerEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolVotePeriod), currPeriod), IntegerEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolActiveSWOP), userPoolActiveVoteSWOPnew), IntegerEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolFreezeSWOP), userPoolFreezeSWOPnew), IntegerEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolVoteSWOP), userPoolVoteSWOPnew), IntegerEntry((((toString(i.caller) + "_") + poolAddress) + kUserTotalVoteSWOP), userTotalVoteSWOPnew), IntegerEntry(((toString(i.caller) + "_") + kUserUnvoted), userUnvotedNew)] | |
119 | + | let poolVoteSWOPnew = (poolVoteSWOP + poolVoteDiffSWOP) | |
120 | + | let poolActiveSWOPnew = if ((poolPeriod == currPeriod)) | |
121 | + | then (poolActiveSWOP + ((poolVoteDiffSWOP * coef) / scale8)) | |
122 | + | else (poolVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8)) | |
123 | + | let poolFreezeSWOPnew = if ((poolPeriod == currPeriod)) | |
124 | + | then poolFreezeSWOP | |
125 | + | else poolVoteSWOP | |
126 | + | let poolEntry = [IntegerEntry((poolAddress + kPoolPeriod), currPeriod), IntegerEntry((poolAddress + kPoolActiveSWOP), poolActiveSWOPnew), IntegerEntry((poolAddress + kPoolFreezeSWOP), poolFreezeSWOPnew), IntegerEntry((poolAddress + kPoolVoteSWOP), poolVoteSWOPnew)] | |
127 | + | let totalVoteSWOPnew = (totalVoteSWOP + poolVoteDiffSWOP) | |
128 | + | let totalActiveSWOPnew = if ((totalPeriod == currPeriod)) | |
129 | + | then (totalActiveSWOP + ((poolVoteDiffSWOP * coef) / scale8)) | |
130 | + | else (totalVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8)) | |
131 | + | let totalFreezeSWOPnew = if ((poolPeriod == currPeriod)) | |
132 | + | then totalFreezeSWOP | |
133 | + | else totalVoteSWOP | |
134 | + | let totalEntry = [IntegerEntry(kTotalPeriod, currPeriod), IntegerEntry(kTotalActiveSWOP, poolActiveSWOPnew), IntegerEntry(kTotalFreezeSWOP, poolFreezeSWOPnew), IntegerEntry(kTotalVoteSWOP, poolVoteSWOPnew)] | |
135 | + | ((userEntry ++ poolEntry) ++ totalEntry) | |
136 | + | } | |
137 | + | else { | |
138 | + | let removePoolVote = -(poolVoteDiffSWOP) | |
139 | + | let userPoolFreezeSWOPnew = if ((userPoolVotePeriod == currPeriod)) | |
140 | + | then min([userPoolFreezeSWOP, userPoolVoteSWOPnew]) | |
141 | + | else userPoolVoteSWOPnew | |
142 | + | let userPoolActiveVoteSWOPnew = if (((userPoolVoteSWOP - userPoolFreezeSWOP) == 0)) | |
143 | + | then 0 | |
144 | + | else (userPoolFreezeSWOPnew + (((userPoolActiveVoteSWOP - userPoolFreezeSWOP) * (userPoolVoteSWOPnew - userPoolFreezeSWOPnew)) / (userPoolVoteSWOP - userPoolFreezeSWOP))) | |
145 | + | let newUnvoted = max([0, (removePoolVote - (if ((userUnvotedPeriod == currPeriod)) | |
146 | + | then (userPoolVoteSWOP - userPoolFreezeSWOP) | |
147 | + | else 0))]) | |
148 | + | let userUnvotedNew = if ((userUnvotedPeriod == currPeriod)) | |
149 | + | then userUnvoted | |
150 | + | else (0 + newUnvoted) | |
151 | + | let userUnvotedPeriodNew = if ((newUnvoted > 0)) | |
152 | + | then currPeriod | |
153 | + | else userUnvotedPeriod | |
154 | + | let userEntry = [IntegerEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolVotePeriod), currPeriod), IntegerEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolFreezeSWOP), userPoolFreezeSWOPnew), IntegerEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolActiveSWOP), userPoolActiveVoteSWOPnew), IntegerEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolVoteSWOP), userPoolVoteSWOPnew), IntegerEntry((((toString(i.caller) + "_") + poolAddress) + kUserTotalVoteSWOP), userTotalVoteSWOPnew), IntegerEntry((((toString(i.caller) + "_") + poolAddress) + kUserUnvoted), userUnvotedNew), IntegerEntry((((toString(i.caller) + "_") + poolAddress) + kUserUnvotedPeriod), userUnvotedPeriod)] | |
155 | + | let poolVoteSWOPnew = (poolVoteSWOP - removePoolVote) | |
156 | + | let poolFreezeSWOPnew = if ((poolPeriod == currPeriod)) | |
157 | + | then min([poolFreezeSWOP, poolVoteSWOPnew]) | |
158 | + | else poolVoteSWOPnew | |
159 | + | let poolActiveVoteSWOPnew = if (((poolVoteSWOP - poolFreezeSWOP) == 0)) | |
160 | + | then 0 | |
161 | + | else (poolFreezeSWOPnew + (((poolActiveSWOP - poolFreezeSWOP) * (poolVoteSWOPnew - poolFreezeSWOPnew)) / (poolVoteSWOP - poolFreezeSWOP))) | |
162 | + | let poolEntry = [IntegerEntry((poolAddress + kPoolPeriod), currPeriod), IntegerEntry((poolAddress + kPoolFreezeSWOP), poolFreezeSWOPnew), IntegerEntry((poolAddress + kPoolActiveSWOP), poolActiveVoteSWOPnew), IntegerEntry((poolAddress + kPoolVoteSWOP), poolVoteSWOPnew)] | |
163 | + | let totalVoteSWOPnew = (totalVoteSWOP - removePoolVote) | |
164 | + | let totalFreezeSWOPnew = if ((totalPeriod == currPeriod)) | |
165 | + | then min([totalFreezeSWOP, totalVoteSWOPnew]) | |
166 | + | else totalVoteSWOPnew | |
167 | + | let totalActiveVoteSWOPnew = if (((totalVoteSWOP - totalFreezeSWOP) == 0)) | |
168 | + | then 0 | |
169 | + | else (totalFreezeSWOPnew + (((totalActiveSWOP - totalFreezeSWOP) * (totalVoteSWOPnew - totalFreezeSWOPnew)) / (totalVoteSWOP - totalFreezeSWOP))) | |
170 | + | let totalEntry = [IntegerEntry(kTotalPeriod, currPeriod), IntegerEntry(kTotalFreezeSWOP, totalFreezeSWOPnew), IntegerEntry(kTotalActiveSWOP, totalActiveVoteSWOPnew), IntegerEntry(kTotalVoteSWOP, totalVoteSWOPnew)] | |
171 | + | ((userEntry ++ poolEntry) ++ totalEntry) | |
172 | + | } | |
173 | + | } | |
174 | + | ||
175 | + |
github/deemru/w8io/169f3d6 39.99 ms ◑