1. Event overview
secondary title In short, the specific method of this attack is that the attacker borrowed a huge amount of money using flash loans, and then carried out circular arbitrage. According to the response and analysis of the Chengdu Beosin security team, the contract involved in this attack is yValut+Curve Pool. 2. Event analysis 1. The attacker deposits DAI in the yVault contract, and calls earn to trigger yValut to add liquidity to the liquidity pool using DAI, as shown in the figure below: image description 2. The attacker uses the borrowed funds to add liquidity to the liquidity pool using USDT to obtain Curve tokens, as shown in the figure below: △Figure 2 image description 3. The attacker takes out the DAI stored in the yValut contract, as shown in the figure below: △Figure 3 image description 4. The attacker specifies the same amount of USDT as when adding liquidity, and removes the liquidity. Note that because a part of DAI is taken away at #3, the price of USDT will drop relative to #2, so the remaining part of Curve will be replaced here. currency. △Figure 4 image description △Figure 4 The above cycle continues, which allows the attacker to consume DAI to obtain Curve tokens. Here, lets look at the attackers first step in the attack, as shown in the following figure: △Figure 5 image description In addition to this part of the loss, the attacker also obtained more Curve tokens, thus making a profit. secondary title 3. Security Recommendations2. Event analysis
3. Security Recommendations