Skip to content

Improper Gain Evaluation #6

@hawkofsky

Description

@hawkofsky

XVA-06M: Improper Gain Evaluation

Type Severity Location
Logical Fault Medium xVault.sol:L608

Description:

The gain of the strategy does not factor the loss nor the performance fees applied to the gains.

Example:

if (loss > 0) {
  _reportLoss(msg.sender, loss);
}

_assessFees(msg.sender, gain);

strategies[msg.sender].totalGain = strategies[msg.sender].totalGain.add(gain);

Recommendation:

We advise this to be done so to avoid miscalculated APYs and general metrics in the codebase.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions