Omniscia Platypus Finance Audit
Core Code Style Findings
Core Code Style Findings
COR-01C: Mislabeled Yellowpaper Sections
Type | Severity | Location |
---|---|---|
Code Style | Informational | Core.sol:L126, L175 |
Description:
The codebase references incorrect sections of the yellowpaper.
Example:
contracts/pool/Core.sol
125/**126 * @notice Yellow Paper Def. 6.2 (Withdrawal Fee)127 * @dev When covBefore >= 1, fee is 0128 * @dev When covBefore < 1, we apply a fee to prevent withdrawal arbitrage129 * @param k K slippage parameter in WAD130 * @param n N slippage parameter131 * @param c1 C1 slippage parameter in WAD132 * @param xThreshold xThreshold slippage parameter in WAD133 * @param cash cash position of asset in WAD134 * @param liability liability position of asset in WAD135 * @param amount amount to be withdrawn in WAD136 * @return The final fee to be applied137 */138function _withdrawalFee(
Recommendation:
We advise both linked references to be subtracted by 1
in the "chapter" specifier to properly illustrate the formula they are meant to implement.
Alleviation:
The yellow paper references have been corrected in the codebase.