sherlock-audit / 2024-08-woofi-solana-deployment-judging

0 stars 0 forks source link

Passive Indigo Dolphin - Some ErrorCodes are not used throughout the codebase #95

Closed sherlock-admin4 closed 13 hours ago

sherlock-admin4 commented 13 hours ago

Passive Indigo Dolphin

Low/Info

Some ErrorCodes are not used throughout the codebase

Summary

A lot of Errorcodes are available but not used in the codebase

Root Cause

All error codes are available in woofi/src/error.rs and rebate_manager/src/error.rs

Impact

This could easily lead to some error handling that was forgotten by the developer in the codebase.

Mitigation

Delete or comment out the following error codes

rebate_manager/src/error.rs RebateVaultNotMatch PendingRebateNotMatch

woofi/src/error.rs NumberDownCastError CapBalanceSmallerThanTargetBalance IntegerOverflow ConversionFailure MulDivInvalidInput MultiplicationOverflow NoPoolMintOutput BurnTooMuch