Skip to content

Commit

Permalink
feat: socialize negative yield
Browse files Browse the repository at this point in the history
  • Loading branch information
haythemsellami committed May 30, 2024
1 parent ced8cc3 commit 10a6db8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/FourSixTwoSixAgg.sol
Original file line number Diff line number Diff line change
Expand Up @@ -620,8 +620,8 @@ contract FourSixTwoSixAgg is BalanceForwarder, EVCUtil, ERC4626, AccessControlEn

_accruePerformanceFee(yield);
} else {
// TODO handle losses
revert NegativeYield();
uint256 socializedLoss = strategyData.allocated - underlyingBalance;
totalAssetsDeposited -= socializedLoss;
}
}

Expand Down

0 comments on commit 10a6db8

Please sign in to comment.