The contract inherits from ERC4626, which implements the ERC4626 Tokenized Vault Standard. Under normal behavior, all functions should comply with the standard interface, allowing the contract to integrate seamlessly with DeFi protocols, aggregators, and other systems that expect ERC4626-compliant vaults
However, the contract overrides the withdraw() function on line 294 with a custom signature that doesn't match the ERC4626 standard. The standard requires withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares), but this contract implements withdraw() external winnerSet with no parameters. This breaks ERC4626 compliance, preventing the contract from being used with protocols that rely on the standard interface, such as yield aggregators, lending protocols, or other DeFi integrations that expect the standard withdraw() signature.
This non-compliance occurs whenever external protocols or integrations attempt to call the standard ERC4626 withdraw() function, as the function signature mismatch will cause compilation errors or runtime failures
The bug manifests during integration attempts when DeFi protocols, aggregators, or other smart contracts try to interact with this vault using the standard ERC4626 interface
The contract cannot be integrated with DeFi protocols that expect ERC4626-compliant vaults, limiting its usability and preventing composability
External systems that rely on the standard interface will fail when attempting to interact with this vault, potentially causing integration failures and user confusion
Explanation of PoC:
This proof of concept demonstrates the non-compliance by showing that the contract's withdraw() function doesn't match the ERC4626 standard signature. The test verifies the function selector mismatch and shows that the standard interface cannot be called.
Test Results:
✅ Contract's withdraw() has different signature than standard
✅ Cannot be called with standard ERC4626 interface parameters
✅ Breaks interface compliance
Explanation:
The recommended mitigation implements the standard ERC4626 withdraw() function signature while maintaining the custom winner verification logic. This ensures ERC4626 compliance while preserving the winner verification functionality.
Key Changes:
Implement the standard withdraw(uint256 assets, address receiver, address owner) function signature
Add winner verification logic inside the standard function
Maintain backward compatibility by keeping the custom function that calls the standard one
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.