tx · 7JP3RhGEk1X3YraZmWm8WVkZsdiYBcvuXtFwDNHBnQBV 3MrJgdL1GniipErHy44YF9idzLaUL2iX5DQ: -0.01400000 Waves 2021.05.31 13:22 [1549728] smart account 3MrJgdL1GniipErHy44YF9idzLaUL2iX5DQ > SELF 0.00000000 Waves
{ "type": 13, "id": "7JP3RhGEk1X3YraZmWm8WVkZsdiYBcvuXtFwDNHBnQBV", "fee": 1400000, "feeAssetId": null, "timestamp": 1622456622411, "version": 2, "chainId": 84, "sender": "3MrJgdL1GniipErHy44YF9idzLaUL2iX5DQ", "senderPublicKey": "Dkwrk2dDeUwNM8gVg17qj6fCpJ2e7Qb2myPi1FE9Y6is", "proofs": [ "2P5WZhNTJRymWBsNykeuBLdSTQkcJWia4x2RgYDZC82HvggVG7vzhxWV6MVa61zYSysZV3K5TySnFuaDZYCF98B" ], "script": "base64:AAIEAAAAAAAAAAgIAhIECgIYEQAAAB4AAAAADGFkbWluUHViS2V5MQEAAAAgBM915WTQwQ9OZ7kfE2TEGg3qhCRCMX0zkF1AWAqdk0oAAAAADGFkbWluUHViS2V5MgEAAAAgBM915WTQwQ9OZ7kfE2TEGg3qhCRCMX0zkF1AWAqdk0oAAAAADGFkbWluUHViS2V5MwEAAAAgBM915WTQwQ9OZ7kfE2TEGg3qhCRCMX0zkF1AWAqdk0oAAAAAEWtVc2VyUG9vbFZvdGVTV09QAgAAAAVfdm90ZQAAAAAOa1VzZXJQb29sU3RydWMCAAAAEF91c2VyX3Bvb2xfc3RydWMAAAAAEmtVc2VyVG90YWxWb3RlU1dPUAIAAAAVX3VzZXJfdG90YWxfU1dPUF92b3RlAAAAAA9rVXNlclRvdGFsU3RydWMCAAAAEV91c2VyX3RvdGFsX3N0cnVjAAAAAA1rUG9vbFZvdGVTV09QAgAAAApfdm90ZV9TV09QAAAAAAprUG9vbFN0cnVjAgAAAAtfcG9vbF9zdHJ1YwAAAAAOa1RvdGFsVm90ZVNXT1ACAAAAD3RvdGFsX3ZvdGVfU1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ABEwAAAACBQAAABR1c2VyVW52b3RlZFBlcmlvZE5ldwkABEwAAAACBQAAAA9wb29sVm90ZVNXT1BuZXcJAARMAAAAAgUAAAARcG9vbEFjdGl2ZVNXT1BuZXcJAARMAAAAAgUAAAAQdG90YWxWb3RlU1dPUG5ldwkABEwAAAACBQAAABJ0b3RhbEFjdGl2ZVNXT1BuZXcFAAAAA25pbAMJAABmAAAAAgAAAAAAAAAAAAkAAZcAAAABBQAAAAxhbGxOZXdWYWx1ZXMJAAACAAAAAQIAAAAfT25lIG9yIG1vcmUgdmFsdWVzIGFyZSBuZWdhdGl2ZQkABE4AAAACCQAETgAAAAIJAAROAAAAAgkABE4AAAACCQAETgAAAAIJAAROAAAAAgUAAAANdXNlclBvb2xFbnRyeQUAAAAOdXNlclRvdGFsRW50cnkFAAAACXBvb2xFbnRyeQUAAAAKdG90YWxFbnRyeQkBAAAAD2NhbGNEZWxldGVFbnRyeQAAAAMJAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyBQAAAAtwb29sQWRkcmVzcwUAAAATdXNlclBvb2xWb3RlU1dPUG5ldwUAAAAfaGFydmVzdFBvb2xBY3RpdmVWb3RlU3RydWNFbnRyeQUAAAAjaGFydmVzdFVzZXJQb29sQWN0aXZlVm90ZVN0cnVjRW50cnkAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleZg8sL0=", "height": 1549728, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6QwcyK3iMidzni8JwJ9iGegBhjhFyxcn5p1Xo7N4Dhdk Next: M8v9fDgPBTknaJ9F1ayoMvL2htZgRgPTnWGgGAyp6TF Diff:
Old | New | Differences | |
---|---|---|---|
49 | 49 | ||
50 | 50 | let minVotePower = valueOrErrorMessage(getInteger(this, kMinVotePower), "Empty kMinVotePower") | |
51 | 51 | ||
52 | - | let govAddr = Address(base58' | |
52 | + | let govAddr = Address(base58'3PLHVWCqA9DJPDbadUofTohnCULLauiDWhS') | |
53 | 53 | ||
54 | 54 | let currPeriod = (basePeriod + ((height - startHeight) / periodLength)) | |
55 | 55 | ||
98 | 98 | then throw("This pool has no _current_pool_fraction_reward in Governance dApp") | |
99 | 99 | else { | |
100 | 100 | let userSWOPinGovernance = valueOrErrorMessage(getInteger(govAddr, (toString(i.caller) + "_SWOP_amount")), "Empty _SWOP_amount at gov. address") | |
101 | - | let $ | |
101 | + | let $t035404173 = if (isDefined(getString(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc)))) | |
102 | 102 | then { | |
103 | 103 | let data = split(valueOrErrorMessage(getString(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc)), "Empty kUserPoolStruc"), "_") | |
104 | 104 | $Tuple4(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]), parseIntValue(data[3])) | |
107 | 107 | let uPoolVoteSWOP = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolVoteSWOP)), 0) | |
108 | 108 | $Tuple4(uPoolVoteSWOP, uPoolVoteSWOP, 0, 0) | |
109 | 109 | } | |
110 | - | let userPoolVoteSWOP = $ | |
111 | - | let userPoolActiveVoteSWOP = $ | |
112 | - | let userPoolVotePeriod = $ | |
113 | - | let userPoolFreezeSWOP = $ | |
114 | - | let $ | |
110 | + | let userPoolVoteSWOP = $t035404173._1 | |
111 | + | let userPoolActiveVoteSWOP = $t035404173._2 | |
112 | + | let userPoolVotePeriod = $t035404173._3 | |
113 | + | let userPoolFreezeSWOP = $t035404173._4 | |
114 | + | let $t041794687 = if (isDefined(getString(this, (toString(i.caller) + kUserTotalStruc)))) | |
115 | 115 | then { | |
116 | 116 | let data = split(valueOrErrorMessage(getString(this, (toString(i.caller) + kUserTotalStruc)), "Empty kUserTotalStruc"), "_") | |
117 | 117 | $Tuple3(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2])) | |
120 | 120 | let uPoolTotalSWOP = valueOrElse(getInteger(this, (toString(i.caller) + kUserTotalVoteSWOP)), 0) | |
121 | 121 | $Tuple3(uPoolTotalSWOP, 0, 0) | |
122 | 122 | } | |
123 | - | let userTotalVoteSWOP = $ | |
124 | - | let userUnvoted = $ | |
125 | - | let userUnvotedPeriod = $ | |
126 | - | let $ | |
123 | + | let userTotalVoteSWOP = $t041794687._1 | |
124 | + | let userUnvoted = $t041794687._2 | |
125 | + | let userUnvotedPeriod = $t041794687._3 | |
126 | + | let $t046925160 = if (isDefined(getString(this, (poolAddress + kPoolStruc)))) | |
127 | 127 | then { | |
128 | 128 | let data = split(valueOrErrorMessage(getString(this, (poolAddress + kPoolStruc)), "Empty kPoolStruc"), "_") | |
129 | 129 | $Tuple3(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2])) | |
132 | 132 | let uPoolVoteSWOP = valueOrElse(getInteger(this, (poolAddress + kPoolVoteSWOP)), 0) | |
133 | 133 | $Tuple4(uPoolVoteSWOP, uPoolVoteSWOP, 0, 0) | |
134 | 134 | } | |
135 | - | let poolVoteSWOP = $ | |
136 | - | let poolActiveSWOP = $ | |
137 | - | let poolPeriod = $ | |
138 | - | let $ | |
135 | + | let poolVoteSWOP = $t046925160._1 | |
136 | + | let poolActiveSWOP = $t046925160._2 | |
137 | + | let poolPeriod = $t046925160._3 | |
138 | + | let $t051665602 = if (isDefined(getString(this, kTotalStruc))) | |
139 | 139 | then { | |
140 | 140 | let data = split(valueOrErrorMessage(getString(this, kTotalStruc), "Empty kTotalStruc"), "_") | |
141 | 141 | $Tuple3(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2])) | |
144 | 144 | let uTotalVoteSWOP = valueOrElse(getInteger(this, kTotalVoteSWOP), 0) | |
145 | 145 | $Tuple4(uTotalVoteSWOP, uTotalVoteSWOP, 0, 0) | |
146 | 146 | } | |
147 | - | let totalVoteSWOP = $ | |
148 | - | let totalActiveSWOP = $ | |
149 | - | let totalPeriod = $ | |
147 | + | let totalVoteSWOP = $t051665602._1 | |
148 | + | let totalActiveSWOP = $t051665602._2 | |
149 | + | let totalPeriod = $t051665602._3 | |
150 | 150 | let poolVoteDiffSWOP = (userPoolVoteSWOPnew - userPoolVoteSWOP) | |
151 | 151 | let userTotalVoteSWOPnew = (userTotalVoteSWOP + poolVoteDiffSWOP) | |
152 | 152 | if (!(isCallerInGovernance(i.caller))) | |
157 | 157 | then throw("New userTotalVoteSWOPnew < 0") | |
158 | 158 | else if ((0 > userPoolVoteSWOPnew)) | |
159 | 159 | then throw("New userPoolVoteSWOPnew < 0") | |
160 | - | else if ((userPoolVoteSWOPnew >= userPoolVoteSWOP)) | |
161 | - | then { | |
162 | - | let coef = votingCoef() | |
163 | - | let userPoolActiveVoteSWOPnew = if ((userPoolVotePeriod == currPeriod)) | |
164 | - | then (userPoolActiveVoteSWOP + fraction(poolVoteDiffSWOP, coef, scale8)) | |
165 | - | else (userPoolVoteSWOP + fraction(poolVoteDiffSWOP, coef, scale8)) | |
166 | - | let userPoolFreezeSWOPnew = if ((userPoolVotePeriod == currPeriod)) | |
167 | - | then userPoolFreezeSWOP | |
168 | - | else userPoolVoteSWOP | |
169 | - | let userUnvotedNew = if ((userUnvotedPeriod == currPeriod)) | |
170 | - | then max([0, (userUnvoted - poolVoteDiffSWOP)]) | |
171 | - | else 0 | |
172 | - | let userUnvotedPeriodNew = currPeriod | |
173 | - | let userPoolStrucNew = ((((((toString(userPoolVoteSWOPnew) + "_") + toString(userPoolActiveVoteSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(userPoolFreezeSWOPnew)) | |
174 | - | let userPoolEntry = [StringEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc), userPoolStrucNew)] | |
175 | - | let userTotalStrucNew = ((((toString(userTotalVoteSWOPnew) + "_") + toString(userUnvotedNew)) + "_") + toString(userUnvotedPeriodNew)) | |
176 | - | let userTotalEntry = [StringEntry((toString(i.caller) + kUserTotalStruc), userTotalStrucNew)] | |
177 | - | let poolVoteSWOPnew = (poolVoteSWOP + poolVoteDiffSWOP) | |
178 | - | let poolActiveSWOPnew = if ((poolPeriod == currPeriod)) | |
179 | - | then (poolActiveSWOP + fraction(poolVoteDiffSWOP, coef, scale8)) | |
180 | - | else (poolVoteSWOP + fraction(poolVoteDiffSWOP, coef, scale8)) | |
181 | - | let poolStrucNew = ((((toString(poolVoteSWOPnew) + "_") + toString(poolActiveSWOPnew)) + "_") + toString(currPeriod)) | |
182 | - | let poolEntry = [StringEntry((poolAddress + kPoolStruc), poolStrucNew)] | |
183 | - | let totalVoteSWOPnew = (totalVoteSWOP + poolVoteDiffSWOP) | |
184 | - | let totalActiveSWOPnew = if ((totalPeriod == currPeriod)) | |
185 | - | then (totalActiveSWOP + fraction(poolVoteDiffSWOP, coef, scale8)) | |
186 | - | else (totalVoteSWOP + fraction(poolVoteDiffSWOP, coef, scale8)) | |
187 | - | let totalStrucNew = ((((toString(totalVoteSWOPnew) + "_") + toString(totalActiveSWOPnew)) + "_") + toString(currPeriod)) | |
188 | - | let totalEntry = [StringEntry(kTotalStruc, totalStrucNew)] | |
189 | - | ((((userPoolEntry ++ userTotalEntry) ++ poolEntry) ++ totalEntry) ++ calcDeleteEntry(toString(i.caller), poolAddress, userPoolVoteSWOPnew)) | |
190 | - | } | |
191 | - | else { | |
192 | - | let removePoolVote = -(poolVoteDiffSWOP) | |
193 | - | let userPoolFreezeSWOPnew = if ((userPoolVotePeriod == currPeriod)) | |
194 | - | then userPoolFreezeSWOP | |
195 | - | else userPoolVoteSWOP | |
196 | - | let userPoolFreezeSWOP2 = min([userPoolFreezeSWOP, userPoolVoteSWOP]) | |
197 | - | let userPoolFreezeSWOPnew2 = min([userPoolFreezeSWOPnew, userPoolVoteSWOPnew]) | |
198 | - | let userPoolActiveVoteSWOPnew = (userPoolFreezeSWOPnew2 + (if (((userPoolVoteSWOP - userPoolFreezeSWOP) == 0)) | |
199 | - | then 0 | |
200 | - | else fraction((userPoolActiveVoteSWOP - userPoolFreezeSWOP), (userPoolVoteSWOPnew - userPoolFreezeSWOPnew2), (userPoolVoteSWOP - userPoolFreezeSWOP)))) | |
201 | - | let userPoolActiveVoteDiff = (userPoolActiveVoteSWOPnew - (if ((userPoolVotePeriod == currPeriod)) | |
202 | - | then userPoolActiveVoteSWOP | |
203 | - | else userPoolVoteSWOP)) | |
204 | - | let newUnvoted = max([0, (removePoolVote - (if ((userPoolVotePeriod == currPeriod)) | |
205 | - | then (userPoolVoteSWOP - userPoolFreezeSWOP2) | |
206 | - | else 0))]) | |
207 | - | let userUnvotedNew = (newUnvoted + (if ((userUnvotedPeriod == currPeriod)) | |
208 | - | then userUnvoted | |
209 | - | else 0)) | |
210 | - | let userUnvotedPeriodNew = if ((newUnvoted > 0)) | |
211 | - | then currPeriod | |
212 | - | else userUnvotedPeriod | |
213 | - | let userPoolStrucNew = ((((((toString(userPoolVoteSWOPnew) + "_") + toString(userPoolActiveVoteSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(userPoolFreezeSWOPnew)) | |
214 | - | let userPoolEntry = [StringEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc), userPoolStrucNew)] | |
215 | - | let userTotalStrucNew = ((((toString(userTotalVoteSWOPnew) + "_") + toString(userUnvotedNew)) + "_") + toString(userUnvotedPeriodNew)) | |
216 | - | let userTotalEntry = [StringEntry((toString(i.caller) + kUserTotalStruc), userTotalStrucNew)] | |
217 | - | let poolVoteSWOPnew = (poolVoteSWOP - removePoolVote) | |
218 | - | let poolActiveSWOPnew = if ((poolPeriod == currPeriod)) | |
219 | - | then (poolActiveSWOP + userPoolActiveVoteDiff) | |
220 | - | else (poolVoteSWOP + userPoolActiveVoteDiff) | |
221 | - | let poolStrucNew = ((((toString(poolVoteSWOPnew) + "_") + toString(poolActiveSWOPnew)) + "_") + toString(currPeriod)) | |
222 | - | let poolEntry = [StringEntry((poolAddress + kPoolStruc), poolStrucNew)] | |
223 | - | let totalVoteSWOPnew = (totalVoteSWOP - removePoolVote) | |
224 | - | let totalActiveSWOPnew = if ((totalPeriod == currPeriod)) | |
225 | - | then (totalActiveSWOP + userPoolActiveVoteDiff) | |
226 | - | else (totalVoteSWOP + userPoolActiveVoteDiff) | |
227 | - | let totalStrucNew = ((((toString(totalVoteSWOPnew) + "_") + toString(totalActiveSWOPnew)) + "_") + toString(currPeriod)) | |
228 | - | let totalEntry = [StringEntry(kTotalStruc, totalStrucNew)] | |
229 | - | let allNewValues = [currPeriod, userPoolFreezeSWOPnew, userPoolActiveVoteSWOPnew, userPoolFreezeSWOPnew, userUnvotedNew, userUnvotedPeriodNew, poolVoteSWOPnew, poolActiveSWOPnew, totalVoteSWOPnew, totalActiveSWOPnew] | |
230 | - | if ((0 > min(allNewValues))) | |
231 | - | then throw("One or more values are negative") | |
232 | - | else ((((userPoolEntry ++ userTotalEntry) ++ poolEntry) ++ totalEntry) ++ calcDeleteEntry(toString(i.caller), poolAddress, userPoolVoteSWOPnew)) | |
233 | - | } | |
160 | + | else { | |
161 | + | let amountOfVoting = split(valueOrElse(getString(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc)), ""), "_") | |
162 | + | let amountPoolStract = split(valueOrElse(getString(this, (poolAddress + kPoolStruc)), ""), "_") | |
163 | + | let harvestPoolActiveVoteStrucEntry = if (if ((valueOrElse(getString(this, (poolAddress + kPoolStruc)), "") != "")) | |
164 | + | then (currPeriod != valueOrElse(parseInt(amountPoolStract[2]), 0)) | |
165 | + | else false) | |
166 | + | then { | |
167 | + | let harvestPoolActiveVoteStruc = ((amountPoolStract[1] + "_") + amountPoolStract[2]) | |
168 | + | [StringEntry((poolAddress + kHarvestPoolActiveVoteStruc), harvestPoolActiveVoteStruc)] | |
169 | + | } | |
170 | + | else nil | |
171 | + | let harvestUserPoolActiveVoteStrucEntry = if (if ((valueOrElse(getString(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc)), "") != "")) | |
172 | + | then (currPeriod != valueOrElse(parseInt(amountOfVoting[2]), 0)) | |
173 | + | else false) | |
174 | + | then { | |
175 | + | let harvestUserPoolActiveVoteStruc = ((amountOfVoting[1] + "_") + amountOfVoting[2]) | |
176 | + | [StringEntry((((toString(i.caller) + "_") + poolAddress) + kHarvestUserPoolActiveVoteStruc), harvestUserPoolActiveVoteStruc)] | |
177 | + | } | |
178 | + | else nil | |
179 | + | if ((userPoolVoteSWOPnew >= userPoolVoteSWOP)) | |
180 | + | then { | |
181 | + | let coef = votingCoef() | |
182 | + | let userPoolActiveVoteSWOPnew = if ((userPoolVotePeriod == currPeriod)) | |
183 | + | then (userPoolActiveVoteSWOP + fraction(poolVoteDiffSWOP, coef, scale8)) | |
184 | + | else (userPoolVoteSWOP + fraction(poolVoteDiffSWOP, coef, scale8)) | |
185 | + | let userPoolFreezeSWOPnew = if ((userPoolVotePeriod == currPeriod)) | |
186 | + | then userPoolFreezeSWOP | |
187 | + | else userPoolVoteSWOP | |
188 | + | let userUnvotedNew = if ((userUnvotedPeriod == currPeriod)) | |
189 | + | then max([0, (userUnvoted - poolVoteDiffSWOP)]) | |
190 | + | else 0 | |
191 | + | let userUnvotedPeriodNew = currPeriod | |
192 | + | let userPoolStrucNew = ((((((toString(userPoolVoteSWOPnew) + "_") + toString(userPoolActiveVoteSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(userPoolFreezeSWOPnew)) | |
193 | + | let userPoolEntry = [StringEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc), userPoolStrucNew)] | |
194 | + | let userTotalStrucNew = ((((toString(userTotalVoteSWOPnew) + "_") + toString(userUnvotedNew)) + "_") + toString(userUnvotedPeriodNew)) | |
195 | + | let userTotalEntry = [StringEntry((toString(i.caller) + kUserTotalStruc), userTotalStrucNew)] | |
196 | + | let poolVoteSWOPnew = (poolVoteSWOP + poolVoteDiffSWOP) | |
197 | + | let poolActiveSWOPnew = if ((poolPeriod == currPeriod)) | |
198 | + | then (poolActiveSWOP + fraction(poolVoteDiffSWOP, coef, scale8)) | |
199 | + | else (poolVoteSWOP + fraction(poolVoteDiffSWOP, coef, scale8)) | |
200 | + | let poolStrucNew = ((((toString(poolVoteSWOPnew) + "_") + toString(poolActiveSWOPnew)) + "_") + toString(currPeriod)) | |
201 | + | let poolEntry = [StringEntry((poolAddress + kPoolStruc), poolStrucNew)] | |
202 | + | let totalVoteSWOPnew = (totalVoteSWOP + poolVoteDiffSWOP) | |
203 | + | let totalActiveSWOPnew = if ((totalPeriod == currPeriod)) | |
204 | + | then (totalActiveSWOP + fraction(poolVoteDiffSWOP, coef, scale8)) | |
205 | + | else (totalVoteSWOP + fraction(poolVoteDiffSWOP, coef, scale8)) | |
206 | + | let totalStrucNew = ((((toString(totalVoteSWOPnew) + "_") + toString(totalActiveSWOPnew)) + "_") + toString(currPeriod)) | |
207 | + | let totalEntry = [StringEntry(kTotalStruc, totalStrucNew)] | |
208 | + | ((((((userPoolEntry ++ userTotalEntry) ++ poolEntry) ++ totalEntry) ++ calcDeleteEntry(toString(i.caller), poolAddress, userPoolVoteSWOPnew)) ++ harvestPoolActiveVoteStrucEntry) ++ harvestUserPoolActiveVoteStrucEntry) | |
209 | + | } | |
210 | + | else { | |
211 | + | let removePoolVote = -(poolVoteDiffSWOP) | |
212 | + | let userPoolFreezeSWOPnew = if ((userPoolVotePeriod == currPeriod)) | |
213 | + | then userPoolFreezeSWOP | |
214 | + | else userPoolVoteSWOP | |
215 | + | let userPoolFreezeSWOP2 = min([userPoolFreezeSWOP, userPoolVoteSWOP]) | |
216 | + | let userPoolFreezeSWOPnew2 = min([userPoolFreezeSWOPnew, userPoolVoteSWOPnew]) | |
217 | + | let userPoolActiveVoteSWOPnew = (userPoolFreezeSWOPnew2 + (if (((userPoolVoteSWOP - userPoolFreezeSWOP) == 0)) | |
218 | + | then 0 | |
219 | + | else fraction((userPoolActiveVoteSWOP - userPoolFreezeSWOP), (userPoolVoteSWOPnew - userPoolFreezeSWOPnew2), (userPoolVoteSWOP - userPoolFreezeSWOP)))) | |
220 | + | let userPoolActiveVoteDiff = (userPoolActiveVoteSWOPnew - (if ((userPoolVotePeriod == currPeriod)) | |
221 | + | then userPoolActiveVoteSWOP | |
222 | + | else userPoolVoteSWOP)) | |
223 | + | let newUnvoted = max([0, (removePoolVote - (if ((userPoolVotePeriod == currPeriod)) | |
224 | + | then (userPoolVoteSWOP - userPoolFreezeSWOP2) | |
225 | + | else 0))]) | |
226 | + | let userUnvotedNew = (newUnvoted + (if ((userUnvotedPeriod == currPeriod)) | |
227 | + | then userUnvoted | |
228 | + | else 0)) | |
229 | + | let userUnvotedPeriodNew = if ((newUnvoted > 0)) | |
230 | + | then currPeriod | |
231 | + | else userUnvotedPeriod | |
232 | + | let userPoolStrucNew = ((((((toString(userPoolVoteSWOPnew) + "_") + toString(userPoolActiveVoteSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(userPoolFreezeSWOPnew)) | |
233 | + | let userPoolEntry = [StringEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc), userPoolStrucNew)] | |
234 | + | let userTotalStrucNew = ((((toString(userTotalVoteSWOPnew) + "_") + toString(userUnvotedNew)) + "_") + toString(userUnvotedPeriodNew)) | |
235 | + | let userTotalEntry = [StringEntry((toString(i.caller) + kUserTotalStruc), userTotalStrucNew)] | |
236 | + | let poolVoteSWOPnew = (poolVoteSWOP - removePoolVote) | |
237 | + | let poolActiveSWOPnew = if ((poolPeriod == currPeriod)) | |
238 | + | then (poolActiveSWOP + userPoolActiveVoteDiff) | |
239 | + | else (poolVoteSWOP + userPoolActiveVoteDiff) | |
240 | + | let poolStrucNew = ((((toString(poolVoteSWOPnew) + "_") + toString(poolActiveSWOPnew)) + "_") + toString(currPeriod)) | |
241 | + | let poolEntry = [StringEntry((poolAddress + kPoolStruc), poolStrucNew)] | |
242 | + | let totalVoteSWOPnew = (totalVoteSWOP - removePoolVote) | |
243 | + | let totalActiveSWOPnew = if ((totalPeriod == currPeriod)) | |
244 | + | then (totalActiveSWOP + userPoolActiveVoteDiff) | |
245 | + | else (totalVoteSWOP + userPoolActiveVoteDiff) | |
246 | + | let totalStrucNew = ((((toString(totalVoteSWOPnew) + "_") + toString(totalActiveSWOPnew)) + "_") + toString(currPeriod)) | |
247 | + | let totalEntry = [StringEntry(kTotalStruc, totalStrucNew)] | |
248 | + | let allNewValues = [currPeriod, userPoolFreezeSWOPnew, userPoolActiveVoteSWOPnew, userPoolFreezeSWOPnew, userUnvotedNew, userUnvotedPeriodNew, poolVoteSWOPnew, poolActiveSWOPnew, totalVoteSWOPnew, totalActiveSWOPnew] | |
249 | + | if ((0 > min(allNewValues))) | |
250 | + | then throw("One or more values are negative") | |
251 | + | else ((((((userPoolEntry ++ userTotalEntry) ++ poolEntry) ++ totalEntry) ++ calcDeleteEntry(toString(i.caller), poolAddress, userPoolVoteSWOPnew)) ++ harvestPoolActiveVoteStrucEntry) ++ harvestUserPoolActiveVoteStrucEntry) | |
252 | + | } | |
253 | + | } | |
234 | 254 | } | |
235 | 255 | } | |
236 | 256 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let adminPubKey1 = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
5 | 5 | ||
6 | 6 | let adminPubKey2 = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
7 | 7 | ||
8 | 8 | let adminPubKey3 = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
9 | 9 | ||
10 | 10 | let kUserPoolVoteSWOP = "_vote" | |
11 | 11 | ||
12 | 12 | let kUserPoolStruc = "_user_pool_struc" | |
13 | 13 | ||
14 | 14 | let kUserTotalVoteSWOP = "_user_total_SWOP_vote" | |
15 | 15 | ||
16 | 16 | let kUserTotalStruc = "_user_total_struc" | |
17 | 17 | ||
18 | 18 | let kPoolVoteSWOP = "_vote_SWOP" | |
19 | 19 | ||
20 | 20 | let kPoolStruc = "_pool_struc" | |
21 | 21 | ||
22 | 22 | let kTotalVoteSWOP = "total_vote_SWOP" | |
23 | 23 | ||
24 | 24 | let kTotalStruc = "total_struc" | |
25 | 25 | ||
26 | 26 | let kHarvestPoolActiveVoteStruc = "_harvest_pool_activeVote_struc" | |
27 | 27 | ||
28 | 28 | let kHarvestUserPoolActiveVoteStruc = "_harvest_user_pool_activeVote_struc" | |
29 | 29 | ||
30 | 30 | let kStartHeight = "start_height" | |
31 | 31 | ||
32 | 32 | let kBasePeriod = "base_period" | |
33 | 33 | ||
34 | 34 | let kPeriodLength = "period_length" | |
35 | 35 | ||
36 | 36 | let kDurationFullVotePower = "duration_full_vote_power" | |
37 | 37 | ||
38 | 38 | let kMinVotePower = "min_vote_power" | |
39 | 39 | ||
40 | 40 | let scale8 = 100000000 | |
41 | 41 | ||
42 | 42 | let basePeriod = valueOrErrorMessage(getInteger(this, kBasePeriod), "Empty kBasePeriod") | |
43 | 43 | ||
44 | 44 | let startHeight = valueOrErrorMessage(getInteger(this, kStartHeight), "Empty kStartHeight") | |
45 | 45 | ||
46 | 46 | let periodLength = valueOrErrorMessage(getInteger(this, kPeriodLength), "Empty kPeriodLength") | |
47 | 47 | ||
48 | 48 | let durationFullVotePower = valueOrErrorMessage(getInteger(this, kDurationFullVotePower), "Empty kDurationFullVotePower") | |
49 | 49 | ||
50 | 50 | let minVotePower = valueOrErrorMessage(getInteger(this, kMinVotePower), "Empty kMinVotePower") | |
51 | 51 | ||
52 | - | let govAddr = Address(base58' | |
52 | + | let govAddr = Address(base58'3PLHVWCqA9DJPDbadUofTohnCULLauiDWhS') | |
53 | 53 | ||
54 | 54 | let currPeriod = (basePeriod + ((height - startHeight) / periodLength)) | |
55 | 55 | ||
56 | 56 | func isCallerInGovernance (user) = if ((valueOrElse(getInteger(govAddr, (toString(user) + "_SWOP_amount")), 0) > 0)) | |
57 | 57 | then true | |
58 | 58 | else false | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func isPoolInGovernance (poolAddress) = isDefined(getInteger(govAddr, (poolAddress + "_current_pool_fraction_reward"))) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func votingCoef () = { | |
65 | 65 | let votingDuration = (height - (startHeight + (currPeriod * periodLength))) | |
66 | 66 | if ((durationFullVotePower > votingDuration)) | |
67 | 67 | then scale8 | |
68 | 68 | else { | |
69 | 69 | let x1 = durationFullVotePower | |
70 | 70 | let y1 = scale8 | |
71 | 71 | let x2 = periodLength | |
72 | 72 | let y2 = minVotePower | |
73 | 73 | let k = (((y2 - y1) * scale8) / (x2 - x1)) | |
74 | 74 | let b = ((y1 * scale8) - (k * x1)) | |
75 | 75 | (((votingDuration * k) / scale8) + (b / scale8)) | |
76 | 76 | } | |
77 | 77 | } | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func calcDeleteEntry (caller,poolAddress,userPoolVoteSWOPnew) = { | |
81 | 81 | func deleteIfExists (list,key) = if (isDefined(getInteger(this, key))) | |
82 | 82 | then (list :+ DeleteEntry(key)) | |
83 | 83 | else list | |
84 | 84 | ||
85 | 85 | deleteIfExists(deleteIfExists(deleteIfExists(deleteIfExists(nil, (((caller + "_") + poolAddress) + kUserPoolVoteSWOP)), (caller + kUserTotalVoteSWOP)), (poolAddress + kPoolVoteSWOP)), kTotalVoteSWOP) | |
86 | 86 | } | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | @Callable(i) | |
90 | 90 | func votePoolWeight (poolAddressesL,poolsVoteSWOPNewL) = if (if ((size(poolAddressesL) > 1)) | |
91 | 91 | then true | |
92 | 92 | else (size(poolsVoteSWOPNewL) > 1)) | |
93 | 93 | then throw("poolAddressesL.size > 1 or poolsVoteSWOPNewL.size > 1") | |
94 | 94 | else { | |
95 | 95 | let poolAddress = poolAddressesL[0] | |
96 | 96 | let userPoolVoteSWOPnew = poolsVoteSWOPNewL[0] | |
97 | 97 | if (!(isPoolInGovernance(poolAddress))) | |
98 | 98 | then throw("This pool has no _current_pool_fraction_reward in Governance dApp") | |
99 | 99 | else { | |
100 | 100 | let userSWOPinGovernance = valueOrErrorMessage(getInteger(govAddr, (toString(i.caller) + "_SWOP_amount")), "Empty _SWOP_amount at gov. address") | |
101 | - | let $ | |
101 | + | let $t035404173 = if (isDefined(getString(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc)))) | |
102 | 102 | then { | |
103 | 103 | let data = split(valueOrErrorMessage(getString(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc)), "Empty kUserPoolStruc"), "_") | |
104 | 104 | $Tuple4(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]), parseIntValue(data[3])) | |
105 | 105 | } | |
106 | 106 | else { | |
107 | 107 | let uPoolVoteSWOP = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolVoteSWOP)), 0) | |
108 | 108 | $Tuple4(uPoolVoteSWOP, uPoolVoteSWOP, 0, 0) | |
109 | 109 | } | |
110 | - | let userPoolVoteSWOP = $ | |
111 | - | let userPoolActiveVoteSWOP = $ | |
112 | - | let userPoolVotePeriod = $ | |
113 | - | let userPoolFreezeSWOP = $ | |
114 | - | let $ | |
110 | + | let userPoolVoteSWOP = $t035404173._1 | |
111 | + | let userPoolActiveVoteSWOP = $t035404173._2 | |
112 | + | let userPoolVotePeriod = $t035404173._3 | |
113 | + | let userPoolFreezeSWOP = $t035404173._4 | |
114 | + | let $t041794687 = if (isDefined(getString(this, (toString(i.caller) + kUserTotalStruc)))) | |
115 | 115 | then { | |
116 | 116 | let data = split(valueOrErrorMessage(getString(this, (toString(i.caller) + kUserTotalStruc)), "Empty kUserTotalStruc"), "_") | |
117 | 117 | $Tuple3(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2])) | |
118 | 118 | } | |
119 | 119 | else { | |
120 | 120 | let uPoolTotalSWOP = valueOrElse(getInteger(this, (toString(i.caller) + kUserTotalVoteSWOP)), 0) | |
121 | 121 | $Tuple3(uPoolTotalSWOP, 0, 0) | |
122 | 122 | } | |
123 | - | let userTotalVoteSWOP = $ | |
124 | - | let userUnvoted = $ | |
125 | - | let userUnvotedPeriod = $ | |
126 | - | let $ | |
123 | + | let userTotalVoteSWOP = $t041794687._1 | |
124 | + | let userUnvoted = $t041794687._2 | |
125 | + | let userUnvotedPeriod = $t041794687._3 | |
126 | + | let $t046925160 = if (isDefined(getString(this, (poolAddress + kPoolStruc)))) | |
127 | 127 | then { | |
128 | 128 | let data = split(valueOrErrorMessage(getString(this, (poolAddress + kPoolStruc)), "Empty kPoolStruc"), "_") | |
129 | 129 | $Tuple3(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2])) | |
130 | 130 | } | |
131 | 131 | else { | |
132 | 132 | let uPoolVoteSWOP = valueOrElse(getInteger(this, (poolAddress + kPoolVoteSWOP)), 0) | |
133 | 133 | $Tuple4(uPoolVoteSWOP, uPoolVoteSWOP, 0, 0) | |
134 | 134 | } | |
135 | - | let poolVoteSWOP = $ | |
136 | - | let poolActiveSWOP = $ | |
137 | - | let poolPeriod = $ | |
138 | - | let $ | |
135 | + | let poolVoteSWOP = $t046925160._1 | |
136 | + | let poolActiveSWOP = $t046925160._2 | |
137 | + | let poolPeriod = $t046925160._3 | |
138 | + | let $t051665602 = if (isDefined(getString(this, kTotalStruc))) | |
139 | 139 | then { | |
140 | 140 | let data = split(valueOrErrorMessage(getString(this, kTotalStruc), "Empty kTotalStruc"), "_") | |
141 | 141 | $Tuple3(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2])) | |
142 | 142 | } | |
143 | 143 | else { | |
144 | 144 | let uTotalVoteSWOP = valueOrElse(getInteger(this, kTotalVoteSWOP), 0) | |
145 | 145 | $Tuple4(uTotalVoteSWOP, uTotalVoteSWOP, 0, 0) | |
146 | 146 | } | |
147 | - | let totalVoteSWOP = $ | |
148 | - | let totalActiveSWOP = $ | |
149 | - | let totalPeriod = $ | |
147 | + | let totalVoteSWOP = $t051665602._1 | |
148 | + | let totalActiveSWOP = $t051665602._2 | |
149 | + | let totalPeriod = $t051665602._3 | |
150 | 150 | let poolVoteDiffSWOP = (userPoolVoteSWOPnew - userPoolVoteSWOP) | |
151 | 151 | let userTotalVoteSWOPnew = (userTotalVoteSWOP + poolVoteDiffSWOP) | |
152 | 152 | if (!(isCallerInGovernance(i.caller))) | |
153 | 153 | then throw("This address has 0 SWOP in Governance dApp") | |
154 | 154 | else if ((userTotalVoteSWOPnew > userSWOPinGovernance)) | |
155 | 155 | then throw(((((toString(this) + " has ") + toString(userSWOPinGovernance)) + " SWOP in governance. New SWOP in voting ") + toString(userTotalVoteSWOPnew))) | |
156 | 156 | else if ((0 > userTotalVoteSWOPnew)) | |
157 | 157 | then throw("New userTotalVoteSWOPnew < 0") | |
158 | 158 | else if ((0 > userPoolVoteSWOPnew)) | |
159 | 159 | then throw("New userPoolVoteSWOPnew < 0") | |
160 | - | else if ((userPoolVoteSWOPnew >= userPoolVoteSWOP)) | |
161 | - | then { | |
162 | - | let coef = votingCoef() | |
163 | - | let userPoolActiveVoteSWOPnew = if ((userPoolVotePeriod == currPeriod)) | |
164 | - | then (userPoolActiveVoteSWOP + fraction(poolVoteDiffSWOP, coef, scale8)) | |
165 | - | else (userPoolVoteSWOP + fraction(poolVoteDiffSWOP, coef, scale8)) | |
166 | - | let userPoolFreezeSWOPnew = if ((userPoolVotePeriod == currPeriod)) | |
167 | - | then userPoolFreezeSWOP | |
168 | - | else userPoolVoteSWOP | |
169 | - | let userUnvotedNew = if ((userUnvotedPeriod == currPeriod)) | |
170 | - | then max([0, (userUnvoted - poolVoteDiffSWOP)]) | |
171 | - | else 0 | |
172 | - | let userUnvotedPeriodNew = currPeriod | |
173 | - | let userPoolStrucNew = ((((((toString(userPoolVoteSWOPnew) + "_") + toString(userPoolActiveVoteSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(userPoolFreezeSWOPnew)) | |
174 | - | let userPoolEntry = [StringEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc), userPoolStrucNew)] | |
175 | - | let userTotalStrucNew = ((((toString(userTotalVoteSWOPnew) + "_") + toString(userUnvotedNew)) + "_") + toString(userUnvotedPeriodNew)) | |
176 | - | let userTotalEntry = [StringEntry((toString(i.caller) + kUserTotalStruc), userTotalStrucNew)] | |
177 | - | let poolVoteSWOPnew = (poolVoteSWOP + poolVoteDiffSWOP) | |
178 | - | let poolActiveSWOPnew = if ((poolPeriod == currPeriod)) | |
179 | - | then (poolActiveSWOP + fraction(poolVoteDiffSWOP, coef, scale8)) | |
180 | - | else (poolVoteSWOP + fraction(poolVoteDiffSWOP, coef, scale8)) | |
181 | - | let poolStrucNew = ((((toString(poolVoteSWOPnew) + "_") + toString(poolActiveSWOPnew)) + "_") + toString(currPeriod)) | |
182 | - | let poolEntry = [StringEntry((poolAddress + kPoolStruc), poolStrucNew)] | |
183 | - | let totalVoteSWOPnew = (totalVoteSWOP + poolVoteDiffSWOP) | |
184 | - | let totalActiveSWOPnew = if ((totalPeriod == currPeriod)) | |
185 | - | then (totalActiveSWOP + fraction(poolVoteDiffSWOP, coef, scale8)) | |
186 | - | else (totalVoteSWOP + fraction(poolVoteDiffSWOP, coef, scale8)) | |
187 | - | let totalStrucNew = ((((toString(totalVoteSWOPnew) + "_") + toString(totalActiveSWOPnew)) + "_") + toString(currPeriod)) | |
188 | - | let totalEntry = [StringEntry(kTotalStruc, totalStrucNew)] | |
189 | - | ((((userPoolEntry ++ userTotalEntry) ++ poolEntry) ++ totalEntry) ++ calcDeleteEntry(toString(i.caller), poolAddress, userPoolVoteSWOPnew)) | |
190 | - | } | |
191 | - | else { | |
192 | - | let removePoolVote = -(poolVoteDiffSWOP) | |
193 | - | let userPoolFreezeSWOPnew = if ((userPoolVotePeriod == currPeriod)) | |
194 | - | then userPoolFreezeSWOP | |
195 | - | else userPoolVoteSWOP | |
196 | - | let userPoolFreezeSWOP2 = min([userPoolFreezeSWOP, userPoolVoteSWOP]) | |
197 | - | let userPoolFreezeSWOPnew2 = min([userPoolFreezeSWOPnew, userPoolVoteSWOPnew]) | |
198 | - | let userPoolActiveVoteSWOPnew = (userPoolFreezeSWOPnew2 + (if (((userPoolVoteSWOP - userPoolFreezeSWOP) == 0)) | |
199 | - | then 0 | |
200 | - | else fraction((userPoolActiveVoteSWOP - userPoolFreezeSWOP), (userPoolVoteSWOPnew - userPoolFreezeSWOPnew2), (userPoolVoteSWOP - userPoolFreezeSWOP)))) | |
201 | - | let userPoolActiveVoteDiff = (userPoolActiveVoteSWOPnew - (if ((userPoolVotePeriod == currPeriod)) | |
202 | - | then userPoolActiveVoteSWOP | |
203 | - | else userPoolVoteSWOP)) | |
204 | - | let newUnvoted = max([0, (removePoolVote - (if ((userPoolVotePeriod == currPeriod)) | |
205 | - | then (userPoolVoteSWOP - userPoolFreezeSWOP2) | |
206 | - | else 0))]) | |
207 | - | let userUnvotedNew = (newUnvoted + (if ((userUnvotedPeriod == currPeriod)) | |
208 | - | then userUnvoted | |
209 | - | else 0)) | |
210 | - | let userUnvotedPeriodNew = if ((newUnvoted > 0)) | |
211 | - | then currPeriod | |
212 | - | else userUnvotedPeriod | |
213 | - | let userPoolStrucNew = ((((((toString(userPoolVoteSWOPnew) + "_") + toString(userPoolActiveVoteSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(userPoolFreezeSWOPnew)) | |
214 | - | let userPoolEntry = [StringEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc), userPoolStrucNew)] | |
215 | - | let userTotalStrucNew = ((((toString(userTotalVoteSWOPnew) + "_") + toString(userUnvotedNew)) + "_") + toString(userUnvotedPeriodNew)) | |
216 | - | let userTotalEntry = [StringEntry((toString(i.caller) + kUserTotalStruc), userTotalStrucNew)] | |
217 | - | let poolVoteSWOPnew = (poolVoteSWOP - removePoolVote) | |
218 | - | let poolActiveSWOPnew = if ((poolPeriod == currPeriod)) | |
219 | - | then (poolActiveSWOP + userPoolActiveVoteDiff) | |
220 | - | else (poolVoteSWOP + userPoolActiveVoteDiff) | |
221 | - | let poolStrucNew = ((((toString(poolVoteSWOPnew) + "_") + toString(poolActiveSWOPnew)) + "_") + toString(currPeriod)) | |
222 | - | let poolEntry = [StringEntry((poolAddress + kPoolStruc), poolStrucNew)] | |
223 | - | let totalVoteSWOPnew = (totalVoteSWOP - removePoolVote) | |
224 | - | let totalActiveSWOPnew = if ((totalPeriod == currPeriod)) | |
225 | - | then (totalActiveSWOP + userPoolActiveVoteDiff) | |
226 | - | else (totalVoteSWOP + userPoolActiveVoteDiff) | |
227 | - | let totalStrucNew = ((((toString(totalVoteSWOPnew) + "_") + toString(totalActiveSWOPnew)) + "_") + toString(currPeriod)) | |
228 | - | let totalEntry = [StringEntry(kTotalStruc, totalStrucNew)] | |
229 | - | let allNewValues = [currPeriod, userPoolFreezeSWOPnew, userPoolActiveVoteSWOPnew, userPoolFreezeSWOPnew, userUnvotedNew, userUnvotedPeriodNew, poolVoteSWOPnew, poolActiveSWOPnew, totalVoteSWOPnew, totalActiveSWOPnew] | |
230 | - | if ((0 > min(allNewValues))) | |
231 | - | then throw("One or more values are negative") | |
232 | - | else ((((userPoolEntry ++ userTotalEntry) ++ poolEntry) ++ totalEntry) ++ calcDeleteEntry(toString(i.caller), poolAddress, userPoolVoteSWOPnew)) | |
233 | - | } | |
160 | + | else { | |
161 | + | let amountOfVoting = split(valueOrElse(getString(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc)), ""), "_") | |
162 | + | let amountPoolStract = split(valueOrElse(getString(this, (poolAddress + kPoolStruc)), ""), "_") | |
163 | + | let harvestPoolActiveVoteStrucEntry = if (if ((valueOrElse(getString(this, (poolAddress + kPoolStruc)), "") != "")) | |
164 | + | then (currPeriod != valueOrElse(parseInt(amountPoolStract[2]), 0)) | |
165 | + | else false) | |
166 | + | then { | |
167 | + | let harvestPoolActiveVoteStruc = ((amountPoolStract[1] + "_") + amountPoolStract[2]) | |
168 | + | [StringEntry((poolAddress + kHarvestPoolActiveVoteStruc), harvestPoolActiveVoteStruc)] | |
169 | + | } | |
170 | + | else nil | |
171 | + | let harvestUserPoolActiveVoteStrucEntry = if (if ((valueOrElse(getString(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc)), "") != "")) | |
172 | + | then (currPeriod != valueOrElse(parseInt(amountOfVoting[2]), 0)) | |
173 | + | else false) | |
174 | + | then { | |
175 | + | let harvestUserPoolActiveVoteStruc = ((amountOfVoting[1] + "_") + amountOfVoting[2]) | |
176 | + | [StringEntry((((toString(i.caller) + "_") + poolAddress) + kHarvestUserPoolActiveVoteStruc), harvestUserPoolActiveVoteStruc)] | |
177 | + | } | |
178 | + | else nil | |
179 | + | if ((userPoolVoteSWOPnew >= userPoolVoteSWOP)) | |
180 | + | then { | |
181 | + | let coef = votingCoef() | |
182 | + | let userPoolActiveVoteSWOPnew = if ((userPoolVotePeriod == currPeriod)) | |
183 | + | then (userPoolActiveVoteSWOP + fraction(poolVoteDiffSWOP, coef, scale8)) | |
184 | + | else (userPoolVoteSWOP + fraction(poolVoteDiffSWOP, coef, scale8)) | |
185 | + | let userPoolFreezeSWOPnew = if ((userPoolVotePeriod == currPeriod)) | |
186 | + | then userPoolFreezeSWOP | |
187 | + | else userPoolVoteSWOP | |
188 | + | let userUnvotedNew = if ((userUnvotedPeriod == currPeriod)) | |
189 | + | then max([0, (userUnvoted - poolVoteDiffSWOP)]) | |
190 | + | else 0 | |
191 | + | let userUnvotedPeriodNew = currPeriod | |
192 | + | let userPoolStrucNew = ((((((toString(userPoolVoteSWOPnew) + "_") + toString(userPoolActiveVoteSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(userPoolFreezeSWOPnew)) | |
193 | + | let userPoolEntry = [StringEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc), userPoolStrucNew)] | |
194 | + | let userTotalStrucNew = ((((toString(userTotalVoteSWOPnew) + "_") + toString(userUnvotedNew)) + "_") + toString(userUnvotedPeriodNew)) | |
195 | + | let userTotalEntry = [StringEntry((toString(i.caller) + kUserTotalStruc), userTotalStrucNew)] | |
196 | + | let poolVoteSWOPnew = (poolVoteSWOP + poolVoteDiffSWOP) | |
197 | + | let poolActiveSWOPnew = if ((poolPeriod == currPeriod)) | |
198 | + | then (poolActiveSWOP + fraction(poolVoteDiffSWOP, coef, scale8)) | |
199 | + | else (poolVoteSWOP + fraction(poolVoteDiffSWOP, coef, scale8)) | |
200 | + | let poolStrucNew = ((((toString(poolVoteSWOPnew) + "_") + toString(poolActiveSWOPnew)) + "_") + toString(currPeriod)) | |
201 | + | let poolEntry = [StringEntry((poolAddress + kPoolStruc), poolStrucNew)] | |
202 | + | let totalVoteSWOPnew = (totalVoteSWOP + poolVoteDiffSWOP) | |
203 | + | let totalActiveSWOPnew = if ((totalPeriod == currPeriod)) | |
204 | + | then (totalActiveSWOP + fraction(poolVoteDiffSWOP, coef, scale8)) | |
205 | + | else (totalVoteSWOP + fraction(poolVoteDiffSWOP, coef, scale8)) | |
206 | + | let totalStrucNew = ((((toString(totalVoteSWOPnew) + "_") + toString(totalActiveSWOPnew)) + "_") + toString(currPeriod)) | |
207 | + | let totalEntry = [StringEntry(kTotalStruc, totalStrucNew)] | |
208 | + | ((((((userPoolEntry ++ userTotalEntry) ++ poolEntry) ++ totalEntry) ++ calcDeleteEntry(toString(i.caller), poolAddress, userPoolVoteSWOPnew)) ++ harvestPoolActiveVoteStrucEntry) ++ harvestUserPoolActiveVoteStrucEntry) | |
209 | + | } | |
210 | + | else { | |
211 | + | let removePoolVote = -(poolVoteDiffSWOP) | |
212 | + | let userPoolFreezeSWOPnew = if ((userPoolVotePeriod == currPeriod)) | |
213 | + | then userPoolFreezeSWOP | |
214 | + | else userPoolVoteSWOP | |
215 | + | let userPoolFreezeSWOP2 = min([userPoolFreezeSWOP, userPoolVoteSWOP]) | |
216 | + | let userPoolFreezeSWOPnew2 = min([userPoolFreezeSWOPnew, userPoolVoteSWOPnew]) | |
217 | + | let userPoolActiveVoteSWOPnew = (userPoolFreezeSWOPnew2 + (if (((userPoolVoteSWOP - userPoolFreezeSWOP) == 0)) | |
218 | + | then 0 | |
219 | + | else fraction((userPoolActiveVoteSWOP - userPoolFreezeSWOP), (userPoolVoteSWOPnew - userPoolFreezeSWOPnew2), (userPoolVoteSWOP - userPoolFreezeSWOP)))) | |
220 | + | let userPoolActiveVoteDiff = (userPoolActiveVoteSWOPnew - (if ((userPoolVotePeriod == currPeriod)) | |
221 | + | then userPoolActiveVoteSWOP | |
222 | + | else userPoolVoteSWOP)) | |
223 | + | let newUnvoted = max([0, (removePoolVote - (if ((userPoolVotePeriod == currPeriod)) | |
224 | + | then (userPoolVoteSWOP - userPoolFreezeSWOP2) | |
225 | + | else 0))]) | |
226 | + | let userUnvotedNew = (newUnvoted + (if ((userUnvotedPeriod == currPeriod)) | |
227 | + | then userUnvoted | |
228 | + | else 0)) | |
229 | + | let userUnvotedPeriodNew = if ((newUnvoted > 0)) | |
230 | + | then currPeriod | |
231 | + | else userUnvotedPeriod | |
232 | + | let userPoolStrucNew = ((((((toString(userPoolVoteSWOPnew) + "_") + toString(userPoolActiveVoteSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(userPoolFreezeSWOPnew)) | |
233 | + | let userPoolEntry = [StringEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc), userPoolStrucNew)] | |
234 | + | let userTotalStrucNew = ((((toString(userTotalVoteSWOPnew) + "_") + toString(userUnvotedNew)) + "_") + toString(userUnvotedPeriodNew)) | |
235 | + | let userTotalEntry = [StringEntry((toString(i.caller) + kUserTotalStruc), userTotalStrucNew)] | |
236 | + | let poolVoteSWOPnew = (poolVoteSWOP - removePoolVote) | |
237 | + | let poolActiveSWOPnew = if ((poolPeriod == currPeriod)) | |
238 | + | then (poolActiveSWOP + userPoolActiveVoteDiff) | |
239 | + | else (poolVoteSWOP + userPoolActiveVoteDiff) | |
240 | + | let poolStrucNew = ((((toString(poolVoteSWOPnew) + "_") + toString(poolActiveSWOPnew)) + "_") + toString(currPeriod)) | |
241 | + | let poolEntry = [StringEntry((poolAddress + kPoolStruc), poolStrucNew)] | |
242 | + | let totalVoteSWOPnew = (totalVoteSWOP - removePoolVote) | |
243 | + | let totalActiveSWOPnew = if ((totalPeriod == currPeriod)) | |
244 | + | then (totalActiveSWOP + userPoolActiveVoteDiff) | |
245 | + | else (totalVoteSWOP + userPoolActiveVoteDiff) | |
246 | + | let totalStrucNew = ((((toString(totalVoteSWOPnew) + "_") + toString(totalActiveSWOPnew)) + "_") + toString(currPeriod)) | |
247 | + | let totalEntry = [StringEntry(kTotalStruc, totalStrucNew)] | |
248 | + | let allNewValues = [currPeriod, userPoolFreezeSWOPnew, userPoolActiveVoteSWOPnew, userPoolFreezeSWOPnew, userUnvotedNew, userUnvotedPeriodNew, poolVoteSWOPnew, poolActiveSWOPnew, totalVoteSWOPnew, totalActiveSWOPnew] | |
249 | + | if ((0 > min(allNewValues))) | |
250 | + | then throw("One or more values are negative") | |
251 | + | else ((((((userPoolEntry ++ userTotalEntry) ++ poolEntry) ++ totalEntry) ++ calcDeleteEntry(toString(i.caller), poolAddress, userPoolVoteSWOPnew)) ++ harvestPoolActiveVoteStrucEntry) ++ harvestUserPoolActiveVoteStrucEntry) | |
252 | + | } | |
253 | + | } | |
234 | 254 | } | |
235 | 255 | } | |
236 | 256 | ||
237 | 257 | ||
238 | 258 | @Verifier(tx) | |
239 | 259 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
240 | 260 |
github/deemru/w8io/026f985 49.87 ms ◑