tx · D9HouzWUz8f5jh33we9ik6kRaBGQ4tHUnN9YXZ1HT1os

3N7swxEx1qFQo8Z3k21nf5v275sVG21Vt2V:  -0.01000000 Waves

2020.04.22 12:31 [965526] smart account 3N7swxEx1qFQo8Z3k21nf5v275sVG21Vt2V > SELF 0.00000000 Waves

{ "type": 13, "id": "D9HouzWUz8f5jh33we9ik6kRaBGQ4tHUnN9YXZ1HT1os", "fee": 1000000, "feeAssetId": null, "timestamp": 1587547874150, "version": 1, "sender": "3N7swxEx1qFQo8Z3k21nf5v275sVG21Vt2V", "senderPublicKey": "72uA4MmXYGHuoM3mJc3dC9oTb6FwjzpTq17yDbR1yUzW", "proofs": [ "wpDTVd2dewi6yw69DpY15SJ8TS8frH5zH1122jYT85VPPwvJYJJpJppPKBcgs9hiNoem28U1kUuirF9YwKRX235" ], "script": "base64:AAIDAAAAAAAAABcIARIDCgEIEgwKCgECAQIBAgECAQISAAAAABgBAAAAFmNvbnZlcnRXYXZlc1RvTmV1dHJpbm8AAAACAAAABmFtb3VudAAAAAVwcmljZQkAAGsAAAADCQAAawAAAAMFAAAABmFtb3VudAUAAAAFcHJpY2UAAAAAAAAAAGQAAAAAAAAPQkAAAAAAAAX14QABAAAADmdldFN0cmluZ0J5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWECAAAAAAEAAAAYZ2V0TnVtYmVyQnlBZGRyZXNzQW5kS2V5AAAAAgAAAAdhZGRyZXNzAAAAA2tleQQAAAAHJG1hdGNoMAkABBoAAAACCQEAAAAcQGV4dHJVc2VyKGFkZHJlc3NGcm9tU3RyaW5nKQAAAAEFAAAAB2FkZHJlc3MFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAA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lib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAgkAAlkAAAABCQABkQAAAAIFAAAAEHB1YktleUFkbWluc0xpc3QAAAAAAAAAAAIAAAAAAAAAAAEAAAAAAAAAAAADCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAwkAAlkAAAABCQABkQAAAAIFAAAAEHB1YktleUFkbWluc0xpc3QAAAAAAAAAAAMAAAAAAAAAAAIAAAAAAAAAAAAJAABnAAAAAgUAAAAFY291bnQAAAAAAAAAAANHQ5Sq", "chainId": 84, "height": 965526, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, 100), 1000000, 100000000)
5+
6+
7+func getStringByKey (key) = match getString(this, key) {
8+ case a: String =>
9+ a
10+ case _ =>
11+ ""
12+}
13+
14+
15+func getNumberByAddressAndKey (address,key) = match getInteger(addressFromStringValue(address), key) {
16+ case a: Int =>
17+ a
18+ case _ =>
19+ 0
20+}
21+
22+
23+func getOracleProvideHeight (ownerPub,height) = match getInteger(addressFromPublicKey(ownerPub), ("price_" + toString(height))) {
24+ case a: Int =>
25+ a
26+ case _ =>
27+ 0
28+}
29+
30+
31+func getStringByAddressAndKey (address,key) = match getString(address, key) {
32+ case a: String =>
33+ a
34+ case _ =>
35+ ""
36+}
37+
38+
39+func dropElementInJsonArray (array,element) = {
40+ let splitedArray = split(array, element)
41+ if ((take(splitedArray[1], 1) == ","))
42+ then (splitedArray[0] + drop(splitedArray[1], 1))
43+ else (dropRight(splitedArray[0], 1) + splitedArray[1])
44+ }
45+
46+
47+func convertJsonArrayToList (jsonArray) = split(jsonArray, ",")
48+
49+
50+let price = match getInteger(this, "price") {
51+ case a: Int =>
52+ a
53+ case _ =>
54+ 0
55+}
56+
57+let priceIndex = match getInteger(this, "price_index") {
58+ case a: Int =>
59+ a
60+ case _ =>
61+ 0
62+}
63+
64+let isBlocked = match getBoolean(this, "is_blocked") {
65+ case a: Boolean =>
66+ a
67+ case _ =>
68+ false
69+}
70+
71+let percentPriceOffset = 25
72+
73+let pubKeyOracles = getStringByKey("oracles")
74+
75+let pubKeyOraclesList = convertJsonArrayToList(pubKeyOracles)
76+
77+let bftCoefficientOracle = 3
78+
79+let neutrinoAddress = addressFromPublicKey(fromBase58String("Gt26gHQ4Sb99J2kQapScCswUhSGCY1dChJ3uHhek3qBg"))
80+
81+let liquidationAddress = addressFromPublicKey(fromBase58String("91g2NN9ra2wrDveiNVhN8HV6FS2MqNp94GZwpKMtCuLr"))
82+
83+let neutrinoAsset = fromBase58String("B1MJTymV91CoXBtqMBU2och9fhu8hQjnFLK86fNtawf")
84+
85+let neutrinoLockedBalance = match getInteger(neutrinoAddress, "balance_lock_neutrino") {
86+ case a: Int =>
87+ a
88+ case _ =>
89+ 0
90+}
91+
92+let wavesLockedBalance = match getInteger(neutrinoAddress, "balance_lock_waves") {
93+ case a: Int =>
94+ a
95+ case _ =>
96+ 0
97+}
98+
99+let reserve = (wavesBalance(neutrinoAddress) - wavesLockedBalance)
100+
101+let neutrinoSupply = (((neutrinoLockedBalance + extract(assetInfo(neutrinoAsset)).quantity) - assetBalance(neutrinoAddress, neutrinoAsset)) - assetBalance(liquidationAddress, neutrinoAsset))
102+
103+let deficit = (neutrinoSupply - convertWavesToNeutrino(reserve, price))
104+
105+func findPricesInRange (prices) = {
106+ let minPercentBound = 90
107+ let maxPercentBound = 110
108+ let p0 = prices[0]
109+ let check0 = if ((0 >= prices[0]))
110+ then [0]
111+ else {
112+ let p01 = ((prices[1] * 100) / p0)
113+ let p02 = ((prices[2] * 100) / p0)
114+ let p03 = ((prices[3] * 100) / p0)
115+ let p04 = ((prices[4] * 100) / p0)
116+ let array1 = if (if ((maxPercentBound > p01))
117+ then (p01 > minPercentBound)
118+ else false)
119+ then [1, 0]
120+ else [0]
121+ let array2 = if (if ((maxPercentBound > p02))
122+ then (p02 > minPercentBound)
123+ else false)
124+ then 2 :: array1
125+ else array1
126+ let array3 = if (if ((maxPercentBound > p03))
127+ then (p03 > minPercentBound)
128+ else false)
129+ then 3 :: array2
130+ else array2
131+ if (if ((maxPercentBound > p04))
132+ then (p04 > minPercentBound)
133+ else false)
134+ then 4 :: array3
135+ else array3
136+ }
137+ let check1 = if ((size(check0) >= 3))
138+ then check0
139+ else {
140+ let p1 = prices[1]
141+ if ((0 >= p1))
142+ then [1]
143+ else {
144+ let p10 = ((prices[0] * 100) / p1)
145+ let p12 = ((prices[2] * 100) / p1)
146+ let p13 = ((prices[3] * 100) / p1)
147+ let p14 = ((prices[4] * 100) / p1)
148+ let array1 = if (if ((maxPercentBound > p10))
149+ then (p10 > minPercentBound)
150+ else false)
151+ then [0, 1]
152+ else [1]
153+ let array2 = if (if ((maxPercentBound > p12))
154+ then (p12 > minPercentBound)
155+ else false)
156+ then 2 :: array1
157+ else array1
158+ let array3 = if (if ((maxPercentBound > p13))
159+ then (p13 > minPercentBound)
160+ else false)
161+ then 3 :: array2
162+ else array2
163+ if (if ((maxPercentBound > p14))
164+ then (p14 > minPercentBound)
165+ else false)
166+ then 4 :: array3
167+ else array3
168+ }
169+ }
170+ let check2 = if ((size(check1) >= 3))
171+ then check1
172+ else {
173+ let p2 = prices[2]
174+ if ((0 >= p2))
175+ then [2]
176+ else {
177+ let p20 = ((prices[0] * 100) / p2)
178+ let p21 = ((prices[1] * 100) / p2)
179+ let p23 = ((prices[3] * 100) / p2)
180+ let p24 = ((prices[4] * 100) / p2)
181+ let array1 = if (if ((maxPercentBound > p20))
182+ then (p20 > minPercentBound)
183+ else false)
184+ then [0, 2]
185+ else [2]
186+ let array2 = if (if ((maxPercentBound > p21))
187+ then (p21 > minPercentBound)
188+ else false)
189+ then 1 :: array1
190+ else array1
191+ let array3 = if (if ((maxPercentBound > p23))
192+ then (p23 > minPercentBound)
193+ else false)
194+ then 3 :: array2
195+ else array2
196+ if (if ((maxPercentBound > p24))
197+ then (p24 > minPercentBound)
198+ else false)
199+ then 4 :: array3
200+ else array3
201+ }
202+ }
203+ let check3 = if ((size(check2) >= 3))
204+ then check2
205+ else {
206+ let p3 = prices[3]
207+ if ((0 >= p3))
208+ then [3]
209+ else {
210+ let p30 = ((prices[0] * 100) / p3)
211+ let p31 = ((prices[1] * 100) / p3)
212+ let p32 = ((prices[2] * 100) / p3)
213+ let p34 = ((prices[4] * 100) / p3)
214+ let array1 = if (if ((maxPercentBound > p30))
215+ then (p30 > minPercentBound)
216+ else false)
217+ then [0, 3]
218+ else [3]
219+ let array2 = if (if ((maxPercentBound > p31))
220+ then (p31 > minPercentBound)
221+ else false)
222+ then 1 :: array1
223+ else array1
224+ let array3 = if (if ((maxPercentBound > p32))
225+ then (p32 > minPercentBound)
226+ else false)
227+ then 2 :: array2
228+ else array2
229+ if (if ((maxPercentBound > p34))
230+ then (p34 > minPercentBound)
231+ else false)
232+ then 4 :: array3
233+ else array3
234+ }
235+ }
236+ if ((size(check3) >= 3))
237+ then check3
238+ else {
239+ let p4 = prices[4]
240+ if ((0 >= p4))
241+ then [4]
242+ else {
243+ let p40 = ((prices[0] * 100) / p4)
244+ let p41 = ((prices[1] * 100) / p4)
245+ let p42 = ((prices[2] * 100) / p4)
246+ let p43 = ((prices[3] * 100) / p4)
247+ let array1 = if (if ((maxPercentBound > p40))
248+ then (p40 > minPercentBound)
249+ else false)
250+ then [0, 4]
251+ else [4]
252+ let array2 = if (if ((maxPercentBound > p41))
253+ then (p41 > minPercentBound)
254+ else false)
255+ then 1 :: array1
256+ else array1
257+ let array3 = if (if ((maxPercentBound > p42))
258+ then (p42 > minPercentBound)
259+ else false)
260+ then 2 :: array2
261+ else array2
262+ if (if ((maxPercentBound > p43))
263+ then (p43 > minPercentBound)
264+ else false)
265+ then 3 :: array3
266+ else array3
267+ }
268+ }
269+ }
270+
271+
272+func formattingPriceMsg (price,height) = toBytes((((("WAVESNEUTRINOPREFIX" + "_") + toString(height)) + "_") + toString(price)))
273+
274+
275+@Callable(i)
276+func callEmergencyShutdown (reason) = {
277+ let AutoEmergencyOracleAddress = "3N8wGQXV1hqgJXDsNhuzTAiDmg9ZcXYk14H"
278+ let callerAddress = toString(i.caller)
279+ if ((AutoEmergencyOracleAddress != callerAddress))
280+ then throw("caller must be one an emergency oracle")
281+ else WriteSet([DataEntry("is_blocked", true), DataEntry("is_blocked_caller", callerAddress), DataEntry("is_blocked_reason", reason)])
282+ }
283+
284+
285+
286+@Callable(i)
287+func finalizeCurrentPrice (price1,sign1,price2,sign2,price3,sign3,price4,sign4,price5,sign5) = if (isBlocked)
288+ then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles")
289+ else if (( match getInteger(this, ("price_" + toString(height))) {
290+ case a: Int =>
291+ a
292+ case _ =>
293+ 0
294+ } != 0))
295+ then throw("wait next block")
296+ else if ((pubKeyOraclesList[(height % 5)] != toBase58String(i.callerPublicKey)))
297+ then throw(((("Out of turn finalization: " + toString(height)) + " block should be finalize by ") + pubKeyOraclesList[(height % 5)]))
298+ else {
299+ let prices = [if (sigVerify(formattingPriceMsg(price1, height), sign1, fromBase58String(pubKeyOraclesList[0])))
300+ then price1
301+ else 0, if (sigVerify(formattingPriceMsg(price2, height), sign2, fromBase58String(pubKeyOraclesList[1])))
302+ then price2
303+ else 0, if (sigVerify(formattingPriceMsg(price3, height), sign3, fromBase58String(pubKeyOraclesList[2])))
304+ then price3
305+ else 0, if (sigVerify(formattingPriceMsg(price4, height), sign4, fromBase58String(pubKeyOraclesList[3])))
306+ then price4
307+ else 0, if (sigVerify(formattingPriceMsg(price5, height), sign5, fromBase58String(pubKeyOraclesList[4])))
308+ then price5
309+ else 0]
310+ let pricesInRange = findPricesInRange(prices)
311+ let priceProvidingCount = size(pricesInRange)
312+ if ((3 > priceProvidingCount))
313+ then throw(((((((((((((((((((((("Could not finalize price because of big variation: height=" + toString(height)) + "
314+") + pubKeyOraclesList[0]) + "=") + toString(prices[0])) + "
315+") + pubKeyOraclesList[1]) + "=") + toString(prices[1])) + "
316+") + pubKeyOraclesList[2]) + "=") + toString(prices[2])) + "
317+") + pubKeyOraclesList[3]) + "=") + toString(prices[3])) + "
318+") + pubKeyOraclesList[4]) + "=") + toString(prices[4])))
319+ else {
320+ let sum1 = ((prices[pricesInRange[0]] + prices[pricesInRange[1]]) + prices[pricesInRange[2]])
321+ let sum2 = if ((priceProvidingCount >= 4))
322+ then (sum1 + prices[pricesInRange[3]])
323+ else sum1
324+ let priceSum = if ((priceProvidingCount >= 5))
325+ then (sum2 + prices[pricesInRange[4]])
326+ else sum2
327+ if ((priceProvidingCount >= 6))
328+ then throw("Invalid pricesInRange creation")
329+ else {
330+ let newPrice = (priceSum / priceProvidingCount)
331+ if (if ((newPrice >= (price + ((price * percentPriceOffset) / 100))))
332+ then true
333+ else ((price - ((price * percentPriceOffset) / 100)) >= newPrice))
334+ then {
335+ let reason = "automatic emergency shutdown because of large price variability"
336+ WriteSet([DataEntry("is_blocked", true), DataEntry("is_blocked_caller", toString(this)), DataEntry("is_blocked_reason", reason), DataEntry((("black_swarm_price" + "_") + toString(height)), newPrice)])
337+ }
338+ else {
339+ let newPriceIndex = (priceIndex + 1)
340+ 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))
341+ then ((deficit * 100) / neutrinoSupply)
342+ else 0)])
343+ }
344+ }
345+ }
346+ }
347+
348+
349+
350+@Callable(i)
351+func updateReservesAndNeutrinoSupply () = {
352+ func getNumberByKeyInternal (key) = match getInteger(this, key) {
353+ case a: Int =>
354+ a
355+ case _ =>
356+ 0
357+ }
358+
359+ let idx = getNumberByKeyInternal("updateReservesAndNeutrinoSupplyIdx")
360+ let newIdx = (idx + 1)
361+ WriteSet([DataEntry("updateReservesAndNeutrinoSupplyIdx", newIdx), DataEntry("reserve", reserve), DataEntry("neutrinoSupply", neutrinoSupply), DataEntry("deficit", deficit)])
362+ }
363+
364+
365+@Verifier(tx)
366+func verify () = {
367+ let pubKeyAdminsList = ["BDEhptLEkiyP5qKCTgkChdsQS9tuzxN5st1Ej2EXgxzj", "FZG25sLdE6jz8AEPBRp1wGBKx8m7PQoxep1t6GGuYMuD", "8GYVGvCZJfXArP1dhxVSs48YgNzANCet6j5pTZVgBqUD", "5WRXFSjwcTbNfKcJs8ZqXmSSWYsSVJUtMvMqZj5hH4Nc"]
368+ let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0])))
369+ then 1
370+ else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1])))
371+ then 1
372+ else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2])))
373+ then 1
374+ else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3])))
375+ then 2
376+ else 0))
377+ (count >= 3)
378+ }
379+

github/deemru/w8io/169f3d6 
33.21 ms