Types of Exploits in DeFi You Need to Watch Out For

Even as advanced as blockchain technology and smart contracts have become, there still exist loopholes and errors vulnerable to exploits, which usually leads to the loss of users’ assets. This is one of the biggest risks you have to consider when becoming an investor in the DeFi space, especially if you’re a crypto beginner. This article will explain the main types of exploits so you can recognize and stay away from them.

The Rug Pull

The rug pull is a general term for exit scams that remove liquidity from the liquidity pool. Scammers can come up with a seemingly attractive and lucrative project, but when investors flock in and increase the price, they pull all the liquidity out of the project, walking away with the funds. This severely damages the capital of the investors, eventually forcing them to sell all their assets.

The rug pull happens quite often in the crypto sphere due to how easy it is to execute. As long as the developer team has access to the liquidity pool, you’re just placing your blind trust in them to not pull off the exploit. Even if they don’t initially have access to the pool, they can update the project to allow themselves permission.

Therefore, research is of utmost importance before investing in a project. Look for projects with transparent and accessible source code, a time lock on the liquidity pool, and a multi-signature system where it takes keys from various individuals to access the pool.

CertiK is a really useful site to examine audited reports and detect projects’ vulnerabilities.  Sometimes, the information can be hard to digest for someone without a cyber security background but the site will summarize problems in a readable manner. In addition, rekt.news is a good choice to track where DeFi exploits are happening.

DeFi

Flash Loan Attacks and Exploits

Flash loan is a special tool of trading where users can borrow a loan without any collateral by using smart contracts. The smart contract forces the borrower to pay back the loan before the transaction ends or it will reverse the process so it’s like the loan never happens. Flash loan is a useful instrument for its speed and collateral-free nature, but it also comes with potential attacks and exploits.

Arbitrage Trading

Even though considered an exploit, arbitrage trading is very common and even one of the main reasons why people utilize flash loans. Basically, the same cryptocurrency can have a 1-3% difference in trading price in different exchanges, because of trading volume and time zone.

Arbitrage trading takes advantage of this price difference, borrowing coins for a lower price on one exchange and selling them for a profit on another, then paying back the loan. All of this happens in a matter of seconds, basically earning free crypto. To lessen arbitrage trading, a more stable market is necessary.

Flash Loan Attack

Since flash loans rely solely on smart contracts for security, these smart contracts themselves can be targeted to tamper with their rules and protocols. One such attack is called the re-entrancy attack.

This attack happens when a smart contract makes an external call to another untrusted contract before the next step can take effect. If someone manages to control this untrusted contract, they can create a response to the original function over and over again, thus repeating the same interaction. Perpetual repetition prevents the smart contract from resolving and eventually drains all the ether out of it or make the execution reach its maximum stack size.

Wash Trading

Wash trading is as common in stock trading as it is in crypto. It refers to the practice of performing large transactions of, in our case, a coin to create false information to the market and pump up the price of said coin. After that, those behind the scene will sell the coins for increased value.

Wash trading can either be a joined act of both investors and brokers or investors alone acting as both buyers and sellers. This is illegal under US law and the IRS dismisses losses resulting from wash sales, which are defined as those occurring within 30 days of buying the security and resulting in a loss.

DeFi

Real-life Example of DeFi Exploits

Value Defi

The Value DeFi platform offers a variety of services aiming to bring fairness and innovation to the DeFi community. Unfortunately, it is one of the few protocols to have been exploited over and over again.

The first exploit was a classic flash loan attack happening at the end of 2020. The exploiter managed to steal $7 million but gave back $2 million to the developers with a message: “do you really know flash loan?”

In May of 2021, Value DeFi was exploited twice in a span of 4 days, both times by taking advantage of a coding error. The first attacker managed to set themselves as the owner of a liquidity pool and they walked away with $10 million worth of Bitcoin. The second exploit targeted an incorrect usage of a “Bancor formula”, which let the exploiter steal money from pools that didn’t have a 50/50 split liquidity. $11 million was stolen as a result.

Meerkat Finance

Meerkat Finance is a yield aggregator protocol that, after launching only one day, was exploited for around $31 million. It seemed like just another exploit until people found out the project was updated right before the attack to give developers backdoor access to user funds.

All evidence points towards this being a rug pull disguised as a hack but little did people know there was another twist waiting in store. Immediately a day later, all investors were refunded and it was announced that the ‘rug pull’ was a “social experiment” to test “user greed and subjectivity”. So while it was lucky that nobody lost their money, the Meerkat Finance case demonstrated how easy it was for people to invest in projects without thorough research.

EasyFi

When the devs came up with the name EasyFi, they probably didn’t mean ‘easy-to-exploit’. Still, EasyFi was a victim to the most disastrous DeFi exploit of $6 million in stablecoins plus $53 million in EASY tokens. This was achieved by injecting a malicious version of MetaMask into a computer used for EasyFi official transactions which let the hacker gain access to the admin keys. EasyFi’s founder, Ankitt Gaur, has offered a $1 million payout to the hacker to return the stolen funds but it doesn’t look like they’re biting any time soon.

Harvest Finance

Harvest Finance is yet another yield aggregator protocol that was attacked by flash loans. The exploiter first took a $50 million USDT flash loan, then swapped $11.4 million USDC to USDT which caused USDT price to increase. Then, they deposited $60.6 millon USDT into vault and swapped $11.4 million USDT back to USDC which made USDT price go down. After that, they withdrew the $60.6 million USDT from vault with a $0.5 million profit from the price arbitrage. They repeated this process 32 times, all in 7 minutes.

 

About the author

Brent Dixon is the owner of E-Crypto News and an early adopter of cryptocurrencies. He is a Book editor- that has edited numerous books on Cryptocurrencies. He has been a writer for more than 30 years. Covering everything from Jazz Music to Blockchain Technology. He currently lives with his wife on Miami Beach, Fl.

Related Posts

For a Hedge Against Inflation - Click the Rocket!

E-Crypto News Executive Interviews

Blockchain/Cryptocurrency Questions and Answers

Trading
How to Get Started with Automated Crypto Trading?
November 25, 2022
Cryptocurrency
How to Get a License for a Cryptocurrency Exchange
November 24, 2022
How to Make Money in the Crypto Space?
November 24, 2022
How to Avoid Losing In Cryptocurrency Trading - 8 Steps!
How to Avoid Losing In Cryptocurrency Trading – 8 Steps!
November 23, 2022
cryptocurrency
Decoding the Future of Cryptocurrency: What You Need to Know
November 23, 2022

Automated trading with HaasBot Crypto Trading Bots


CryptoCurrencyUSDChange 1hChange 24hChange 7d
? --- 0.00 % 0.00 %
Ethereum1,167.4 0.13 % 0.59 % 5.14 %
Tether1.000 0.08 % 0.52 % 0.08 %
BNB283.64 0.09 % 0.32 % 2.79 %
USD Coin1.000 0.44 % 0.25 % 0.18 %
Binance USD1.000 0.15 % 0.14 % 0.18 %
XRP0.4687 0.46 % 4.02 % 4.38 %
Dogecoin0.09511 0.56 % 0.04 % 26.61 %
Cardano0.3058 0.09 % 0.28 % 0.10 %
Polygon0.8206 0.12 % 0.66 % 2.97 %

bitcoin
Bitcoin (BTC) $ 16,191.26
ethereum
Ethereum (ETH) $ 1,168.17
tether
Tether (USDT) $ 1.00
bnb
BNB (BNB) $ 291.37
usd-coin
USD Coin (USDC) $ 1.00
binance-usd
Binance USD (BUSD) $ 1.00
xrp
XRP (XRP) $ 0.388858
dogecoin
Dogecoin (DOGE) $ 0.094422
cardano
Cardano (ADA) $ 0.305745
matic-network
Polygon (MATIC) $ 0.820489