The author is a Reuters Breakingviews columnist. The opinions expressed are his own.

For investment banks, blockchain technology looks as much foe as friend. The use of multi-computer databases like that used by the cryptocurrency Bitcoin could cut costs, by automating labour-intensive tasks and stripping out other capital market intermediaries. But it may also eat into revenue.

At its essence, a blockchain is an immutable record of exchanges of data, money, goods or services that sits on a network of computers. This shared ledger is stored simultaneously on the computers involved, which must first validate and then agree to any changes. This makes fraud acutely hard to perpetrate without majority control of the network. And data security and privacy are enhanced through the use of two types of cryptographic keys: a public one that can be accessed by the computers identifying the transactions, and private ones that belong solely to the buyers and sellers involved.

Capital markets banks see this as a big opportunity. In theory, blockchains could do away with much of the business performed by fee-charging third-party overseers like clearers and custodian banks. The former vouch for counterparties’ credit positions, while the latter transfer cash from one account to another.

With investment bank-run blockchains, these credit-checking, margin-call and settlement processes could conceivably happen automatically as part of the transaction itself. Instead of needing intermediaries to give it their blessing, the computers at the participating broker-dealers would be the sole signatories required. The main function of custody banks BNY Mellon and State Street would thus become redundant. Private sector clearing houses like LCH.Clearnet, CME Clearing Europe and the Depository Trust & Clearing Corporation could also conceivably lose business, though they might still be needed to sanction complex derivatives or multi-asset class transactions.

Banks could benefit in other ways too. There would be less need for the thousands of middle and back-office staff that the typical broker-dealer employs. Deutsche Bank as of December employed as many as two-thirds of its 28,280 investment bank staff in such roles.

All of that implies big cost savings. Separate studies by consultancy Accenture and Spain’s Santander each reckon blockchain technology could save $20 billion in annual costs, although the management consultancy sees that total as applying for the whole securities industry and the Spanish lender views it as applying to just banks. Accenture also says that those cost savings could be as much as a fifth of banks’ IT expenses.

Even so, the potential savings may not be all that material. Investment banks typically spend about a third of their total cost base on IT, including technologists’ salaries. That means blockchain-related savings could have pushed up the industry’s 2015 return on equity, excluding exceptionals, to 10.4 percent, according to Breakingviews’ calculations based on Coalition data. A handy bump, but only just above a cost of equity most analysts put at about 10 percent.

But with actual industry return on equity just 6.7 percent last year, according to Coalition, it is little wonder that bank bosses are suddenly interested. As many as 42 financial institutions have signed up to bank-funded blockchain development consortium R3. And hopes for blockchain fixes have helped former JPMorgan commodities head Blythe Masters raise $60 million for her Digital Asset Holdings startup.

Yet there’s also danger, however small, that other market participants could develop blockchain technology to the detriment of banks. Nasdaq Linq has already offered non-public equity securities on a controlled blockchain, while an Overstock bond has traded on the bitcoin blockchain. The likes of UBS and JPMorgan are rare examples of investment banks that have also managed to develop basic applications.

More generally, the more that is automated, the less investment banks will have to do. True, big money spinners like the buying and selling of highly structured derivatives may always need human brainpower, while mergers and acquisitions advisory is unquestionably a people business. But there’s no reason why much of the heavy lifting of secondary trading or even equity and bond issuance couldn’t be done largely on automated, blockchain-enabled platforms. Banks may be able to develop some of these trading systems themselves, while buying others. But they could struggle to charge as much for their use.

It’s hard to quantify how much the twin threats of lower fees and shrinking business could hurt banks. But imagine 10 percent of annual industry revenue vanishes. Even allowing for the potential savings, returns would barely improve from underlying 2015 levels, according to Breakingviews calculations.

Bankers disinclined to panic have some crumbs of comfort. There are several difficulties with getting blockchain adoption over the line. Propellerheads are yet to design blockchains that would resolve complicated ownership structures or even allow settlement in more than one currency, as TABB Group notes. Cross-jurisdictional claims also present a formidable legal obstacle. And the cost savings envisaged so far may be on the low side.

Still, the technology seems at least as much as a threat as a benefit for investment banking. If the banks weren’t so desperate to bump up their returns, they might be keener to block blockchain’s advance – rather than help hook it up.