Omniscia Kinza Finance Audit
ProtectedERC20 Manual Review Findings
ProtectedERC20 Manual Review Findings
PER-01M: Potentially Incompatible Code
Type | Severity | Location |
---|---|---|
Language Specific | ProtectedERC20.sol:L12-L13 |
Description:
The ProtectedERC20
token wrapper will attempt to use the IERC20Metadata::name
and IERC20Metadata::symbol
functions of the underlying
token even though it may not support them.
Example:
src/periphery/pToken/ProtectedERC20.sol
10constructor(address underlying, string memory underlyingName, string memory underlyingSymbol) 11ERC20(12 string(abi.encodePacked("Kinza Protected ", IERC20Metadata(underlying).name())),13 string(abi.encodePacked("p", IERC20Metadata(underlying).symbol()))14 )15ERC20Wrapper(IERC20(underlying)) {16}
Recommendation:
Given that the metadata EIP-20 standard is optional, the code should be compatible with tokens that do not comply with it by f.e. using the token's address.
Alleviation:
The Kinza Finance team states that they do not wish to support tokens that do not comply with the EIP-20 metadata standard. As such, we consider this exhibit acknowledged.