A potential exploit in the decentralized financedecentralized finance (DeFi) ecosystem has been exposed and it won’t be fixed until noon on Friday. The reveal comes just days after two exploits used DeFi tools to take home $1 million.
Dominik Harz, a PhD candidate at Imperial College London, has posted a Medium post detailing the potential weakness. It’s focused on the concept of flash loans and the stablecoin Dai. While he has notified Maker—which runs Dai—the issue won’t go up for a vote until tomorrow. And in the meantime, $700 million is at risk.
A trader has again exploited a number of decentralized finance (DeFi) tools, to take home a large amount of Ethereum (ETH). After netting $350,000 on Valentine’s Day, he or she has now taken a further $645,000—a total just shy of a million dollars.
The theft happened in the same way. A clever set of instructions—all executed in one big transaction—enabled the trader to leverage current weaknesses in the DeFi ecosystem for their own gain. By using several decentralized financial tools, and a smal...
“That attacker would be able to steal $700m worth of ETH collateral and be able to print new Dai at will,” Harz wrote. “This attack would spread throughout the whole DeFi space as Dai is used as backing collateral in other protocols.”
What is a flash loan?
A flash loan is a new—and risky—concept in DeFi. It’s essentially the act of lending out money, without asking for anything held as collateral in case the loan is defaulted upon. The only reason that they exist is that the loan gets paid back, in the same transaction. This is possible because on Ethereum—the blockchain platform in question—transactions can be made up of multiple components.
Can an attacker use flash loans to attack @MakerDAO? Find out!
We quantify the required MKR and show that an attacker can increase his chances by: - combining loans from @dydxprotocol and @AaveAave to increase liquidity - oracle tampering on DEXshttps://t.co/CxzpUnUPCy
So, in the case of the first DeFi exploit the other day, the trader made one big transaction that triggered a bunch of actions across various DeFi protocols. Within the transaction, they made a flash loan, used the money for nefarious goals, profited $350 million, and returned the loan. The lender is safe because they know that—due to the power of the blockchain—if the money doesn’t come back, the transaction is (kind of) reversed so it never happened in the first place. Either way, they keep their money.
The $700 million attack vector
Now, here’s how Harz argues that flash loans could be used to exploit Maker.
MakerDAO is a decentralized governance system that runs the Dai stablecoin. Holders of the governance token MKR vote on how Dai should be programmed. But it’s possible to exploit the governance system.
“The basic idea is to accumulate enough MKR tokens to replace the existing governance contract with the attacker’s, malicious, governance contract,” Harz said. “The malicious governance contract is then able to give the attacker full control over the system and withdraw any collateral in the system as well as create arbitrary amounts of new Dai.”
However, when this attack vector was suggested before, the idea was to crowdfund the MKR tokens needed to carry it out. And that’s where flash loans come in. They make it much easier for an attacker to build up a large supply of MKR tokens—and use them to take over the system.
Not only can they use a flash loan to buy a large amount of MKR, but they can also use flash loans to manipulate the price of MKR—in the same way as the recent DeFi attacks. With a cheaper MKR price, it becomes much easier to snap up more coins.
Harz said that this strategy could be used in combination with a crowdsourcing strategy for maximum effect at a low cost. Maker is set to vote on a solution to stop flash loans from affecting the governance mechanism tomorrow—but the clock is ticking.
Daily Debrief Newsletter
Start every day with the top news stories right now, plus original features, a podcast, videos and more.
A new layer-1 blockchain focused on privacy and mining accessibility is now live with the launch of Tari mainnet.
Led by a group of former Monero developers, Tari’s mainnet follows the network’s testnet launch in September 2024, placing it in a crowded field of layer-1 networks that includes heavyweights like Bitcoin, Ethereum, and Solana. But the developers see Tari differently than the pack.
“Our hot take: Existing chains are missing key ingredients needed for them to succeed in becoming the...
Solana network validators narrowly avoided catastrophe, rolling out a patch that killed a bug in a program that could have allowed exploiters to mint certain tokens in unlimited quantities—or withdraw them from any account.
The vulnerability, which would have only affected Token-22 confidential tokens, was found in the ZK ElGamal Proof program, which certifies encrypted balances and verifies the accuracy of zero-knowledge proofs.
“In the on-chain ZK ElGamal Proof program, some algebraic compon...
In a demo transaction, developers from smart contract operating system BitcoinOS (BOS) claim to have sent 1 BTC from a Bitcoin wallet to a Cardano wallet and back without relying on traditional bridge infrastructure, touting it as the first "bridgeless cross-chain transfer."
"Crypto users don't use BTC beyond the existing functionality," not because they value simplicity, but because "they don't have any other options," Edan Yago, co-founder and core contributor at BOS, told Decrypt.
Compared t...