tx · HLEfERHCLQ4TKxbELi9FTcRaGmt1jbh1nmLuCPPya2p1

3MzosTW6DBBjpRwTZUWFhZo6UFW1yrmfdtB:  -0.02000000 Waves

2020.06.17 15:55 [1047562] smart account 3MzosTW6DBBjpRwTZUWFhZo6UFW1yrmfdtB > SELF 0.00000000 Waves

{ "type": 13, "id": "HLEfERHCLQ4TKxbELi9FTcRaGmt1jbh1nmLuCPPya2p1", "fee": 2000000, "feeAssetId": null, "timestamp": 1592398554899, "version": 1, "sender": "3MzosTW6DBBjpRwTZUWFhZo6UFW1yrmfdtB", "senderPublicKey": "5fBuXu2ia9ZVbjRyXVrpaeFCUc3SHu6QeMeFaSmdvw4z", "proofs": [ "47xWzMM8Shkhwr5RZN3bfkaZBEwEyJ43daYLPgMhZZGGXXFbCNtvWfrPR4pged6HSdP3xj5HG4Y1XaaHmefwvWk7", "z3kAZ2kQtBeL13r4RUeMeDoGxGPZKeKRoqPh99xoqVA3vsngXboy7a9TUggXksViTvQv746TUHKccc6z9HsZTSW", "25VPYRgb3TK7DJJ66iV7MA4rgBxuaDe9CniSRTUrj7hJFsiggMk45mVo2ZJ34T8UQLCK2Nki7TM9o9H99oN2bVTw" ], "script": "base64:AAIDAAAAAAAAABcIARIDCgEIEgwKCgECAQIBAgECAQISAAAAABgBAAAAFmNvbnZlcnRXYXZlc1RvTmV1dHJpbm8AAAACAAAABmFtb3VudAAAAAVwcmljZQkAAGsAAAADCQAAawAAAAMFAAAABmFtb3VudAUAAAAFcHJpY2UAAAAAAAAAAGQAAAAAAAAPQkAAAAAAAAX14QABAAAADmdldFN0cmluZ0J5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWECAAAAAAEAAAAYZ2V0TnVtYmVyQnlBZGRyZXNzQW5kS2V5AAAAAgAAAAdhZGRy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AAAAAQkAAZEAAAACBQAAABBwdWJLZXlBZG1pbnNMaXN0AAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAEJAAJZAAAAAQkAAZEAAAACBQAAABBwdWJLZXlBZG1pbnNMaXN0AAAAAAAAAAABAAAAAAAAAAABAAAAAAAAAAAAAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAIJAAJZAAAAAQkAAZEAAAACBQAAABBwdWJLZXlBZG1pbnNMaXN0AAAAAAAAAAACAAAAAAAAAAABAAAAAAAAAAAAAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAMJAAJZAAAAAQkAAZEAAAACBQAAABBwdWJLZXlBZG1pbnNMaXN0AAAAAAAAAAADAAAAAAAAAAACAAAAAAAAAAAACQAAZwAAAAIFAAAABWNvdW50AAAAAAAAAAADPK4IRQ==", "chainId": 84, "height": 1047562, "spentComplexity": 0 } View: original | compacted Prev: 8idQA5YAmCWYqRuA6CX15DHf1FprxrNTDDcnUwg2L742 Next: 5RdCkUdSBVBsoRzpuMutc5fEMG4zncWs7HSX2CaQJajW Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, 1000000), 1000000, 100000000)
4+func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, 100), 1000000, 100000000)
55
66
77 func getStringByKey (key) = match getString(this, key) {
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, 1000000), 1000000, 100000000)
4+func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, 100), 1000000, 100000000)
55
66
77 func getStringByKey (key) = match getString(this, key) {
88 case a: String =>
99 a
1010 case _ =>
1111 ""
1212 }
1313
1414
1515 func getNumberByAddressAndKey (address,key) = match getInteger(addressFromStringValue(address), key) {
1616 case a: Int =>
1717 a
1818 case _ =>
1919 0
2020 }
2121
2222
2323 func getOracleProvideHeight (ownerPub,height) = match getInteger(addressFromPublicKey(ownerPub), ("price_" + toString(height))) {
2424 case a: Int =>
2525 a
2626 case _ =>
2727 0
2828 }
2929
3030
3131 func getStringByAddressAndKey (address,key) = match getString(address, key) {
3232 case a: String =>
3333 a
3434 case _ =>
3535 ""
3636 }
3737
3838
3939 func dropElementInJsonArray (array,element) = {
4040 let splitedArray = split(array, element)
4141 if ((take(splitedArray[1], 1) == ","))
4242 then (splitedArray[0] + drop(splitedArray[1], 1))
4343 else (dropRight(splitedArray[0], 1) + splitedArray[1])
4444 }
4545
4646
4747 func convertJsonArrayToList (jsonArray) = split(jsonArray, ",")
4848
4949
5050 let price = match getInteger(this, "price") {
5151 case a: Int =>
5252 a
5353 case _ =>
5454 0
5555 }
5656
5757 let priceIndex = match getInteger(this, "price_index") {
5858 case a: Int =>
5959 a
6060 case _ =>
6161 0
6262 }
6363
6464 let isBlocked = match getBoolean(this, "is_blocked") {
6565 case a: Boolean =>
6666 a
6767 case _ =>
6868 false
6969 }
7070
7171 let percentPriceOffset = 25
7272
7373 let pubKeyOracles = getStringByKey("oracles")
7474
7575 let pubKeyOraclesList = convertJsonArrayToList(pubKeyOracles)
7676
7777 let bftCoefficientOracle = 3
7878
7979 let neutrinoAddress = addressFromPublicKey(fromBase58String("3VHsLLWkFL98S7B2qFvsehH7yt6RF3dJouXsR5X3WHHZ"))
8080
8181 let liquidationAddress = addressFromPublicKey(fromBase58String("GHUE94wSngxjR6mgyfWLqmuf8wJPJaQypJAwPKGHYoAn"))
8282
8383 let neutrinoAsset = fromBase58String("EHLhLVDUufqQytiAjBHzPhsPZgqsX6XfSCrVdxYeC4QN")
8484
8585 let neutrinoLockedBalance = match getInteger(neutrinoAddress, "balance_lock_neutrino") {
8686 case a: Int =>
8787 a
8888 case _ =>
8989 0
9090 }
9191
9292 let wavesLockedBalance = match getInteger(neutrinoAddress, "balance_lock_waves") {
9393 case a: Int =>
9494 a
9595 case _ =>
9696 0
9797 }
9898
9999 let reserve = (wavesBalance(neutrinoAddress) - wavesLockedBalance)
100100
101101 let neutrinoSupply = (((neutrinoLockedBalance + extract(assetInfo(neutrinoAsset)).quantity) - assetBalance(neutrinoAddress, neutrinoAsset)) - assetBalance(liquidationAddress, neutrinoAsset))
102102
103103 let deficit = (neutrinoSupply - convertWavesToNeutrino(reserve, price))
104104
105105 func findPricesInRange (prices) = {
106106 let minPercentBound = 90
107107 let maxPercentBound = 110
108108 let p0 = prices[0]
109109 let check0 = if ((0 >= prices[0]))
110110 then [0]
111111 else {
112112 let p01 = ((prices[1] * 100) / p0)
113113 let p02 = ((prices[2] * 100) / p0)
114114 let p03 = ((prices[3] * 100) / p0)
115115 let p04 = ((prices[4] * 100) / p0)
116116 let array1 = if (if ((maxPercentBound > p01))
117117 then (p01 > minPercentBound)
118118 else false)
119119 then [1, 0]
120120 else [0]
121121 let array2 = if (if ((maxPercentBound > p02))
122122 then (p02 > minPercentBound)
123123 else false)
124124 then 2 :: array1
125125 else array1
126126 let array3 = if (if ((maxPercentBound > p03))
127127 then (p03 > minPercentBound)
128128 else false)
129129 then 3 :: array2
130130 else array2
131131 if (if ((maxPercentBound > p04))
132132 then (p04 > minPercentBound)
133133 else false)
134134 then 4 :: array3
135135 else array3
136136 }
137137 let check1 = if ((size(check0) >= 3))
138138 then check0
139139 else {
140140 let p1 = prices[1]
141141 if ((0 >= p1))
142142 then [1]
143143 else {
144144 let p10 = ((prices[0] * 100) / p1)
145145 let p12 = ((prices[2] * 100) / p1)
146146 let p13 = ((prices[3] * 100) / p1)
147147 let p14 = ((prices[4] * 100) / p1)
148148 let array1 = if (if ((maxPercentBound > p10))
149149 then (p10 > minPercentBound)
150150 else false)
151151 then [0, 1]
152152 else [1]
153153 let array2 = if (if ((maxPercentBound > p12))
154154 then (p12 > minPercentBound)
155155 else false)
156156 then 2 :: array1
157157 else array1
158158 let array3 = if (if ((maxPercentBound > p13))
159159 then (p13 > minPercentBound)
160160 else false)
161161 then 3 :: array2
162162 else array2
163163 if (if ((maxPercentBound > p14))
164164 then (p14 > minPercentBound)
165165 else false)
166166 then 4 :: array3
167167 else array3
168168 }
169169 }
170170 let check2 = if ((size(check1) >= 3))
171171 then check1
172172 else {
173173 let p2 = prices[2]
174174 if ((0 >= p2))
175175 then [2]
176176 else {
177177 let p20 = ((prices[0] * 100) / p2)
178178 let p21 = ((prices[1] * 100) / p2)
179179 let p23 = ((prices[3] * 100) / p2)
180180 let p24 = ((prices[4] * 100) / p2)
181181 let array1 = if (if ((maxPercentBound > p20))
182182 then (p20 > minPercentBound)
183183 else false)
184184 then [0, 2]
185185 else [2]
186186 let array2 = if (if ((maxPercentBound > p21))
187187 then (p21 > minPercentBound)
188188 else false)
189189 then 1 :: array1
190190 else array1
191191 let array3 = if (if ((maxPercentBound > p23))
192192 then (p23 > minPercentBound)
193193 else false)
194194 then 3 :: array2
195195 else array2
196196 if (if ((maxPercentBound > p24))
197197 then (p24 > minPercentBound)
198198 else false)
199199 then 4 :: array3
200200 else array3
201201 }
202202 }
203203 let check3 = if ((size(check2) >= 3))
204204 then check2
205205 else {
206206 let p3 = prices[3]
207207 if ((0 >= p3))
208208 then [3]
209209 else {
210210 let p30 = ((prices[0] * 100) / p3)
211211 let p31 = ((prices[1] * 100) / p3)
212212 let p32 = ((prices[2] * 100) / p3)
213213 let p34 = ((prices[4] * 100) / p3)
214214 let array1 = if (if ((maxPercentBound > p30))
215215 then (p30 > minPercentBound)
216216 else false)
217217 then [0, 3]
218218 else [3]
219219 let array2 = if (if ((maxPercentBound > p31))
220220 then (p31 > minPercentBound)
221221 else false)
222222 then 1 :: array1
223223 else array1
224224 let array3 = if (if ((maxPercentBound > p32))
225225 then (p32 > minPercentBound)
226226 else false)
227227 then 2 :: array2
228228 else array2
229229 if (if ((maxPercentBound > p34))
230230 then (p34 > minPercentBound)
231231 else false)
232232 then 4 :: array3
233233 else array3
234234 }
235235 }
236236 if ((size(check3) >= 3))
237237 then check3
238238 else {
239239 let p4 = prices[4]
240240 if ((0 >= p4))
241241 then [4]
242242 else {
243243 let p40 = ((prices[0] * 100) / p4)
244244 let p41 = ((prices[1] * 100) / p4)
245245 let p42 = ((prices[2] * 100) / p4)
246246 let p43 = ((prices[3] * 100) / p4)
247247 let array1 = if (if ((maxPercentBound > p40))
248248 then (p40 > minPercentBound)
249249 else false)
250250 then [0, 4]
251251 else [4]
252252 let array2 = if (if ((maxPercentBound > p41))
253253 then (p41 > minPercentBound)
254254 else false)
255255 then 1 :: array1
256256 else array1
257257 let array3 = if (if ((maxPercentBound > p42))
258258 then (p42 > minPercentBound)
259259 else false)
260260 then 2 :: array2
261261 else array2
262262 if (if ((maxPercentBound > p43))
263263 then (p43 > minPercentBound)
264264 else false)
265265 then 3 :: array3
266266 else array3
267267 }
268268 }
269269 }
270270
271271
272272 func formattingPriceMsg (price,height) = toBytes((((("WAVESNEUTRINOPREFIX" + "_") + toString(height)) + "_") + toString(price)))
273273
274274
275275 @Callable(i)
276276 func callEmergencyShutdown (reason) = {
277277 let AutoEmergencyOracleAddress = "3Mz1xicgip5sZXjcdQEf5TfZs5ZwPPi1qA5"
278278 let callerAddress = toString(i.caller)
279279 if ((AutoEmergencyOracleAddress != callerAddress))
280280 then throw("caller must be one an emergency oracle")
281281 else WriteSet([DataEntry("is_blocked", true), DataEntry("is_blocked_caller", callerAddress), DataEntry("is_blocked_reason", reason)])
282282 }
283283
284284
285285
286286 @Callable(i)
287287 func finalizeCurrentPrice (price1,sign1,price2,sign2,price3,sign3,price4,sign4,price5,sign5) = if (isBlocked)
288288 then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles")
289289 else if (( match getInteger(this, ("price_" + toString(height))) {
290290 case a: Int =>
291291 a
292292 case _ =>
293293 0
294294 } != 0))
295295 then throw("wait next block")
296296 else if ((pubKeyOraclesList[(height % 5)] != toBase58String(i.callerPublicKey)))
297297 then throw(((("Out of turn finalization: " + toString(height)) + " block should be finalize by ") + pubKeyOraclesList[(height % 5)]))
298298 else {
299299 let prices = [if (sigVerify(formattingPriceMsg(price1, height), sign1, fromBase58String(pubKeyOraclesList[0])))
300300 then price1
301301 else 0, if (sigVerify(formattingPriceMsg(price2, height), sign2, fromBase58String(pubKeyOraclesList[1])))
302302 then price2
303303 else 0, if (sigVerify(formattingPriceMsg(price3, height), sign3, fromBase58String(pubKeyOraclesList[2])))
304304 then price3
305305 else 0, if (sigVerify(formattingPriceMsg(price4, height), sign4, fromBase58String(pubKeyOraclesList[3])))
306306 then price4
307307 else 0, if (sigVerify(formattingPriceMsg(price5, height), sign5, fromBase58String(pubKeyOraclesList[4])))
308308 then price5
309309 else 0]
310310 let pricesInRange = findPricesInRange(prices)
311311 let priceProvidingCount = size(pricesInRange)
312312 if ((3 > priceProvidingCount))
313313 then throw(((((((((((((((((((((("Could not finalize price because of big variation: height=" + toString(height)) + "
314314 ") + pubKeyOraclesList[0]) + "=") + toString(prices[0])) + "
315315 ") + pubKeyOraclesList[1]) + "=") + toString(prices[1])) + "
316316 ") + pubKeyOraclesList[2]) + "=") + toString(prices[2])) + "
317317 ") + pubKeyOraclesList[3]) + "=") + toString(prices[3])) + "
318318 ") + pubKeyOraclesList[4]) + "=") + toString(prices[4])))
319319 else {
320320 let sum1 = ((prices[pricesInRange[0]] + prices[pricesInRange[1]]) + prices[pricesInRange[2]])
321321 let sum2 = if ((priceProvidingCount >= 4))
322322 then (sum1 + prices[pricesInRange[3]])
323323 else sum1
324324 let priceSum = if ((priceProvidingCount >= 5))
325325 then (sum2 + prices[pricesInRange[4]])
326326 else sum2
327327 if ((priceProvidingCount >= 6))
328328 then throw("Invalid pricesInRange creation")
329329 else {
330330 let newPrice = (priceSum / priceProvidingCount)
331331 if (if ((newPrice >= (price + ((price * percentPriceOffset) / 100))))
332332 then true
333333 else ((price - ((price * percentPriceOffset) / 100)) >= newPrice))
334334 then {
335335 let reason = "automatic emergency shutdown because of large price variability"
336336 WriteSet([DataEntry("is_blocked", true), DataEntry("is_blocked_caller", toString(this)), DataEntry("is_blocked_reason", reason), DataEntry((("black_swarm_price" + "_") + toString(height)), newPrice)])
337337 }
338338 else {
339339 let newPriceIndex = (priceIndex + 1)
340340 WriteSet([DataEntry("price", newPrice), DataEntry(("price_" + toString(height)), newPrice), DataEntry("price_index", newPriceIndex), DataEntry(("price_index_" + toString(newPriceIndex)), height), DataEntry(("deficit_" + toString(height)), deficit), DataEntry(("neutrinoSupply_" + toString(height)), neutrinoSupply), DataEntry(("deficit_percent_" + toString(height)), if ((neutrinoSupply != 0))
341341 then ((deficit * 100) / neutrinoSupply)
342342 else 0)])
343343 }
344344 }
345345 }
346346 }
347347
348348
349349
350350 @Callable(i)
351351 func updateReservesAndNeutrinoSupply () = {
352352 func getNumberByKeyInternal (key) = match getInteger(this, key) {
353353 case a: Int =>
354354 a
355355 case _ =>
356356 0
357357 }
358358
359359 let idx = getNumberByKeyInternal("updateReservesAndNeutrinoSupplyIdx")
360360 let newIdx = (idx + 1)
361361 WriteSet([DataEntry("updateReservesAndNeutrinoSupplyIdx", newIdx), DataEntry("reserve", reserve), DataEntry("neutrinoSupply", neutrinoSupply), DataEntry("deficit", deficit)])
362362 }
363363
364364
365365 @Verifier(tx)
366366 func verify () = {
367367 let pubKeyAdminsList = ["D96T5UoL7E2FERaEwov9Frx8XFVPNGqZ4TyDiWvn1urJ", "Fk2zgbrRA8KytTVMVy6Df5i4tTEsKaqg6ybh6x6Hehjj", "37f1yE54FyMKwEkg413peq5Gbze9sBavASVeTYbQLTvJ", "5WRXFSjwcTbNfKcJs8ZqXmSSWYsSVJUtMvMqZj5hH4Nc"]
368368 let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0])))
369369 then 1
370370 else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1])))
371371 then 1
372372 else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2])))
373373 then 1
374374 else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3])))
375375 then 2
376376 else 0))
377377 (count >= 3)
378378 }
379379

github/deemru/w8io/169f3d6 
52.14 ms