tx · CR27vg4VyvBtM8VkSMANuSN2exj5bHS9AQtgk9YMx9TR 3N6mVEULck7uViUaDo1wi98wch9XzYNXriv: -1.00000000 Waves 2019.02.22 07:58 [506027] smart asset 3N6mVEULck7uViUaDo1wi98wch9XzYNXriv > SELF 0.00000000 exchange
{ "type": 15, "id": "CR27vg4VyvBtM8VkSMANuSN2exj5bHS9AQtgk9YMx9TR", "fee": 100000000, "feeAssetId": null, "timestamp": 1550811514681, "version": 1, "sender": "3N6mVEULck7uViUaDo1wi98wch9XzYNXriv", "senderPublicKey": "GMCkL2F7fYotQtrpQq5sjNm5cjpR7CSfawr9kMSKLHVs", "proofs": [ "2w93snZqtrAS4ofWDmQXxVcsmzhoqyj9b1DNZ2n1mpjxfKrukaLuD35e5X1GiZYCDF4BZSQFLskV1RnHkWevAzz2" ], "assetId": "CdAw5Uu1A9RT6jafc9cQSUy16naaYjzYgcVWDY8xGw8z", "script": "base64:AQQAAAAKaGVpZ2h0RGlmZgAAAAAAAAAAAwQAAAAOcHJpY2VEaWZmQ29uc3QAAAAAAAACisgEAAAAD2V4cGlyYXRpb25Ib3VycwAAAAAAAAAAGAQAAAANbWF4RXhwaXJhdGlvbgkAAGgAAAACCQAAaAAAAAIJAABoAAAAAgUAAAAPZXhwaXJhdGlvbkhvdXJzAAAAAAAAAAA8AAAAAAAAAAA8AAAAAAAAAAPoBAAAAAtzdGFydEhlaWdodAAAAAAAAAe4iwQAAAAGY3ljbGVzCQAAaQAAAAIJAABlAAAAAgUAAAAGaGVpZ2h0BQAAAAtzdGFydEhlaWdodAUAAAAKaGVpZ2h0RGlmZgQAAAAJcHJpY2VEaWZmAAAAAAAAAAEsBAAAAA1zdGFydEJ1eVByaWNlAAAAAAAA/k/oBAAAAAttaW5CdXlQcmljZQkAAGQAAAACBQAAAA1zdGFydEJ1eVByaWNlBQAAAAlwcmljZURpZmYEAAAADG1heEJ1eUFtb3VudAAAAAAPgataAAQAAAAOc3RhcnRTZWxsUHJpY2UAAAAAAAD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AAAAckbWF0Y2gwAgAAABdNYXNzVHJhbnNmZXJUcmFuc2FjdGlvbgYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0J1cm5UcmFuc2FjdGlvbgYJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAABdAUAAAAHJG1hdGNoMAYGj65vGA==", "chainId": 84, "height": 506027, "spentComplexity": 0 } View: original | compacted Prev: HWdvSRnnuUjmM8rEHrSYSfZ3gt87wAUEbZKP7ZugwpgR Next: BwZjgVqNdfG48mHkiF3woPa4EGguE1qt1UqYujqSugfY Diff:
Old | New | Differences | |
---|---|---|---|
8 | 8 | let cycles = ((height - startHeight) / heightDiff) | |
9 | 9 | let priceDiff = 300 | |
10 | 10 | let startBuyPrice = 16666600 | |
11 | - | let minBuyPrice = (startBuyPrice + | |
11 | + | let minBuyPrice = (startBuyPrice + priceDiff) | |
12 | 12 | let maxBuyAmount = 66600000000 | |
13 | 13 | let startSellPrice = 16666900 | |
14 | - | let minSellPrice = startSellPrice | |
14 | + | let minSellPrice = (startSellPrice + priceDiff) | |
15 | 15 | let minSellAmount = 600000000 | |
16 | 16 | let expirationError = "Expiration must be <= 24 hours" | |
17 | 17 | let buyAmountError = ("Buy amount must be <= " + toString((maxBuyAmount / 100000000))) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 1 #-} | |
2 | 2 | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | 3 | let heightDiff = 3 | |
4 | 4 | let priceDiffConst = 166600 | |
5 | 5 | let expirationHours = 24 | |
6 | 6 | let maxExpiration = (((expirationHours * 60) * 60) * 1000) | |
7 | 7 | let startHeight = 505995 | |
8 | 8 | let cycles = ((height - startHeight) / heightDiff) | |
9 | 9 | let priceDiff = 300 | |
10 | 10 | let startBuyPrice = 16666600 | |
11 | - | let minBuyPrice = (startBuyPrice + | |
11 | + | let minBuyPrice = (startBuyPrice + priceDiff) | |
12 | 12 | let maxBuyAmount = 66600000000 | |
13 | 13 | let startSellPrice = 16666900 | |
14 | - | let minSellPrice = startSellPrice | |
14 | + | let minSellPrice = (startSellPrice + priceDiff) | |
15 | 15 | let minSellAmount = 600000000 | |
16 | 16 | let expirationError = "Expiration must be <= 24 hours" | |
17 | 17 | let buyAmountError = ("Buy amount must be <= " + toString((maxBuyAmount / 100000000))) | |
18 | 18 | let buyPriceError = (((("Buy price must be <= " + toString(minBuyPrice)) + " wavelets (cycles: ") + toString(cycles)) + ")") | |
19 | 19 | let sellAmountError = ("Sell amount must be >= " + toString((minSellAmount / 100000000))) | |
20 | 20 | let sellPriceError = (((("Sell price must be >= " + toString(minSellPrice)) + " wavelets (cycles: ") + toString(cycles)) + ")") | |
21 | 21 | match tx { | |
22 | 22 | case e: ExchangeTransaction => | |
23 | 23 | if (((e.sellOrder.expiration - e.sellOrder.timestamp) > maxExpiration)) | |
24 | 24 | then throw(expirationError) | |
25 | 25 | else { | |
26 | 26 | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) | |
27 | 27 | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
28 | 28 | if (sell) | |
29 | 29 | then if ((minSellAmount > e.sellOrder.amount)) | |
30 | 30 | then throw(sellAmountError) | |
31 | 31 | else if (if ((minSellPrice > e.sellOrder.price)) | |
32 | 32 | then true | |
33 | 33 | else isDefined(e.sellOrder.assetPair.priceAsset)) | |
34 | 34 | then throw(sellPriceError) | |
35 | 35 | else true | |
36 | 36 | else if (buy) | |
37 | 37 | then if ((e.buyOrder.amount > maxBuyAmount)) | |
38 | 38 | then throw(buyAmountError) | |
39 | 39 | else if (if ((e.buyOrder.price > minBuyPrice)) | |
40 | 40 | then true | |
41 | 41 | else isDefined(e.buyOrder.assetPair.priceAsset)) | |
42 | 42 | then throw(buyPriceError) | |
43 | 43 | else true | |
44 | 44 | else false | |
45 | 45 | } | |
46 | 46 | case t: MassTransferTransaction|BurnTransaction|TransferTransaction => | |
47 | 47 | true | |
48 | 48 | case _ => | |
49 | 49 | true | |
50 | 50 | } |
github/deemru/w8io/169f3d6 35.18 ms ◑