Omniscia Kanpeki Finance Audit
FeeManager Manual Review Findings
FeeManager Manual Review Findings
FMR-01M: Incorrect Fee Discount Assumption
Type | Severity | Location |
---|---|---|
Logical Fault | Minor | FeeManager.sol:L89, L111 |
Description:
The fee discount that is meant to be applied by the FeeManager
contract for discounted borrowers is 25%, however, a static value discount of 25
is performed which is equal to 0.25% and may not always yield a 25% discount as the comments indicate.
Example:
contracts/managers/FeeManager.sol
86function calcBorrowFeeOnDebt (address borrower, address debtToken, uint256 debt, address collateralToken) external view returns (uint256)87{88 // 25 = 0.25% in basis point; 1 - 0.25 = 0.75% -> 25% discount89 uint256 fee = IStakingManager(_ADDRESSES.stakingManager()).isDiscountedBorrower(borrower) ? _fee.borrow - 25 : _fee.borrow;90
91
92 return _calcPercentOf(IOracle(_ADDRESSES.oracle()).convert(debtToken, collateralToken, debt), fee);93}
Recommendation:
We advise the proportionate discount methodology applied on deposits to be also applied on borrows to ensure a uniform discount structure.
Alleviation:
A proper percentage based discount is now applied in the codebase.