Assessment reports>Solera>Informational findings>Vesting withdrawals emit the wrong event
Category: Coding Mistakes

Vesting withdrawals emit the wrong event

Informational Impact
Informational Severity
N/A Likelihood

Description

The vestingWithdraw function mistakenly emits the VestingDeposit event instead of VestingWithdraw.

function vestingWithdraw(
    address to,
    uint256 amount
) public nonReentrant onlyRole(VESTING_ADMIN_ROLE) returns (uint256) {
    if (amount > getVestingDeposit()) {
      revert VestingWithdrawAmountExceeded(amount, getVestingDeposit());
    }
    SafeERC20.safeTransfer(IERC20(asset()), to, amount);
    _vestingDeposit -= amount;
!    emit VestingDeposit(to, amount);

    return amount;
}

Impact

This will be misleading for users and developers who are monitoring the contract events.

Recommendations

Emit a VestingWithdraw event instead of VestingDeposit.

Remediation

This issue has been acknowledged by Solera Markets, and a fix was implemented in PR #11.

Zellic © 2025Back to top ↑