From 10a6db8d23ecb0a6d10f86413b19efeb0060f10c Mon Sep 17 00:00:00 2001 From: Haythem Sellami <17862704+haythemsellami@users.noreply.github.com> Date: Thu, 30 May 2024 13:42:59 +0100 Subject: [PATCH] feat: socialize negative yield --- src/FourSixTwoSixAgg.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FourSixTwoSixAgg.sol b/src/FourSixTwoSixAgg.sol index 5f79f742..607dbbc1 100644 --- a/src/FourSixTwoSixAgg.sol +++ b/src/FourSixTwoSixAgg.sol @@ -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; } }