tx · 6sWj91cmh1JANWDRTGbDiBTSEiWXskqaFohHJxMc1W4x

3Mz5Ya4WEXatCfa2JKqqCe4g3deCrFaBxiL:  -0.01400000 Waves

2019.09.27 23:53 [695341] smart account 3Mz5Ya4WEXatCfa2JKqqCe4g3deCrFaBxiL > SELF 0.00000000 Waves

{ "type": 13, "id": "6sWj91cmh1JANWDRTGbDiBTSEiWXskqaFohHJxMc1W4x", "fee": 1400000, "feeAssetId": null, "timestamp": 1569617642103, "version": 1, "sender": "3Mz5Ya4WEXatCfa2JKqqCe4g3deCrFaBxiL", "senderPublicKey": "CmDpND6JVW2kuJjY4zyXaTHga2fTuCGbo3G9aySpdybJ", "proofs": [ "emMugUhJU2pFGCSa5pFvefkRCwF2gA6VKhGBGCu5vbWLn5GnD2VjqbGNAfBopU9EDv8qNQn89nb8A34b9kUJxeq" ], "script": "base64:AAIDAAAAAAAAAAAAAABhAQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAgAAAAABAAAADGdldEJvb2xCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGwAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAHQm9vbGVhbgQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQcAAAAAD0xJU1RTUExJVFNZTUJPTAIAAAABXwAAAAAOTElTVERBVEFTWU1CT0wCAAAAASsAAAAAB1dBVkVM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2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAAcQGV4dHJVc2VyKGFkZHJlc3NGcm9tU3RyaW5nKQAAAAEFAAAACm9yZGVyT3duZXIJAQAAABVjb252ZXJ0Qm9uZFRvTmV1dHJpbm8AAAABBQAAAA5uZXdGaWxsZWRUb3RhbAUAAAAPbmV1dHJpbm9Bc3NldElkBQAAAANuaWwAAAAAO1fVaA==", "chainId": 84, "height": 695341, "spentComplexity": 0 } View: original | compacted Prev: 3jn389JsnYPnD7Tyt9tZ1d2DWHX2A9EyS8uZJFJuBNnc Next: HjGfsPpUuU3uodf5GbwTyrgbhgtvELztzY6rngUoTpxK 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 getBoolByKey (key) = match getBoolean(this, key) {
2121 case a: Boolean =>
2222 a
2323 case _ =>
2424 false
2525 }
2626
2727
2828 let LISTSPLITSYMBOL = "_"
2929
3030 let LISTDATASYMBOL = "+"
3131
3232 let WAVELET = 100000000
3333
3434 let CANCELED = "canceled"
3535
3636 let NEW = "new"
3737
3838 let FILLED = "filled"
3939
4040 let NeutrinoAssetIdKey = "neutrino_asset_id"
4141
4242 let BondAssetIdKey = "bond_asset_id"
4343
4444 let AuctionContractKey = "auction_contract"
4545
4646 let BalanceLockIntervalKey = "balance_lock_interval"
4747
4848 let VoteIntervalKey = "vote_interval"
4949
5050 let MinSwapAmountKey = "min_swap_amount"
5151
5252 let PriceOffsetKey = "price_offset"
5353
5454 let ProvidingIntervalKey = "providing_interval"
5555
5656 let PriceKey = "price"
5757
5858 let NeutrinoBalanceKey = "neutrino_"
5959
6060 let WavesBalanceKey = "waves_"
6161
6262 let BalanceUnlockBlockKey = "balance_block_"
6363
6464 let OrderbookKey = "orderbook"
6565
6666 let OrderTotalKey = "order_total_"
6767
6868 let OrderOwnerKey = "order_owner_"
6969
7070 let OrderHeightKey = "order_height_"
7171
7272 let OrderFilledTotalKey = "order_filled_total_"
7373
7474 let OrderStatusKey = "order_status_"
7575
7676 let IsBlockedKey = "is_blocked"
7777
7878 let BlackSwarmPriceKey = "black_swarm_price"
7979
8080 let AdminVoteKey = "admin_vote_"
8181
8282 let AdminVotePriceKey = "admin_vote_price_"
8383
8484 let BlockExpireVoteKey = "vote_expire_block"
8585
8686 let AdminKey = "admin_"
8787
8888 let IsPricePendingKey = "is_pending_price"
8989
9090 let OracleKey = "oracle_"
9191
9292 let OracleIsProvideKey = "oracle_is_provide_"
9393
9494 let OracleProvidePriceKey = "oracle_price_provide_"
9595
9696 let BlockExpireProvidingKey = "providing_expire_block"
9797
9898 func getAdminKey (count) = (AdminKey + toString(count))
9999
100100
101101 func getAdminVoteKey (owner) = (AdminVoteKey + owner)
102102
103103
104104 func getAdminVotePriceKey (owner) = (AdminVotePriceKey + owner)
105105
106106
107107 func getOracleKey (count) = (OracleKey + toString(count))
108108
109109
110110 func getOracleIsProvideKey (owner) = (OracleIsProvideKey + owner)
111111
112112
113113 func getOracleProvidePriceKey (owner) = (OracleProvidePriceKey + owner)
114114
115115
116116 func getNeutrinoBalanceKey (owner) = (NeutrinoBalanceKey + owner)
117117
118118
119119 func getWavesBalanceKey (owner) = (WavesBalanceKey + owner)
120120
121121
122122 func getBalanceUnlockBlockKey (owner) = (BalanceUnlockBlockKey + owner)
123123
124124
125125 func getBlackSwarmPriceKey (block) = ((BlackSwarmPriceKey + "_") + toString(block))
126126
127127
128128 func getPriceHistoryKey (block) = ((PriceKey + "_") + toString(block))
129129
130130
131131 func getOrderTotalKey (orderId) = (OrderTotalKey + orderId)
132132
133133
134134 func getOrderOwnerKey (orderId) = (OrderOwnerKey + orderId)
135135
136136
137137 func getOrderHeightKey (orderId) = (OrderHeightKey + orderId)
138138
139139
140140 func getOrderStatusKey (orderId) = (OrderStatusKey + orderId)
141141
142142
143143 func getOrderFilledTotalKey (orderId) = (OrderFilledTotalKey + orderId)
144144
145145
146146 let price = getNumberByKey(PriceKey)
147147
148148 func convertNeutrinoToWaves (amount) = ((amount * 100) / price)
149149
150150
151151 func convertWavesToNeutrino (amount) = ((amount * price) / 100)
152152
153153
154154 func convertNeutrinoToBond (amount) = (amount / WAVELET)
155155
156156
157157 func convertBondToNeutrino (amount) = (amount * WAVELET)
158158
159159
160160 func convertWavesToBond (amount) = convertNeutrinoToBond(convertWavesToNeutrino(amount))
161161
162162
163163 let providingInterval = getNumberByKey(ProvidingIntervalKey)
164164
165165 let blockExpireProviding = getNumberByKey(BlockExpireProvidingKey)
166166
167167 let isPricePending = getBoolByKey(IsPricePendingKey)
168168
169169 let percentPriceOffset = getNumberByKey(PriceOffsetKey)
170170
171171 let voteInterval = getNumberByKey(VoteIntervalKey)
172172
173173 let blockExpireVote = getNumberByKey(BlockExpireVoteKey)
174174
175175 let balanceLockInterval = getNumberByKey(BalanceLockIntervalKey)
176176
177177 let isBlocked = getBoolByKey(IsBlockedKey)
178178
179179 let minSwapAmount = getNumberByKey(MinSwapAmountKey)
180180
181181 let neutrinoAssetId = fromBase58String(getStringByKey(NeutrinoAssetIdKey))
182182
183183 let auctionContract = getStringByKey(AuctionContractKey)
184184
185185 let reserve = wavesBalance(this)
186186
187187 let orderbook = getStringByKey(OrderbookKey)
188188
189189 let bondAssetId = fromBase58String(getStringByKey(BondAssetIdKey))
190190
191191 let bondSupply = {
192192 let info = extract(assetInfo(bondAssetId))
193193 (info.quantity - assetBalance(this, bondAssetId))
194194 }
195195
196196 let neutrinoSupply = {
197197 let info = extract(assetInfo(neutrinoAssetId))
198198 (info.quantity - assetBalance(this, neutrinoAssetId))
199199 }
200200
201201 let surplus = (convertWavesToNeutrino(reserve) - neutrinoSupply)
202202
203203 let oracleOne = getStringByKey(getOracleKey(0))
204204
205205 let oracleTwo = getStringByKey(getOracleKey(1))
206206
207207 let oracleThree = getStringByKey(getOracleKey(2))
208208
209209 let adminOne = getStringByKey(getAdminKey(0))
210210
211211 let adminTwo = getStringByKey(getAdminKey(1))
212212
213213 let adminThree = getStringByKey(getAdminKey(2))
214214
215215 func getAdminVoteInt (owner) = if (getBoolByKey(getAdminVoteKey(owner)))
216216 then 1
217217 else 0
218218
219219
220220 func getAdminVotePrice (owner) = getNumberByKey(getAdminVotePriceKey(owner))
221221
222222
223223 func isOracleProvide (owner) = getBoolByKey(getOracleIsProvideKey(owner))
224224
225225
226226 func isOracleProvideInt (owner) = if (isOracleProvide(owner))
227227 then 1
228228 else 0
229229
230230
231231 func getOracleProvidePrice (owner) = getNumberByKey(getOracleProvidePriceKey(owner))
232232
233233
234234 func getWavesBalance (owner) = getNumberByKey(getWavesBalanceKey(owner))
235235
236236
237237 func getNeutrinoBalance (owner) = getNumberByKey(getNeutrinoBalanceKey(owner))
238238
239239
240240 func getUnlockBalanceBlock (owner) = getNumberByKey(getBalanceUnlockBlockKey(owner))
241241
242242
243243 func getOrderTotal (id) = getNumberByKey(getOrderTotalKey(id))
244244
245245
246246 func getOrderOwner (id) = getStringByKey(getOrderOwnerKey(id))
247247
248248
249249 func getOrderFilledTotal (id) = getNumberByKey(getOrderFilledTotalKey(id))
250250
251251
252252 func getOrderElementById (id) = (id + LISTSPLITSYMBOL)
253253
254254
255255 func addOrder (orderId) = (orderbook + getOrderElementById(orderId))
256256
257257
258258 func dropOrder (orderId) = {
259259 let parts = split(orderbook, getOrderElementById(orderId))
260260 (parts[0] + parts[1])
261261 }
262262
263263
264264 @Callable(i)
265265 func setCurrentPrice (newPrice) = {
266266 let account = toString(i.caller)
267267 let priceProvidingCount = (((isOracleProvideInt(oracleOne) + isOracleProvideInt(oracleTwo)) + isOracleProvideInt(oracleThree)) + 1)
268268 if (isBlocked)
269269 then throw("contract is blocked")
270270 else if (if (if ((account != oracleOne))
271271 then (account != oracleTwo)
272272 else false)
273273 then (account != oracleThree)
274274 else false)
275275 then throw("permission denied")
276276 else if (if ((blockExpireProviding >= height))
277277 then isOracleProvide(account)
278278 else false)
279279 then throw("price is already provided")
280280 else if (if ((height > blockExpireProviding))
281281 then isPricePending
282282 else false)
283283 then throw("use finilizeCurrentPrice")
284284 else WriteSet([DataEntry(getOracleProvidePriceKey(account), newPrice), DataEntry(BlockExpireProvidingKey, if ((height > blockExpireProviding))
285285 then (height + providingInterval)
286286 else blockExpireProviding), DataEntry(getOracleIsProvideKey(oracleOne), if ((height > blockExpireProviding))
287287 then false
288288 else isOracleProvide(oracleOne)), DataEntry(getOracleIsProvideKey(oracleTwo), if ((height > blockExpireProviding))
289289 then false
290290 else isOracleProvide(oracleTwo)), DataEntry(getOracleIsProvideKey(oracleThree), if ((height > blockExpireProviding))
291291 then false
292292 else isOracleProvide(oracleThree)), DataEntry(getOracleIsProvideKey(account), true), DataEntry(IsPricePendingKey, if (if ((blockExpireProviding >= height))
293293 then (priceProvidingCount >= 2)
294294 else false)
295295 then true
296296 else isPricePending)])
297297 }
298298
299299
300300
301301 @Callable(i)
302302 func finilizeCurrentPrice () = {
303303 let account = toString(i.caller)
304304 let priceProvidingCount = ((isOracleProvideInt(oracleOne) + isOracleProvideInt(oracleTwo)) + isOracleProvideInt(oracleThree))
305305 let newPrice = ((((getOracleProvidePrice(oracleOne) * isOracleProvideInt(oracleOne)) + (getOracleProvidePrice(oracleTwo) * isOracleProvideInt(oracleTwo))) + (getOracleProvidePrice(oracleThree) * isOracleProvideInt(oracleThree))) / priceProvidingCount)
306306 if (isBlocked)
307307 then throw("contract is blocked")
308308 else if (if (if ((account != oracleOne))
309309 then (account != oracleTwo)
310310 else false)
311311 then (account != oracleThree)
312312 else false)
313313 then throw("permission denied")
314314 else if (if (!(isPricePending))
315315 then true
316316 else (blockExpireProviding >= height))
317317 then throw("wait for the end of the price providing")
318318 else if ((2 > priceProvidingCount))
319319 then throw("2/3 oracles need to set a price")
320320 else if (if ((newPrice >= (price + ((price * percentPriceOffset) / 100))))
321321 then true
322322 else ((price - ((price * percentPriceOffset) / 100)) >= newPrice))
323323 then WriteSet([DataEntry(IsBlockedKey, true), DataEntry(getBlackSwarmPriceKey(height), newPrice)])
324324 else WriteSet([DataEntry(PriceKey, newPrice), DataEntry(getPriceHistoryKey(height), newPrice), DataEntry(IsPricePendingKey, false)])
325325 }
326326
327327
328328
329329 @Callable(i)
330330 func adminUnlock (newPrice) = {
331331 let account = toString(i.caller)
332332 let adminOneVote = if ((account != adminOne))
333333 then getAdminVoteInt(adminOne)
334334 else 0
335335 let adminTwoVote = if ((account != adminTwo))
336336 then getAdminVoteInt(adminTwo)
337337 else 0
338338 let adminThreeVote = if ((account != adminThree))
339339 then getAdminVoteInt(adminThree)
340340 else 0
341341 let adminOnePrice = if (((getAdminVotePrice(adminOne) * adminOneVote) == newPrice))
342342 then 1
343343 else 0
344344 let adminTwoPrice = if (((getAdminVotePrice(adminTwo) * adminTwoVote) == newPrice))
345345 then 1
346346 else 0
347347 let adminThreePrice = if (((getAdminVotePrice(adminThree) * adminThreeVote) == newPrice))
348348 then 1
349349 else 0
350350 if (!(isBlocked))
351351 then throw("Contract is not blocked")
352352 else if (if (((((adminOnePrice + adminTwoPrice) + adminThreePrice) + 1) >= 2))
353353 then (blockExpireVote >= height)
354354 else false)
355355 then WriteSet([DataEntry(IsBlockedKey, false), DataEntry(PriceKey, newPrice), DataEntry(getPriceHistoryKey(height), newPrice), DataEntry(getAdminVoteKey(adminOne), false), DataEntry(getAdminVoteKey(adminTwo), false), DataEntry(getAdminVoteKey(adminThree), false), DataEntry(BlockExpireVoteKey, 0), DataEntry(BlockExpireProvidingKey, 0), DataEntry(IsPricePendingKey, false)])
356356 else WriteSet([DataEntry(getAdminVotePriceKey(account), newPrice), DataEntry(BlockExpireVoteKey, if ((height > blockExpireVote))
357357 then (height + voteInterval)
358358 else blockExpireVote), DataEntry(getAdminVoteKey(adminOne), if ((height > blockExpireVote))
359359 then false
360360 else (adminOneVote == 1)), DataEntry(getAdminVoteKey(adminTwo), if ((height > blockExpireVote))
361361 then false
362362 else (adminTwoVote == 1)), DataEntry(getAdminVoteKey(adminThree), if ((height > blockExpireVote))
363363 then false
364364 else (adminThreeVote == 1)), DataEntry(getAdminVoteKey(account), true)])
365365 }
366366
367367
368368
369369 @Callable(i)
370370 func adminLock () = {
371371 let account = toString(i.caller)
372372 let adminOneVote = if ((account != adminOne))
373373 then getAdminVoteInt(adminOne)
374374 else 1
375375 let adminTwoVote = if ((account != adminTwo))
376376 then getAdminVoteInt(adminTwo)
377377 else 1
378378 let adminThreeVote = if ((account != adminThree))
379379 then getAdminVoteInt(adminThree)
380380 else 1
381381 if (isBlocked)
382382 then throw("Contract is blocked")
383383 else if ((((adminOneVote + adminTwoVote) + adminThreeVote) >= 2))
384384 then WriteSet([DataEntry(IsBlockedKey, true), DataEntry(getAdminVoteKey(adminOne), false), DataEntry(getAdminVoteKey(adminTwo), false), DataEntry(getAdminVoteKey(adminThree), false), DataEntry(BlockExpireVoteKey, 0)])
385385 else WriteSet([DataEntry(BlockExpireVoteKey, if ((height > blockExpireVote))
386386 then (height + voteInterval)
387387 else blockExpireVote), DataEntry(getAdminVoteKey(adminOne), if ((height > blockExpireVote))
388388 then false
389389 else (adminOneVote == 1)), DataEntry(getAdminVoteKey(adminTwo), if ((height > blockExpireVote))
390390 then false
391391 else (adminTwoVote == 1)), DataEntry(getAdminVoteKey(adminThree), if ((height > blockExpireVote))
392392 then false
393393 else (adminThreeVote == 1))])
394394 }
395395
396396
397397
398398 @Callable(i)
399399 func swapWavesToNeutrino () = {
400400 let pmt = extract(i.payment)
401401 if ((minSwapAmount > pmt.amount))
402402 then throw("amount less min")
403403 else if (isDefined(pmt.assetId))
404404 then throw("can use waves only")
405405 else if (isBlocked)
406406 then throw("contract is blocked")
407407 else {
408408 let account = toBase58String(i.caller.bytes)
409409 let amount = convertWavesToNeutrino(pmt.amount)
410410 WriteSet([DataEntry(getNeutrinoBalanceKey(account), (getNeutrinoBalance(account) + amount)), DataEntry(getBalanceUnlockBlockKey(account), (height + balanceLockInterval))])
411411 }
412412 }
413413
414414
415415
416416 @Callable(i)
417417 func swapNeutrinoToWaves () = {
418418 let pmt = extract(i.payment)
419419 if ((minSwapAmount > pmt.amount))
420420 then throw("amount less min")
421421 else if (isBlocked)
422422 then throw("contract is blocked")
423423 else if ((pmt.assetId != neutrinoAssetId))
424424 then throw("can use neutrino only")
425425 else {
426426 let account = toBase58String(i.caller.bytes)
427427 let amount = convertNeutrinoToWaves(pmt.amount)
428428 WriteSet([DataEntry(getWavesBalanceKey(account), (getWavesBalance(account) + amount)), DataEntry(getBalanceUnlockBlockKey(account), (height + balanceLockInterval))])
429429 }
430430 }
431431
432432
433433
434434 @Callable(i)
435435 func withdraw (account) = if ((getUnlockBalanceBlock(account) > height))
436436 then throw("wait a couple of blocks for withdraw")
437437 else ScriptResult(WriteSet([DataEntry(getWavesBalanceKey(account), 0), DataEntry(getNeutrinoBalanceKey(account), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(account), getNeutrinoBalance(account), neutrinoAssetId), ScriptTransfer(addressFromStringValue(account), getWavesBalance(account), unit)]))
438438
439439
440440
441441 @Callable(i)
442442 func generateBond () = {
443443 let deficit = (neutrinoSupply - convertWavesToNeutrino(reserve))
444444 let balanceAuction = assetBalance(addressFromStringValue(auctionContract), bondAssetId)
445445 let amount = (convertNeutrinoToBond(deficit) - balanceAuction)
446446 if (isBlocked)
447447 then throw("contract is blocked")
448448 else if ((amount > 0))
449449 then TransferSet([ScriptTransfer(addressFromStringValue(auctionContract), amount, bondAssetId)])
450450 else throw("bond were generated or do not need it")
451451 }
452452
453453
454454
455455 @Callable(i)
456456 func setOrder () = {
457457 let pmt = extract(i.payment)
458458 let newOrderId = toBase58String(keccak256(((toBytes(pmt.amount) + i.caller.bytes) + toBytes(height))))
459459 if ((pmt.assetId != bondAssetId))
460460 then throw("can use bond only")
461461 else if ((getOrderOwner(newOrderId) != ""))
462462 then throw("order exists")
463463 else WriteSet([DataEntry(OrderbookKey, addOrder(newOrderId)), DataEntry(getOrderTotalKey(newOrderId), pmt.amount), DataEntry(getOrderOwnerKey(newOrderId), toString(i.caller)), DataEntry(getOrderHeightKey(newOrderId), height), DataEntry(getOrderStatusKey(newOrderId), NEW)])
464464 }
465465
466466
467467
468468 @Callable(i)
469469 func cancelOrder (orderId) = {
470470 let owner = getOrderOwner(orderId)
471471 let amount = (getOrderTotal(orderId) - getOrderFilledTotal(orderId))
472472 if ((owner != toString(i.caller)))
473473 then throw("permission denied")
474474 else ScriptResult(WriteSet([DataEntry(OrderbookKey, dropOrder(orderId)), DataEntry(getOrderStatusKey(orderId), CANCELED)]), TransferSet([ScriptTransfer(i.caller, amount, bondAssetId)]))
475475 }
476476
477477
478478
479479 @Callable(i)
480480 func executeOrder () = {
481481 let orderId = split(orderbook, LISTSPLITSYMBOL)[0]
482482 let orderTotal = getOrderTotal(orderId)
483483 let orderOwner = getOrderOwner(orderId)
484484 let filledTotal = getOrderFilledTotal(orderId)
485485 if (isBlocked)
486486 then throw("contract is blocked")
487487 else if ((0 >= surplus))
488488 then throw("surplus is less than zero")
489489 else {
490490 let amount = (orderTotal - filledTotal)
491491 let surplusBond = convertNeutrinoToBond(surplus)
492492 let status = if ((surplusBond >= amount))
493493 then FILLED
494494 else NEW
495495 let newFilledTotal = if ((surplusBond >= amount))
496496 then orderTotal
497497 else surplusBond
498498 ScriptResult(WriteSet([DataEntry(OrderbookKey, dropOrder(orderId)), DataEntry(getOrderFilledTotalKey(orderId), (filledTotal + newFilledTotal)), DataEntry(getOrderStatusKey(orderId), status)]), TransferSet([ScriptTransfer(addressFromStringValue(orderOwner), convertBondToNeutrino(newFilledTotal), neutrinoAssetId)]))
499499 }
500500 }
501501
502502

github/deemru/w8io/169f3d6 
90.29 ms