tx · 61xTR5cqZ6tEwMHzpHwYbu4qfVkoqbuiQk3zTi1vD8fV

3N6CYoCsxrcXKe75pQvvV3JqJrwJjm1t4QN:  -0.01400000 Waves

2021.04.14 13:09 [1481984] smart account 3N6CYoCsxrcXKe75pQvvV3JqJrwJjm1t4QN > SELF 0.00000000 Waves

{ "type": 13, "id": "61xTR5cqZ6tEwMHzpHwYbu4qfVkoqbuiQk3zTi1vD8fV", "fee": 1400000, "feeAssetId": null, "timestamp": 1618395018530, "version": 2, "chainId": 84, "sender": "3N6CYoCsxrcXKe75pQvvV3JqJrwJjm1t4QN", "senderPublicKey": "9NDcimsSfq5LxxqoVoq2nbMd1zPqZhFvr6mVUiXWwtM1", "proofs": [ "2p33bPTEzMdWs2xLfTDPesm4wRFgeL1RK8QR6k9Yjjs8H2VkP73gQndHwsbHWGaYuayQsxUtGDa8myTiizskRfQH" ], "script": "base64:AAIEAAAAAAAAAAgIAhIECgIIAQAAABwAAAAADGFkbWluUHViS2V5MQEAAAAgBM915WTQwQ9OZ7kfE2TEGg3qhCRCMX0zkF1AWAqdk0oAAAAADGFkbWluUHViS2V5MgEAAAAgBM915WTQwQ9OZ7kfE2TEGg3qhCRCMX0zkF1AWAqdk0oAAAAADGFkbWluUHViS2V5MwEAAAAgBM915WTQwQ9OZ7kfE2TEGg3qhCRCMX0zkF1AWAqdk0oAAAAAEWtVc2VyUG9vbFZvdGVTV09QAgAAAAVfdm90ZQAAAAAOa1VzZXJQb29sU3RydWMCAAAAEF91c2VyX3Bvb2xfc3RydWMAAAAAEmtVc2VyVG90YWxWb3RlU1dPUAIAAAAVX3VzZXJfdG90YWxfU1dPUF92b3RlAAAAAA9rVXNlclRvdGFsU3RydWMCAAAAEV91c2VyX3RvdGFsX3N0cnVjAAAAAA1rUG9vbFZvdGVTV09QAgAAAApfdm90ZV9TV09QAAAAAAprUG9vbFN0cnVjAgAAAAtfcG9vbF9zdHJ1YwAAAAAOa1RvdGFsVm90ZVNXT1ACAAAAD3RvdGF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NhbGxlcgUAAAALcG9vbEFkZHJlc3MFAAAAE3VzZXJQb29sVm90ZVNXT1BuZXcAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleRUUM4w=", "height": 1481984, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3CqyxN32Tzw1gCYiegzS8L2R3iiZwLoEAPFbHXdR7Foj Next: 749hQD7hJFDepQXZ1BsFVYpyjjgNzwj5BhfqftcPey3Y Diff:
OldNewDifferences
9393 @Callable(i)
9494 func votePoolWeight (poolAddress,userPoolVoteSWOPnew) = {
9595 let userSWOPinGovernance = valueOrErrorMessage(getInteger(govAddr, (toString(i.caller) + "_SWOP_amount")), "Empty _SWOP_amount at gov. address")
96- let $t035564198 = if (isDefined(getString(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc))))
97- then {
98- let data = split(valueOrErrorMessage(getString(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc)), "Empty kUserPoolStruc"), "_")
99- $Tuple4(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]), parseIntValue(data[3]))
96+ if (true)
97+ then throw("line 73")
98+ else {
99+ let $t035904232 = if (isDefined(getString(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc))))
100+ then {
101+ let data = split(valueOrErrorMessage(getString(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc)), "Empty kUserPoolStruc"), "_")
102+ $Tuple4(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]), parseIntValue(data[3]))
103+ }
104+ else {
105+ let uPoolVoteSWOP = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolVoteSWOP)), 0)
106+ $Tuple4(uPoolVoteSWOP, uPoolVoteSWOP, currPeriod, 0)
107+ }
108+ let userPoolVoteSWOP = $t035904232._1
109+ let userPoolActiveVoteSWOP = $t035904232._2
110+ let userPoolVotePeriod = $t035904232._3
111+ let userPoolFreezeSWOP = $t035904232._4
112+ let $t042384755 = if (isDefined(getString(this, (toString(i.caller) + kUserTotalStruc))))
113+ then {
114+ let data = split(valueOrErrorMessage(getString(this, (toString(i.caller) + kUserTotalStruc)), "Empty kUserTotalStruc"), "_")
115+ $Tuple3(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]))
116+ }
117+ else {
118+ let uPoolTotalSWOP = valueOrElse(getInteger(this, (toString(i.caller) + kUserTotalVoteSWOP)), 0)
119+ $Tuple3(uPoolTotalSWOP, 0, currPeriod)
120+ }
121+ let userTotalVoteSWOP = $t042384755._1
122+ let userUnvoted = $t042384755._2
123+ let userUnvotedPeriod = $t042384755._3
124+ let $t047605267 = if (isDefined(getString(this, (poolAddress + kPoolStruc))))
125+ then {
126+ let data = split(valueOrErrorMessage(getString(this, (poolAddress + kPoolStruc)), "Empty kPoolStruc"), "_")
127+ $Tuple4(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]), parseIntValue(data[3]))
128+ }
129+ else {
130+ let uPoolVoteSWOP = valueOrElse(getInteger(this, (poolAddress + kPoolVoteSWOP)), 0)
131+ $Tuple4(uPoolVoteSWOP, uPoolVoteSWOP, 0, 0)
132+ }
133+ let poolVoteSWOP = $t047605267._1
134+ let poolActiveSWOP = $t047605267._2
135+ let poolPeriod = $t047605267._3
136+ let poolFreezeSWOP = $t047605267._4
137+ let $t052735749 = if (isDefined(getString(this, kTotalStruc)))
138+ then {
139+ let data = split(valueOrErrorMessage(getString(this, kTotalStruc), "Empty kTotalStruc"), "_")
140+ $Tuple4(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]), parseIntValue(data[3]))
141+ }
142+ else {
143+ let uTotalVoteSWOP = valueOrElse(getInteger(this, kTotalVoteSWOP), 0)
144+ $Tuple4(uTotalVoteSWOP, uTotalVoteSWOP, 0, 0)
145+ }
146+ let totalVoteSWOP = $t052735749._1
147+ let totalActiveSWOP = $t052735749._2
148+ let totalPeriod = $t052735749._3
149+ let totalFreezeSWOP = $t052735749._4
150+ let poolVoteDiffSWOP = (userPoolVoteSWOPnew - userPoolVoteSWOP)
151+ let userTotalVoteSWOPnew = (userTotalVoteSWOP + poolVoteDiffSWOP)
152+ if (!(isCallerInGovernance(i.caller)))
153+ then throw("This address has 0 SWOP in Governance dApp")
154+ else if ((userTotalVoteSWOPnew > userSWOPinGovernance))
155+ then throw(((((toString(this) + " has ") + toString(userSWOPinGovernance)) + " SWOP in governance. New SWOP in voting ") + toString(userTotalVoteSWOPnew)))
156+ else if ((0 > userTotalVoteSWOPnew))
157+ then throw("New userPoolVoteSWOPnew < 0")
158+ else if ((userPoolVoteSWOPnew >= userPoolVoteSWOP))
159+ then {
160+ let coef = votingCoef()
161+ let userPoolActiveVoteSWOPnew = if ((userPoolVotePeriod == currPeriod))
162+ then (userPoolActiveVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
163+ else (userPoolVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
164+ let userPoolFreezeSWOPnew = if ((userPoolVotePeriod == currPeriod))
165+ then userPoolFreezeSWOP
166+ else userPoolVoteSWOP
167+ let userUnvotedNew = if ((userUnvoted == currPeriod))
168+ then userUnvoted
169+ else max([0, (userUnvoted - poolVoteDiffSWOP)])
170+ let userPoolStrucNew = ((((((toString(userPoolVoteSWOPnew) + "_") + toString(userPoolActiveVoteSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(userPoolFreezeSWOPnew))
171+ let userPoolEntry = [StringEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc), userPoolStrucNew)]
172+ let userTotalStrucNew = ((((toString(userTotalVoteSWOPnew) + "_") + toString(userUnvotedNew)) + "_") + toString(currPeriod))
173+ let userTotalEntry = [StringEntry((toString(i.caller) + kUserTotalStruc), userTotalStrucNew)]
174+ let poolVoteSWOPnew = (poolVoteSWOP + poolVoteDiffSWOP)
175+ let poolActiveSWOPnew = if ((poolPeriod == currPeriod))
176+ then (poolActiveSWOP + ((poolVoteDiffSWOP * coef) / scale8))
177+ else (poolVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
178+ let poolFreezeSWOPnew = if ((poolPeriod == currPeriod))
179+ then poolFreezeSWOP
180+ else poolVoteSWOP
181+ let poolStrucNew = ((((((toString(poolVoteSWOPnew) + "_") + toString(poolActiveSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(poolFreezeSWOPnew))
182+ let poolEntry = [StringEntry((poolAddress + kPoolStruc), poolStrucNew)]
183+ let totalVoteSWOPnew = (totalVoteSWOP + poolVoteDiffSWOP)
184+ let totalActiveSWOPnew = if ((totalPeriod == currPeriod))
185+ then (totalActiveSWOP + ((poolVoteDiffSWOP * coef) / scale8))
186+ else (totalVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
187+ let totalFreezeSWOPnew = if ((poolPeriod == currPeriod))
188+ then totalFreezeSWOP
189+ else totalVoteSWOP
190+ let totalStrucNew = ((((((toString(totalVoteSWOPnew) + "_") + toString(totalActiveSWOPnew)) + "_") + toString(totalPeriod)) + "_") + toString(totalFreezeSWOPnew))
191+ let totalEntry = [StringEntry(kTotalStruc, totalStrucNew)]
192+ ((((userPoolEntry ++ userTotalEntry) ++ poolEntry) ++ totalEntry) ++ calcDeleteEntry(toString(i.caller), poolAddress, userPoolVoteSWOPnew))
193+ }
194+ else {
195+ let removePoolVote = -(poolVoteDiffSWOP)
196+ let userPoolFreezeSWOPnew = if ((userPoolVotePeriod == currPeriod))
197+ then min([userPoolFreezeSWOP, userPoolVoteSWOPnew])
198+ else userPoolVoteSWOPnew
199+ let userPoolActiveVoteSWOPnew = if (((userPoolVoteSWOP - userPoolFreezeSWOP) == 0))
200+ then 0
201+ else (userPoolFreezeSWOPnew + (((userPoolActiveVoteSWOP - userPoolFreezeSWOP) * (userPoolVoteSWOPnew - userPoolFreezeSWOPnew)) / (userPoolVoteSWOP - userPoolFreezeSWOP)))
202+ let newUnvoted = max([0, (removePoolVote - (if ((userUnvotedPeriod == currPeriod))
203+ then (userPoolVoteSWOP - userPoolFreezeSWOP)
204+ else 0))])
205+ let userUnvotedNew = if ((userUnvotedPeriod == currPeriod))
206+ then userUnvoted
207+ else (0 + newUnvoted)
208+ let userUnvotedPeriodNew = if ((newUnvoted > 0))
209+ then currPeriod
210+ else userUnvotedPeriod
211+ let userPoolStrucNew = ((((((toString(userPoolVoteSWOPnew) + "_") + toString(userPoolActiveVoteSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(userPoolFreezeSWOPnew))
212+ let userPoolEntry = [StringEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc), userPoolStrucNew)]
213+ let userTotalStrucNew = ((((toString(userTotalVoteSWOPnew) + "_") + toString(userUnvotedNew)) + "_") + toString(currPeriod))
214+ let userTotalEntry = [StringEntry((toString(i.caller) + kUserTotalStruc), userTotalStrucNew)]
215+ let poolVoteSWOPnew = (poolVoteSWOP - removePoolVote)
216+ let poolFreezeSWOPnew = if ((poolPeriod == currPeriod))
217+ then min([poolFreezeSWOP, poolVoteSWOPnew])
218+ else poolVoteSWOPnew
219+ let poolActiveSWOPnew = if (((poolVoteSWOP - poolFreezeSWOP) == 0))
220+ then 0
221+ else (poolFreezeSWOPnew + (((poolActiveSWOP - poolFreezeSWOP) * (poolVoteSWOPnew - poolFreezeSWOPnew)) / (poolVoteSWOP - poolFreezeSWOP)))
222+ let poolStrucNew = ((((((toString(poolVoteSWOPnew) + "_") + toString(poolActiveSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(poolFreezeSWOPnew))
223+ let poolEntry = [StringEntry((poolAddress + kPoolStruc), poolStrucNew)]
224+ let totalVoteSWOPnew = (totalVoteSWOP - removePoolVote)
225+ let totalFreezeSWOPnew = if ((totalPeriod == currPeriod))
226+ then min([totalFreezeSWOP, totalVoteSWOPnew])
227+ else totalVoteSWOPnew
228+ let totalActiveSWOPnew = if (((totalVoteSWOP - totalFreezeSWOP) == 0))
229+ then 0
230+ else (totalFreezeSWOPnew + (((totalActiveSWOP - totalFreezeSWOP) * (totalVoteSWOPnew - totalFreezeSWOPnew)) / (totalVoteSWOP - totalFreezeSWOP)))
231+ let totalStrucNew = ((((((toString(totalVoteSWOPnew) + "_") + toString(totalActiveSWOPnew)) + "_") + toString(totalPeriod)) + "_") + toString(totalFreezeSWOPnew))
232+ let totalEntry = [StringEntry(kTotalStruc, totalStrucNew)]
233+ ((((userPoolEntry ++ userTotalEntry) ++ poolEntry) ++ totalEntry) ++ calcDeleteEntry(toString(i.caller), poolAddress, userPoolVoteSWOPnew))
234+ }
100235 }
101- else {
102- let uPoolVoteSWOP = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolVoteSWOP)), 0)
103- $Tuple4(uPoolVoteSWOP, uPoolVoteSWOP, currPeriod, 0)
104- }
105- let userPoolVoteSWOP = $t035564198._1
106- let userPoolActiveVoteSWOP = $t035564198._2
107- let userPoolVotePeriod = $t035564198._3
108- let userPoolFreezeSWOP = $t035564198._4
109- let $t042044721 = if (isDefined(getString(this, (toString(i.caller) + kUserTotalStruc))))
110- then {
111- let data = split(valueOrErrorMessage(getString(this, (toString(i.caller) + kUserTotalStruc)), "Empty kUserTotalStruc"), "_")
112- $Tuple3(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]))
113- }
114- else {
115- let uPoolTotalSWOP = valueOrElse(getInteger(this, (toString(i.caller) + kUserTotalVoteSWOP)), 0)
116- $Tuple3(uPoolTotalSWOP, 0, currPeriod)
117- }
118- let userTotalVoteSWOP = $t042044721._1
119- let userUnvoted = $t042044721._2
120- let userUnvotedPeriod = $t042044721._3
121- let $t047265233 = if (isDefined(getString(this, (poolAddress + kPoolStruc))))
122- then {
123- let data = split(valueOrErrorMessage(getString(this, (poolAddress + kPoolStruc)), "Empty kPoolStruc"), "_")
124- $Tuple4(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]), parseIntValue(data[3]))
125- }
126- else {
127- let uPoolVoteSWOP = valueOrElse(getInteger(this, (poolAddress + kPoolVoteSWOP)), 0)
128- $Tuple4(uPoolVoteSWOP, uPoolVoteSWOP, 0, 0)
129- }
130- let poolVoteSWOP = $t047265233._1
131- let poolActiveSWOP = $t047265233._2
132- let poolPeriod = $t047265233._3
133- let poolFreezeSWOP = $t047265233._4
134- let $t052395715 = if (isDefined(getString(this, kTotalStruc)))
135- then {
136- let data = split(valueOrErrorMessage(getString(this, kTotalStruc), "Empty kTotalStruc"), "_")
137- $Tuple4(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]), parseIntValue(data[3]))
138- }
139- else {
140- let uTotalVoteSWOP = valueOrElse(getInteger(this, kTotalVoteSWOP), 0)
141- $Tuple4(uTotalVoteSWOP, uTotalVoteSWOP, 0, 0)
142- }
143- let totalVoteSWOP = $t052395715._1
144- let totalActiveSWOP = $t052395715._2
145- let totalPeriod = $t052395715._3
146- let totalFreezeSWOP = $t052395715._4
147- let poolVoteDiffSWOP = (userPoolVoteSWOPnew - userPoolVoteSWOP)
148- let userTotalVoteSWOPnew = (userTotalVoteSWOP + poolVoteDiffSWOP)
149- if (!(isCallerInGovernance(i.caller)))
150- then throw("This address has 0 SWOP in Governance dApp")
151- else if ((userTotalVoteSWOPnew > userSWOPinGovernance))
152- then throw(((((toString(this) + " has ") + toString(userSWOPinGovernance)) + " SWOP in governance. New SWOP in voting ") + toString(userTotalVoteSWOPnew)))
153- else if ((0 > userTotalVoteSWOPnew))
154- then throw("New userPoolVoteSWOPnew < 0")
155- else if ((userPoolVoteSWOPnew >= userPoolVoteSWOP))
156- then {
157- let coef = votingCoef()
158- let userPoolActiveVoteSWOPnew = if ((userPoolVotePeriod == currPeriod))
159- then (userPoolActiveVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
160- else (userPoolVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
161- let userPoolFreezeSWOPnew = if ((userPoolVotePeriod == currPeriod))
162- then userPoolFreezeSWOP
163- else userPoolVoteSWOP
164- let userUnvotedNew = if ((userUnvoted == currPeriod))
165- then userUnvoted
166- else max([0, (userUnvoted - poolVoteDiffSWOP)])
167- let userPoolStrucNew = ((((((toString(userPoolVoteSWOPnew) + "_") + toString(userPoolActiveVoteSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(userPoolFreezeSWOPnew))
168- let userPoolEntry = [StringEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc), userPoolStrucNew)]
169- let userTotalStrucNew = ((((toString(userTotalVoteSWOPnew) + "_") + toString(userUnvotedNew)) + "_") + toString(currPeriod))
170- let userTotalEntry = [StringEntry((toString(i.caller) + kUserTotalStruc), userTotalStrucNew)]
171- let poolVoteSWOPnew = (poolVoteSWOP + poolVoteDiffSWOP)
172- let poolActiveSWOPnew = if ((poolPeriod == currPeriod))
173- then (poolActiveSWOP + ((poolVoteDiffSWOP * coef) / scale8))
174- else (poolVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
175- let poolFreezeSWOPnew = if ((poolPeriod == currPeriod))
176- then poolFreezeSWOP
177- else poolVoteSWOP
178- let poolStrucNew = ((((((toString(poolVoteSWOPnew) + "_") + toString(poolActiveSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(poolFreezeSWOPnew))
179- let poolEntry = [StringEntry((poolAddress + kPoolStruc), poolStrucNew)]
180- let totalVoteSWOPnew = (totalVoteSWOP + poolVoteDiffSWOP)
181- let totalActiveSWOPnew = if ((totalPeriod == currPeriod))
182- then (totalActiveSWOP + ((poolVoteDiffSWOP * coef) / scale8))
183- else (totalVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
184- let totalFreezeSWOPnew = if ((poolPeriod == currPeriod))
185- then totalFreezeSWOP
186- else totalVoteSWOP
187- let totalStrucNew = ((((((toString(totalVoteSWOPnew) + "_") + toString(totalActiveSWOPnew)) + "_") + toString(totalPeriod)) + "_") + toString(totalFreezeSWOPnew))
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 min([userPoolFreezeSWOP, userPoolVoteSWOPnew])
195- else userPoolVoteSWOPnew
196- let userPoolActiveVoteSWOPnew = if (((userPoolVoteSWOP - userPoolFreezeSWOP) == 0))
197- then 0
198- else (userPoolFreezeSWOPnew + (((userPoolActiveVoteSWOP - userPoolFreezeSWOP) * (userPoolVoteSWOPnew - userPoolFreezeSWOPnew)) / (userPoolVoteSWOP - userPoolFreezeSWOP)))
199- let newUnvoted = max([0, (removePoolVote - (if ((userUnvotedPeriod == currPeriod))
200- then (userPoolVoteSWOP - userPoolFreezeSWOP)
201- else 0))])
202- let userUnvotedNew = if ((userUnvotedPeriod == currPeriod))
203- then userUnvoted
204- else (0 + newUnvoted)
205- let userUnvotedPeriodNew = if ((newUnvoted > 0))
206- then currPeriod
207- else userUnvotedPeriod
208- let userPoolStrucNew = ((((((toString(userPoolVoteSWOPnew) + "_") + toString(userPoolActiveVoteSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(userPoolFreezeSWOPnew))
209- let userPoolEntry = [StringEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc), userPoolStrucNew)]
210- let userTotalStrucNew = ((((toString(userTotalVoteSWOPnew) + "_") + toString(userUnvotedNew)) + "_") + toString(currPeriod))
211- let userTotalEntry = [StringEntry((toString(i.caller) + kUserTotalStruc), userTotalStrucNew)]
212- let poolVoteSWOPnew = (poolVoteSWOP - removePoolVote)
213- let poolFreezeSWOPnew = if ((poolPeriod == currPeriod))
214- then min([poolFreezeSWOP, poolVoteSWOPnew])
215- else poolVoteSWOPnew
216- let poolActiveSWOPnew = if (((poolVoteSWOP - poolFreezeSWOP) == 0))
217- then 0
218- else (poolFreezeSWOPnew + (((poolActiveSWOP - poolFreezeSWOP) * (poolVoteSWOPnew - poolFreezeSWOPnew)) / (poolVoteSWOP - poolFreezeSWOP)))
219- let poolStrucNew = ((((((toString(poolVoteSWOPnew) + "_") + toString(poolActiveSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(poolFreezeSWOPnew))
220- let poolEntry = [StringEntry((poolAddress + kPoolStruc), poolStrucNew)]
221- let totalVoteSWOPnew = (totalVoteSWOP - removePoolVote)
222- let totalFreezeSWOPnew = if ((totalPeriod == currPeriod))
223- then min([totalFreezeSWOP, totalVoteSWOPnew])
224- else totalVoteSWOPnew
225- let totalActiveSWOPnew = if (((totalVoteSWOP - totalFreezeSWOP) == 0))
226- then 0
227- else (totalFreezeSWOPnew + (((totalActiveSWOP - totalFreezeSWOP) * (totalVoteSWOPnew - totalFreezeSWOPnew)) / (totalVoteSWOP - totalFreezeSWOP)))
228- let totalStrucNew = ((((((toString(totalVoteSWOPnew) + "_") + toString(totalActiveSWOPnew)) + "_") + toString(totalPeriod)) + "_") + toString(totalFreezeSWOPnew))
229- let totalEntry = [StringEntry(kTotalStruc, totalStrucNew)]
230- ((((userPoolEntry ++ userTotalEntry) ++ poolEntry) ++ totalEntry) ++ calcDeleteEntry(toString(i.caller), poolAddress, userPoolVoteSWOPnew))
231- }
232236 }
233237
234238
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let adminPubKey1 = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK'
55
66 let adminPubKey2 = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK'
77
88 let adminPubKey3 = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK'
99
1010 let kUserPoolVoteSWOP = "_vote"
1111
1212 let kUserPoolStruc = "_user_pool_struc"
1313
1414 let kUserTotalVoteSWOP = "_user_total_SWOP_vote"
1515
1616 let kUserTotalStruc = "_user_total_struc"
1717
1818 let kPoolVoteSWOP = "_vote_SWOP"
1919
2020 let kPoolStruc = "_pool_struc"
2121
2222 let kTotalVoteSWOP = "total_vote_SWOP"
2323
2424 let kTotalStruc = "total_struc"
2525
2626 let kStartHeight = "start_height"
2727
2828 let kBasePeriod = "base_period"
2929
3030 let kPeriodLength = "period_length"
3131
3232 let kDurationFullVotePower = "duration_full_vote_power"
3333
3434 let kMinVotePower = "min_vote_power"
3535
3636 let scale8 = 100000000
3737
3838 let basePeriod = valueOrErrorMessage(getInteger(this, kBasePeriod), "Empty kBasePeriod")
3939
4040 let startHeight = valueOrErrorMessage(getInteger(this, kStartHeight), "Empty kStartHeight")
4141
4242 let periodLength = valueOrErrorMessage(getInteger(this, kPeriodLength), "Empty kPeriodLength")
4343
4444 let durationFullVotePower = valueOrErrorMessage(getInteger(this, kDurationFullVotePower), "Empty kDurationFullVotePower")
4545
4646 let minVotePower = valueOrErrorMessage(getInteger(this, kMinVotePower), "Empty kMinVotePower")
4747
4848 let govAddr = Address(base58'3MzJZEn6jzxCPaHEfkrXd7FhbjTyVjdRPLS')
4949
5050 let currPeriod = (basePeriod + ((height - startHeight) / periodLength))
5151
5252 func isCallerInGovernance (user) = if ((valueOrElse(getInteger(govAddr, (toString(user) + "_SWOP_amount")), 0) > 0))
5353 then true
5454 else false
5555
5656
5757 func isPoolInGovernance (poolAddress) = isDefined(getInteger(govAddr, (poolAddress + "_current_pool_fraction_reward")))
5858
5959
6060 func votingCoef () = {
6161 let votingDuration = (height - (startHeight + (currPeriod * periodLength)))
6262 if ((durationFullVotePower > votingDuration))
6363 then scale8
6464 else {
6565 let x1 = durationFullVotePower
6666 let y1 = scale8
6767 let x2 = periodLength
6868 let y2 = minVotePower
6969 let k = (((y2 - y1) * scale8) / (x2 - x1))
7070 let b = ((y1 * scale8) - (k * x1))
7171 (((votingDuration * k) / scale8) + (b / scale8))
7272 }
7373 }
7474
7575
7676 func calcDeleteEntry (caller,poolAddress,userPoolVoteSWOPnew) = {
7777 let deleteKeyUserPoolVoteSWOP = if (isDefined(getInteger(this, (((caller + "_") + poolAddress) + kUserPoolVoteSWOP))))
7878 then DeleteEntry((((caller + "_") + poolAddress) + kUserPoolVoteSWOP))
7979 else DeleteEntry(".")
8080 let deleteKeyUserTotalVoteSWOP = if (isDefined(getInteger(this, (caller + kUserTotalVoteSWOP))))
8181 then DeleteEntry((caller + kUserTotalVoteSWOP))
8282 else DeleteEntry(".")
8383 let deleteKeyPoolVoteSWOP = if (isDefined(getInteger(this, (poolAddress + kPoolVoteSWOP))))
8484 then DeleteEntry((poolAddress + kPoolVoteSWOP))
8585 else DeleteEntry(".")
8686 let deleteKeyTotalVoteSWOP = if (isDefined(getInteger(this, kTotalVoteSWOP)))
8787 then DeleteEntry(kTotalVoteSWOP)
8888 else DeleteEntry(".")
8989 [deleteKeyUserPoolVoteSWOP, deleteKeyUserTotalVoteSWOP, deleteKeyPoolVoteSWOP, deleteKeyTotalVoteSWOP]
9090 }
9191
9292
9393 @Callable(i)
9494 func votePoolWeight (poolAddress,userPoolVoteSWOPnew) = {
9595 let userSWOPinGovernance = valueOrErrorMessage(getInteger(govAddr, (toString(i.caller) + "_SWOP_amount")), "Empty _SWOP_amount at gov. address")
96- let $t035564198 = if (isDefined(getString(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc))))
97- then {
98- let data = split(valueOrErrorMessage(getString(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc)), "Empty kUserPoolStruc"), "_")
99- $Tuple4(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]), parseIntValue(data[3]))
96+ if (true)
97+ then throw("line 73")
98+ else {
99+ let $t035904232 = if (isDefined(getString(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc))))
100+ then {
101+ let data = split(valueOrErrorMessage(getString(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc)), "Empty kUserPoolStruc"), "_")
102+ $Tuple4(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]), parseIntValue(data[3]))
103+ }
104+ else {
105+ let uPoolVoteSWOP = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolVoteSWOP)), 0)
106+ $Tuple4(uPoolVoteSWOP, uPoolVoteSWOP, currPeriod, 0)
107+ }
108+ let userPoolVoteSWOP = $t035904232._1
109+ let userPoolActiveVoteSWOP = $t035904232._2
110+ let userPoolVotePeriod = $t035904232._3
111+ let userPoolFreezeSWOP = $t035904232._4
112+ let $t042384755 = if (isDefined(getString(this, (toString(i.caller) + kUserTotalStruc))))
113+ then {
114+ let data = split(valueOrErrorMessage(getString(this, (toString(i.caller) + kUserTotalStruc)), "Empty kUserTotalStruc"), "_")
115+ $Tuple3(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]))
116+ }
117+ else {
118+ let uPoolTotalSWOP = valueOrElse(getInteger(this, (toString(i.caller) + kUserTotalVoteSWOP)), 0)
119+ $Tuple3(uPoolTotalSWOP, 0, currPeriod)
120+ }
121+ let userTotalVoteSWOP = $t042384755._1
122+ let userUnvoted = $t042384755._2
123+ let userUnvotedPeriod = $t042384755._3
124+ let $t047605267 = if (isDefined(getString(this, (poolAddress + kPoolStruc))))
125+ then {
126+ let data = split(valueOrErrorMessage(getString(this, (poolAddress + kPoolStruc)), "Empty kPoolStruc"), "_")
127+ $Tuple4(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]), parseIntValue(data[3]))
128+ }
129+ else {
130+ let uPoolVoteSWOP = valueOrElse(getInteger(this, (poolAddress + kPoolVoteSWOP)), 0)
131+ $Tuple4(uPoolVoteSWOP, uPoolVoteSWOP, 0, 0)
132+ }
133+ let poolVoteSWOP = $t047605267._1
134+ let poolActiveSWOP = $t047605267._2
135+ let poolPeriod = $t047605267._3
136+ let poolFreezeSWOP = $t047605267._4
137+ let $t052735749 = if (isDefined(getString(this, kTotalStruc)))
138+ then {
139+ let data = split(valueOrErrorMessage(getString(this, kTotalStruc), "Empty kTotalStruc"), "_")
140+ $Tuple4(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]), parseIntValue(data[3]))
141+ }
142+ else {
143+ let uTotalVoteSWOP = valueOrElse(getInteger(this, kTotalVoteSWOP), 0)
144+ $Tuple4(uTotalVoteSWOP, uTotalVoteSWOP, 0, 0)
145+ }
146+ let totalVoteSWOP = $t052735749._1
147+ let totalActiveSWOP = $t052735749._2
148+ let totalPeriod = $t052735749._3
149+ let totalFreezeSWOP = $t052735749._4
150+ let poolVoteDiffSWOP = (userPoolVoteSWOPnew - userPoolVoteSWOP)
151+ let userTotalVoteSWOPnew = (userTotalVoteSWOP + poolVoteDiffSWOP)
152+ if (!(isCallerInGovernance(i.caller)))
153+ then throw("This address has 0 SWOP in Governance dApp")
154+ else if ((userTotalVoteSWOPnew > userSWOPinGovernance))
155+ then throw(((((toString(this) + " has ") + toString(userSWOPinGovernance)) + " SWOP in governance. New SWOP in voting ") + toString(userTotalVoteSWOPnew)))
156+ else if ((0 > userTotalVoteSWOPnew))
157+ then throw("New userPoolVoteSWOPnew < 0")
158+ else if ((userPoolVoteSWOPnew >= userPoolVoteSWOP))
159+ then {
160+ let coef = votingCoef()
161+ let userPoolActiveVoteSWOPnew = if ((userPoolVotePeriod == currPeriod))
162+ then (userPoolActiveVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
163+ else (userPoolVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
164+ let userPoolFreezeSWOPnew = if ((userPoolVotePeriod == currPeriod))
165+ then userPoolFreezeSWOP
166+ else userPoolVoteSWOP
167+ let userUnvotedNew = if ((userUnvoted == currPeriod))
168+ then userUnvoted
169+ else max([0, (userUnvoted - poolVoteDiffSWOP)])
170+ let userPoolStrucNew = ((((((toString(userPoolVoteSWOPnew) + "_") + toString(userPoolActiveVoteSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(userPoolFreezeSWOPnew))
171+ let userPoolEntry = [StringEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc), userPoolStrucNew)]
172+ let userTotalStrucNew = ((((toString(userTotalVoteSWOPnew) + "_") + toString(userUnvotedNew)) + "_") + toString(currPeriod))
173+ let userTotalEntry = [StringEntry((toString(i.caller) + kUserTotalStruc), userTotalStrucNew)]
174+ let poolVoteSWOPnew = (poolVoteSWOP + poolVoteDiffSWOP)
175+ let poolActiveSWOPnew = if ((poolPeriod == currPeriod))
176+ then (poolActiveSWOP + ((poolVoteDiffSWOP * coef) / scale8))
177+ else (poolVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
178+ let poolFreezeSWOPnew = if ((poolPeriod == currPeriod))
179+ then poolFreezeSWOP
180+ else poolVoteSWOP
181+ let poolStrucNew = ((((((toString(poolVoteSWOPnew) + "_") + toString(poolActiveSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(poolFreezeSWOPnew))
182+ let poolEntry = [StringEntry((poolAddress + kPoolStruc), poolStrucNew)]
183+ let totalVoteSWOPnew = (totalVoteSWOP + poolVoteDiffSWOP)
184+ let totalActiveSWOPnew = if ((totalPeriod == currPeriod))
185+ then (totalActiveSWOP + ((poolVoteDiffSWOP * coef) / scale8))
186+ else (totalVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
187+ let totalFreezeSWOPnew = if ((poolPeriod == currPeriod))
188+ then totalFreezeSWOP
189+ else totalVoteSWOP
190+ let totalStrucNew = ((((((toString(totalVoteSWOPnew) + "_") + toString(totalActiveSWOPnew)) + "_") + toString(totalPeriod)) + "_") + toString(totalFreezeSWOPnew))
191+ let totalEntry = [StringEntry(kTotalStruc, totalStrucNew)]
192+ ((((userPoolEntry ++ userTotalEntry) ++ poolEntry) ++ totalEntry) ++ calcDeleteEntry(toString(i.caller), poolAddress, userPoolVoteSWOPnew))
193+ }
194+ else {
195+ let removePoolVote = -(poolVoteDiffSWOP)
196+ let userPoolFreezeSWOPnew = if ((userPoolVotePeriod == currPeriod))
197+ then min([userPoolFreezeSWOP, userPoolVoteSWOPnew])
198+ else userPoolVoteSWOPnew
199+ let userPoolActiveVoteSWOPnew = if (((userPoolVoteSWOP - userPoolFreezeSWOP) == 0))
200+ then 0
201+ else (userPoolFreezeSWOPnew + (((userPoolActiveVoteSWOP - userPoolFreezeSWOP) * (userPoolVoteSWOPnew - userPoolFreezeSWOPnew)) / (userPoolVoteSWOP - userPoolFreezeSWOP)))
202+ let newUnvoted = max([0, (removePoolVote - (if ((userUnvotedPeriod == currPeriod))
203+ then (userPoolVoteSWOP - userPoolFreezeSWOP)
204+ else 0))])
205+ let userUnvotedNew = if ((userUnvotedPeriod == currPeriod))
206+ then userUnvoted
207+ else (0 + newUnvoted)
208+ let userUnvotedPeriodNew = if ((newUnvoted > 0))
209+ then currPeriod
210+ else userUnvotedPeriod
211+ let userPoolStrucNew = ((((((toString(userPoolVoteSWOPnew) + "_") + toString(userPoolActiveVoteSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(userPoolFreezeSWOPnew))
212+ let userPoolEntry = [StringEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc), userPoolStrucNew)]
213+ let userTotalStrucNew = ((((toString(userTotalVoteSWOPnew) + "_") + toString(userUnvotedNew)) + "_") + toString(currPeriod))
214+ let userTotalEntry = [StringEntry((toString(i.caller) + kUserTotalStruc), userTotalStrucNew)]
215+ let poolVoteSWOPnew = (poolVoteSWOP - removePoolVote)
216+ let poolFreezeSWOPnew = if ((poolPeriod == currPeriod))
217+ then min([poolFreezeSWOP, poolVoteSWOPnew])
218+ else poolVoteSWOPnew
219+ let poolActiveSWOPnew = if (((poolVoteSWOP - poolFreezeSWOP) == 0))
220+ then 0
221+ else (poolFreezeSWOPnew + (((poolActiveSWOP - poolFreezeSWOP) * (poolVoteSWOPnew - poolFreezeSWOPnew)) / (poolVoteSWOP - poolFreezeSWOP)))
222+ let poolStrucNew = ((((((toString(poolVoteSWOPnew) + "_") + toString(poolActiveSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(poolFreezeSWOPnew))
223+ let poolEntry = [StringEntry((poolAddress + kPoolStruc), poolStrucNew)]
224+ let totalVoteSWOPnew = (totalVoteSWOP - removePoolVote)
225+ let totalFreezeSWOPnew = if ((totalPeriod == currPeriod))
226+ then min([totalFreezeSWOP, totalVoteSWOPnew])
227+ else totalVoteSWOPnew
228+ let totalActiveSWOPnew = if (((totalVoteSWOP - totalFreezeSWOP) == 0))
229+ then 0
230+ else (totalFreezeSWOPnew + (((totalActiveSWOP - totalFreezeSWOP) * (totalVoteSWOPnew - totalFreezeSWOPnew)) / (totalVoteSWOP - totalFreezeSWOP)))
231+ let totalStrucNew = ((((((toString(totalVoteSWOPnew) + "_") + toString(totalActiveSWOPnew)) + "_") + toString(totalPeriod)) + "_") + toString(totalFreezeSWOPnew))
232+ let totalEntry = [StringEntry(kTotalStruc, totalStrucNew)]
233+ ((((userPoolEntry ++ userTotalEntry) ++ poolEntry) ++ totalEntry) ++ calcDeleteEntry(toString(i.caller), poolAddress, userPoolVoteSWOPnew))
234+ }
100235 }
101- else {
102- let uPoolVoteSWOP = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolVoteSWOP)), 0)
103- $Tuple4(uPoolVoteSWOP, uPoolVoteSWOP, currPeriod, 0)
104- }
105- let userPoolVoteSWOP = $t035564198._1
106- let userPoolActiveVoteSWOP = $t035564198._2
107- let userPoolVotePeriod = $t035564198._3
108- let userPoolFreezeSWOP = $t035564198._4
109- let $t042044721 = if (isDefined(getString(this, (toString(i.caller) + kUserTotalStruc))))
110- then {
111- let data = split(valueOrErrorMessage(getString(this, (toString(i.caller) + kUserTotalStruc)), "Empty kUserTotalStruc"), "_")
112- $Tuple3(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]))
113- }
114- else {
115- let uPoolTotalSWOP = valueOrElse(getInteger(this, (toString(i.caller) + kUserTotalVoteSWOP)), 0)
116- $Tuple3(uPoolTotalSWOP, 0, currPeriod)
117- }
118- let userTotalVoteSWOP = $t042044721._1
119- let userUnvoted = $t042044721._2
120- let userUnvotedPeriod = $t042044721._3
121- let $t047265233 = if (isDefined(getString(this, (poolAddress + kPoolStruc))))
122- then {
123- let data = split(valueOrErrorMessage(getString(this, (poolAddress + kPoolStruc)), "Empty kPoolStruc"), "_")
124- $Tuple4(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]), parseIntValue(data[3]))
125- }
126- else {
127- let uPoolVoteSWOP = valueOrElse(getInteger(this, (poolAddress + kPoolVoteSWOP)), 0)
128- $Tuple4(uPoolVoteSWOP, uPoolVoteSWOP, 0, 0)
129- }
130- let poolVoteSWOP = $t047265233._1
131- let poolActiveSWOP = $t047265233._2
132- let poolPeriod = $t047265233._3
133- let poolFreezeSWOP = $t047265233._4
134- let $t052395715 = if (isDefined(getString(this, kTotalStruc)))
135- then {
136- let data = split(valueOrErrorMessage(getString(this, kTotalStruc), "Empty kTotalStruc"), "_")
137- $Tuple4(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]), parseIntValue(data[3]))
138- }
139- else {
140- let uTotalVoteSWOP = valueOrElse(getInteger(this, kTotalVoteSWOP), 0)
141- $Tuple4(uTotalVoteSWOP, uTotalVoteSWOP, 0, 0)
142- }
143- let totalVoteSWOP = $t052395715._1
144- let totalActiveSWOP = $t052395715._2
145- let totalPeriod = $t052395715._3
146- let totalFreezeSWOP = $t052395715._4
147- let poolVoteDiffSWOP = (userPoolVoteSWOPnew - userPoolVoteSWOP)
148- let userTotalVoteSWOPnew = (userTotalVoteSWOP + poolVoteDiffSWOP)
149- if (!(isCallerInGovernance(i.caller)))
150- then throw("This address has 0 SWOP in Governance dApp")
151- else if ((userTotalVoteSWOPnew > userSWOPinGovernance))
152- then throw(((((toString(this) + " has ") + toString(userSWOPinGovernance)) + " SWOP in governance. New SWOP in voting ") + toString(userTotalVoteSWOPnew)))
153- else if ((0 > userTotalVoteSWOPnew))
154- then throw("New userPoolVoteSWOPnew < 0")
155- else if ((userPoolVoteSWOPnew >= userPoolVoteSWOP))
156- then {
157- let coef = votingCoef()
158- let userPoolActiveVoteSWOPnew = if ((userPoolVotePeriod == currPeriod))
159- then (userPoolActiveVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
160- else (userPoolVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
161- let userPoolFreezeSWOPnew = if ((userPoolVotePeriod == currPeriod))
162- then userPoolFreezeSWOP
163- else userPoolVoteSWOP
164- let userUnvotedNew = if ((userUnvoted == currPeriod))
165- then userUnvoted
166- else max([0, (userUnvoted - poolVoteDiffSWOP)])
167- let userPoolStrucNew = ((((((toString(userPoolVoteSWOPnew) + "_") + toString(userPoolActiveVoteSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(userPoolFreezeSWOPnew))
168- let userPoolEntry = [StringEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc), userPoolStrucNew)]
169- let userTotalStrucNew = ((((toString(userTotalVoteSWOPnew) + "_") + toString(userUnvotedNew)) + "_") + toString(currPeriod))
170- let userTotalEntry = [StringEntry((toString(i.caller) + kUserTotalStruc), userTotalStrucNew)]
171- let poolVoteSWOPnew = (poolVoteSWOP + poolVoteDiffSWOP)
172- let poolActiveSWOPnew = if ((poolPeriod == currPeriod))
173- then (poolActiveSWOP + ((poolVoteDiffSWOP * coef) / scale8))
174- else (poolVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
175- let poolFreezeSWOPnew = if ((poolPeriod == currPeriod))
176- then poolFreezeSWOP
177- else poolVoteSWOP
178- let poolStrucNew = ((((((toString(poolVoteSWOPnew) + "_") + toString(poolActiveSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(poolFreezeSWOPnew))
179- let poolEntry = [StringEntry((poolAddress + kPoolStruc), poolStrucNew)]
180- let totalVoteSWOPnew = (totalVoteSWOP + poolVoteDiffSWOP)
181- let totalActiveSWOPnew = if ((totalPeriod == currPeriod))
182- then (totalActiveSWOP + ((poolVoteDiffSWOP * coef) / scale8))
183- else (totalVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
184- let totalFreezeSWOPnew = if ((poolPeriod == currPeriod))
185- then totalFreezeSWOP
186- else totalVoteSWOP
187- let totalStrucNew = ((((((toString(totalVoteSWOPnew) + "_") + toString(totalActiveSWOPnew)) + "_") + toString(totalPeriod)) + "_") + toString(totalFreezeSWOPnew))
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 min([userPoolFreezeSWOP, userPoolVoteSWOPnew])
195- else userPoolVoteSWOPnew
196- let userPoolActiveVoteSWOPnew = if (((userPoolVoteSWOP - userPoolFreezeSWOP) == 0))
197- then 0
198- else (userPoolFreezeSWOPnew + (((userPoolActiveVoteSWOP - userPoolFreezeSWOP) * (userPoolVoteSWOPnew - userPoolFreezeSWOPnew)) / (userPoolVoteSWOP - userPoolFreezeSWOP)))
199- let newUnvoted = max([0, (removePoolVote - (if ((userUnvotedPeriod == currPeriod))
200- then (userPoolVoteSWOP - userPoolFreezeSWOP)
201- else 0))])
202- let userUnvotedNew = if ((userUnvotedPeriod == currPeriod))
203- then userUnvoted
204- else (0 + newUnvoted)
205- let userUnvotedPeriodNew = if ((newUnvoted > 0))
206- then currPeriod
207- else userUnvotedPeriod
208- let userPoolStrucNew = ((((((toString(userPoolVoteSWOPnew) + "_") + toString(userPoolActiveVoteSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(userPoolFreezeSWOPnew))
209- let userPoolEntry = [StringEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc), userPoolStrucNew)]
210- let userTotalStrucNew = ((((toString(userTotalVoteSWOPnew) + "_") + toString(userUnvotedNew)) + "_") + toString(currPeriod))
211- let userTotalEntry = [StringEntry((toString(i.caller) + kUserTotalStruc), userTotalStrucNew)]
212- let poolVoteSWOPnew = (poolVoteSWOP - removePoolVote)
213- let poolFreezeSWOPnew = if ((poolPeriod == currPeriod))
214- then min([poolFreezeSWOP, poolVoteSWOPnew])
215- else poolVoteSWOPnew
216- let poolActiveSWOPnew = if (((poolVoteSWOP - poolFreezeSWOP) == 0))
217- then 0
218- else (poolFreezeSWOPnew + (((poolActiveSWOP - poolFreezeSWOP) * (poolVoteSWOPnew - poolFreezeSWOPnew)) / (poolVoteSWOP - poolFreezeSWOP)))
219- let poolStrucNew = ((((((toString(poolVoteSWOPnew) + "_") + toString(poolActiveSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(poolFreezeSWOPnew))
220- let poolEntry = [StringEntry((poolAddress + kPoolStruc), poolStrucNew)]
221- let totalVoteSWOPnew = (totalVoteSWOP - removePoolVote)
222- let totalFreezeSWOPnew = if ((totalPeriod == currPeriod))
223- then min([totalFreezeSWOP, totalVoteSWOPnew])
224- else totalVoteSWOPnew
225- let totalActiveSWOPnew = if (((totalVoteSWOP - totalFreezeSWOP) == 0))
226- then 0
227- else (totalFreezeSWOPnew + (((totalActiveSWOP - totalFreezeSWOP) * (totalVoteSWOPnew - totalFreezeSWOPnew)) / (totalVoteSWOP - totalFreezeSWOP)))
228- let totalStrucNew = ((((((toString(totalVoteSWOPnew) + "_") + toString(totalActiveSWOPnew)) + "_") + toString(totalPeriod)) + "_") + toString(totalFreezeSWOPnew))
229- let totalEntry = [StringEntry(kTotalStruc, totalStrucNew)]
230- ((((userPoolEntry ++ userTotalEntry) ++ poolEntry) ++ totalEntry) ++ calcDeleteEntry(toString(i.caller), poolAddress, userPoolVoteSWOPnew))
231- }
232236 }
233237
234238
235239 @Verifier(tx)
236240 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
237241

github/deemru/w8io/169f3d6 
86.25 ms