From dc67a9c7eb154f8bdf76f34a36f75d3ec1095911 Mon Sep 17 00:00:00 2001 From: MirthFutures Date: Tue, 6 Jan 2026 13:36:27 -0500 Subject: [PATCH] epoch boundry bug fix --- contracts/delegation/Delegation.sol | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contracts/delegation/Delegation.sol b/contracts/delegation/Delegation.sol index 73860a1c..883b385c 100644 --- a/contracts/delegation/Delegation.sol +++ b/contracts/delegation/Delegation.sol @@ -183,6 +183,8 @@ contract Delegation is IDelegation, UUPSUpgradeable, Access, DelegationStorageUt uint256 cap = $.coverageCap[_agent]; uint48 currentEpochStart = uint48(epoch() * $.epochDuration); + if (currentEpochStart == block.timestamp) currentEpochStart -= 1; + // Query coverage at the current epoch boundary uint256 currentEpochCoverage = ISymbioticNetworkMiddleware($.agentData[_agent].network).slashableCollateral(_agent, currentEpochStart);