salvorio / salvor-contracts

0 stars 0 forks source link

[SLG-01C] Dead Code #2

Open HKskn opened 4 months ago

HKskn commented 4 months ago

SLG-01C: Dead Code

Type Severity Location
Code Style SalvorLending.sol:L468-L474

Description:

The referenced function serve no functional purpose and is not utilized anywhere in the code rendering it redundant.

Example:

/**
* @notice Calculates a portion of a bid based on a percentage. This internal pure function is used for fee calculations.
* @param _totalBid The total bid amount.
* @param _percentage The percentage to calculate the portion of the bid.
* @return The calculated portion of the bid.
*/
function _getPortionOfBid(uint256 _totalBid, uint96 _percentage) internal pure returns (uint256) { return (_totalBid * (_percentage)) / 10000; }

Recommendation:

We advise it to be safely omitted, optimizing the code's bytecode size and thus deployment cost.

HKskn commented 4 months ago

Done