tx · DzwL4wC3oSS8RBMUqzg4gdgQSUnVqy2toVSNEAedXhEP

3MtDaKQafFQ6VH8ppFACUP4V9iV4RLZsH4Y:  -0.01400000 Waves

2021.04.13 23:53 [1481184] smart account 3MtDaKQafFQ6VH8ppFACUP4V9iV4RLZsH4Y > SELF 0.00000000 Waves

{ "type": 13, "id": "DzwL4wC3oSS8RBMUqzg4gdgQSUnVqy2toVSNEAedXhEP", "fee": 1400000, "feeAssetId": null, "timestamp": 1618347186680, "version": 1, "sender": "3MtDaKQafFQ6VH8ppFACUP4V9iV4RLZsH4Y", "senderPublicKey": "3Gtqh3GjBysA4JAyqEETspZj3qJPqUKMqUV2Cckzg4EC", "proofs": [ "4F28sJmUfzwXXjojAMGEKRNTTBx6rPBe2VaBCL8JQp3yP1KQu6YGPyRzpLYFDeaMPzE1AhddHxBiFXppJ8oz46Se" ], "script": "base64:AAIEAAAAAAAAAAgIAhIECgIIAQAAABwAAAAADGFkbWluUHViS2V5MQEAAAAgugnXO4lZpNFdoP/xuzPQquE5aQ/L4r2R1jvuT16o4BMAAAAADGFkbWluUHViS2V5MgEAAAAgwpFEmbPSsLQNIqWRWL2IvKE3uwjL/92M5pTvWxYOfkAAAAAADGFkbWluUHViS2V5MwEAAAAgjh4XLnixBzv0SE56Myhgdih3/JnlkjCjIMLPqKvpDlUAAAAAEWtVc2VyUG9vbFZvdGVTV09QAgAAAAVfdm90ZQAAAAAOa1VzZXJQb29sU3RydWMCAAAAEF91c2VyX3Bvb2xfc3RydWMAAAAAEmtVc2VyVG90YWxWb3RlU1dPUAIAAAAVX3VzZXJfdG90YWxfU1dPUF92b3RlAAAAAA9rVXNlclRvdGFsU3RydWMCAAAAEV91c2VyX3RvdGFsX3N0cnVjAAAAAA1rUG9vbFZvdGVTV09QAgAAAApfdm90ZV9TV09QAAAAAAprUG9vbFN0cnVjAgAAAAtfcG9vbF9zdHJ1YwAAAAAOa1RvdGFsVm90ZVNXT1ACAAAAD3RvdGFsX3ZvdGVfU1dP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FAAAAC3Bvb2xBZGRyZXNzBQAAABN1c2VyUG9vbFZvdGVTV09QbmV3AAAAAPUS6YE=", "chainId": 84, "height": 1481184, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 4 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let adminPubKey1 = base58'DXDY2itiEcYBtGkVLnkpHtDFyWQUkoLJz79uJ7ECbMrA'
5+
6+let adminPubKey2 = base58'E6Wa1SGoktYcjHjsKrvjMiqJY3SWmGKcD8Q5L8kxSPS7'
7+
8+let adminPubKey3 = base58'AZmWJtuy4GeVrMmJH4hfFBRApe1StvhJSk4jcbT6bArQ'
9+
10+let kUserPoolVoteSWOP = "_vote"
11+
12+let kUserPoolStruc = "_user_pool_struc"
13+
14+let kUserTotalVoteSWOP = "_user_total_SWOP_vote"
15+
16+let kUserTotalStruc = "_user_total_struc"
17+
18+let kPoolVoteSWOP = "_vote_SWOP"
19+
20+let kPoolStruc = "_pool_struc"
21+
22+let kTotalVoteSWOP = "total_vote_SWOP"
23+
24+let kTotalStruc = "total_struc"
25+
26+let kStartHeight = "start_height"
27+
28+let kBasePeriod = "base_period"
29+
30+let kPeriodLength = "period_length"
31+
32+let kDurationFullVotePower = "duration_full_vote_power"
33+
34+let kMinVotePower = "min_vote_power"
35+
36+let scale8 = 100000000
37+
38+let basePeriod = valueOrErrorMessage(getInteger(this, kBasePeriod), "Empty kBasePeriod")
39+
40+let startHeight = valueOrErrorMessage(getInteger(this, kStartHeight), "Empty kStartHeight")
41+
42+let periodLength = valueOrErrorMessage(getInteger(this, kPeriodLength), "Empty kPeriodLength")
43+
44+let durationFullVotePower = valueOrErrorMessage(getInteger(this, kPeriodLength), "Empty kPeriodLength")
45+
46+let minVotePower = valueOrErrorMessage(getInteger(this, kMinVotePower), "Empty kMinVotePower")
47+
48+let govAddr = Address(base58'3N8gfDJc5N53ePx2qBn3oQXbnhbz3Z7WFNj')
49+
50+let currPeriod = (basePeriod + ((height - startHeight) / periodLength))
51+
52+func isCallerInGovernance (user) = if ((valueOrElse(getInteger(govAddr, (toString(user) + "_SWOP_amount")), 0) > 0))
53+ then true
54+ else false
55+
56+
57+func isPoolInGovernance (poolAddress) = isDefined(getInteger(govAddr, (poolAddress + "_current_pool_fraction_reward")))
58+
59+
60+func votingCoef () = {
61+ let votingDuration = (height - (startHeight + (currPeriod * periodLength)))
62+ if ((durationFullVotePower > votingDuration))
63+ then scale8
64+ else {
65+ let x1 = durationFullVotePower
66+ let y1 = scale8
67+ let x2 = periodLength
68+ let y2 = minVotePower
69+ let k = (((y2 - y1) * scale8) / (x2 - x1))
70+ let b = ((y1 * scale8) - (k * x1))
71+ if (true)
72+ then throw(toString((((votingDuration * k) / scale8) + (b / scale8))))
73+ else (((votingDuration * k) / scale8) + (b / scale8))
74+ }
75+ }
76+
77+
78+func calcDeleteEntry (caller,poolAddress,userPoolVoteSWOPnew) = {
79+ let deleteKeyUserPoolVoteSWOP = if (isDefined(getInteger(this, (((caller + "_") + poolAddress) + kUserPoolVoteSWOP))))
80+ then DeleteEntry((((caller + "_") + poolAddress) + kUserPoolVoteSWOP))
81+ else DeleteEntry(".")
82+ let deleteKeyUserTotalVoteSWOP = if (isDefined(getInteger(this, (caller + kUserTotalVoteSWOP))))
83+ then DeleteEntry((caller + kUserTotalVoteSWOP))
84+ else DeleteEntry(".")
85+ let deleteKeyPoolVoteSWOP = if (isDefined(getInteger(this, (poolAddress + kPoolVoteSWOP))))
86+ then DeleteEntry((poolAddress + kPoolVoteSWOP))
87+ else DeleteEntry(".")
88+ let deleteKeyTotalVoteSWOP = if (isDefined(getInteger(this, kTotalVoteSWOP)))
89+ then DeleteEntry(kTotalVoteSWOP)
90+ else DeleteEntry(".")
91+[deleteKeyUserPoolVoteSWOP, deleteKeyUserTotalVoteSWOP, deleteKeyPoolVoteSWOP, deleteKeyTotalVoteSWOP]
92+ }
93+
94+
95+@Callable(i)
96+func votePoolWeight (poolAddress,userPoolVoteSWOPnew) = {
97+ let userSWOPinGovernance = valueOrErrorMessage(getInteger(govAddr, (toString(i.caller) + "_SWOP_amount")), "Empty _SWOP_amount at gov. address")
98+ let $t041554797 = if (isDefined(getString(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc))))
99+ then {
100+ let data = split(valueOrErrorMessage(getString(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolStruc)), "Empty kUserPoolStruc"), "_")
101+ $Tuple4(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]), parseIntValue(data[3]))
102+ }
103+ else {
104+ let uPoolVoteSWOP = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + poolAddress) + kUserPoolVoteSWOP)), 0)
105+ $Tuple4(uPoolVoteSWOP, uPoolVoteSWOP, currPeriod, 0)
106+ }
107+ let userPoolVoteSWOP = $t041554797._1
108+ let userPoolActiveVoteSWOP = $t041554797._2
109+ let userPoolVotePeriod = $t041554797._3
110+ let userPoolFreezeSWOP = $t041554797._4
111+ let $t048035320 = if (isDefined(getString(this, (toString(i.caller) + kUserTotalStruc))))
112+ then {
113+ let data = split(valueOrErrorMessage(getString(this, (toString(i.caller) + kUserTotalStruc)), "Empty kUserTotalStruc"), "_")
114+ $Tuple3(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]))
115+ }
116+ else {
117+ let uPoolTotalSWOP = valueOrElse(getInteger(this, (toString(i.caller) + kUserTotalVoteSWOP)), 0)
118+ $Tuple3(uPoolTotalSWOP, 0, currPeriod)
119+ }
120+ let userTotalVoteSWOP = $t048035320._1
121+ let userUnvoted = $t048035320._2
122+ let userUnvotedPeriod = $t048035320._3
123+ let $t053255832 = if (isDefined(getString(this, (poolAddress + kPoolStruc))))
124+ then {
125+ let data = split(valueOrErrorMessage(getString(this, (poolAddress + kPoolStruc)), "Empty kPoolStruc"), "_")
126+ $Tuple4(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]), parseIntValue(data[3]))
127+ }
128+ else {
129+ let uPoolVoteSWOP = valueOrElse(getInteger(this, (poolAddress + kPoolVoteSWOP)), 0)
130+ $Tuple4(uPoolVoteSWOP, uPoolVoteSWOP, 0, 0)
131+ }
132+ let poolVoteSWOP = $t053255832._1
133+ let poolActiveSWOP = $t053255832._2
134+ let poolPeriod = $t053255832._3
135+ let poolFreezeSWOP = $t053255832._4
136+ let $t058386314 = if (isDefined(getString(this, kTotalStruc)))
137+ then {
138+ let data = split(valueOrErrorMessage(getString(this, kTotalStruc), "Empty kTotalStruc"), "_")
139+ $Tuple4(parseIntValue(data[0]), parseIntValue(data[1]), parseIntValue(data[2]), parseIntValue(data[3]))
140+ }
141+ else {
142+ let uTotalVoteSWOP = valueOrElse(getInteger(this, kTotalVoteSWOP), 0)
143+ $Tuple4(uTotalVoteSWOP, uTotalVoteSWOP, 0, 0)
144+ }
145+ let totalVoteSWOP = $t058386314._1
146+ let totalActiveSWOP = $t058386314._2
147+ let totalPeriod = $t058386314._3
148+ let totalFreezeSWOP = $t058386314._4
149+ let poolVoteDiffSWOP = (userPoolVoteSWOPnew - userPoolVoteSWOP)
150+ let userTotalVoteSWOPnew = (userTotalVoteSWOP + poolVoteDiffSWOP)
151+ if (!(isCallerInGovernance(i.caller)))
152+ then throw("This address has 0 SWOP in Governance dApp")
153+ else if ((userTotalVoteSWOPnew > userSWOPinGovernance))
154+ then throw(((((toString(this) + " has ") + toString(userSWOPinGovernance)) + " SWOP in governance. New SWOP in voting ") + toString(userTotalVoteSWOPnew)))
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+ }
232+ }
233+
234+

github/deemru/w8io/169f3d6 
73.18 ms