ArchonArchon
Public verified reportRun your own audit

Archon public report

Agora_Escrow_Manager

Mantle Mainnet · scan depth quick · generated 6/21/2026, 3:57:49 PM

Risk Score

24

Archon completed a read-only Mantle Mainnet audit of Agora_Escrow_Manager and found 3 deterministic findings. The highest-priority issue is Timestamp-sensitive settlement lacks explicit tolerance window, with risk score 24/100 based on severity-weighted findings. The deadline check uses exact `block.timestamp` comparison, which can cause transactions to revert even if they are submitted very close to the deadline due to slight block timing variations. Without a tolerance window (e.g., a few seconds), legitimate user actions near the expiry may reliably fail. Review the recommended fixes and run regression tests before deployment. External imports could not be resolved (openzeppelin/4/contracts/access/Ownable2Step.sol, openzeppelin/4/contracts/token/ERC20/IERC20.sol, openzeppelin/4/contracts/token/ERC20/utils/SafeERC20.sol, openzeppelin/4/contracts/utils/Pausable.sol, openzeppelin/4/contracts/utils/ReentrancyGuard.sol, @openzeppelin/contracts/access/Ownable2Step.sol, @openzeppelin/contracts/token/ERC20/IERC20.sol, @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol, @openzeppelin/contracts/utils/Pausable.sol, @openzeppelin/contracts/utils/ReentrancyGuard.sol); static analysis ran in reduced mode, so Slither/import-dependent checks were skipped while Archon's deterministic rules still ran.

Models used: Tencent Cloud TokenHub (deepseek-v4-pro) — AI reasoning served on Tencent Cloud TokenHub.

Findings

low: 0high: 0info: 2medium: 1critical: 0
SeverityFindingLocationConfidence
medium

Timestamp-sensitive settlement lacks explicit tolerance window

The deadline check uses exact `block.timestamp` comparison, which can cause transactions to revert even if they are submitted very close to the deadline due to slight block timing variations. Without a tolerance window (e.g., a few seconds), legitimate user actions near the expiry may reliably fail.

EscrowManager.sol:6270%
info

Mark never-changing value constant or immutable

The expression `agentRegistry.ownerOf(escrow.agentId)` is computed inside a function but the result is invariant for a given `agentId` as long as the registry is immutable. Marking the registry reference as `immutable` reduces repeated storage lookups for the registry address, though the call itself is still external. If the registry address never changes, making it immutable saves gas.

EscrowManager.sol:14085%
info

Cache repeated storage read

The function reads `escrowId` from storage once, but the subsequent `_escrows[escrowId]` assignment performs an SLOAD + SSTORE for the mapping. Although the code snippet shows only one explicit `_nextEscrowId++` sload, the typical issue is that `escrowId` is used multiple times in the same function, causing repeated sloads. However, the given snippet only uses it once. If downstream logic in the same function accesses `_escrows[escrowId]` or `escrowId` again, those accesses would re-read from storage. Caching the value in memory would save gas.

EscrowManager.sol:6980%