
So what if you can buy large amount of coin and sell in 1 second? Profitable enough? Here are some posts about the attacks against BSC.
15 Mar 2021 — Finance and PancakeSwap reportedly came under attack by hackers.
19 Mar 2021 — On March 15th, PancakeSwap was targeted by an attacker who managed to successfully gain access to our GoDaddy account and hijack our DNS...
In May 2021, we witnessed multiple hacks targeting BSC DeFi products. In particular, a loophole related to reward minting in the yield aggregator, PancakeBunny, was exploited to mint ~7M BUNNY tokens from nothing, leading to a $45M financial loss. After the hack, three forked projects — AutoShark, Merlin Labs, and PancakeHunny — were exploited using similar techniques. Below we dig into loophole and give a step-by-step account of the exploit by reproducing the attack against PancakeBunny.
You can read the full article here:
What is Flash Loan
Flash loans are a new type of uncollateralized loans enforced by smart contracts pioneered by Aave, one of the top lending protocols in DeFi.
There are traditionally two types of loans: secured loans, which require collateral, and unsecured loans, which don’t. A good example of an unsecured loan is when you borrow $2,000 from a bank. Some banks are willing to lend you that amount provided that you have a good track record of paying loans.
However, if the sum you intend to borrow is too large, it would be too risky for them to offer an unsecured loan, even if you have a good credit score. For instance, if you want to borrow $30,000, banks would normally require you to provide collateral, such as your house, vehicle, etc., to mitigate their risk.
Flash loans are essentially unsecured loans on steroids for the DeFi degen generation, requiring no collateral, credit checks, nor a limit to how much you can borrow, provided that you can pay back the loan in the same transaction. According to Aave, flash loans are the "first uncollateralized loan option in DeFi" designed for developers and allow users to borrow instantly and easily.
Arbitrage is the most popular use case of flash loans as it allows traders to earn from the price differences across various exchanges. For instance, if LINK is $30 on Exchange A and $35 on Exchange B, a user can borrow via a flash loan and conduct a separate order to buy 100 LINK for $3,000 at Exchange A, then sell them all for $3,500 at Exchange B and pay back the $3,000 loan. In this scenario, the user will be able to pocket $500 minus fees.
You can read the full article here:
https://coinmarketcap.com/alexandria/article/what-are-flash-loan-attacks?
Flash Loan Attack in PancakeSwap
Now that you are willing to do the flash loan attack, I'll show you how to do it with the easiest and simplest tutorial below.
We can get flash loan from Multiplier Finance ILendingPool and swap with BUSD and immediately swap with BNB(what we lend from Finance) in one transaction.
Note: Flashloan must be finished in one call of method. ie. in one transaction
Flash Loan Attack can be done with a methode by these two type of blockchain, ETH and BNB. The difference between them is that ETH using Uniswap and BNB using Pancakeswap. Each blockchain has different gas fees, But Eth has high gas fee. So choose wisely.
Now Are you ready to jump? Code Now!