

Archon public report
MantleMessageRegistry
Mantle Mainnet · scan depth full-report · generated 6/16/2026, 5:43:56 PM
Risk Score
39
Archon completed a read-only Mantle Mainnet audit of MantleMessageRegistry and found 6 deterministic findings. The highest-priority issue is Immutable States, with risk score 39/100 based on severity-weighted findings. The 'owner' state variable is immutable and can be set only once during contract deployment. Review the recommended fixes and run regression tests before deployment.
Models used: OpenAI (gpt-4o-mini), Tencent Cloud TokenHub (deepseek-v4-pro) — AI reasoning served on Tencent Cloud TokenHub.
Findings
| Severity | Finding | Location | Confidence |
|---|---|---|---|
| low | Immutable States The 'owner' state variable is immutable and can be set only once during contract deployment. | MantleMessageRegistry.sol:18 | 50% |
| medium | Pack small storage variables into fewer slots The contract has separate storage slots for the 'owner' address and 'nextMessageId' uint256 variable, which can lead to inefficient storage usage. | MantleMessageRegistry.sol:18 | 70% |
| info | Mark never-changing value constant or immutable The `owner` state variable is set once during contract deployment and never modified. Marking it `immutable` eliminates an `SLOAD` on every read, replacing it with a cheaper `PUSH` from bytecode. | MantleMessageRegistry.sol:18 | 95% |
| info | Cache repeated storage read The `hashExists[messageHash]` storage read is performed twice: first implicitly in the conditional check and possibly again later if the function continues. Caching the value in a local variable avoids a redundant `SLOAD`. | MantleMessageRegistry.sol:49 | 90% |
| info | Cache repeated storage read The `nextMessageId` storage variable is read multiple times (increment on line 55 and then used on line 56) but a single cached SLOAD could suffice, saving gas. | MantleMessageRegistry.sol:56 | 90% |
| medium | Bitmap-pack boolean flags The `hashExists` mapping stores individual booleans per `bytes32` key. Bitmap-packing multiple flags into a `mapping(bytes32 => uint256)` reduces SSTORE costs when multiple flags are written in the same storage slot. | MantleMessageRegistry.sol:28 | 80% |

