Harvest.Finance被黑事件简析
10月26号,据慢雾区消息 Harvest Finance 项目遭受闪电贷攻击,损失超过 400 万美元。以下为慢雾安全团队对此事件的简要分析。 \n1. 攻击者通过 Tornado.cash 转入 20ETH 作为后续攻击手续费; \n2. 攻击者通过 UniswapV2 闪电贷借出巨额 USDC 与 USDT; \n3. 攻击者先通过 Curve 的 exchange_underlying 函数将 USDT 换成 USDC,此时 Curve yUSDC 池中的 investedUnderlyingBalance 将相对应的变小; \n4. 随后攻击者通过 Harvest 的 deposit 将巨额 USDC 充值进 Vault 中,充值的同时 Harvest 的 Vault 将铸出 fUSDC,而铸出的数量计算方式如下: \n amount.mul(totalSupply()).div(underlyingBalanceWithInvestment()); \n 计算方式中的 underlyingBalanceWithInvestment 一部分取的是 Curve 中的


