Assessment reports>InfiniCard Vault>Low findings>Mismatched function parameter types affecting inheritance
Category: Coding Mistakes

Mismatched function parameter types affecting inheritance

Low Severity
Low Impact
N/A Likelihood

Description

The interface IStrategyVault defines the functions deposit and redeem with parameters of types uint256 and bytes:

function deposit(uint256 _amount, bytes calldata depositInfo) external;
function redeem(uint256 _amount, bytes calldata redeemInfo) external returns (uint256);

However, the contract BaseStrategyVault implements these functions with only uint256 parameters:

function deposit(uint256 _amount) virtual external {}
function redeem(uint256 _amount) virtual external returns (uint256 actualRedeemedAmount) {}

Impact

This discrepancy causes the BaseStrategyVault contract and its child contracts to have two versions of each deposit and redeem function with different parameter types. Only one version of each function will function correctly, potentially leading to confusion and introducing bugs.

Recommendations

Consider updating the parameter types of functions deposit and redeem in the contract BaseStrategyVault to (uint256, bytes).

Remediation

This issue has been acknowledged by Infini Labs, and a fix was implemented in commit e4d3944d.

Zellic © 2025Back to top ↑