“Alister Maclin” can break Bitcoin on command
motherboard.vice.com
motherboard.vice.com
Reading the title of the post was a pang of nostalgia, I can still remember him telling me about Ice Station Zebra, Night Without End, Where Eagles Dare, Guns of Navarone, Force 10 from Navarone. I miss him.
To clear this up: the technique in the article is literally what we use in unit tests to check that our TX-based event code won't break under malleability. It's something that Bitcoin developers have been writing code around forever (and warning about just as long.) So truly: if there's anyone out there still writing code that assumes static TXIDs they really do deserve what's coming to them.
As I see it: the attack reaches critical mayhem in a similar way to accepting zero-conf transactions in that what you have is a consensus problem. The specific fix for TX malleability is to watch transactions based on their meaning, not their TXID (in this case "meaning" is looking at the inputs, outputs, version, timelock, etc to produce equivalent transactions.) And of course: don't accept zero-confirmation transactions.
Here's some of my ultra-1337 Python code for producing the "attack" just for laughs:
def mutate_tx(tx_hex):
"""
Mutates a raw transaction using TX malleability in the scriptSig (specifically, the OP codes.) This function shouldn't be used beyond testing as it uses an ugly eval() hack.
https://en.bitcoin.it/wiki/Transaction_Malleability
"""
tx = CTransaction.deserialize(binascii.unhexlify(tx_hex))
script_sig = repr(tx.vin[0].scriptSig)[9:]
script_sig = eval("CScript([OP_1, OP_DROP, " + script_sig)
tx.vin[0].scriptSig = script_sig
return b2x(tx.serialize())
As you can see, there's nothing to it. Just a clueless attention whore claiming to an even more clueless journalist that he can break Bitcoin.More details here: https://bitcointalk.org/index.php?topic=1166928.0
> A more fundamental worry is that digital-currency mining, like other sorts of mining, has environmental costs: all that number-crunching uses a lot of electricity, and not all of it comes from renewable sources, as it does in Boden. The rapid development of the ASICs chips has made the machines more efficient, but even if all mining worldwide were carried out in modern facilities like Boden’s, the combined electricity consumption would be 1.46 terawatt-hours per year—the consumption of about 135,000 average American homes.
http://www.economist.com/news/business/21638124-minting-digi...
The whole consensus network of Bitcoin is based around burning so much energy/space/infrastructure on hashing that a single actor wouldn't be able to invest a bunch of money and take a controlling majority.
I can't speak to how much energy we burn with ACH systems, paper money, etc., but those are much bigger than Bitcoin in terms of usage. If you add up the total energy consumed by every bank and mint in the world, you might get a higher absolute number. In terms of energy used per amount of value transferred, the traditional currencies almost certainly win.
If you have the time and you don't mind, could you elaborate on that? It just doesn't sound right to me. What is the mechanism that discourages big investments? As far as I can tell, there seem to be some economies of scale, that's why there are mining farms.
From the bitcoin wiki "Attacker has a lot of computing power":
"Since this attack doesn't permit all that much power over the network, it is expected that no one will attempt it. A profit-seeking person will always gain more by just following the rules, and even someone trying to destroy the system will probably find other attacks more attractive. However, if this attack is successfully executed, it will be difficult or impossible to "untangle" the mess created -- any changes the attacker makes might become permanent."
[1] https://en.bitcoin.it/wiki/Weaknesses#Attacker_has_a_lot_of_...
>The whole consensus network of Bitcoin is based around burning so much energy/space/infrastructure on hashing that a single actor wouldn't be able to invest a bunch of money and take a controlling majority.
I just don't think that's true. The only thing keeping one big player from taking over the network is scale. I really don't think that the "whole consensus network of Bitcoin is based around" what he says it is, since it's not necessary. Yes, there is a proof of stake, but it has nothing to do with "burning so much energy/space/infrastructure on hashing that a single actor wouldn't be able to invest a bunch of money and take a controlling majority". It's just a way to create the right incentives for people to want to mine.
"The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they'll generate the longest chain and outpace attackers." https://bitcoin.org/bitcoin.pdf
So, literally the group that burns the most energy/space/infrastructure is correct, as far as the system is concerned. if an attacker can burn more cpu, generate a longer chain, they win.
As the wiki points out, potential gains aren't total control: you get to reverse transactions but can't directly steal coins out of someone else's wallet.
With a system of independent agents all trying to game the system to make money, it comes down to a cost/benefit analysis. If Bitcoin weren't designed to have the network scale that it does, the cost of making that attack could be cheap enough for it to be worth doing.
But since the mining incentives are made to drive terawatt-hours of energy used in huge datacenters, the attack doesn't make economic sense. That's what I mean by saying the consensus system is built around having a huge network.
Currently this works out as about $7 of electricity per transaction. https://blockchain.info/charts/cost-per-transaction
Source?
Commercial miners make the vast majority of their money on the block reward which has nothing to do with the size of the block. If anything, they'll make more money with less variance with a larger block (since small miners with worse connectivity will have a higher orphan rate).
The only people I've seen opposing a block size increase are idealists who are afraid of further centralization of mining power as hobbyist/small miners will have a more difficult time participating (you'll need faster internet and larger hard drives).
My money is on a block size increase in the next 1-2 years.
Are there any legitimate prediction markets still operating where we might be able to do this? I googled around a little for it and stumbled across Augur (http://www.augur.net/) but it seems too alpha for such a long term bet right now.
Increased competition to get in on the smaller blocks leads to larger transaction fees. Miners benefit from people competing to have their transactions hashed in the next block.
If the userbase scales, the competition goes up and transaction fees go higher. If everyone could get their transactions through on a larger block, they're going to pay almost no fee and miner's make less.
Amusingly as bitcoin gets more successful and the price rises, the system gets less efficient to compensate.
Transaction volume doesn't increase with efficiency. Blocksize is capped at 1MB, and any new efficiency goes into the hashing algorithms, not the size. The Bitcoin network has always only been able to handle 1 MB of transactions every 10 minutes (~7 tx/s) and always will at this rate.
It's possible there is a misunderstanding here with me interpreting "gets more successful" as seeing its transaction volume increase, and you interpreting it to mean something else.
If that's true, then why the hell is anyone mining? Bitcoin is currently trading at $240 or so which is half of break-even if the block reward is 25BTC.
e: Nevermind, I see fryguy's comment now:
> It's 25 BTC + miner fees per block. According to the website linked, it's about 20-30 BTC per block, so at $250 USD/BTC, that's ~$12,000 USD per block of electricity.
I wasn't aware miner fees made up such a large portion of the reward these days.
To nitpick a little and add some more information: the 25 bitcoins isn't necessarily the cost of electricity, it's the reward, and the expenses incurred to reap that award approach 25 but likely sit slightly below it to allow for some profit, and the expenses aren't all electricity either but in large part also hardware and overhead.
So what does the split look like in expenses (electricity, hardware, overhead etc). Well in the past few years hardware had a tremendous turnover rate as the industry essentially built an application specific integrated circuit for one particular hash, and then tried to catch up with decades of moore's law (I think they're now at 14nm), seeing extreme exponential growth of hashing power and some hardware going obsolete after a few months and not even being able to break even on their cost (i.e. the hardware:reward ratio was positive, which gives you a sense of how much was spent on hardware), meaning most money probably went to building new chips rather than burning electricity. Take January 2013 to January 2014 for example, hashing power increased from about 25k to 12.m, or 500x in 1 year. That meant if you were reaping 10% of the rewards in early 2013, a year later your setup could only reap 0.02% of the total rewards, necessitating tremendous investments to keep up with competition, investments that are obviously capped by bitcoin block reward, thus electricity was just a fraction of total expenditures.
Of course this changes over time, they're now hitting some real walls and combined with a price stagnancy of bitcoin the hashing power. January 2014-2015 saw just a 21x increase in hashrate for example. So it's safe to say that today, a much greater share of the block reward goes to electricity than before. But even now, much is spent on replacing old equipment and on buying hardware that's just as powerful but uses less electricity than before, meaning even today not the entire 25 bitcoins are spent on electricity and thereby not the entire $7 either.
Beyond that I think it's a bit misleading to state $7 per transaction, even though it's obviously correct in a certain sense that if you take the total expenditures and divide them by the units, you get an average. But if I run an automated subway between two parts of town for $100 per trip that leaves every 10 minutes regardless of occupancy, and it has a max capacity of say 1000 people, it'd be a bit misleading to say if one person took the subway and paid a $1 ticket that it costs $100 per person even though that's the average. No it costs $100 per subway trip whether it has 0 or 1000 people, and if 1 person gets on then it still costs just $1 per person. The fixed costs are $100, regardless of occupancy. Now bitcoin specifically does have a max 'occupancy' (transactions per block) which are close to $7, but bitcoin has 1mb blocks every 10 minutes. That's the bandwidth, 1.7 kb per seconds. We could have 100mb blocks and the 'electricity per transaction' would drop to 7c, while the bandwidth would still be just 170kb/s. As storage, bandwidth and cpu gets cheaper and bigger, we could eventually get to 1 gigabyte blocks and beyond. And as 1 transaction is just some data in a ledger, we could even use 1 transaction (i.e. some data) to represent pairs of multiple transactions. In short, while you're completely correct in citing the $7 figure, I think it's misleading to anyone who doesn't know anything about bitcoin because it tells this story of a ridiculously expensive and inefficient system, without mentioning a context where blocks are like a digital subway (referencing the above analogy) that we can make much bigger with the stroke of a keyboard (there are some genuine technical challenges but they're surmountable), a digital subway that's pretty much in the 56k modem stage and whose scaling up is long overdue, and thereby whose cost per transaction is way exaggerated. The biggest topic in bitcoin right now is essentially how to scale this thing up in a sensible way and once its agreed upon, that $7 will come down to a fraction of a penny before long. I've got a $60 TV+Internet package at home for example and my internet speed I just tested downloads at 10.5mb per second. Every 10 minutes bitcoin puts out one 1 mb block, in the same time I can download 6300. So even scaling by a factor of 100 right now on a residential line is feasible. There's a lot more to it of course, there are some political and possibly some security issues involved (mostly the more you scale it, the more only wealthy organisations can afford the connections necessary, the less ownership of the system by 'normal' people) but you'd have to really scale a lot before you get there. Simply scaling up by say 10x and then following normal bandwidth/storage growth rates a year would be a great start.
In short, the claim isn't incorrect today, it uses a lot of energy relative to its utility as a value network, but it's one of those things where the theory on paper, and the current trends in practice, show that the problem will solve itself over time. It reminds me of the endless stream of journalists decades ago who kept saying solar had no future because its embodied energy was more than it could generate, which was a partial truth in the 1980s and one that was rarely mentioned alongside the fact in theory it didn't have to be this way and in practice the trend showed it was getting solved over time. Today payback times of embodied energy went down from 50 years (for panels with a 20 year lifespan) to a fraction of a single year. Funny enough, you can still find people saying these things to this very day, ah well.
If you want to know the rough numbers... well money spent on getting x reward will approach x. Assuming 75% of the money miners spend on getting the block reward (the other 25% going to manufacturing or procuring the hardware, management etc etc), and knowing the price of a bitcoin is $240 and every day roughly 3600 coins are mined, then electricity expenditure is about $650k per day worldwide. Worldwide electricity consumption is about $3 billion (very much a back of the envelope calculation) a day at a hypothetical 10c a kwh, for the US alone total energy expenditures exceed a trillion a year. Bitcoin today is relatively wasteful for the utility it provides today that's for certain, but it's looking pretty good for the future, and in the grand scheme of things it's a really tiny operation in absolute terms.
What's interesting is that a lot of the bitcoin mining has sought out cheap electricity, e.g. Iceland where renewables are between 99 and 100% of electricity, there's a limited environmental impact to mining there and as prices are so cheap, multiple big miners have set up shop there in the past.
Finally it's important to realise that the cost of validating a transaction is pretty much near zero. The electricity waste is in the proof of work, which is hashing and it's just as hard whether you hash 1 or 1 trillion transactions. Further, the amount wasted is based on the block reward which is ridiculously high in the first years of bitcoin because of its distribution system. When the block reward drops, the amount of waste drops, and every day this inches closer to a more market-driven price of a transaction, thereby reward for mining and thereby the cost of waste invested to reap that reward. In short we're seeing, by design, a few years of ridiculously high waste-per-value transmitted to essentially kickstart the bitcoin ecosystem and distribute bitcoins, which drops every year. So again, the waste isn't necessarily tied to a transaction, whether a block has 0 transactions or a million, is no different for hashing and 99% of the reward today is still the block reward (i.e., irrespective of the amount of transactions). So anyone citing a cost per transaction figure is very misleading even though it's not incorrect in some way, because that cost is not marginal but fixed and exists even if there are 0 transactions and is therefore not a 'per transaction' cost. A bit like if you maintain a bridge for $100 a day and 1 person walks on it, doesn't mean the cost of walking on the bridge is $100 per person, it's actually 0 because if you walk 0 or 100 people over the bridge, the fixed cost is always $100 and the marginal cost is always $0. Obviously a bridge has capacity limitations, but bitcoin as a digital ledger has much fewer. The total bandwidth of bitcoin today, no joke, is 1 mb per 10 minutes, or about 1.7 kb per second. We could increase that by orders of magnitude in the coming years and be okay, meaning whatever 'cost per transaction' anyone cites would also drop by orders of magnitude. Anyway I'm rambling but the cost/waste argument always feels a bit disingenuous given a medium to long-term context in which it gets less wasteful every year, and given in the short-term it's pretty minor in absolute terms anyway.
There's not a lot to say you haven't already said. Mining is literally an increase of the money supply that devaluates each unit of that money, in this case. If the price remains the same, that must mean that its offset by an equal increase in demand. And indeed if the public interest stagnates, that offset won't happen and bitcoins will devaluate, you're absolutely right about that. But I'm not sure if there's some interesting 'snowball' effect going on here. Generally people withdraw their money from any investment that does not grow and has stagnated because there's no ROI there, so even if there was no bitcoin block rewards it's likely that if public demand for bitcoin stagnated to nothing that it'd still lead to people saying there's no ROI in bitcoin for me and as public interest has waned the utility of bitcoin won't grow either so I'm selling off my holdings. Such a mass sell-off would cause the price to fall, too. It's no different from say if there were 5 million people on Facebook and all of them only had 3-4 friends on there and public interest stagnated, people would leave and the value of FB would drop. Bitcoin block rewards aren't really a necessary aspect of that failure scenario, it can fail without it. If bitcoin can't beat inflation (which is at 9% per year), i.e. bitcoin isn't growing by 9% a year or so in adoption, then it's dead in the water regardless of inflation because that means that say assuming there are 5 million bitcoin users in the world, that in 10 years there'll be only 12m, and that's just nothing, imagine Facebook took 10 years to grow from 5m to 12m users, it'd have long been acquired by some other company or shut down and would have made no waves whatsoever. So bitcoin mining or not, if public interest stagnates for long enough, bitcoin's dead.
When I say 'dead' I mean as in 'insignificant because it's so small even if it's still alive', dead like myspace or something like that. If the price drops, miners will leave, but that makes mining for others easier. So it reaches a new equilibrium where the incentives to secure the system are lower, but the rewards to cheat the system are, too. Security doesn't really change much in bitcoin as it just finds a new equilibrium and as the incentives for security and anti-security move in the same direction. So it could still be secure, but if public interest stagnates and there's no adoption, no investment, no companies looking to build products and services etc etc, then it's insignificant anyway and will continue to decline until its fully usurped by alternatives.
An interesting idea is that inflation is set to halve in about 10 months from about 9% today to 4.2% or so. Assuming that new demand (due to companies like Coinbase continuing to grow) remains the same, while inflation halves, then we might see price increases again. And bitcoin sort of revolves around those, every time the price is set to increase you get this obvious flock of people investing short-term, a bubble emerging and that's when its in the headlines, when the message boards are flooded, when VCs invest more money etc. Without those bubbles bitcoin would probably have faded into obscurity by now. A lot of that block reward halving already priced in, in theory, but it'll be fun to see how it plays out this time around. Anyway so to answer your question, I don't think bitcoin has to worry about security if growth stagnates long enough, it'd be a bit similar to worrying about whether typewriters are ergonomic enough in a world where its completely irrelevant. Bitcoin has to grow, if it doesn't then its dead and its security isn't very important (although as I mentioned earlier, it'd just settle at a new level. Security incentives sort of self-adjusts to the value it has to secure).
(Love the crackier theories that /r/buttcoin are banker shills. If only banks could get hold of a few thousand dollars somewhere ...)
This does not actually exist for Bitcoin. Shorting requires trusting an exchange, and statistically trusting a Bitcoin exchange is historically a terrible idea.
So no, you can't just short Bitcoin and expect to make money.
Ie you and the counterparty agree on a price today to sell them bitcoins a fixed time later. If both of you keep honouring any margin calls you agree on, the risk is fairly low. No third party necessary.
But yes, it is a more complicated transaction than the spot market.
But, it might be worthwhile to make this work. If you implement the margin calls right, there's almost no risk for any party involved. Stand by, while I talk to my bitcoin obsesses friends about a startup idea.
Large, relatively trustworthy exchange. Costs roughly 3.3% APR to borrow $1m worth of BTC for shorting right now: https://www.bitfinex.com/credit/index/btc
Edit: corrected the interest rate
I have no confidence in Bitfinex's ability to literally run their own systems. Typical Bitcoin system, i.e. cobbled together from cheese and string by amateurs. It's as if financial software and systems never existed.
Gemini is attempting to be as legit an exchange as is possible. Not sure they're offering shorting yet. OTOH, their volume is laughably tiny; everyone else is strongly suspected of frontrunning and Willybots. It turns out that crooks and scammers see an unregulated environment as a golden opportunity, but not for their customers.
It's not gambling if, say, I need to hold Bitcoin in inventory to run my business but I want to short it on Bitfinex to hedge my exposure to currency fluctuations. Not shorting would be the gamble.
> Gemini is attempting to be as legit an exchange as is possible.
Coinbase Exchange is a perfectly legitimate exchange too (I work for Coinbase). But accepting deposits and lending them out to other users to short and/or trade on margin is a whole different regulatory ballgame.
> It turns out that crooks and scammers see an unregulated environment as a golden opportunity
The regulations here are actively hurting consumers as legitimate providers are afraid to step into the space. It's a self-fulfilling prophecy (too many regulations -> only idiots and crooks offer services -> consumers lose money -> more regulation).
Edit: opinions are my own, not Coinbase's, yada yada