tx · 3gaq31qmeTQRT9yen4xRN2ffenA8gdwVUYo4JTrQFzbF

3MugZ2TLyAMfGVZyWQAkjh2GGA4Ev7msLKs:  -0.01000000 Waves

2020.01.28 18:10 [874325] smart account 3MugZ2TLyAMfGVZyWQAkjh2GGA4Ev7msLKs > SELF 0.00000000 Waves

{ "type": 13, "id": "3gaq31qmeTQRT9yen4xRN2ffenA8gdwVUYo4JTrQFzbF", "fee": 1000000, "feeAssetId": null, "timestamp": 1580224295086, "version": 1, "sender": "3MugZ2TLyAMfGVZyWQAkjh2GGA4Ev7msLKs", "senderPublicKey": "2P9aHmCd4D68vte56ag4dMUgkWhdd8Bk8FG87CEFZWsX", "proofs": [ "4f6dcyLq3Q2UTbwk6L6DGMTQbnKFN8tWSjjbYKtm3fCR1fVWzZHVggyzLeirszHKaYcub9rrCyJRNka7vsbu5JxC" ], "script": "base64:AAIDAAAAAAAAAA0IARIAEgMKAQgSABIAAAAAOAEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAEAAAAOZ2V0U3RyaW5nQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQIAAAAAAQAAABhnZXRTdHJpbmdCeUFkZHJlc3NBbmRLZXkAAAACAAAAB2FkZHJlc3MAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAAB2FkZHJlc3MFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAgAAAAABAAAAGGdldE51bWJlckJ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AAAQcHViS2V5QWRtaW5zTGlzdAAAAAAAAAAAAgAAAAAAAAAAAQAAAAAAAAAAAAMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAADCQACWQAAAAEJAAGRAAAAAgUAAAAQcHViS2V5QWRtaW5zTGlzdAAAAAAAAAAAAwAAAAAAAAAAAgAAAAAAAAAAAAkAAGcAAAACBQAAAAVjb3VudAAAAAAAAAAAA9gtJnE=", "chainId": 84, "height": 874325, "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 getNumberByKey (key) = match getInteger(this, key) {
5+ case a: Int =>
6+ a
7+ case _ =>
8+ 0
9+}
10+
11+
12+func getStringByKey (key) = match getString(this, key) {
13+ case a: String =>
14+ a
15+ case _ =>
16+ ""
17+}
18+
19+
20+func getStringByAddressAndKey (address,key) = match getString(address, key) {
21+ case a: String =>
22+ a
23+ case _ =>
24+ ""
25+}
26+
27+
28+func getNumberByAddressAndKey (address,key) = match getInteger(address, key) {
29+ case a: Int =>
30+ a
31+ case _ =>
32+ 0
33+}
34+
35+
36+let WAVELET = 100000000
37+
38+let ORDERSPLITSYMBOL = "_"
39+
40+let PAULI = 1000000
41+
42+let PERCENTACCURACY = 1000
43+
44+let MAXDISCOUNT = 50
45+
46+let CANCELED = "canceled"
47+
48+let NEW = "new"
49+
50+let FILLED = "filled"
51+
52+let NeutrinoContractKey = "neutrino_contract"
53+
54+let PriceKey = "price"
55+
56+let BondAssetIdKey = "bond_asset_id"
57+
58+let NeutrinoAssetIdKey = "neutrino_asset_id"
59+
60+let ControlContractKey = "control_contract"
61+
62+let BalanceLockedkKey = "balance_lock_"
63+
64+let WavesLockedBalanceKey = (BalanceLockedkKey + "waves")
65+
66+let NeutrinoLockedBalanceKey = (BalanceLockedkKey + "neutrino")
67+
68+let FirstOrderKey = "order_first"
69+
70+let LastOrderKey = "order_last"
71+
72+func getOrderPrevKey (orderId) = ("order_prev_" + orderId)
73+
74+
75+func getOrderNextKey (orderId) = ("order_next_" + orderId)
76+
77+
78+func getOrderTotalKey (orderId) = ("order_total_" + orderId)
79+
80+
81+func getOrderOwnerKey (orderId) = ("order_owner_" + orderId)
82+
83+
84+func getOrderHeightKey (orderId) = ("order_height_" + orderId)
85+
86+
87+func getOrderStatusKey (orderId) = ("order_status_" + orderId)
88+
89+
90+func getOrderFilledTotalKey (orderId) = ("order_filled_total_" + orderId)
91+
92+
93+func getLastOrderOwnerKey (owner) = ("last_order_owner_" + owner)
94+
95+
96+func convertNeutrinoToWaves (amount,price) = fraction(fraction(amount, 100, price), WAVELET, PAULI)
97+
98+
99+func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, 100), PAULI, WAVELET)
100+
101+
102+func convertNeutrinoToBond (amount) = (amount / PAULI)
103+
104+
105+func convertBondToNeutrino (amount) = (amount * PAULI)
106+
107+
108+func convertWavesToBond (amount,price) = convertNeutrinoToBond(convertWavesToNeutrino(amount, price))
109+
110+
111+let neutrinoContract = addressFromStringValue(getStringByKey(NeutrinoContractKey))
112+
113+let controlContract = addressFromStringValue(getStringByAddressAndKey(neutrinoContract, ControlContractKey))
114+
115+let liquidationContract = this
116+
117+let neutrinoAssetId = fromBase58String(getStringByAddressAndKey(neutrinoContract, NeutrinoAssetIdKey))
118+
119+let bondAssetId = fromBase58String(getStringByAddressAndKey(neutrinoContract, BondAssetIdKey))
120+
121+let firstOrder = getStringByKey(FirstOrderKey)
122+
123+let lastOrder = getStringByKey(LastOrderKey)
124+
125+let currentPrice = getNumberByAddressAndKey(controlContract, PriceKey)
126+
127+let neutrinoLockedBalance = getNumberByAddressAndKey(neutrinoContract, NeutrinoLockedBalanceKey)
128+
129+let wavesLockedBalance = getNumberByAddressAndKey(neutrinoContract, WavesLockedBalanceKey)
130+
131+let reserve = (wavesBalance(neutrinoContract) - wavesLockedBalance)
132+
133+let neutrinoSupply = (((neutrinoLockedBalance + extract(assetInfo(neutrinoAssetId)).quantity) - assetBalance(neutrinoContract, neutrinoAssetId)) - assetBalance(liquidationContract, neutrinoAssetId))
134+
135+let surplus = (convertWavesToNeutrino(reserve, currentPrice) - neutrinoSupply)
136+
137+func getOrderTotal (id) = getNumberByKey(getOrderTotalKey(id))
138+
139+
140+func getOrderOwner (id) = getStringByKey(getOrderOwnerKey(id))
141+
142+
143+func getOrderStatus (id) = getStringByKey(getOrderStatusKey(id))
144+
145+
146+func getOrderFilledTotal (id) = getNumberByKey(getOrderFilledTotalKey(id))
147+
148+
149+func getOrderPrev (id) = getStringByKey(getOrderPrevKey(id))
150+
151+
152+func getOrderNext (id) = getStringByKey(getOrderNextKey(id))
153+
154+
155+func getOrderHeight (id) = getNumberByKey(getOrderHeightKey(id))
156+
157+
158+func getLastOrderOwner (owner) = getStringByKey(getLastOrderOwnerKey(owner))
159+
160+
161+@Callable(i)
162+func addLiquidationOrder () = {
163+ let pmt = extract(i.payment)
164+ let newOrderId = toBase58String(keccak256((((toBytes(pmt.amount) + i.caller.bytes) + toBytes(height)) + i.transactionId)))
165+ let nextOrder = getOrderNext(lastOrder)
166+ let orderStatus = getOrderStatus(lastOrder)
167+ let owner = toString(i.caller)
168+ if ((pmt.assetId != bondAssetId))
169+ then throw("can use appropriate neutrino bonds tokens only")
170+ else if ((getOrderOwner(newOrderId) != ""))
171+ then throw("an order is already exists")
172+ else if ((nextOrder != ""))
173+ then throw(("nextOrder is not last. Info:" + nextOrder))
174+ else if (if ((firstOrder != ""))
175+ then (lastOrder == "")
176+ else false)
177+ then throw("invalid last order")
178+ else if (if ((firstOrder != ""))
179+ then (orderStatus != NEW)
180+ else false)
181+ then throw("last order status is not new")
182+ else WriteSet([DataEntry(getLastOrderOwnerKey(owner), newOrderId), DataEntry(getOrderPrevKey(newOrderId), lastOrder), DataEntry(getOrderNextKey(lastOrder), if ((lastOrder == ""))
183+ then ""
184+ else newOrderId), DataEntry(FirstOrderKey, if ((firstOrder == ""))
185+ then newOrderId
186+ else firstOrder), DataEntry(LastOrderKey, newOrderId), DataEntry(getOrderTotalKey(newOrderId), pmt.amount), DataEntry(getOrderOwnerKey(newOrderId), owner), DataEntry(getOrderHeightKey(newOrderId), height), DataEntry(getOrderStatusKey(newOrderId), NEW)])
187+ }
188+
189+
190+
191+@Callable(i)
192+func cancelOrder (orderId) = {
193+ let owner = getOrderOwner(orderId)
194+ let amount = (getOrderTotal(orderId) - getOrderFilledTotal(orderId))
195+ let nextOrder = getOrderNext(orderId)
196+ let prevOrder = getOrderPrev(orderId)
197+ if ((owner != toString(i.caller)))
198+ then throw("permission denied")
199+ else if ((getOrderStatus(orderId) != NEW))
200+ then throw("invalid order status")
201+ else ScriptResult(WriteSet([DataEntry(FirstOrderKey, if ((firstOrder == orderId))
202+ then nextOrder
203+ else firstOrder), DataEntry(LastOrderKey, if ((lastOrder == orderId))
204+ then prevOrder
205+ else lastOrder), DataEntry(getOrderNextKey(prevOrder), nextOrder), DataEntry(getOrderPrevKey(nextOrder), prevOrder), DataEntry(getOrderStatusKey(orderId), CANCELED)]), TransferSet([ScriptTransfer(i.caller, amount, bondAssetId)]))
206+ }
207+
208+
209+
210+@Callable(i)
211+func liquidateBond () = {
212+ let surplusPositive = if ((0 >= surplus))
213+ then 0
214+ else surplus
215+ let liquidationBalance = assetBalance(this, neutrinoAssetId)
216+ let returnAmount = if ((surplusPositive >= liquidationBalance))
217+ then 0
218+ else (liquidationBalance - surplusPositive)
219+ let surplusBond = convertNeutrinoToBond(surplusPositive)
220+ if (if ((returnAmount == 0))
221+ then (liquidationBalance == 0)
222+ else false)
223+ then throw("cannot liquidate order without neutrino on the smart contract")
224+ else if ((returnAmount > 0))
225+ then TransferSet([ScriptTransfer(neutrinoContract, returnAmount, neutrinoAssetId)])
226+ else if ((0 >= surplusBond))
227+ then throw("there is no proficit on the smart contract now")
228+ else if ((firstOrder == ""))
229+ then throw("empty orderbook")
230+ else {
231+ let nextOrder = getOrderNext(firstOrder)
232+ let orderTotal = getOrderTotal(firstOrder)
233+ let orderOwner = getOrderOwner(firstOrder)
234+ let filledTotal = getOrderFilledTotal(firstOrder)
235+ let amount = (orderTotal - filledTotal)
236+ let newStatus = if ((surplusBond >= amount))
237+ then FILLED
238+ else NEW
239+ let fillableOrderAmount = if ((surplusBond >= amount))
240+ then amount
241+ else surplusBond
242+ ScriptResult(WriteSet([DataEntry(getOrderPrevKey(nextOrder), if ((newStatus == FILLED))
243+ then ""
244+ else firstOrder), DataEntry(FirstOrderKey, if ((newStatus == FILLED))
245+ then nextOrder
246+ else firstOrder), DataEntry(LastOrderKey, if (if ((newStatus == FILLED))
247+ then (firstOrder == lastOrder)
248+ else false)
249+ then ""
250+ else lastOrder), DataEntry(getOrderFilledTotalKey(firstOrder), (filledTotal + fillableOrderAmount)), DataEntry(getOrderStatusKey(firstOrder), newStatus)]), TransferSet([ScriptTransfer(addressFromStringValue(orderOwner), convertBondToNeutrino(fillableOrderAmount), neutrinoAssetId)]))
251+ }
252+ }
253+
254+
255+
256+@Callable(i)
257+func updateReservesAndNeutrinoSupply () = {
258+ let idx = getNumberByKey("updateReservesAndNeutrinoSupplyIdx")
259+ let newIdx = (idx + 1)
260+ WriteSet([DataEntry("updateReservesAndNeutrinoSupplyIdx", newIdx), DataEntry("reserve", reserve), DataEntry("neutrinoSupply", neutrinoSupply), DataEntry("surplus", surplus)])
261+ }
262+
263+
264+@Verifier(tx)
265+func verify () = {
266+ let pubKeyAdminsList = ["GhfjByrxpjDqQ9JvJoGjxG2WTguunR9sujsPM8qYh3nL", "6dpqiSXuBAM7x3nrD5VuCaYQb2cz1g4NooFDS1xGdCV6", "9EU95UGWLuccZCpPK3KBjhiq5CFapNs8QWxtHqjJ25cc", "5WRXFSjwcTbNfKcJs8ZqXmSSWYsSVJUtMvMqZj5hH4Nc"]
267+ let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0])))
268+ then 1
269+ else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1])))
270+ then 1
271+ else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2])))
272+ then 1
273+ else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3])))
274+ then 2
275+ else 0))
276+ (count >= 3)
277+ }
278+

github/deemru/w8io/026f985 
38.79 ms