tx · Bk63FzcC3yeBvk8W9g3VCQejbwh6VMrj4VNkwnfsNsBw

3MyaxeXTYGU9ZYkx5CA3YFwQZU2PXV36crr:  -0.01400000 Waves

2021.04.13 01:44 [1479858] smart account 3MyaxeXTYGU9ZYkx5CA3YFwQZU2PXV36crr > SELF 0.00000000 Waves

{ "type": 13, "id": "Bk63FzcC3yeBvk8W9g3VCQejbwh6VMrj4VNkwnfsNsBw", "fee": 1400000, "feeAssetId": null, "timestamp": 1618267501494, "version": 1, "sender": "3MyaxeXTYGU9ZYkx5CA3YFwQZU2PXV36crr", "senderPublicKey": "FrLh9zDpe5zc5bWgFRKMZReNLHL87ZUBn4FSiAWtVSaF", "proofs": [ "XEAxSEiSD4CrWhx4dQ8dy3gaF7y7NtuGwDYdR1gpxv6fZaobTTLhtBx973j82bRLSKTDRB5HHQShpaMRtdYcHjT" ], "script": "base64:AAIEAAAAAAAAAAgIAhIECgIIAQAAABwAAAAADGFkbWluUHViS2V5MQEAAAAgugnXO4lZpNFdoP/xuzPQquE5aQ/L4r2R1jvuT16o4BMAAAAADGFkbWluUHViS2V5MgEAAAAgwpFEmbPSsLQNIqWRWL2IvKE3uwjL/92M5pTvWxYOfkAAAAAADGFkbWluUHViS2V5MwEAAAAgjh4XLnixBzv0SE56Myhgdih3/JnlkjCjIMLPqKvpDlUAAAAAEWtVc2VyUG9vbFZvdGVTV09QAgAAAAVfdm90ZQAAAAAOa1VzZXJQb29sU3RydWMCAAAAEF91c2VyX3Bvb2xfc3RydWMAAAAAEmtVc2VyVG90YWxWb3RlU1dPUAIAAAAVX3VzZXJfdG90YWxfU1dPUF92b3RlAAAAAA9rVXNlclRvdGFsU3RydWMCAAAAEV91c2VyX3RvdGFsX3N0cnVjAAAAAA1rUG9vbFZvdGVTV09QAgAAAApfdm90ZV9TV09QAAAAAAprUG9vbFN0cnVjAgAAAAtfcG9vbF9zdHJ1YwAAAAAOa1RvdGFsVm90ZVNXT1ACAAAAD3RvdGFsX3ZvdGVfU1dPU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Bvb2xWb3RlU1dPUG5ldwAAAACE+aIf", "chainId": 84, "height": 1479858, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HEXqXQmERdaUfsoBe86QEapfWYRvW6tsZLYA6QuiSvVW Next: EZYmmPVsgnXsTQvi8Qr45fPycyLZBc2bproGbvavctTt Diff:
OldNewDifferences
118118 let userTotalVoteSWOP = $t047225239._1
119119 let userUnvoted = $t047225239._2
120120 let userUnvotedPeriod = $t047225239._3
121- let $t052445723 = if (isDefined(getString(this, kPoolStruc)))
122- then {
123- let data = split(valueOrErrorMessage(getString(this, kPoolStruc), "Empty kPoolStruc"), "_")
124- $Tuple4(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]), parseIntValue(data[3]))
125- }
121+ if (true)
122+ then throw(getStringValue(this, (toString(i.caller) + kUserTotalStruc)))
126123 else {
127- let uPoolVoteSWOP = valueOrElse(getInteger(this, (poolAddress + kPoolVoteSWOP)), 0)
128- $Tuple4(uPoolVoteSWOP, uPoolVoteSWOP, 0, 0)
129- }
130- let poolVoteSWOP = $t052445723._1
131- let poolActiveSWOP = $t052445723._2
132- let poolPeriod = $t052445723._3
133- let poolFreezeSWOP = $t052445723._4
134- let $t057296205 = 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 = $t057296205._1
144- let totalActiveSWOP = $t057296205._2
145- let totalPeriod = $t057296205._3
146- let totalFreezeSWOP = $t057296205._4
147- let poolVoteDiffSWOP = (userPoolVoteSWOPnew - userPoolVoteSWOP)
148- let userTotalVoteSWOPnew = (totalVoteSWOP + 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 ((userPoolVoteSWOPnew >= userPoolVoteSWOP))
124+ let $t053325811 = if (isDefined(getString(this, kPoolStruc)))
154125 then {
155- let coef = votingCoef()
156- let userPoolActiveVoteSWOPnew = if ((userPoolVotePeriod == currPeriod))
157- then (userPoolActiveVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
158- else (userPoolVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
159- let userPoolFreezeSWOPnew = if ((userPoolVotePeriod == currPeriod))
160- then userPoolFreezeSWOP
161- else userPoolVoteSWOP
162- let userUnvotedNew = if ((userUnvoted == currPeriod))
163- then userUnvoted
164- else max([0, (userUnvoted - poolVoteDiffSWOP)])
165- let userPoolStrucNew = ((((((toString(userPoolVoteSWOPnew) + "_") + toString(userPoolActiveVoteSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(userPoolFreezeSWOPnew))
166- let userPoolEntry = [StringEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc), userPoolStrucNew)]
167- let userTotalStrucNew = ((((toString(userTotalVoteSWOPnew) + "_") + toString(userUnvotedNew)) + "_") + toString(currPeriod))
168- let userTotalEntry = [StringEntry((toString(i.caller) + kUserTotalStruc), userTotalStrucNew)]
169- let poolVoteSWOPnew = (poolVoteSWOP + poolVoteDiffSWOP)
170- let poolActiveSWOPnew = if ((poolPeriod == currPeriod))
171- then (poolActiveSWOP + ((poolVoteDiffSWOP * coef) / scale8))
172- else (poolVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
173- let poolFreezeSWOPnew = if ((poolPeriod == currPeriod))
174- then poolFreezeSWOP
175- else poolVoteSWOP
176- let poolStrucNew = ((((((toString(poolVoteSWOPnew) + "_") + toString(poolActiveSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(poolFreezeSWOPnew))
177- let poolEntry = [StringEntry((poolAddress + kUserPoolStruc), poolStrucNew)]
178- let totalVoteSWOPnew = (totalVoteSWOP + poolVoteDiffSWOP)
179- let totalActiveSWOPnew = if ((totalPeriod == currPeriod))
180- then (totalActiveSWOP + ((poolVoteDiffSWOP * coef) / scale8))
181- else (totalVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
182- let totalFreezeSWOPnew = if ((poolPeriod == currPeriod))
183- then totalFreezeSWOP
184- else totalVoteSWOP
185- let totalStrucNew = ((((((toString(totalVoteSWOPnew) + "_") + toString(totalActiveSWOPnew)) + "_") + toString(totalPeriod)) + "_") + toString(totalFreezeSWOPnew))
186- let totalEntry = [StringEntry((poolAddress + kUserPoolStruc), totalStrucNew)]
187- ((((userPoolEntry ++ userTotalEntry) ++ poolEntry) ++ totalEntry) ++ calcDeleteEntry(toString(i.caller), poolAddress, userPoolVoteSWOPnew))
126+ let data = split(valueOrErrorMessage(getString(this, kPoolStruc), "Empty kPoolStruc"), "_")
127+ $Tuple4(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]), parseIntValue(data[3]))
188128 }
189129 else {
190- let removePoolVote = -(poolVoteDiffSWOP)
191- let userPoolFreezeSWOPnew = if ((userPoolVotePeriod == currPeriod))
192- then min([userPoolFreezeSWOP, userPoolVoteSWOPnew])
193- else userPoolVoteSWOPnew
194- let userPoolActiveVoteSWOPnew = if (((userPoolVoteSWOP - userPoolFreezeSWOP) == 0))
195- then 0
196- else (userPoolFreezeSWOPnew + (((userPoolActiveVoteSWOP - userPoolFreezeSWOP) * (userPoolVoteSWOPnew - userPoolFreezeSWOPnew)) / (userPoolVoteSWOP - userPoolFreezeSWOP)))
197- let newUnvoted = max([0, (removePoolVote - (if ((userUnvotedPeriod == currPeriod))
198- then (userPoolVoteSWOP - userPoolFreezeSWOP)
199- else 0))])
200- let userUnvotedNew = if ((userUnvotedPeriod == currPeriod))
201- then userUnvoted
202- else (0 + newUnvoted)
203- let userUnvotedPeriodNew = if ((newUnvoted > 0))
204- then currPeriod
205- else userUnvotedPeriod
206- let userPoolStrucNew = ((((((toString(userPoolVoteSWOPnew) + "_") + toString(userPoolActiveVoteSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(userPoolFreezeSWOPnew))
207- let userPoolEntry = [StringEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc), userPoolStrucNew)]
208- let userTotalStrucNew = ((((toString(userTotalVoteSWOPnew) + "_") + toString(userUnvotedNew)) + "_") + toString(currPeriod))
209- let userTotalEntry = [StringEntry((toString(i.caller) + kUserTotalStruc), userTotalStrucNew)]
210- let poolVoteSWOPnew = (poolVoteSWOP - removePoolVote)
211- let poolFreezeSWOPnew = if ((poolPeriod == currPeriod))
212- then min([poolFreezeSWOP, poolVoteSWOPnew])
213- else poolVoteSWOPnew
214- let poolActiveSWOPnew = if (((poolVoteSWOP - poolFreezeSWOP) == 0))
215- then 0
216- else (poolFreezeSWOPnew + (((poolActiveSWOP - poolFreezeSWOP) * (poolVoteSWOPnew - poolFreezeSWOPnew)) / (poolVoteSWOP - poolFreezeSWOP)))
217- let poolStrucNew = ((((((toString(poolVoteSWOPnew) + "_") + toString(poolActiveSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(poolFreezeSWOPnew))
218- let poolEntry = [StringEntry((poolAddress + kPoolStruc), poolStrucNew)]
219- let totalVoteSWOPnew = (totalVoteSWOP - removePoolVote)
220- let totalFreezeSWOPnew = if ((totalPeriod == currPeriod))
221- then min([totalFreezeSWOP, totalVoteSWOPnew])
222- else totalVoteSWOPnew
223- let totalActiveSWOPnew = if (((totalVoteSWOP - totalFreezeSWOP) == 0))
224- then 0
225- else (totalFreezeSWOPnew + (((totalActiveSWOP - totalFreezeSWOP) * (totalVoteSWOPnew - totalFreezeSWOPnew)) / (totalVoteSWOP - totalFreezeSWOP)))
226- let totalStrucNew = ((((((toString(totalVoteSWOPnew) + "_") + toString(totalActiveSWOPnew)) + "_") + toString(totalPeriod)) + "_") + toString(totalFreezeSWOPnew))
227- let totalEntry = [StringEntry(kTotalStruc, totalStrucNew)]
228- ((((userPoolEntry ++ userTotalEntry) ++ poolEntry) ++ totalEntry) ++ calcDeleteEntry(toString(i.caller), poolAddress, userPoolVoteSWOPnew))
130+ let uPoolVoteSWOP = valueOrElse(getInteger(this, (poolAddress + kPoolVoteSWOP)), 0)
131+ $Tuple4(uPoolVoteSWOP, uPoolVoteSWOP, 0, 0)
229132 }
133+ let poolVoteSWOP = $t053325811._1
134+ let poolActiveSWOP = $t053325811._2
135+ let poolPeriod = $t053325811._3
136+ let poolFreezeSWOP = $t053325811._4
137+ let $t058176293 = 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 = $t058176293._1
147+ let totalActiveSWOP = $t058176293._2
148+ let totalPeriod = $t058176293._3
149+ let totalFreezeSWOP = $t058176293._4
150+ let poolVoteDiffSWOP = (userPoolVoteSWOPnew - userPoolVoteSWOP)
151+ let userTotalVoteSWOPnew = (totalVoteSWOP + 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 ((userPoolVoteSWOPnew >= userPoolVoteSWOP))
157+ then {
158+ let coef = votingCoef()
159+ let userPoolActiveVoteSWOPnew = if ((userPoolVotePeriod == currPeriod))
160+ then (userPoolActiveVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
161+ else (userPoolVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
162+ let userPoolFreezeSWOPnew = if ((userPoolVotePeriod == currPeriod))
163+ then userPoolFreezeSWOP
164+ else userPoolVoteSWOP
165+ let userUnvotedNew = if ((userUnvoted == currPeriod))
166+ then userUnvoted
167+ else max([0, (userUnvoted - poolVoteDiffSWOP)])
168+ let userPoolStrucNew = ((((((toString(userPoolVoteSWOPnew) + "_") + toString(userPoolActiveVoteSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(userPoolFreezeSWOPnew))
169+ let userPoolEntry = [StringEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc), userPoolStrucNew)]
170+ let userTotalStrucNew = ((((toString(userTotalVoteSWOPnew) + "_") + toString(userUnvotedNew)) + "_") + toString(currPeriod))
171+ let userTotalEntry = [StringEntry((toString(i.caller) + kUserTotalStruc), userTotalStrucNew)]
172+ let poolVoteSWOPnew = (poolVoteSWOP + poolVoteDiffSWOP)
173+ let poolActiveSWOPnew = if ((poolPeriod == currPeriod))
174+ then (poolActiveSWOP + ((poolVoteDiffSWOP * coef) / scale8))
175+ else (poolVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
176+ let poolFreezeSWOPnew = if ((poolPeriod == currPeriod))
177+ then poolFreezeSWOP
178+ else poolVoteSWOP
179+ let poolStrucNew = ((((((toString(poolVoteSWOPnew) + "_") + toString(poolActiveSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(poolFreezeSWOPnew))
180+ let poolEntry = [StringEntry((poolAddress + kUserPoolStruc), poolStrucNew)]
181+ let totalVoteSWOPnew = (totalVoteSWOP + poolVoteDiffSWOP)
182+ let totalActiveSWOPnew = if ((totalPeriod == currPeriod))
183+ then (totalActiveSWOP + ((poolVoteDiffSWOP * coef) / scale8))
184+ else (totalVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
185+ let totalFreezeSWOPnew = if ((poolPeriod == currPeriod))
186+ then totalFreezeSWOP
187+ else totalVoteSWOP
188+ let totalStrucNew = ((((((toString(totalVoteSWOPnew) + "_") + toString(totalActiveSWOPnew)) + "_") + toString(totalPeriod)) + "_") + toString(totalFreezeSWOPnew))
189+ let totalEntry = [StringEntry((poolAddress + kUserPoolStruc), totalStrucNew)]
190+ ((((userPoolEntry ++ userTotalEntry) ++ poolEntry) ++ totalEntry) ++ calcDeleteEntry(toString(i.caller), poolAddress, userPoolVoteSWOPnew))
191+ }
192+ else {
193+ let removePoolVote = -(poolVoteDiffSWOP)
194+ let userPoolFreezeSWOPnew = if ((userPoolVotePeriod == currPeriod))
195+ then min([userPoolFreezeSWOP, userPoolVoteSWOPnew])
196+ else userPoolVoteSWOPnew
197+ let userPoolActiveVoteSWOPnew = if (((userPoolVoteSWOP - userPoolFreezeSWOP) == 0))
198+ then 0
199+ else (userPoolFreezeSWOPnew + (((userPoolActiveVoteSWOP - userPoolFreezeSWOP) * (userPoolVoteSWOPnew - userPoolFreezeSWOPnew)) / (userPoolVoteSWOP - userPoolFreezeSWOP)))
200+ let newUnvoted = max([0, (removePoolVote - (if ((userUnvotedPeriod == currPeriod))
201+ then (userPoolVoteSWOP - userPoolFreezeSWOP)
202+ else 0))])
203+ let userUnvotedNew = if ((userUnvotedPeriod == currPeriod))
204+ then userUnvoted
205+ else (0 + newUnvoted)
206+ let userUnvotedPeriodNew = if ((newUnvoted > 0))
207+ then currPeriod
208+ else userUnvotedPeriod
209+ let userPoolStrucNew = ((((((toString(userPoolVoteSWOPnew) + "_") + toString(userPoolActiveVoteSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(userPoolFreezeSWOPnew))
210+ let userPoolEntry = [StringEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc), userPoolStrucNew)]
211+ let userTotalStrucNew = ((((toString(userTotalVoteSWOPnew) + "_") + toString(userUnvotedNew)) + "_") + toString(currPeriod))
212+ let userTotalEntry = [StringEntry((toString(i.caller) + kUserTotalStruc), userTotalStrucNew)]
213+ let poolVoteSWOPnew = (poolVoteSWOP - removePoolVote)
214+ let poolFreezeSWOPnew = if ((poolPeriod == currPeriod))
215+ then min([poolFreezeSWOP, poolVoteSWOPnew])
216+ else poolVoteSWOPnew
217+ let poolActiveSWOPnew = if (((poolVoteSWOP - poolFreezeSWOP) == 0))
218+ then 0
219+ else (poolFreezeSWOPnew + (((poolActiveSWOP - poolFreezeSWOP) * (poolVoteSWOPnew - poolFreezeSWOPnew)) / (poolVoteSWOP - poolFreezeSWOP)))
220+ let poolStrucNew = ((((((toString(poolVoteSWOPnew) + "_") + toString(poolActiveSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(poolFreezeSWOPnew))
221+ let poolEntry = [StringEntry((poolAddress + kPoolStruc), poolStrucNew)]
222+ let totalVoteSWOPnew = (totalVoteSWOP - removePoolVote)
223+ let totalFreezeSWOPnew = if ((totalPeriod == currPeriod))
224+ then min([totalFreezeSWOP, totalVoteSWOPnew])
225+ else totalVoteSWOPnew
226+ let totalActiveSWOPnew = if (((totalVoteSWOP - totalFreezeSWOP) == 0))
227+ then 0
228+ else (totalFreezeSWOPnew + (((totalActiveSWOP - totalFreezeSWOP) * (totalVoteSWOPnew - totalFreezeSWOPnew)) / (totalVoteSWOP - totalFreezeSWOP)))
229+ let totalStrucNew = ((((((toString(totalVoteSWOPnew) + "_") + toString(totalActiveSWOPnew)) + "_") + toString(totalPeriod)) + "_") + toString(totalFreezeSWOPnew))
230+ let totalEntry = [StringEntry(kTotalStruc, totalStrucNew)]
231+ ((((userPoolEntry ++ userTotalEntry) ++ poolEntry) ++ totalEntry) ++ calcDeleteEntry(toString(i.caller), poolAddress, userPoolVoteSWOPnew))
232+ }
233+ }
230234 }
231235
232236
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let adminPubKey1 = base58'DXDY2itiEcYBtGkVLnkpHtDFyWQUkoLJz79uJ7ECbMrA'
55
66 let adminPubKey2 = base58'E6Wa1SGoktYcjHjsKrvjMiqJY3SWmGKcD8Q5L8kxSPS7'
77
88 let adminPubKey3 = base58'AZmWJtuy4GeVrMmJH4hfFBRApe1StvhJSk4jcbT6bArQ'
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_legth"
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, kPeriodLength), "Empty kPeriodLength")
4545
4646 let minVotePower = valueOrErrorMessage(getInteger(this, kMinVotePower), "Empty kMinVotePower")
4747
4848 let govAddr = Address(base58'3N8gfDJc5N53ePx2qBn3oQXbnhbz3Z7WFNj')
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")
9696 let $t040744716 = if (isDefined(getString(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc))))
9797 then {
9898 let data = split(valueOrErrorMessage(getString(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc)), "Empty kUserPoolStruc"), "_")
9999 $Tuple4(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]), parseIntValue(data[3]))
100100 }
101101 else {
102102 let uPoolVoteSWOP = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolVoteSWOP)), 0)
103103 $Tuple4(uPoolVoteSWOP, uPoolVoteSWOP, currPeriod, 0)
104104 }
105105 let userPoolVoteSWOP = $t040744716._1
106106 let userPoolActiveVoteSWOP = $t040744716._2
107107 let userPoolVotePeriod = $t040744716._3
108108 let userPoolFreezeSWOP = $t040744716._4
109109 let $t047225239 = if (isDefined(getString(this, (toString(i.caller) + kUserTotalStruc))))
110110 then {
111111 let data = split(valueOrErrorMessage(getString(this, (toString(i.caller) + kUserTotalStruc)), "Empty kUserTotalStruc"), "_")
112112 $Tuple3(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]))
113113 }
114114 else {
115115 let uPoolTotalSWOP = valueOrElse(getInteger(this, (toString(i.caller) + kUserTotalVoteSWOP)), 0)
116116 $Tuple3(uPoolTotalSWOP, 0, currPeriod)
117117 }
118118 let userTotalVoteSWOP = $t047225239._1
119119 let userUnvoted = $t047225239._2
120120 let userUnvotedPeriod = $t047225239._3
121- let $t052445723 = if (isDefined(getString(this, kPoolStruc)))
122- then {
123- let data = split(valueOrErrorMessage(getString(this, kPoolStruc), "Empty kPoolStruc"), "_")
124- $Tuple4(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]), parseIntValue(data[3]))
125- }
121+ if (true)
122+ then throw(getStringValue(this, (toString(i.caller) + kUserTotalStruc)))
126123 else {
127- let uPoolVoteSWOP = valueOrElse(getInteger(this, (poolAddress + kPoolVoteSWOP)), 0)
128- $Tuple4(uPoolVoteSWOP, uPoolVoteSWOP, 0, 0)
129- }
130- let poolVoteSWOP = $t052445723._1
131- let poolActiveSWOP = $t052445723._2
132- let poolPeriod = $t052445723._3
133- let poolFreezeSWOP = $t052445723._4
134- let $t057296205 = 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 = $t057296205._1
144- let totalActiveSWOP = $t057296205._2
145- let totalPeriod = $t057296205._3
146- let totalFreezeSWOP = $t057296205._4
147- let poolVoteDiffSWOP = (userPoolVoteSWOPnew - userPoolVoteSWOP)
148- let userTotalVoteSWOPnew = (totalVoteSWOP + 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 ((userPoolVoteSWOPnew >= userPoolVoteSWOP))
124+ let $t053325811 = if (isDefined(getString(this, kPoolStruc)))
154125 then {
155- let coef = votingCoef()
156- let userPoolActiveVoteSWOPnew = if ((userPoolVotePeriod == currPeriod))
157- then (userPoolActiveVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
158- else (userPoolVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
159- let userPoolFreezeSWOPnew = if ((userPoolVotePeriod == currPeriod))
160- then userPoolFreezeSWOP
161- else userPoolVoteSWOP
162- let userUnvotedNew = if ((userUnvoted == currPeriod))
163- then userUnvoted
164- else max([0, (userUnvoted - poolVoteDiffSWOP)])
165- let userPoolStrucNew = ((((((toString(userPoolVoteSWOPnew) + "_") + toString(userPoolActiveVoteSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(userPoolFreezeSWOPnew))
166- let userPoolEntry = [StringEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc), userPoolStrucNew)]
167- let userTotalStrucNew = ((((toString(userTotalVoteSWOPnew) + "_") + toString(userUnvotedNew)) + "_") + toString(currPeriod))
168- let userTotalEntry = [StringEntry((toString(i.caller) + kUserTotalStruc), userTotalStrucNew)]
169- let poolVoteSWOPnew = (poolVoteSWOP + poolVoteDiffSWOP)
170- let poolActiveSWOPnew = if ((poolPeriod == currPeriod))
171- then (poolActiveSWOP + ((poolVoteDiffSWOP * coef) / scale8))
172- else (poolVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
173- let poolFreezeSWOPnew = if ((poolPeriod == currPeriod))
174- then poolFreezeSWOP
175- else poolVoteSWOP
176- let poolStrucNew = ((((((toString(poolVoteSWOPnew) + "_") + toString(poolActiveSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(poolFreezeSWOPnew))
177- let poolEntry = [StringEntry((poolAddress + kUserPoolStruc), poolStrucNew)]
178- let totalVoteSWOPnew = (totalVoteSWOP + poolVoteDiffSWOP)
179- let totalActiveSWOPnew = if ((totalPeriod == currPeriod))
180- then (totalActiveSWOP + ((poolVoteDiffSWOP * coef) / scale8))
181- else (totalVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
182- let totalFreezeSWOPnew = if ((poolPeriod == currPeriod))
183- then totalFreezeSWOP
184- else totalVoteSWOP
185- let totalStrucNew = ((((((toString(totalVoteSWOPnew) + "_") + toString(totalActiveSWOPnew)) + "_") + toString(totalPeriod)) + "_") + toString(totalFreezeSWOPnew))
186- let totalEntry = [StringEntry((poolAddress + kUserPoolStruc), totalStrucNew)]
187- ((((userPoolEntry ++ userTotalEntry) ++ poolEntry) ++ totalEntry) ++ calcDeleteEntry(toString(i.caller), poolAddress, userPoolVoteSWOPnew))
126+ let data = split(valueOrErrorMessage(getString(this, kPoolStruc), "Empty kPoolStruc"), "_")
127+ $Tuple4(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]), parseIntValue(data[3]))
188128 }
189129 else {
190- let removePoolVote = -(poolVoteDiffSWOP)
191- let userPoolFreezeSWOPnew = if ((userPoolVotePeriod == currPeriod))
192- then min([userPoolFreezeSWOP, userPoolVoteSWOPnew])
193- else userPoolVoteSWOPnew
194- let userPoolActiveVoteSWOPnew = if (((userPoolVoteSWOP - userPoolFreezeSWOP) == 0))
195- then 0
196- else (userPoolFreezeSWOPnew + (((userPoolActiveVoteSWOP - userPoolFreezeSWOP) * (userPoolVoteSWOPnew - userPoolFreezeSWOPnew)) / (userPoolVoteSWOP - userPoolFreezeSWOP)))
197- let newUnvoted = max([0, (removePoolVote - (if ((userUnvotedPeriod == currPeriod))
198- then (userPoolVoteSWOP - userPoolFreezeSWOP)
199- else 0))])
200- let userUnvotedNew = if ((userUnvotedPeriod == currPeriod))
201- then userUnvoted
202- else (0 + newUnvoted)
203- let userUnvotedPeriodNew = if ((newUnvoted > 0))
204- then currPeriod
205- else userUnvotedPeriod
206- let userPoolStrucNew = ((((((toString(userPoolVoteSWOPnew) + "_") + toString(userPoolActiveVoteSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(userPoolFreezeSWOPnew))
207- let userPoolEntry = [StringEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc), userPoolStrucNew)]
208- let userTotalStrucNew = ((((toString(userTotalVoteSWOPnew) + "_") + toString(userUnvotedNew)) + "_") + toString(currPeriod))
209- let userTotalEntry = [StringEntry((toString(i.caller) + kUserTotalStruc), userTotalStrucNew)]
210- let poolVoteSWOPnew = (poolVoteSWOP - removePoolVote)
211- let poolFreezeSWOPnew = if ((poolPeriod == currPeriod))
212- then min([poolFreezeSWOP, poolVoteSWOPnew])
213- else poolVoteSWOPnew
214- let poolActiveSWOPnew = if (((poolVoteSWOP - poolFreezeSWOP) == 0))
215- then 0
216- else (poolFreezeSWOPnew + (((poolActiveSWOP - poolFreezeSWOP) * (poolVoteSWOPnew - poolFreezeSWOPnew)) / (poolVoteSWOP - poolFreezeSWOP)))
217- let poolStrucNew = ((((((toString(poolVoteSWOPnew) + "_") + toString(poolActiveSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(poolFreezeSWOPnew))
218- let poolEntry = [StringEntry((poolAddress + kPoolStruc), poolStrucNew)]
219- let totalVoteSWOPnew = (totalVoteSWOP - removePoolVote)
220- let totalFreezeSWOPnew = if ((totalPeriod == currPeriod))
221- then min([totalFreezeSWOP, totalVoteSWOPnew])
222- else totalVoteSWOPnew
223- let totalActiveSWOPnew = if (((totalVoteSWOP - totalFreezeSWOP) == 0))
224- then 0
225- else (totalFreezeSWOPnew + (((totalActiveSWOP - totalFreezeSWOP) * (totalVoteSWOPnew - totalFreezeSWOPnew)) / (totalVoteSWOP - totalFreezeSWOP)))
226- let totalStrucNew = ((((((toString(totalVoteSWOPnew) + "_") + toString(totalActiveSWOPnew)) + "_") + toString(totalPeriod)) + "_") + toString(totalFreezeSWOPnew))
227- let totalEntry = [StringEntry(kTotalStruc, totalStrucNew)]
228- ((((userPoolEntry ++ userTotalEntry) ++ poolEntry) ++ totalEntry) ++ calcDeleteEntry(toString(i.caller), poolAddress, userPoolVoteSWOPnew))
130+ let uPoolVoteSWOP = valueOrElse(getInteger(this, (poolAddress + kPoolVoteSWOP)), 0)
131+ $Tuple4(uPoolVoteSWOP, uPoolVoteSWOP, 0, 0)
229132 }
133+ let poolVoteSWOP = $t053325811._1
134+ let poolActiveSWOP = $t053325811._2
135+ let poolPeriod = $t053325811._3
136+ let poolFreezeSWOP = $t053325811._4
137+ let $t058176293 = 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 = $t058176293._1
147+ let totalActiveSWOP = $t058176293._2
148+ let totalPeriod = $t058176293._3
149+ let totalFreezeSWOP = $t058176293._4
150+ let poolVoteDiffSWOP = (userPoolVoteSWOPnew - userPoolVoteSWOP)
151+ let userTotalVoteSWOPnew = (totalVoteSWOP + 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 ((userPoolVoteSWOPnew >= userPoolVoteSWOP))
157+ then {
158+ let coef = votingCoef()
159+ let userPoolActiveVoteSWOPnew = if ((userPoolVotePeriod == currPeriod))
160+ then (userPoolActiveVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
161+ else (userPoolVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
162+ let userPoolFreezeSWOPnew = if ((userPoolVotePeriod == currPeriod))
163+ then userPoolFreezeSWOP
164+ else userPoolVoteSWOP
165+ let userUnvotedNew = if ((userUnvoted == currPeriod))
166+ then userUnvoted
167+ else max([0, (userUnvoted - poolVoteDiffSWOP)])
168+ let userPoolStrucNew = ((((((toString(userPoolVoteSWOPnew) + "_") + toString(userPoolActiveVoteSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(userPoolFreezeSWOPnew))
169+ let userPoolEntry = [StringEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc), userPoolStrucNew)]
170+ let userTotalStrucNew = ((((toString(userTotalVoteSWOPnew) + "_") + toString(userUnvotedNew)) + "_") + toString(currPeriod))
171+ let userTotalEntry = [StringEntry((toString(i.caller) + kUserTotalStruc), userTotalStrucNew)]
172+ let poolVoteSWOPnew = (poolVoteSWOP + poolVoteDiffSWOP)
173+ let poolActiveSWOPnew = if ((poolPeriod == currPeriod))
174+ then (poolActiveSWOP + ((poolVoteDiffSWOP * coef) / scale8))
175+ else (poolVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
176+ let poolFreezeSWOPnew = if ((poolPeriod == currPeriod))
177+ then poolFreezeSWOP
178+ else poolVoteSWOP
179+ let poolStrucNew = ((((((toString(poolVoteSWOPnew) + "_") + toString(poolActiveSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(poolFreezeSWOPnew))
180+ let poolEntry = [StringEntry((poolAddress + kUserPoolStruc), poolStrucNew)]
181+ let totalVoteSWOPnew = (totalVoteSWOP + poolVoteDiffSWOP)
182+ let totalActiveSWOPnew = if ((totalPeriod == currPeriod))
183+ then (totalActiveSWOP + ((poolVoteDiffSWOP * coef) / scale8))
184+ else (totalVoteSWOP + ((poolVoteDiffSWOP * coef) / scale8))
185+ let totalFreezeSWOPnew = if ((poolPeriod == currPeriod))
186+ then totalFreezeSWOP
187+ else totalVoteSWOP
188+ let totalStrucNew = ((((((toString(totalVoteSWOPnew) + "_") + toString(totalActiveSWOPnew)) + "_") + toString(totalPeriod)) + "_") + toString(totalFreezeSWOPnew))
189+ let totalEntry = [StringEntry((poolAddress + kUserPoolStruc), totalStrucNew)]
190+ ((((userPoolEntry ++ userTotalEntry) ++ poolEntry) ++ totalEntry) ++ calcDeleteEntry(toString(i.caller), poolAddress, userPoolVoteSWOPnew))
191+ }
192+ else {
193+ let removePoolVote = -(poolVoteDiffSWOP)
194+ let userPoolFreezeSWOPnew = if ((userPoolVotePeriod == currPeriod))
195+ then min([userPoolFreezeSWOP, userPoolVoteSWOPnew])
196+ else userPoolVoteSWOPnew
197+ let userPoolActiveVoteSWOPnew = if (((userPoolVoteSWOP - userPoolFreezeSWOP) == 0))
198+ then 0
199+ else (userPoolFreezeSWOPnew + (((userPoolActiveVoteSWOP - userPoolFreezeSWOP) * (userPoolVoteSWOPnew - userPoolFreezeSWOPnew)) / (userPoolVoteSWOP - userPoolFreezeSWOP)))
200+ let newUnvoted = max([0, (removePoolVote - (if ((userUnvotedPeriod == currPeriod))
201+ then (userPoolVoteSWOP - userPoolFreezeSWOP)
202+ else 0))])
203+ let userUnvotedNew = if ((userUnvotedPeriod == currPeriod))
204+ then userUnvoted
205+ else (0 + newUnvoted)
206+ let userUnvotedPeriodNew = if ((newUnvoted > 0))
207+ then currPeriod
208+ else userUnvotedPeriod
209+ let userPoolStrucNew = ((((((toString(userPoolVoteSWOPnew) + "_") + toString(userPoolActiveVoteSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(userPoolFreezeSWOPnew))
210+ let userPoolEntry = [StringEntry((((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc), userPoolStrucNew)]
211+ let userTotalStrucNew = ((((toString(userTotalVoteSWOPnew) + "_") + toString(userUnvotedNew)) + "_") + toString(currPeriod))
212+ let userTotalEntry = [StringEntry((toString(i.caller) + kUserTotalStruc), userTotalStrucNew)]
213+ let poolVoteSWOPnew = (poolVoteSWOP - removePoolVote)
214+ let poolFreezeSWOPnew = if ((poolPeriod == currPeriod))
215+ then min([poolFreezeSWOP, poolVoteSWOPnew])
216+ else poolVoteSWOPnew
217+ let poolActiveSWOPnew = if (((poolVoteSWOP - poolFreezeSWOP) == 0))
218+ then 0
219+ else (poolFreezeSWOPnew + (((poolActiveSWOP - poolFreezeSWOP) * (poolVoteSWOPnew - poolFreezeSWOPnew)) / (poolVoteSWOP - poolFreezeSWOP)))
220+ let poolStrucNew = ((((((toString(poolVoteSWOPnew) + "_") + toString(poolActiveSWOPnew)) + "_") + toString(currPeriod)) + "_") + toString(poolFreezeSWOPnew))
221+ let poolEntry = [StringEntry((poolAddress + kPoolStruc), poolStrucNew)]
222+ let totalVoteSWOPnew = (totalVoteSWOP - removePoolVote)
223+ let totalFreezeSWOPnew = if ((totalPeriod == currPeriod))
224+ then min([totalFreezeSWOP, totalVoteSWOPnew])
225+ else totalVoteSWOPnew
226+ let totalActiveSWOPnew = if (((totalVoteSWOP - totalFreezeSWOP) == 0))
227+ then 0
228+ else (totalFreezeSWOPnew + (((totalActiveSWOP - totalFreezeSWOP) * (totalVoteSWOPnew - totalFreezeSWOPnew)) / (totalVoteSWOP - totalFreezeSWOP)))
229+ let totalStrucNew = ((((((toString(totalVoteSWOPnew) + "_") + toString(totalActiveSWOPnew)) + "_") + toString(totalPeriod)) + "_") + toString(totalFreezeSWOPnew))
230+ let totalEntry = [StringEntry(kTotalStruc, totalStrucNew)]
231+ ((((userPoolEntry ++ userTotalEntry) ++ poolEntry) ++ totalEntry) ++ calcDeleteEntry(toString(i.caller), poolAddress, userPoolVoteSWOPnew))
232+ }
233+ }
230234 }
231235
232236

github/deemru/w8io/026f985 
37.45 ms