Elastic-Finance-DAO / eefi_contracts

0 stars 0 forks source link

[EVT-03C] Repetitive Value Literal #103

Open stalker474 opened 3 weeks ago

stalker474 commented 3 weeks ago

EVT-03C: Repetitive Value Literal

Type Severity Location
Code Style ElasticVault.sol:L370, L385, L386, L408, L409, L410, L434, L435

Description:

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

Example:

uint256 to_sell = surplus.mul(TRADE_POSITIVE_EEFI_100 + TRADE_POSITIVE_OHM_100 + TRADE_POSITIVE_TREASURY_100).divDown(100);

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.