7 ms·
Crazy. Was this just the result of a typo? Perhaps not, considering: - The transaction sender set both the max total fee and the max priority fee to above 10
by fanzhang 5y ago
Crazy. Was this just the result of a typo? Perhaps not, considering:
- The transaction sender set both the max total fee and the max priority fee to above 10 million. Most UIs require at least two manual setting changes to do this.
- The sender is Bitfinex -- they're pros and not just a mon and pop.
Maybe it could just be a transfer from the sender to whoever the miner is...
- jazzyjackson 5y agoMy guess is Integer VS Float. Take a typical $23 transaction fee, which comes out to ~0.00775756 ETH Of course, everyone knows you don't want to do math as floating point, you want to use an integer representation. 1 ETH can be divided into 1e18 "Wei" or 1e9 "GigaWei". So that 23 USD could be expressed an an integer "7757560", with the expectation that the decimal point would get moved 9 points <- thataway to become 0.00775756 ETH If somewhere in your code you do some kind of money formatting that turns 7757560 GWEI into 7757.56 ETH, you've got your $23,000,000 USD mining fee.
- quotemstr 5y agoMy position for ages now has been that it was a mistake to make floating point types first-class primitives in most programming languages. Integers and rationals should be the go-to types for most code most of the time. If you really need a IEEE float, you should reach into a library to get it.
- rightbyte 5y agoI think you mixed up the problem. Had they used floats they would have got a small rounding error, not a 23 million loss.
- kevinpet 5y agoWell, this isn't very strong support for that position, because Ethereum doesn't support floating point, and yet here we are.
- jonny_eh 5y ago> Ethereum doesn't support floating point The software that interacts with it does.
- mhh__ 5y agoSo all companies will automatically include the float library and thus nothing will change
- WillDaSilva 5y agoWhat you include as a first-class element in your languages, versus what is packed away in a library, will affect what developers do with your language. For instance, Numpy provides array-language [1] capabilities to Python, but because it isn't a first-class element in the language Python is not thought of as an array language, and using it as one would be a bit clunky. [1] https://en.wikipedia.org/wiki/Array_programming https://en.wikipedia.org/wiki/Array_programming
- MuffinFlavored 5y agoDumb question on my end, I apologize. How are rationals used to represent decimals?
- dragonwriter 5y ago> How are rationals used to represent decimals? Decimals are just the subset of rationals where the denominator is always a power of 10, so the representation and arithmetic operations are simple if you already have rational support (though if you need to preserve decimal results, you need approximation logic for division, since dividing two rationals with denominators that are powers of 10 may result in a rational with a denominator that is not a power of 10.)
- thaumasiotes 5y ago> though if you need to preserve decimal results, you need approximation logic for division, since dividing two rationals with denominators that are powers of 10 may result in a rational with a denominator that is not a power of 10. This is also true for adding, subtracting, and multiplying, though in those cases it is always trivial to convert the result into a form where the denominator is a power of 10.
- webkike 5y agoIf the only thing you use computers for is processing financial transactions then that position is defendable
- abraae 5y agoAny number of sensors, measuring devices and other IoT stuff disagrees with you.
- ajsharp 5y agoyou win HN today, jazzy
- xvilka 5y agoThis is why in "classic" fintech they used so-called "decimal" fixed-point numbers for decades. To not use COBOL as an example let's check something more modern, e.g. Rust[1]. [1] https://github.com/paupino/rust-decimal https://github.com/paupino/rust-decimal
- MichaelBurge 5y agoEthereum uses integers to store transaction amounts internally. Integers are fixed-point already, so that library is completely irrelevant.
- xvilka 5y agoI didn't mean Ethereum itself, apparently the bug is in whatever code written at the higher level, inside the exchange or whatever service they use.
- csomar 5y agoBut then, they should have basic "high mining" fees checks. My Trezor does have that.
- jallen_dot_dev 5y agoThis sounds about right but I think the mistake is a little bit simpler. In an eth transaction you don't actually specify the total fee, you specify the gas price. In the raw transaction it is measured in wei. But in UIs it is common to represent price in gwei (see e.g. https://ethgasstation.info/ https://ethgasstation.info/). So instead of a bug in converting gwei to eth, I bet somebody thought they were specifying the raw price in wei but the input box assumes gwei and does a x1000000000.
- ericwood 5y agoIt looks like you were pretty much correct: https://blog.deversifi.com/23-7-million-dollar-ethereum-transaction-fee-post-mortem https://blog.deversifi.com/23-7-million-dollar-ethereum-tran...
- klntsky 5y agoNot everyone uses UIs. It might be a typo in some custom code. Can happen with anyone.
- retrac 5y agoYep. In one of the previous cases of jaw-dropping txn fees, while we never learned who lost so much, we can be pretty sure it was a program as the exact same thing happened again 24 hours later.
- stefan_ 5y agoYes, they are a cryptocurrency exchange, how corrupt and inept can they possibly be?
- turloughc 5y agoThe CEO of diversifi is Will Harborne. The Miner is Christopher Harborne his father. Assuming this was deliberate what benefit for Christopher Harborne to possess this coin for a few hours? (thats what occurred)
- TaylorGood 5y agoHow did you confirm miner identity??
- MrPatan 5y agoHuge if true. Link?
- tome 5y ago> Maybe it could just be a transfer from the sender to whoever the miner is... How could they know who the miner was going to be before the block was mined?
- jallen_dot_dev 5y agoThey could have sent the transaction directly to the miner instead of broadcasting it to the network.
- tome 5y agoI suppose, if they were willing to wait a long time for that miner to mine a block.