Omniscia Platypus Finance Audit

Core Code Style Findings

Core Code Style Findings

COR-01C: Mislabeled Yellowpaper Sections

TypeSeverityLocation
Code StyleInformationalCore.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 0
128 * @dev When covBefore < 1, we apply a fee to prevent withdrawal arbitrage
129 * @param k K slippage parameter in WAD
130 * @param n N slippage parameter
131 * @param c1 C1 slippage parameter in WAD
132 * @param xThreshold xThreshold slippage parameter in WAD
133 * @param cash cash position of asset in WAD
134 * @param liability liability position of asset in WAD
135 * @param amount amount to be withdrawn in WAD
136 * @return The final fee to be applied
137 */
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.