tx · 767Yxd7YLrzxknpE4yevPSn8FiPpnDSy42486KNa9Xi6 3MuhHdDkjQxuQRjVjTJ6Zf6Rf7uC9nKr9EV: -0.01500000 Waves 2024.03.05 10:37 [3004422] smart account 3MuhHdDkjQxuQRjVjTJ6Zf6Rf7uC9nKr9EV > SELF 0.00000000 Waves
{ "type": 13, "id": "767Yxd7YLrzxknpE4yevPSn8FiPpnDSy42486KNa9Xi6", "fee": 1500000, "feeAssetId": null, "timestamp": 1709624278769, "version": 2, "chainId": 84, "sender": "3MuhHdDkjQxuQRjVjTJ6Zf6Rf7uC9nKr9EV", "senderPublicKey": "3dw5GmZgR7YXRaWaz4Wqk1nkqQ1GTX4zkoSHUfJrfnEZ", "proofs": [ "jfPSNZJTx6jJWSVS7Q92eemJ6Qs8B7f9NyQMP4g6m1wV8J1bpRWAcno61yguiw9PVqWQAW5ePi6qxBQ383d2U2M" ], "script": "base64:AAIEAAAAAAAAAAwIAhIICgYICAICAgIAAAAgAAAAAAtQcm90b2NvbFNFUAIAAAABOgAAAAADU0VQAgAAAAJfXwAAAAAScGVyY2VudFByaWNlT2Zmc2V0AAAAAAAAACUcAQAAAAhrZXlQcmljZQAAAAEAAAAGc3ltYm9sCQABLAAAAAICAAAADSVzJXNfX3ByaWNlX18FAAAABnN5bWJvbAEAAAAKa2V5T3JhY2xlcwAAAAACAAAAFSVzJXNfX2NvbmZpZ19fb3JhY2xlcwEAAAAMa2V5R3JvdXBEYXRhAAAAAQAAAAhncm91cE51bQkAASwAAAACAgAAAA0lcyVkX19ncm91cF9fBQAAAAhncm91cE51bQEAAAAPa2V5TWluQ29uc2Vuc3VzAAAAAAIAAAAaJXMlc19fY29uZmlnX19taW5Db25zZW5zdXMBAAAAD2tleVByaWNlRmFpbHVyZQAAAAEAAAAGc3ltYm9sCQAEuQAAAAIJAARMAAAAAgIAAAAbJXMlcyVkX19maW5hbGl6YXRpb25GYWlsdXJlCQAETAAAAAIFAAAABnN5bWJvbAkABEwAAAACCQABpAAAA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dyb3VwRGF0YVN0cgUAAAAIbXNnQXJyYXkFAAAABnNpZ25zMQkBAAAAFWZpbmFsaXplUHJpY2VWMkNvbW1vbgAAAAUAAAAAAAAAAAIFAAAACGdyb3VwTnVtBQAAAAxncm91cERhdGFTdHIFAAAACG1zZ0FycmF5BQAAAAZzaWduczIJAQAAABVmaW5hbGl6ZVByaWNlVjJDb21tb24AAAAFAAAAAAAAAAADBQAAAAhncm91cE51bQUAAAAMZ3JvdXBEYXRhU3RyBQAAAAhtc2dBcnJheQUAAAAGc2lnbnMzCQEAAAAMQm9vbGVhbkVudHJ5AAAAAgkBAAAADmtleUdyb3VwU3RhdHVzAAAAAgUAAAAIZ3JvdXBOdW0FAAAADGZpbkhlaWdodFN0cgYAAAAAM/nDZw==", "height": 3004422, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 4 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let ProtocolSEP = ":" | |
5 | + | ||
6 | + | let SEP = "__" | |
7 | + | ||
8 | + | let percentPriceOffset = 9500 | |
9 | + | ||
10 | + | func keyPrice (symbol) = ("%s%s__price__" + symbol) | |
11 | + | ||
12 | + | ||
13 | + | func keyOracles () = "%s%s__config__oracles" | |
14 | + | ||
15 | + | ||
16 | + | func keyGroupData (groupNum) = ("%s%d__group__" + groupNum) | |
17 | + | ||
18 | + | ||
19 | + | func keyMinConsensus () = "%s%s__config__minConsensus" | |
20 | + | ||
21 | + | ||
22 | + | func keyPriceFailure (symbol) = makeString(["%s%s%d__finalizationFailure", symbol, toString(height)], SEP) | |
23 | + | ||
24 | + | ||
25 | + | func keyLastHeight (symbol) = ("%s%s__lastHeight__" + symbol) | |
26 | + | ||
27 | + | ||
28 | + | func keyPriceByHeight (symbol,h) = makeString(["%s%s%d__priceByHeight", symbol, toString(h)], SEP) | |
29 | + | ||
30 | + | ||
31 | + | func keyIdx (symbol) = ("%s%s__idxCurrent__" + symbol) | |
32 | + | ||
33 | + | ||
34 | + | func keyIdx2Height (symbol,idx) = makeString(["%s%s%d__idx2Height", symbol, toString(idx)], SEP) | |
35 | + | ||
36 | + | ||
37 | + | func keyHeight2Idx (symbol,h) = makeString(["%s%s%d__height2Idx", symbol, toString(h)], SEP) | |
38 | + | ||
39 | + | ||
40 | + | func keyGroupStatus (groupNum,finHeightStr) = makeString(["%s%d%d__groupStatus", groupNum, finHeightStr], SEP) | |
41 | + | ||
42 | + | ||
43 | + | func keyIsMarketOpened (symbol) = ("%s%s__isMarketOpened__" + symbol) | |
44 | + | ||
45 | + | ||
46 | + | func keyEmptyPriceMsg (position) = makeString(["%s%d%d__emptyPriceMsg", toString(height), toString(position)], SEP) | |
47 | + | ||
48 | + | ||
49 | + | func keyIsBlocked (symbol) = ("%s%s__isBlocked__" + symbol) | |
50 | + | ||
51 | + | ||
52 | + | func keyIsBlockedSender (symbol) = makeString(["%s%s%s__isBlocked", symbol, "sender"], SEP) | |
53 | + | ||
54 | + | ||
55 | + | func keyIsBlockedReason (symbol) = makeString(["%s%s%s__isBlocked", symbol, "reason"], SEP) | |
56 | + | ||
57 | + | ||
58 | + | func keyBlackSwarmPrice (h,symbol) = makeString(["%s%s%s%d__isBlocked", symbol, "blackSwarmPrice", toString(h)], SEP) | |
59 | + | ||
60 | + | ||
61 | + | func isGroupFinalaized (groupNum,finHeightStr) = isDefined(getBoolean(this, keyGroupStatus(groupNum, finHeightStr))) | |
62 | + | ||
63 | + | ||
64 | + | func readGroupDataOrFail (groupNum) = { | |
65 | + | let k = keyGroupData(groupNum) | |
66 | + | let groupDataOpt = getString(this, k) | |
67 | + | if (isDefined(groupDataOpt)) | |
68 | + | then value(groupDataOpt) | |
69 | + | else throw(("empty group data for key=" + k)) | |
70 | + | } | |
71 | + | ||
72 | + | ||
73 | + | let pubKeyOraclesList = split(getStringValue(this, keyOracles()), ",") | |
74 | + | ||
75 | + | let oracleCount = size(pubKeyOraclesList) | |
76 | + | ||
77 | + | let minConsensus = valueOrElse(getInteger(this, keyMinConsensus()), 3) | |
78 | + | ||
79 | + | func PriceFailedResult (symbol,msg) = [StringEntry(keyPriceFailure(symbol), msg)] | |
80 | + | ||
81 | + | ||
82 | + | func throwInvalidFinalizationHeight (finHeightStr) = throw(((("invalid finalization height: height=" + toString(height)) + " finalizationHeight=") + finHeightStr)) | |
83 | + | ||
84 | + | ||
85 | + | func throwGroupAlreadyFinalized (groupNum,finHeightStr) = throw((((("prices for groupNum=" + groupNum) + " at ") + finHeightStr) + " height have been already finalized")) | |
86 | + | ||
87 | + | ||
88 | + | func throwInvalidSignsParamLength (num,param) = throw(((((("invalid signs" + toString(num)) + " parameter: actual.size=") + toString(size(param))) + " base58Val=") + toBase58String(param))) | |
89 | + | ||
90 | + | ||
91 | + | func throwOutOfTurnFinalization () = throw(((("Out of turn finalization: " + toString(height)) + " block should be finalize by ") + pubKeyOraclesList[(height % oracleCount)])) | |
92 | + | ||
93 | + | ||
94 | + | func throwBlockedError () = throw("contract is blocked by EMERGENCY SHUTDOWN action") | |
95 | + | ||
96 | + | ||
97 | + | func finalizePriceV2Common (position,groupNum,groupDataStr,msgArray,signs) = { | |
98 | + | let msgOffset = (position * 3) | |
99 | + | if ((msgOffset >= size(msgArray))) | |
100 | + | then [StringEntry(keyEmptyPriceMsg(position), "price data is empty")] | |
101 | + | else { | |
102 | + | let symbol = msgArray[(msgOffset + 0)] | |
103 | + | let newPriceStr = msgArray[(msgOffset + 1)] | |
104 | + | let isMarketOpenedStr = msgArray[(msgOffset + 2)] | |
105 | + | let newPriceOpt = parseInt(newPriceStr) | |
106 | + | let isMarketOpenedOpt = parseInt(isMarketOpenedStr) | |
107 | + | let sig0 = take(signs, 64) | |
108 | + | let sig1 = take(drop(signs, 64), 64) | |
109 | + | let sig2 = take(drop(signs, 128), 64) | |
110 | + | let sig3 = take(drop(signs, 192), 64) | |
111 | + | let sig4 = takeRightBytes(signs, 64) | |
112 | + | let isBlocked = valueOrElse(getBoolean(this, keyIsBlocked(symbol)), false) | |
113 | + | if ((symbol == "")) | |
114 | + | then nil | |
115 | + | else if (isBlocked) | |
116 | + | then PriceFailedResult(symbol, (symbol + " is blocked")) | |
117 | + | else if (contains(groupDataStr, symbol)) | |
118 | + | then if (if (isDefined(newPriceOpt)) | |
119 | + | then isDefined(isMarketOpenedOpt) | |
120 | + | else false) | |
121 | + | then { | |
122 | + | let newPrice = value(newPriceOpt) | |
123 | + | let isMarketOpened = if ((value(isMarketOpenedOpt) == 1)) | |
124 | + | then true | |
125 | + | else false | |
126 | + | let priceMsgStr = makeString(["WAVES-DORA2", groupNum, toString(height), symbol, newPriceStr, isMarketOpenedStr], ProtocolSEP) | |
127 | + | let priceMsg = toBytes(priceMsgStr) | |
128 | + | let verificationsCount = (((((if (sigVerify_8Kb(priceMsg, sig0, fromBase58String(pubKeyOraclesList[0]))) | |
129 | + | then 1 | |
130 | + | else 0) + (if (sigVerify_8Kb(priceMsg, sig1, fromBase58String(pubKeyOraclesList[1]))) | |
131 | + | then 1 | |
132 | + | else 0)) + (if (sigVerify_8Kb(priceMsg, sig2, fromBase58String(pubKeyOraclesList[2]))) | |
133 | + | then 1 | |
134 | + | else 0)) + (if (sigVerify_8Kb(priceMsg, sig3, fromBase58String(pubKeyOraclesList[3]))) | |
135 | + | then 1 | |
136 | + | else 0)) + (if (sigVerify_8Kb(priceMsg, sig4, fromBase58String(pubKeyOraclesList[4]))) | |
137 | + | then 1 | |
138 | + | else 0)) | |
139 | + | if ((verificationsCount >= minConsensus)) | |
140 | + | then { | |
141 | + | let price = valueOrElse(getInteger(this, keyPrice(symbol)), 0) | |
142 | + | let idx = valueOrElse(getInteger(this, keyIdx(symbol)), 0) | |
143 | + | if (if ((price != 0)) | |
144 | + | then if ((newPrice >= (price + ((price * percentPriceOffset) / 100)))) | |
145 | + | then true | |
146 | + | else ((price - ((price * percentPriceOffset) / 100)) >= newPrice) | |
147 | + | else false) | |
148 | + | then { | |
149 | + | let reason = "automatic emergency shutdown because of large price variability" | |
150 | + | [BooleanEntry(keyIsBlocked(symbol), true), StringEntry(keyIsBlockedSender(symbol), toString(this)), StringEntry(keyIsBlockedReason(symbol), reason), IntegerEntry(keyBlackSwarmPrice(height, symbol), newPrice)] | |
151 | + | } | |
152 | + | else { | |
153 | + | let newIdx = (idx + 1) | |
154 | + | [IntegerEntry(keyPrice(symbol), newPrice), IntegerEntry(keyLastHeight(symbol), height), IntegerEntry(keyPriceByHeight(symbol, height), newPrice), IntegerEntry(keyIdx(symbol), newIdx), IntegerEntry(keyIdx2Height(symbol, newIdx), height), IntegerEntry(keyHeight2Idx(symbol, height), newIdx), BooleanEntry(keyIsMarketOpened(symbol), isMarketOpened)] | |
155 | + | } | |
156 | + | } | |
157 | + | else PriceFailedResult(symbol, ((((((((("verificationsCount = " + toString(verificationsCount)) + "signs0.length=") + toString(size(signs))) + " msg0 = ") + priceMsgStr) + " sig0 = ") + toBase58String(sig0)) + " key0 = ") + pubKeyOraclesList[0])) | |
158 | + | } | |
159 | + | else PriceFailedResult(symbol, ((("data parsing error: newPrice=" + newPriceStr) + " isMarketOpened=") + isMarketOpenedStr)) | |
160 | + | else PriceFailedResult(symbol, ((symbol + " doesn't exist in group: groupDataStr=") + groupDataStr)) | |
161 | + | } | |
162 | + | } | |
163 | + | ||
164 | + | ||
165 | + | @Callable(i) | |
166 | + | func finalizeDORA2 (header,msg,signs0,signs1,signs2,signs3) = { | |
167 | + | let headerArray = split(header, ProtocolSEP) | |
168 | + | let groupNum = headerArray[1] | |
169 | + | let finHeightStr = headerArray[2] | |
170 | + | let finHeight = parseIntValue(finHeightStr) | |
171 | + | let signsLength = (64 * oracleCount) | |
172 | + | if ((height != finHeight)) | |
173 | + | then throwInvalidFinalizationHeight(finHeightStr) | |
174 | + | else if (isGroupFinalaized(groupNum, finHeightStr)) | |
175 | + | then throwGroupAlreadyFinalized(groupNum, finHeightStr) | |
176 | + | else if ((pubKeyOraclesList[(height % oracleCount)] != toBase58String(i.callerPublicKey))) | |
177 | + | then throwOutOfTurnFinalization() | |
178 | + | else if ((size(signs0) != signsLength)) | |
179 | + | then throwInvalidSignsParamLength(0, signs0) | |
180 | + | else if ((size(signs1) != signsLength)) | |
181 | + | then throwInvalidSignsParamLength(1, signs1) | |
182 | + | else if ((size(signs2) != signsLength)) | |
183 | + | then throwInvalidSignsParamLength(2, signs2) | |
184 | + | else if ((size(signs3) != signsLength)) | |
185 | + | then throwInvalidSignsParamLength(3, signs3) | |
186 | + | else { | |
187 | + | let groupDataKey = keyGroupData(groupNum) | |
188 | + | let groupDataStr = valueOrErrorMessage(getString(this, groupDataKey), ("empty group data for key=" + groupDataKey)) | |
189 | + | let msgArray = split(msg, ProtocolSEP) | |
190 | + | if (((size(msgArray) % 3) != 0)) | |
191 | + | then throw(("msg parameters count must be multiple of 3: msgArray.size=" + toString(size(msg)))) | |
192 | + | else ((((finalizePriceV2Common(0, groupNum, groupDataStr, msgArray, signs0) ++ finalizePriceV2Common(1, groupNum, groupDataStr, msgArray, signs1)) ++ finalizePriceV2Common(2, groupNum, groupDataStr, msgArray, signs2)) ++ finalizePriceV2Common(3, groupNum, groupDataStr, msgArray, signs3)) :+ BooleanEntry(keyGroupStatus(groupNum, finHeightStr), true)) | |
193 | + | } | |
194 | + | } | |
195 | + | ||
196 | + |
github/deemru/w8io/169f3d6 26.18 ms ◑