Closed sherlock-admin4 closed 13 hours ago
Passive Indigo Dolphin
Low/Info
A lot of Errorcodes are available but not used in the codebase
All error codes are available in woofi/src/error.rs and rebate_manager/src/error.rs
woofi/src/error.rs
rebate_manager/src/error.rs
This could easily lead to some error handling that was forgotten by the developer in the codebase.
Delete or comment out the following error codes
rebate_manager/src/error.rs RebateVaultNotMatch PendingRebateNotMatch
RebateVaultNotMatch
PendingRebateNotMatch
woofi/src/error.rs NumberDownCastError CapBalanceSmallerThanTargetBalance IntegerOverflow ConversionFailure MulDivInvalidInput MultiplicationOverflow NoPoolMintOutput BurnTooMuch
NumberDownCastError
CapBalanceSmallerThanTargetBalance
IntegerOverflow
ConversionFailure
MulDivInvalidInput
MultiplicationOverflow
NoPoolMintOutput
BurnTooMuch
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
andrebate_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