ethernaut icon indicating copy to clipboard operation
ethernaut copied to clipboard

DoubleEntryPoint Level can be solved with a bot that always raises alerts

Open Drblessing opened this issue 2 years ago • 1 comments

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.

Drblessing avatar May 08 '23 01:05 Drblessing

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.

Nfire2103 avatar Jul 21 '24 23:07 Nfire2103