Omniscia Steer Protocol Audit

DynamicFeeHook Code Style Findings

DynamicFeeHook Code Style Findings

DFH-01C: Generic Typographic Mistake

Description:

The referenced line contains a typographical mistake (i.e. private variable without an underscore prefix, a non-snake_case module) or generic documentational error (i.e. copy-paste) that should be corrected.

Example:

src/DynamicFeeHook.sol
150event datad(int128 amount0, int128 amount1);

Recommendation:

We advise this to be done so to enhance the legibility of the codebase.

Alleviation (5dd8944ae71b382923f6971e9985eb7f427147ec):

The referenced event has been omitted altogether, addressing this exhibit indirectly.

DFH-02C: Ineffective Zero Expression

Description:

The referenced statement will wrap the value of 0 manually to signify a zero-value delta.

Example:

src/DynamicFeeHook.sol
147return (ICLHooks.beforeSwap.selector, BeforeSwapDelta.wrap(0), dynamicFee);

Recommendation:

We advise the BeforeSwapDeltaLibrary::ZERO_DELTA constant to be utilized instead, optimizing the code's style.

Alleviation (5dd8944ae71b382923f6971e9985eb7f427147ec):

The Steer Protocol team evaluated this exhibit but opted to acknowledge it in the current iteration of the codebase.

DFH-03C: Repetitive Value Literal

Description:

The linked value literal is repeated across the codebase multiple times.

Example:

src/DynamicFeeHook.sol
47uint256 private constant FEE_DENOMINATOR = 10000; // 100% = 10000 bps

Recommendation:

We advise it to be set to a constant variable instead, optimizing the legibility of the codebase.

In case the constant has already been declared, we advise it to be properly re-used across the code.

Alleviation (5dd8944ae71b382923f6971e9985eb7f427147ec):

The repetitive value literal has been properly replaced in its second instance by the existing FEE_DENOMINATOR declaration, addressing this exhibit.

DFH-04C: Test Dependency Import

Description:

The linked import statement specifies a test dependency that should not be present in production code.

Example:

src/DynamicFeeHook.sol
5import "forge-std/console.sol";

Recommendation:

We advise the import statement and all related usages of it to be safely omitted from the codebase.

Alleviation (5dd8944ae71b382923f6971e9985eb7f427147ec):

The test dependency import has been omitted from the codebase as advised.