Implementation of IERC677Receiver doesn't follow the standard #41
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
low quality report
This report is of especially low quality
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/code-423n4/2023-04-frankencoin/blob/main/contracts/IERC677Receiver.sol#L4-#L8
https://github.com/code-423n4/2023-04-frankencoin/blob/main/contracts/StablecoinBridge.sol#L75-#L84
Vulnerability details
Impact
The receiver in IERC677 implementation should be properly checked to ensure if the address to be passed is a contract or not. The current implementation of functions doesn't cover that.
Moreover, there is no support to or implementation of ERC677 standard by Ethereum. The proposal is still in the draft stage.
Proof of Concept
Include a check to see if the address is a contract.
& revert accordingly.
Tools Used
Manual Review
Recommended Mitigation Steps
Comply with the standard, and include a check to see if the address is a contract address.
Reference Implementation
The text was updated successfully, but these errors were encountered: