Submitted by jonah1005
Theres a permissionless function distributeMochi in FeePoolV0.sol L55-L62. Since everyone can trigger this function, an attacker can launch a sandwich attack with flashloan to steal the funds.
The devs have mentioned this concern in the comment. An attacker can steal the funds with a flash loan attack.
Attackers can steal all the funds in the pool. I consider this is a high-risk issue.
FeePoolV0.sol#L55-L62
Please refer to yDai Incident to check the severity of a harvest function without slippage control.
Please refer to Mushrooms-finance-theft to check how likely this kind of attack might happen.
If the dev wants to make this a permissionless control, the contract should calculate a min return based on TWAP and check the slippage.
ryuheimat (Mochi) disputed:
ghoul-sol (judge) commented:
