tx · 51vNC5dKpKsd6aahk5aZbbZKKMT5vHpbDmz9JV6frXRv

3N5nmMvMH8o3RPEyCKCaoWahBTYTexnZy62:  -0.02000000 Waves

2020.09.16 13:50 [1179731] smart account 3N5nmMvMH8o3RPEyCKCaoWahBTYTexnZy62 > SELF 0.00000000 Waves

{ "type": 13, "id": "51vNC5dKpKsd6aahk5aZbbZKKMT5vHpbDmz9JV6frXRv", "fee": 2000000, "feeAssetId": null, "timestamp": 1600253457273, "version": 1, "sender": "3N5nmMvMH8o3RPEyCKCaoWahBTYTexnZy62", "senderPublicKey": "6PBV8fVJwLaUQbCyG7iqoKR3x1nqFRZFNeuN9qodoiTu", "proofs": [ "3sD7ZtB3iCwVttk3nyqCv6qFqUgkEXGzegP5SHg3C9fgLEfP1CkiTK2YC1QU48iGzB4w4H2WBCNmVzSHR88pw3UZ", "5J9V2hVFhogFGjbp3Node7AZ5EJVti1cYFqBJdSUBMZu5Q41kipxoX5sL4Z9P9R3qwhx5d4skmmMVhVsgwu11BPi", "2V9jqNgQNgKdfCJBXtLzjkgkhsTwabtYAYmao3p3rgK9dLwDjS3D8AFG4j5LTcJ2VAq5mbsXUE5h2L89BzjAghMv" ], "script": "base64:AAIEAAAAAAAAABEIAhIECgIBCBIAEgMKAQgSAAAAADkBAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AAAAAAAAAAAAAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5CQEAAAALdmFsdWVPckVsc2UAAAACCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQIAAAAAAQAAABZnZXRCb29sQnlBZGRyZXNzQW5kS2V5AAAAAgAAAAdhZGRyZXNzAAAAA2tleQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBsAAAACBQAAAAdhZGRyZXNzBQAAAANrZXkHAQAAABhnZXRTdHJpbmdCeUFkZHJlc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AAAAAAACAAAAAAAAAAAACQAAZwAAAAIFAAAABWNvdW50AAAAAAAAAAADuYCNkg==", "chainId": 84, "height": 1179731, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BEbxrNz7J4F1dE5LjzhQQ6oDh2h6Vwo16zsoTRa4GsKF Next: CbuxTXgujJpCcxsWrCB5c8yy6653gmqZrQPpTe6hQc3q Diff:
OldNewDifferences
1-{-# STDLIB_VERSION 3 #-}
1+{-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-func getNumberByKey (key) = match getInteger(this, key) {
5- case a: Int =>
6- a
7- case _ =>
8- 0
9-}
4+func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0)
105
116
12-func getStringByKey (key) = match getString(this, key) {
13- case a: String =>
14- a
15- case _ =>
16- ""
17-}
7+func getStringByKey (key) = valueOrElse(getString(this, key), "")
188
199
20-func getBoolByAddressAndKey (address,key) = match getBoolean(address, key) {
21- case a: Boolean =>
22- a
23- case _ =>
24- false
25-}
10+func getBoolByAddressAndKey (address,key) = valueOrElse(getBoolean(address, key), false)
2611
2712
28-func getStringByAddressAndKey (address,key) = match getString(address, key) {
29- case a: String =>
30- a
31- case _ =>
32- ""
33-}
13+func getStringByAddressAndKey (address,key) = valueOrElse(getString(address, key), "")
3414
3515
36-func getNumberByAddressAndKey (address,key) = match getInteger(address, key) {
37- case a: Int =>
38- a
39- case _ =>
40- 0
41-}
16+func getNumberByAddressAndKey (address,key) = valueOrElse(getInteger(address, key), 0)
4217
4318
4419 let WAVELET = 100000000
126101
127102 let wavesLockedBalance = getNumberByAddressAndKey(neutrinoContract, WavesLockedBalanceKey)
128103
129-let reserve = (wavesBalance(neutrinoContract) - wavesLockedBalance)
104+let reserve = (wavesBalance(neutrinoContract).regular - wavesLockedBalance)
130105
131-let neutrinoSupply = (((neutrinoLockedBalance + extract(assetInfo(neutrinoAssetId)).quantity) - assetBalance(neutrinoContract, neutrinoAssetId)) - assetBalance(liquidationContract, neutrinoAssetId))
106+let neutrinoSupply = (((neutrinoLockedBalance + value(assetInfo(neutrinoAssetId)).quantity) - assetBalance(neutrinoContract, neutrinoAssetId)) - assetBalance(liquidationContract, neutrinoAssetId))
132107
133108 let surplus = (convertWavesToNeutrino(reserve, currentPrice) - neutrinoSupply)
134109
159134 let currentDefaultOrder = getStringByKey(CurrentDefaultOrderKey)
160135
161136 func generateDataEntryToAddOrder (price,newOrderId,i,prevOrder,nextOrder,firstOrder) = {
162- let amount = extract(i.payment).amount
137+ let amount = value(i.payments[0]).amount
163138 let isOneForOneOrder = (price == 100)
164139 let isFirstOrderEmty = (firstOrder == "")
165140 let isNewOrderPriceLowerThanCurrentFirstOrder = (getOrderPrice(firstOrder) > price)
168143 else if (isNewOrderPriceLowerThanCurrentFirstOrder)
169144 then newOrderId
170145 else firstOrder
171-[DataEntry(getPrevOrderKey(newOrderId), prevOrder), DataEntry(getNextOrderKey(newOrderId), nextOrder), DataEntry(getNextOrderKey(prevOrder), if ((prevOrder == ""))
146+[StringEntry(getPrevOrderKey(newOrderId), prevOrder), StringEntry(getNextOrderKey(newOrderId), nextOrder), StringEntry(getNextOrderKey(prevOrder), if ((prevOrder == ""))
172147 then prevOrder
173- else newOrderId), DataEntry(getPrevOrderKey(nextOrder), if ((nextOrder == ""))
148+ else newOrderId), StringEntry(getPrevOrderKey(nextOrder), if ((nextOrder == ""))
174149 then nextOrder
175- else newOrderId), DataEntry(FirstOrderKey, newFirstOrder), DataEntry(getOrderPriceKey(newOrderId), price), DataEntry(getOrderTotalKey(newOrderId), amount), DataEntry(getOrderOwnerKey(newOrderId), toString(i.caller)), DataEntry(getOrderHeightKey(newOrderId), height), DataEntry(getOrderStatusKey(newOrderId), NEW), DataEntry(CurrentDefaultOrderKey, if (isOneForOneOrder)
150+ else newOrderId), StringEntry(FirstOrderKey, newFirstOrder), IntegerEntry(getOrderPriceKey(newOrderId), price), IntegerEntry(getOrderTotalKey(newOrderId), amount), StringEntry(getOrderOwnerKey(newOrderId), toString(i.caller)), IntegerEntry(getOrderHeightKey(newOrderId), height), StringEntry(getOrderStatusKey(newOrderId), NEW), StringEntry(CurrentDefaultOrderKey, if (isOneForOneOrder)
176151 then newOrderId
177152 else currentDefaultOrder)]
178153 }
179154
180155
181156 func internalAddLiquidationOrder (i,price,prevOrder) = {
182- let pmt = extract(i.payment)
157+ let pmt = value(i.payments[0])
183158 let newOrderId = toBase58String(keccak256((((toBytes(pmt.amount) + i.caller.bytes) + toBytes(height)) + i.transactionId)))
184159 let owner = toString(i.caller)
185160 let isEmptyPrevOrder = (prevOrder == "")
208183 else getNextOrder(prevOrder)
209184 let isEmptyNextOrder = (nextOrder == "")
210185 if (isEmptyFirstOrder)
211- then WriteSet(generateDataEntryToAddOrder(price, newOrderId, i, prevOrder, nextOrder, firstOrder))
186+ then generateDataEntryToAddOrder(price, newOrderId, i, prevOrder, nextOrder, firstOrder)
212187 else {
213188 let nextOrderPrice = getNumberByKey(getOrderPriceKey(nextOrder))
214189 let prevOrderPrice = getNumberByKey(getOrderPriceKey(prevOrder))
222197 then true
223198 else isPrevOrderError)
224199 then throw(((("invalid order isPrevOrderError:" + toString(isPrevOrderError)) + " isNextOrderError:") + toString(isNextOrderError)))
225- else WriteSet(generateDataEntryToAddOrder(price, newOrderId, i, prevOrder, nextOrder, firstOrder))
200+ else generateDataEntryToAddOrder(price, newOrderId, i, prevOrder, nextOrder, firstOrder)
226201 }
227202 }
228203 }
234209
235210
236211 @Callable(i)
237-func addLiquidationOrderWithPrice (price,prevOrder) = internalAddLiquidationOrder(i, price, prevOrder)
212+func addLiquidationOrderWithPrice (price,prevOrder) = throw("Method has been deprecated: please use addLiquidationOrder method without parameters")
238213
239214
240215
263238 then throw("permission denied")
264239 else if ((getOrderStatus(orderId) != NEW))
265240 then throw("invalid order status")
266- else ScriptResult(WriteSet([DataEntry(CurrentDefaultOrderKey, newDefaultOrder), DataEntry(FirstOrderKey, if ((firstOrder == orderId))
241+ else [StringEntry(CurrentDefaultOrderKey, newDefaultOrder), StringEntry(FirstOrderKey, if ((firstOrder == orderId))
267242 then nextOrder
268- else firstOrder), DataEntry(getNextOrderKey(prevOrder), nextOrder), DataEntry(getPrevOrderKey(nextOrder), prevOrder), DataEntry(getOrderStatusKey(orderId), CANCELED)]), TransferSet([ScriptTransfer(i.caller, amount, bondAssetId)]))
243+ else firstOrder), StringEntry(getNextOrderKey(prevOrder), nextOrder), StringEntry(getPrevOrderKey(nextOrder), prevOrder), StringEntry(getOrderStatusKey(orderId), CANCELED), ScriptTransfer(i.caller, amount, bondAssetId)]
269244 }
270245
271246
287262 else if ((liquidationBalance == 0))
288263 then throw("without base tokens to liquidate")
289264 else if ((returnAmount > 0))
290- then TransferSet([ScriptTransfer(neutrinoContract, returnAmount, neutrinoAssetId)])
265+ then [ScriptTransfer(neutrinoContract, returnAmount, neutrinoAssetId)]
291266 else if ((firstOrder == ""))
292267 then throw("empty orderbook")
293268 else {
295270 let filledTotal = getOrderFilledTotal(firstOrder)
296271 let nsbt2UsdnPrice = getOrderPrice(firstOrder)
297272 let remainedTotal = (getOrderTotal(firstOrder) - filledTotal)
298- let totalUSDNRequiredToFillOrder = fraction(remainedTotal, nsbt2UsdnPrice, 100)
273+ let totalUSDNRequiredToFillOrderX100 = fraction(remainedTotal, nsbt2UsdnPrice, 1)
274+ let totalUSDNRequiredToFillOrder = (totalUSDNRequiredToFillOrderX100 / 100)
299275 let isOrderFullyFilable = (usdnAmount >= totalUSDNRequiredToFillOrder)
300- let fillableOrderAmount = if (isOrderFullyFilable)
301- then totalUSDNRequiredToFillOrder
302- else usdnAmount
303- let finalNBTFillable = fraction(fillableOrderAmount, 100, nsbt2UsdnPrice)
276+ let fillableOrderAmountX100 = if (isOrderFullyFilable)
277+ then totalUSDNRequiredToFillOrderX100
278+ else (usdnAmount * 100)
279+ let finalNBTFillable = fraction(fillableOrderAmountX100, 1, nsbt2UsdnPrice)
280+ let fillableOrderAmount = (fillableOrderAmountX100 / 100)
304281 let nbTokensLiquidateCondition = (fraction((surplus + neutrinoSupply), 100, neutrinoSupply) >= nsbt2UsdnPrice)
305282 if (!(nbTokensLiquidateCondition))
306283 then throw(("innapropriate surplus: " + toString(surplus)))
314291 else false)
315292 then FILLED
316293 else NEW
317- ScriptResult(WriteSet([DataEntry(getPrevOrderKey(nextOrder), if ((newStatus == FILLED))
294+[StringEntry(getPrevOrderKey(nextOrder), if ((newStatus == FILLED))
318295 then ""
319- else firstOrder), DataEntry(FirstOrderKey, if ((newStatus == FILLED))
296+ else firstOrder), StringEntry(FirstOrderKey, if ((newStatus == FILLED))
320297 then nextOrder
321- else firstOrder), DataEntry(getOrderFilledTotalKey(firstOrder), (filledTotal + finalNBTFillable)), DataEntry(getOrderStatusKey(firstOrder), newStatus), DataEntry(CurrentDefaultOrderKey, if ((newStatus == NEW))
298+ else firstOrder), IntegerEntry(getOrderFilledTotalKey(firstOrder), (filledTotal + finalNBTFillable)), StringEntry(getOrderStatusKey(firstOrder), newStatus), StringEntry(CurrentDefaultOrderKey, if ((newStatus == NEW))
322299 then currentDefaultOrder
323- else computeCurrentDefaultOrder(firstOrder))]), TransferSet([ScriptTransfer(addressFromStringValue(getOrderOwner(firstOrder)), fillableOrderAmount, neutrinoAssetId), ScriptTransfer(neutrinoContract, finalNBTFillable, bondAssetId)]))
300+ else computeCurrentDefaultOrder(firstOrder)), ScriptTransfer(addressFromStringValue(getOrderOwner(firstOrder)), fillableOrderAmount, neutrinoAssetId), ScriptTransfer(neutrinoContract, finalNBTFillable, bondAssetId)]
324301 }
325302 }
326- }
327-
328-
329-
330-@Callable(i)
331-func updateReservesAndNeutrinoSupply () = {
332- func getNumberByKeyInternal (key) = match getInteger(this, key) {
333- case a: Int =>
334- a
335- case _ =>
336- 0
337- }
338-
339- let idx = getNumberByKeyInternal("updateReservesAndNeutrinoSupplyIdx")
340- let newIdx = (idx + 1)
341- WriteSet([DataEntry("updateReservesAndNeutrinoSupplyIdx", newIdx), DataEntry("reserve", reserve), DataEntry("neutrinoSupply", neutrinoSupply), DataEntry("surplus", surplus)])
342303 }
343304
344305
Full:
OldNewDifferences
1-{-# STDLIB_VERSION 3 #-}
1+{-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-func getNumberByKey (key) = match getInteger(this, key) {
5- case a: Int =>
6- a
7- case _ =>
8- 0
9-}
4+func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0)
105
116
12-func getStringByKey (key) = match getString(this, key) {
13- case a: String =>
14- a
15- case _ =>
16- ""
17-}
7+func getStringByKey (key) = valueOrElse(getString(this, key), "")
188
199
20-func getBoolByAddressAndKey (address,key) = match getBoolean(address, key) {
21- case a: Boolean =>
22- a
23- case _ =>
24- false
25-}
10+func getBoolByAddressAndKey (address,key) = valueOrElse(getBoolean(address, key), false)
2611
2712
28-func getStringByAddressAndKey (address,key) = match getString(address, key) {
29- case a: String =>
30- a
31- case _ =>
32- ""
33-}
13+func getStringByAddressAndKey (address,key) = valueOrElse(getString(address, key), "")
3414
3515
36-func getNumberByAddressAndKey (address,key) = match getInteger(address, key) {
37- case a: Int =>
38- a
39- case _ =>
40- 0
41-}
16+func getNumberByAddressAndKey (address,key) = valueOrElse(getInteger(address, key), 0)
4217
4318
4419 let WAVELET = 100000000
4520
4621 let PAULI = 1000000
4722
4823 let PRICELET = 1000000
4924
5025 let CANCELED = "canceled"
5126
5227 let NEW = "new"
5328
5429 let FILLED = "filled"
5530
5631 let NeutrinoContractKey = "neutrino_contract"
5732
5833 let PriceKey = "price"
5934
6035 let BondAssetIdKey = "bond_asset_id"
6136
6237 let NeutrinoAssetIdKey = "neutrino_asset_id"
6338
6439 let ControlContractKey = "control_contract"
6540
6641 let BalanceLockedkKey = "balance_lock_"
6742
6843 let WavesLockedBalanceKey = (BalanceLockedkKey + "waves")
6944
7045 let NeutrinoLockedBalanceKey = (BalanceLockedkKey + "neutrino")
7146
7247 let FirstOrderKey = "order_first"
7348
7449 let CurrentDefaultOrderKey = "order_default"
7550
7651 func getOrderPriceKey (orderId) = ("order_price_" + orderId)
7752
7853
7954 func getOrderTotalKey (orderId) = ("order_total_" + orderId)
8055
8156
8257 func getOrderOwnerKey (orderId) = ("order_owner_" + orderId)
8358
8459
8560 func getOrderHeightKey (orderId) = ("order_height_" + orderId)
8661
8762
8863 func getOrderStatusKey (orderId) = ("order_status_" + orderId)
8964
9065
9166 func getOrderFilledTotalKey (orderId) = ("order_filled_total_" + orderId)
9267
9368
9469 func getPrevOrderKey (orderId) = ("order_prev_" + orderId)
9570
9671
9772 func getNextOrderKey (orderId) = ("order_next_" + orderId)
9873
9974
10075 func convertNeutrinoToWaves (amount,price) = fraction(fraction(amount, PRICELET, price), WAVELET, PAULI)
10176
10277
10378 func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, PRICELET), PAULI, WAVELET)
10479
10580
10681 func convertWavesToBond (amount,price) = convertWavesToNeutrino(amount, price)
10782
10883
10984 let neutrinoContract = addressFromStringValue(getStringByKey(NeutrinoContractKey))
11085
11186 let controlContract = addressFromStringValue(getStringByAddressAndKey(neutrinoContract, ControlContractKey))
11287
11388 let liquidationContract = this
11489
11590 let neutrinoAssetId = fromBase58String(getStringByAddressAndKey(neutrinoContract, NeutrinoAssetIdKey))
11691
11792 let bondAssetId = fromBase58String("BGhPYquXSK6UYjnPLEn94gFhetp4Jvf7toekEY4x1VDH")
11893
11994 let firstOrder = getStringByKey(FirstOrderKey)
12095
12196 let isBlocked = getBoolByAddressAndKey(controlContract, "is_blocked")
12297
12398 let currentPrice = getNumberByAddressAndKey(controlContract, PriceKey)
12499
125100 let neutrinoLockedBalance = getNumberByAddressAndKey(neutrinoContract, NeutrinoLockedBalanceKey)
126101
127102 let wavesLockedBalance = getNumberByAddressAndKey(neutrinoContract, WavesLockedBalanceKey)
128103
129-let reserve = (wavesBalance(neutrinoContract) - wavesLockedBalance)
104+let reserve = (wavesBalance(neutrinoContract).regular - wavesLockedBalance)
130105
131-let neutrinoSupply = (((neutrinoLockedBalance + extract(assetInfo(neutrinoAssetId)).quantity) - assetBalance(neutrinoContract, neutrinoAssetId)) - assetBalance(liquidationContract, neutrinoAssetId))
106+let neutrinoSupply = (((neutrinoLockedBalance + value(assetInfo(neutrinoAssetId)).quantity) - assetBalance(neutrinoContract, neutrinoAssetId)) - assetBalance(liquidationContract, neutrinoAssetId))
132107
133108 let surplus = (convertWavesToNeutrino(reserve, currentPrice) - neutrinoSupply)
134109
135110 func getOrderPrice (id) = getNumberByKey(getOrderPriceKey(id))
136111
137112
138113 func getOrderTotal (id) = getNumberByKey(getOrderTotalKey(id))
139114
140115
141116 func getOrderOwner (id) = getStringByKey(getOrderOwnerKey(id))
142117
143118
144119 func getOrderStatus (id) = getStringByKey(getOrderStatusKey(id))
145120
146121
147122 func getOrderFilledTotal (id) = getNumberByKey(getOrderFilledTotalKey(id))
148123
149124
150125 func getOrderHeight (id) = getNumberByKey(getOrderHeightKey(id))
151126
152127
153128 func getPrevOrder (id) = getStringByKey(getPrevOrderKey(id))
154129
155130
156131 func getNextOrder (id) = getStringByKey(getNextOrderKey(id))
157132
158133
159134 let currentDefaultOrder = getStringByKey(CurrentDefaultOrderKey)
160135
161136 func generateDataEntryToAddOrder (price,newOrderId,i,prevOrder,nextOrder,firstOrder) = {
162- let amount = extract(i.payment).amount
137+ let amount = value(i.payments[0]).amount
163138 let isOneForOneOrder = (price == 100)
164139 let isFirstOrderEmty = (firstOrder == "")
165140 let isNewOrderPriceLowerThanCurrentFirstOrder = (getOrderPrice(firstOrder) > price)
166141 let newFirstOrder = if (isFirstOrderEmty)
167142 then newOrderId
168143 else if (isNewOrderPriceLowerThanCurrentFirstOrder)
169144 then newOrderId
170145 else firstOrder
171-[DataEntry(getPrevOrderKey(newOrderId), prevOrder), DataEntry(getNextOrderKey(newOrderId), nextOrder), DataEntry(getNextOrderKey(prevOrder), if ((prevOrder == ""))
146+[StringEntry(getPrevOrderKey(newOrderId), prevOrder), StringEntry(getNextOrderKey(newOrderId), nextOrder), StringEntry(getNextOrderKey(prevOrder), if ((prevOrder == ""))
172147 then prevOrder
173- else newOrderId), DataEntry(getPrevOrderKey(nextOrder), if ((nextOrder == ""))
148+ else newOrderId), StringEntry(getPrevOrderKey(nextOrder), if ((nextOrder == ""))
174149 then nextOrder
175- else newOrderId), DataEntry(FirstOrderKey, newFirstOrder), DataEntry(getOrderPriceKey(newOrderId), price), DataEntry(getOrderTotalKey(newOrderId), amount), DataEntry(getOrderOwnerKey(newOrderId), toString(i.caller)), DataEntry(getOrderHeightKey(newOrderId), height), DataEntry(getOrderStatusKey(newOrderId), NEW), DataEntry(CurrentDefaultOrderKey, if (isOneForOneOrder)
150+ else newOrderId), StringEntry(FirstOrderKey, newFirstOrder), IntegerEntry(getOrderPriceKey(newOrderId), price), IntegerEntry(getOrderTotalKey(newOrderId), amount), StringEntry(getOrderOwnerKey(newOrderId), toString(i.caller)), IntegerEntry(getOrderHeightKey(newOrderId), height), StringEntry(getOrderStatusKey(newOrderId), NEW), StringEntry(CurrentDefaultOrderKey, if (isOneForOneOrder)
176151 then newOrderId
177152 else currentDefaultOrder)]
178153 }
179154
180155
181156 func internalAddLiquidationOrder (i,price,prevOrder) = {
182- let pmt = extract(i.payment)
157+ let pmt = value(i.payments[0])
183158 let newOrderId = toBase58String(keccak256((((toBytes(pmt.amount) + i.caller.bytes) + toBytes(height)) + i.transactionId)))
184159 let owner = toString(i.caller)
185160 let isEmptyPrevOrder = (prevOrder == "")
186161 let isEmptyFirstOrder = (firstOrder == "")
187162 if (isBlocked)
188163 then throw("contract is blocked by EMERGENCY SHUTDOWN actions until reactivation by emergency oracles")
189164 else if ((PAULI > pmt.amount))
190165 then throw("order amount should be higher than 1 NSBT")
191166 else if ((100 > price))
192167 then throw(("price should be equal or higher than 1 nsbt for 1 usdn. i.e. >= 100; price: " + toString(price)))
193168 else if ((pmt.assetId != bondAssetId))
194169 then throw("can use appropriate neutrino base tokens (nsbt) only")
195170 else if ((getOrderOwner(newOrderId) != ""))
196171 then throw("the order already exists")
197172 else if (if (!(isEmptyPrevOrder))
198173 then (getOrderStatus(prevOrder) != NEW)
199174 else false)
200175 then throw("prev order status is not new")
201176 else if (if (isEmptyFirstOrder)
202177 then !(isEmptyPrevOrder)
203178 else false)
204179 then throw("wrong prev order parameter")
205180 else {
206181 let nextOrder = if (isEmptyPrevOrder)
207182 then firstOrder
208183 else getNextOrder(prevOrder)
209184 let isEmptyNextOrder = (nextOrder == "")
210185 if (isEmptyFirstOrder)
211- then WriteSet(generateDataEntryToAddOrder(price, newOrderId, i, prevOrder, nextOrder, firstOrder))
186+ then generateDataEntryToAddOrder(price, newOrderId, i, prevOrder, nextOrder, firstOrder)
212187 else {
213188 let nextOrderPrice = getNumberByKey(getOrderPriceKey(nextOrder))
214189 let prevOrderPrice = getNumberByKey(getOrderPriceKey(prevOrder))
215190 let isNextOrderError = if (!(isEmptyNextOrder))
216191 then (price >= nextOrderPrice)
217192 else false
218193 let isPrevOrderError = if (!(isEmptyPrevOrder))
219194 then (prevOrderPrice > price)
220195 else false
221196 if (if (isNextOrderError)
222197 then true
223198 else isPrevOrderError)
224199 then throw(((("invalid order isPrevOrderError:" + toString(isPrevOrderError)) + " isNextOrderError:") + toString(isNextOrderError)))
225- else WriteSet(generateDataEntryToAddOrder(price, newOrderId, i, prevOrder, nextOrder, firstOrder))
200+ else generateDataEntryToAddOrder(price, newOrderId, i, prevOrder, nextOrder, firstOrder)
226201 }
227202 }
228203 }
229204
230205
231206 func computeCurrentDefaultOrder (id) = if ((id != currentDefaultOrder))
232207 then currentDefaultOrder
233208 else ""
234209
235210
236211 @Callable(i)
237-func addLiquidationOrderWithPrice (price,prevOrder) = internalAddLiquidationOrder(i, price, prevOrder)
212+func addLiquidationOrderWithPrice (price,prevOrder) = throw("Method has been deprecated: please use addLiquidationOrder method without parameters")
238213
239214
240215
241216 @Callable(i)
242217 func addLiquidationOrder () = internalAddLiquidationOrder(i, 100, currentDefaultOrder)
243218
244219
245220
246221 @Callable(i)
247222 func cancelOrder (orderId) = {
248223 let owner = getOrderOwner(orderId)
249224 let amount = (getOrderTotal(orderId) - getOrderFilledTotal(orderId))
250225 let caller = toString(i.caller)
251226 let nextOrder = getNextOrder(orderId)
252227 let prevOrder = getPrevOrder(orderId)
253228 let isDefaultOrder = (orderId == currentDefaultOrder)
254229 let isPrevCanBecomeDefault = (getOrderStatus(prevOrder) == NEW)
255230 let newDefaultOrder = if (isDefaultOrder)
256231 then if (isPrevCanBecomeDefault)
257232 then prevOrder
258233 else ""
259234 else currentDefaultOrder
260235 if (isBlocked)
261236 then throw("contract is blocked by EMERGENCY SHUTDOWN actions until reactivation by emergency oracles")
262237 else if ((owner != caller))
263238 then throw("permission denied")
264239 else if ((getOrderStatus(orderId) != NEW))
265240 then throw("invalid order status")
266- else ScriptResult(WriteSet([DataEntry(CurrentDefaultOrderKey, newDefaultOrder), DataEntry(FirstOrderKey, if ((firstOrder == orderId))
241+ else [StringEntry(CurrentDefaultOrderKey, newDefaultOrder), StringEntry(FirstOrderKey, if ((firstOrder == orderId))
267242 then nextOrder
268- else firstOrder), DataEntry(getNextOrderKey(prevOrder), nextOrder), DataEntry(getPrevOrderKey(nextOrder), prevOrder), DataEntry(getOrderStatusKey(orderId), CANCELED)]), TransferSet([ScriptTransfer(i.caller, amount, bondAssetId)]))
243+ else firstOrder), StringEntry(getNextOrderKey(prevOrder), nextOrder), StringEntry(getPrevOrderKey(nextOrder), prevOrder), StringEntry(getOrderStatusKey(orderId), CANCELED), ScriptTransfer(i.caller, amount, bondAssetId)]
269244 }
270245
271246
272247
273248 @Callable(i)
274249 func liquidateBond () = {
275250 let liquidationBalance = assetBalance(this, neutrinoAssetId)
276251 let surplusPositive = if ((0 >= surplus))
277252 then 0
278253 else surplus
279254 let usdnAmount = if ((surplusPositive >= liquidationBalance))
280255 then liquidationBalance
281256 else surplusPositive
282257 let returnAmount = if ((surplusPositive >= liquidationBalance))
283258 then 0
284259 else (liquidationBalance - surplusPositive)
285260 if (isBlocked)
286261 then throw("contract is blocked by EMERGENCY SHUTDOWN actions until reactivation by emergency oracles")
287262 else if ((liquidationBalance == 0))
288263 then throw("without base tokens to liquidate")
289264 else if ((returnAmount > 0))
290- then TransferSet([ScriptTransfer(neutrinoContract, returnAmount, neutrinoAssetId)])
265+ then [ScriptTransfer(neutrinoContract, returnAmount, neutrinoAssetId)]
291266 else if ((firstOrder == ""))
292267 then throw("empty orderbook")
293268 else {
294269 let nextOrder = getNextOrder(firstOrder)
295270 let filledTotal = getOrderFilledTotal(firstOrder)
296271 let nsbt2UsdnPrice = getOrderPrice(firstOrder)
297272 let remainedTotal = (getOrderTotal(firstOrder) - filledTotal)
298- let totalUSDNRequiredToFillOrder = fraction(remainedTotal, nsbt2UsdnPrice, 100)
273+ let totalUSDNRequiredToFillOrderX100 = fraction(remainedTotal, nsbt2UsdnPrice, 1)
274+ let totalUSDNRequiredToFillOrder = (totalUSDNRequiredToFillOrderX100 / 100)
299275 let isOrderFullyFilable = (usdnAmount >= totalUSDNRequiredToFillOrder)
300- let fillableOrderAmount = if (isOrderFullyFilable)
301- then totalUSDNRequiredToFillOrder
302- else usdnAmount
303- let finalNBTFillable = fraction(fillableOrderAmount, 100, nsbt2UsdnPrice)
276+ let fillableOrderAmountX100 = if (isOrderFullyFilable)
277+ then totalUSDNRequiredToFillOrderX100
278+ else (usdnAmount * 100)
279+ let finalNBTFillable = fraction(fillableOrderAmountX100, 1, nsbt2UsdnPrice)
280+ let fillableOrderAmount = (fillableOrderAmountX100 / 100)
304281 let nbTokensLiquidateCondition = (fraction((surplus + neutrinoSupply), 100, neutrinoSupply) >= nsbt2UsdnPrice)
305282 if (!(nbTokensLiquidateCondition))
306283 then throw(("innapropriate surplus: " + toString(surplus)))
307284 else {
308285 let isNothingToFillNow = (remainedTotal == 0)
309286 let isNothingToFillAtAll = ((filledTotal + finalNBTFillable) == getOrderTotal(firstOrder))
310287 let newStatus = if (if (isOrderFullyFilable)
311288 then if (isNothingToFillNow)
312289 then true
313290 else isNothingToFillAtAll
314291 else false)
315292 then FILLED
316293 else NEW
317- ScriptResult(WriteSet([DataEntry(getPrevOrderKey(nextOrder), if ((newStatus == FILLED))
294+[StringEntry(getPrevOrderKey(nextOrder), if ((newStatus == FILLED))
318295 then ""
319- else firstOrder), DataEntry(FirstOrderKey, if ((newStatus == FILLED))
296+ else firstOrder), StringEntry(FirstOrderKey, if ((newStatus == FILLED))
320297 then nextOrder
321- else firstOrder), DataEntry(getOrderFilledTotalKey(firstOrder), (filledTotal + finalNBTFillable)), DataEntry(getOrderStatusKey(firstOrder), newStatus), DataEntry(CurrentDefaultOrderKey, if ((newStatus == NEW))
298+ else firstOrder), IntegerEntry(getOrderFilledTotalKey(firstOrder), (filledTotal + finalNBTFillable)), StringEntry(getOrderStatusKey(firstOrder), newStatus), StringEntry(CurrentDefaultOrderKey, if ((newStatus == NEW))
322299 then currentDefaultOrder
323- else computeCurrentDefaultOrder(firstOrder))]), TransferSet([ScriptTransfer(addressFromStringValue(getOrderOwner(firstOrder)), fillableOrderAmount, neutrinoAssetId), ScriptTransfer(neutrinoContract, finalNBTFillable, bondAssetId)]))
300+ else computeCurrentDefaultOrder(firstOrder)), ScriptTransfer(addressFromStringValue(getOrderOwner(firstOrder)), fillableOrderAmount, neutrinoAssetId), ScriptTransfer(neutrinoContract, finalNBTFillable, bondAssetId)]
324301 }
325302 }
326- }
327-
328-
329-
330-@Callable(i)
331-func updateReservesAndNeutrinoSupply () = {
332- func getNumberByKeyInternal (key) = match getInteger(this, key) {
333- case a: Int =>
334- a
335- case _ =>
336- 0
337- }
338-
339- let idx = getNumberByKeyInternal("updateReservesAndNeutrinoSupplyIdx")
340- let newIdx = (idx + 1)
341- WriteSet([DataEntry("updateReservesAndNeutrinoSupplyIdx", newIdx), DataEntry("reserve", reserve), DataEntry("neutrinoSupply", neutrinoSupply), DataEntry("surplus", surplus)])
342303 }
343304
344305
345306 @Verifier(tx)
346307 func verify () = {
347308 let pubKeyAdminsList = ["GXxmZaCigPgJsT6d1cLr8nUXA65nGX8V7FuAzzrY8wQE", "3xumx4hrPpeeoo79HLGbZCgfz95L39ZFdxxwWeSUC2Pu", "D4CqtK5fBsnzRo33ZMhrM7niLseDH2uRoK6weBq2JQ3A", "5WRXFSjwcTbNfKcJs8ZqXmSSWYsSVJUtMvMqZj5hH4Nc"]
348309 let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0])))
349310 then 1
350311 else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1])))
351312 then 1
352313 else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2])))
353314 then 1
354315 else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3])))
355316 then 2
356317 else 0))
357318 (count >= 3)
358319 }
359320

github/deemru/w8io/026f985 
55.69 ms