ethernaut
ethernaut copied to clipboard
DoubleEntryPoint Level can be solved with a bot that always raises alerts
The detection bot:
contract DetectionBot is IDetectionBot {
IForta public forta;
constructor (IForta forta_) {
forta = forta_;
}
function handleTransaction(address user, bytes calldata msgData) external {
forta.raiseAlert(user);
return;
}
}
will auto raise alerts and effectively DDOS the delegateTransfer method. It passes as a valid solution to the level though.
I noticed the same problem. So, I make a PR to fix this : https://github.com/OpenZeppelin/ethernaut/pull/745. In this one, I updated DetectionBot solution to a real solution. I also updated validateInstance to prevent DetectionBot which always raises alert.