Omniscia Steer Protocol Audit

Orchestrator Code Style Findings

Orchestrator Code Style Findings

ORO-01C: Direct Return of Conditional Evaluation

TypeSeverityLocation
Gas OptimizationOrchestrator.sol:L132-L136

Description:

The linked statements perform an if-else branch evaluation that yields either the literal true or the literal false.

Example:

contracts/Orchestrator.sol
131// If there happen to be no keepers, div by zero error will happen here, preventing actions from being executed.
132if ((yesVotes * 100) / numKeepers >= actionThresholdPercent) {
133 return true;
134} else {
135 return false;
136}

Recommendation:

We advise the conditional to be yielded directly, optimizing the code's gas cost.

Alleviation (200f275c40cbd4798f4a416c044ea726755d4741):

The if clause's conditional is now directly yielded by the function via a return statement optimizing its gas cost.