tx · Bqun63ddTg4Hx5iGNBiXuZrYZEre5imKs6m113FUC1at

3N7d3jPxKqSi3XVnAgg8oFsHLcrgctFWpVw:  -0.01400000 Waves

2019.11.18 16:47 [770644] smart account 3N7d3jPxKqSi3XVnAgg8oFsHLcrgctFWpVw > SELF 0.00000000 Waves

{ "type": 13, "id": "Bqun63ddTg4Hx5iGNBiXuZrYZEre5imKs6m113FUC1at", "fee": 1400000, "feeAssetId": null, "timestamp": 1574084818267, "version": 1, "sender": "3N7d3jPxKqSi3XVnAgg8oFsHLcrgctFWpVw", "senderPublicKey": "GHnaLgezSnGCGe7LuhRy8j4JzCcySjwndqh6X9xHQNhz", "proofs": [ "4Vq2Zr4zFdTVqKkLLkpAFTCkxtb1nvEc31oDNmAeUQkrCwJoRETQz2Unft57WQsd8XaXLhcooMbmnGStNLsUp2bd" ], "script": "base64:AAIDAAAAAAAAAA8IARIECgIBARIDCgEIEgAAAAA3AQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAgAAAAABAAAAGGdldFN0cmluZ0J5QWRkcmVzc0FuZEtleQAAAAIAAAAHYWRkcmVzcwAAAANrZXkEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAHYWRkcmVzcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWECAAAAAAEAAAAYZ2V0TnVtYmVyQn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Apib25kQW1vdW50BQAAAAZhbW91bnQFAAAABkZJTExFRAUAAAADTkVXAwkAAAAAAAACBQAAAAV0b3RhbAAAAAAAAAAAAAkAAAIAAAABAgAAABB0b3RhbCBlcXVhbCB6ZXJvCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAMT3JkZXJib29rS2V5AwkAAGcAAAACBQAAAApib25kQW1vdW50BQAAAAZhbW91bnQJAQAAAAlkcm9wT3JkZXIAAAABBQAAAAdvcmRlcklkBQAAAAlvcmRlcmJvb2sJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAABZnZXRPcmRlckZpbGxlZFRvdGFsS2V5AAAAAQUAAAAHb3JkZXJJZAkAAGQAAAACBQAAAAtmaWxsZWRUb3RhbAUAAAAFdG90YWwJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAABFnZXRPcmRlclN0YXR1c0tleQAAAAEFAAAAB29yZGVySWQFAAAABnN0YXR1cwkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAEmdldE9yZGVySGlzdG9yeUtleQAAAAEFAAAABmhlaWdodAUAAAAKb3JkZXJQcmljZQUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQUAAAAKb3JkZXJPd25lcgUAAAAMZmlsbGVkQW1vdW50BQAAAAtib25kQXNzZXRJZAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAABBuZXV0cmlub0NvbnRyYWN0BQAAAAV0b3RhbAUAAAAPbmV1dHJpbm9Bc3NldElkBQAAAANuaWwAAAAAwwnBAw==", "chainId": 84, "height": 770644, "spentComplexity": 0 } View: original | compacted Prev: 5GnedGFqCSRmdY3RsWKqUc6UDs9H8EckHeGthTBpXhiV Next: 5CPs1VPXF9WwexMmWA3dYaQQENX5b7XcdSY9o7L4pXL6 Diff:
OldNewDifferences
123123
124124 let reserve = (wavesBalance(neutrinoContract) - swapWavesLockedBalance)
125125
126-let neutrinoSupply = ((extract(assetInfo(neutrinoAssetId)).quantity - assetBalance(this, neutrinoAssetId)) + swapNeutrinoLockedBalance)
126+let neutrinoSupply = ((extract(assetInfo(neutrinoAssetId)).quantity - assetBalance(neutrinoContract, neutrinoAssetId)) + swapNeutrinoLockedBalance)
127127
128128 let deficit = (neutrinoSupply - convertWavesToNeutrino(reserve, currentPrice))
129129
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func getNumberByKey (key) = match getInteger(this, key) {
55 case a: Int =>
66 a
77 case _ =>
88 0
99 }
1010
1111
1212 func getStringByKey (key) = match getString(this, key) {
1313 case a: String =>
1414 a
1515 case _ =>
1616 ""
1717 }
1818
1919
2020 func getStringByAddressAndKey (address,key) = match getString(address, key) {
2121 case a: String =>
2222 a
2323 case _ =>
2424 ""
2525 }
2626
2727
2828 func getNumberByAddressAndKey (address,key) = match getInteger(address, key) {
2929 case a: Int =>
3030 a
3131 case _ =>
3232 0
3333 }
3434
3535
3636 let WAVELET = 100000000
3737
3838 let ORDERSPLITSYMBOL = "_"
3939
4040 let PAULI = 100
4141
4242 let PERCENTACCURACY = 1000
4343
4444 let MAXDISCOUNT = 50
4545
4646 let CANCELED = "canceled"
4747
4848 let NEW = "new"
4949
5050 let FILLED = "filled"
5151
5252 let OrderbookKey = "orderbook"
5353
5454 let PriceKey = "price"
5555
5656 let BondAssetIdKey = "bond_asset_id"
5757
5858 let NeutrinoAssetIdKey = "neutrino_asset_id"
5959
6060 let NeutrinoContractKey = "neutrino_contract"
6161
6262 let ControlContractKey = "control_contract"
6363
6464 let SwapLockedBalanceKey = "swap_locked_balance"
6565
6666 let SwapNeutrinoLockedBalanceKey = "swap_neutrino_locked_balance"
6767
6868 let SwapWavesLockedBalanceKey = "swap_waves_locked_balance"
6969
7070 func getOrderPriceKey (orderId) = ("order_price_" + orderId)
7171
7272
7373 func getOrderTotalKey (orderId) = ("order_total_" + orderId)
7474
7575
7676 func getOrderOwnerKey (orderId) = ("order_owner_" + orderId)
7777
7878
7979 func getOrderHeightKey (orderId) = ("order_height_" + orderId)
8080
8181
8282 func getOrderStatusKey (orderId) = ("order_status_" + orderId)
8383
8484
8585 func getOrderFilledTotalKey (orderId) = ("order_filled_total_" + orderId)
8686
8787
8888 func getOrderHistoryKey (height) = ("order_history_" + toString(height))
8989
9090
9191 func convertNeutrinoToWaves (amount,price) = ((((amount * 100) / price) * WAVELET) / PAULI)
9292
9393
9494 func convertWavesToNeutrino (amount,price) = ((((amount * price) / 100) * PAULI) / WAVELET)
9595
9696
9797 func convertNeutrinoToBond (amount) = (amount / PAULI)
9898
9999
100100 func convertBondToNeutrino (amount) = (amount * PAULI)
101101
102102
103103 func convertWavesToBond (amount,price) = convertNeutrinoToBond(convertWavesToNeutrino(amount, price))
104104
105105
106106 let orderbook = getStringByKey(OrderbookKey)
107107
108108 let neutrinoContract = addressFromStringValue(getStringByKey(NeutrinoContractKey))
109109
110110 let controlContract = addressFromStringValue(getStringByAddressAndKey(neutrinoContract, ControlContractKey))
111111
112112 let currentPrice = getNumberByAddressAndKey(controlContract, PriceKey)
113113
114114 let swapLockedBalance = getNumberByAddressAndKey(neutrinoContract, SwapLockedBalanceKey)
115115
116116 let swapNeutrinoLockedBalance = getNumberByAddressAndKey(neutrinoContract, SwapNeutrinoLockedBalanceKey)
117117
118118 let swapWavesLockedBalance = getNumberByAddressAndKey(neutrinoContract, SwapWavesLockedBalanceKey)
119119
120120 let neutrinoAssetId = fromBase58String(getStringByAddressAndKey(neutrinoContract, NeutrinoAssetIdKey))
121121
122122 let bondAssetId = fromBase58String(getStringByAddressAndKey(neutrinoContract, BondAssetIdKey))
123123
124124 let reserve = (wavesBalance(neutrinoContract) - swapWavesLockedBalance)
125125
126-let neutrinoSupply = ((extract(assetInfo(neutrinoAssetId)).quantity - assetBalance(this, neutrinoAssetId)) + swapNeutrinoLockedBalance)
126+let neutrinoSupply = ((extract(assetInfo(neutrinoAssetId)).quantity - assetBalance(neutrinoContract, neutrinoAssetId)) + swapNeutrinoLockedBalance)
127127
128128 let deficit = (neutrinoSupply - convertWavesToNeutrino(reserve, currentPrice))
129129
130130 let surplus = (convertWavesToNeutrino(reserve, currentPrice) - neutrinoSupply)
131131
132132 func getOrderPrice (id) = getNumberByKey(getOrderPriceKey(id))
133133
134134
135135 func getOrderTotal (id) = getNumberByKey(getOrderTotalKey(id))
136136
137137
138138 func getOrderOwner (id) = getStringByKey(getOrderOwnerKey(id))
139139
140140
141141 func getOrderStatus (id) = getStringByKey(getOrderStatusKey(id))
142142
143143
144144 func getOrderFilledTotal (id) = getNumberByKey(getOrderFilledTotalKey(id))
145145
146146
147147 func getOrderElementById (id) = (id + ORDERSPLITSYMBOL)
148148
149149
150150 func addOrder (orderId,position) = {
151151 let orders = split(orderbook, ORDERSPLITSYMBOL)
152152 let newOrder = getOrderElementById(orderId)
153153 if ((position == 0))
154154 then (newOrder + orderbook)
155155 else if ((position >= (size(orders) - 1)))
156156 then (orderbook + newOrder)
157157 else {
158158 let parts = split(orderbook, getOrderElementById(orders[position]))
159159 (((parts[0] + newOrder) + getOrderElementById(orders[position])) + parts[1])
160160 }
161161 }
162162
163163
164164 func dropOrder (orderId) = {
165165 let parts = split(orderbook, getOrderElementById(orderId))
166166 (parts[0] + parts[1])
167167 }
168168
169169
170170 func getOrdersInOrderbook (orderbook) = split(orderbook, ORDERSPLITSYMBOL)
171171
172172
173173 @Callable(i)
174174 func addBuyBondOrder (price,position) = {
175175 let pmt = extract(i.payment)
176176 let newOrderId = toBase58String(keccak256((((toBytes(price) + toBytes(pmt.amount)) + i.caller.bytes) + toBytes(height))))
177177 if ((MAXDISCOUNT > price))
178178 then throw("max discount is 50%")
179179 else if ((pmt.assetId != neutrinoAssetId))
180180 then throw("can use neutrino only")
181181 else if ((0 >= price))
182182 then throw("price less zero")
183183 else if ((getOrderOwner(newOrderId) != ""))
184184 then throw("order exists")
185185 else {
186186 let orders = getOrdersInOrderbook(orderbook)
187187 let nextOrderId = if ((position == 0))
188188 then ""
189189 else orders[(position - 1)]
190190 let nextOrderPrice = getOrderPrice(nextOrderId)
191191 let isNextOrderError = if (if ((nextOrderId != ""))
192192 then (price > nextOrderPrice)
193193 else false)
194194 then true
195195 else false
196196 let prevOrderId = orders[position]
197197 let prevOrderPrice = getOrderPrice(prevOrderId)
198198 let isPrevOrderError = if ((prevOrderPrice >= price))
199199 then true
200200 else false
201201 if (if (isNextOrderError)
202202 then true
203203 else isPrevOrderError)
204204 then throw(((("invalid order isPrevOrderError:" + toString(isPrevOrderError)) + " isNextOrderError:") + toString(isNextOrderError)))
205205 else WriteSet([DataEntry(OrderbookKey, addOrder(newOrderId, position)), DataEntry(getOrderPriceKey(newOrderId), price), DataEntry(getOrderTotalKey(newOrderId), pmt.amount), DataEntry(getOrderOwnerKey(newOrderId), toString(i.caller)), DataEntry(getOrderHeightKey(newOrderId), height), DataEntry(getOrderStatusKey(newOrderId), NEW)])
206206 }
207207 }
208208
209209
210210
211211 @Callable(i)
212212 func cancelOrder (orderId) = {
213213 let owner = getOrderOwner(orderId)
214214 let amount = (getOrderTotal(orderId) - getOrderFilledTotal(orderId))
215215 if ((owner != toString(i.caller)))
216216 then throw("permission denied")
217217 else if ((getOrderStatus(orderId) != NEW))
218218 then throw("invalid order status")
219219 else ScriptResult(WriteSet([DataEntry(OrderbookKey, dropOrder(orderId)), DataEntry(getOrderStatusKey(orderId), CANCELED)]), TransferSet([ScriptTransfer(i.caller, amount, neutrinoAssetId)]))
220220 }
221221
222222
223223
224224 @Callable(i)
225225 func sellBond () = {
226226 let bondBalance = assetBalance(this, bondAssetId)
227227 let deficitPositive = if ((0 >= deficit))
228228 then 0
229229 else deficit
230230 let bondAmount = if ((deficitPositive >= bondBalance))
231231 then bondBalance
232232 else deficitPositive
233233 let returnAmount = if ((deficitPositive >= bondBalance))
234234 then 0
235235 else (bondBalance - deficitPositive)
236236 if (if ((returnAmount == 0))
237237 then (bondAmount == 0)
238238 else false)
239239 then throw("without deficit")
240240 else if ((bondAmount == 0))
241241 then TransferSet([ScriptTransfer(neutrinoContract, returnAmount, bondAssetId)])
242242 else if ((orderbook == ""))
243243 then throw("empty orderbook")
244244 else {
245245 let orderId = getOrdersInOrderbook(orderbook)[0]
246246 let filledTotal = getOrderFilledTotal(orderId)
247247 let orderTotal = getOrderTotal(orderId)
248248 let orderPrice = getOrderPrice(orderId)
249249 let orderOwner = getOrderOwner(orderId)
250250 let amount = convertNeutrinoToBond((((orderTotal - filledTotal) * 100) / orderPrice))
251251 let filledAmount = if ((bondAmount >= amount))
252252 then amount
253253 else bondAmount
254254 let total = (((filledAmount * orderPrice) * PAULI) / 100)
255255 let status = if ((bondAmount >= amount))
256256 then FILLED
257257 else NEW
258258 if ((total == 0))
259259 then throw("total equal zero")
260260 else ScriptResult(WriteSet([DataEntry(OrderbookKey, if ((bondAmount >= amount))
261261 then dropOrder(orderId)
262262 else orderbook), DataEntry(getOrderFilledTotalKey(orderId), (filledTotal + total)), DataEntry(getOrderStatusKey(orderId), status), DataEntry(getOrderHistoryKey(height), orderPrice)]), TransferSet([ScriptTransfer(addressFromStringValue(orderOwner), filledAmount, bondAssetId), ScriptTransfer(neutrinoContract, total, neutrinoAssetId)]))
263263 }
264264 }
265265
266266

github/deemru/w8io/169f3d6 
50.06 ms