A flash loan attack occurs in decentralized finance (DeFi), where attackers borrow large amounts of cryptocurrency in a single transaction without providing collateral by using flash loans. These loans must then be repaid within the same blockchain transaction. This should ideally make them safe for lenders, however, they are used to manipulate markets or exploit vulnerabilities.

Attackers use smart contracts on platforms like Aave or dYdX to borrow instantly. They use the borrowed crypto to manipulate market prices on decentralized exchanges by either inflating or crashing value. They take advantage of this price difference or take money out of liquidity pools. But because everything happens in one block, the exploit can take place within seconds. Such attacks happen when markets are unstable or when protocols have bugs, like when an oracle price is changed.

You can identify such attacks when you see a lot of borrowing happen all at once, followed by quick trades and repayments in the same transaction. Etherscan and other tools can help you find these strange spikes in trading volume or sharp price changes. Other security monitoring services also point out these kinds of patterns.

Join our newsletter

Disclaimer: Coin Medium is not responsible for any losses or damages resulting from reliance on any content, products, or services mentioned in our articles or content belonging to the Coin Medium brand, including but not limited to its social media, newsletters, or posts related to Coin Medium team members.

Related Terms

WBTC

The Wrapped Bitcoin token operates as an ERC-20 token on the Ethereum blockchain which maintains a one-to-one value relationship with Bitcoin. One WBTC token receives backing from one Bitcoin which a custodian keeps in secure storage. WBTC enables Bitcoin holders to access their cryptocurrency through Ethereum-based applications which use their Bitcoin holdings. The two cryptocurrencies Bitcoin and Ethereum function on different blockchain networks which do not enable their users to perform transactions between both systems. The WBTC system operates by

Slippage

Slippage describes the discrepancy between the anticipated trading price and the actual trading price which results from executing a trade. Slippage occurs in cryptocurrency markets when there are two conditions which create high volatility and low liquidity because prices experience rapid changes from order placement until actual order completion. A trader attempts to purchase Bitcoin at a specific price, but by the time his order reaches execution, the market price has moved upward. The trade is completed, but at a

Vyper

Vyper enables programmers to create smart contracts which operate on the Ethereum blockchain through its dedicated programming system. The system serves as a replacement for Solidity programming because its designers built it to create secure and accessible code which users can easily understand. The creation of Vyper emerged as a solution to simplify smart contract development because developers considered Solidity to be the most popular programming language for that purpose which included features that created security risks. Vyper uses Python-based