archon.audit.report
100.0
1,000,000 free RPC requestsJust a wallet, via x402.
Start buildingFor agent 97 on Mantle Mainnet · 2026-06-16
https://archonaudit.xyz/app/proofs
{
"chain": {
"name": "Mantle Mainnet",
"chainId": 5000
},
"report": {
"id": "718b58e0-31c8-4cbc-925a-54ea67028922",
"scope": {
"pragma": "^0.8.24",
"network": "mantle-mainnet",
"lineCount": 109,
"protocols": [
"mETH",
"cmETH",
"USDY",
"Aave V3",
"Merchant Moe",
"Agni"
],
"sourceKind": "paste",
"aiReasoning": {
"hits": 0,
"total": 3,
"misses": 3,
"batches": 2,
"reasons": {},
"skipped": 0,
"provider": "tokenhub",
"timeoutMs": 75000,
"fallbackCount": 0,
"providersUsed": [
"Tencent Cloud TokenHub (deepseek-v4-pro)"
]
},
"reducedMode": null,
"solcVersion": "0.8.24",
"gasOptimizer": {
"pricing": {
"mode": "calibrated-receipts",
"pricedAt": "2026-06-16T16:01:47.504Z",
"l2GasPriceWei": "50000100000",
"deployDataFeeMnt": "0.006624925115937076",
"deployDataFeeWei": "6624925115937076",
"calldataZeroBytes": 25,
"calibrationErrorPct": 0,
"calldataGasEstimate": 29684,
"calldataNonZeroBytes": 1849,
"creationBytecodeBytes": 1874
},
"daPricing": {
"model": {
"mode": "calibrated-receipts",
"samples": [
{
"txHash": "0x82d99588e5f1bff33d618743025d598445493032637de25844a67aa8e88088ef",
"l1FeeWei": "699231354481640",
"l1GasUsed": "2530",
"zeroBytes": 135,
"l1GasPrice": "538782662",
"totalBytes": 228,
"blobGasUsed": "63200",
"blockNumber": "96205628",
"nonZeroBytes": 93,
"l1BlobBaseFee": "330004069609410902",
"l1BaseFeeScalar": "169019",
"operatorFeeScalar": "100000000",
"calldataGasEstimate": 2028,
"l1BlobBaseFeeScalar": "0",
"operatorFeeConstant": "0",
"daFootprintGasScalar": "400"
},
{
"txHash": "0xb9ce87de86b212b91eb64012bbdab91014373da1f6d960470b340e1991a1a7c5",
"l1FeeWei": "6874261528561290",
"l1GasUsed": "22258",
"zeroBytes": 28,
"l1GasPrice": "603039864",
"totalBytes": 1945,
"blobGasUsed": "556400",
"blockNumber": "96205472",
"nonZeroBytes": 1917,
"l1BlobBaseFee": "321479049246759320",
"l1BaseFeeScalar": "169019",
"operatorFeeScalar": "100000000",
"calldataGasEstimate": 30784,
"l1BlobBaseFeeScalar": "0",
"operatorFeeConstant": "0",
"daFootprintGasScalar": "400"
}
],
"validation": [
{
"txHash": "0x82d99588e5f1bff33d618743025d598445493032637de25844a67aa8e88088ef",
"errorPct": 0,
"actualL1FeeWei": "699231354481640",
"predictedL1FeeWei": "699231354481572"
},
{
"txHash": "0xb9ce87de86b212b91eb64012bbdab91014373da1f6d960470b340e1991a1a7c5",
"errorPct": 0,
"actualL1FeeWei": "6874261528561290",
"predictedL1FeeWei": "6874261528560500"
}
],
"sampleCount": 2,
"zeroByteFeeWei": "2736708878864",
"nonZeroByteFeeWei": "3545974793924",
"maxValidationErrorPct": 0,
"meanValidationErrorPct": 0
},
"source": "receipt-calibrated",
"groundTruthField": "l1Fee"
},
"sourceHash": "0xf229c5f2c2b9ef6dc1552caf87a0668bad38c94f5a87eb41460c4a20a34bd76c",
"measurement": {
"forge": {
"ok": false,
"error": "No safety=safe gas patches available for automatic measurement.",
"command": null,
"attempted": false,
"gasReport": null
},
"source": "deterministic-estimate",
"status": "skipped",
"patches": [
{
"note": "Review-only patch is not auto-applied for measurement.",
"after": "uint256 cached = hashExists[milestoneHash]; // reuse cached value",
"before": "hashExists[milestoneHash] read 3 times",
"ruleId": "cache-repeated-sload",
"safety": "review",
"status": "skipped",
"l2GasDelta": 200,
"l1DaDeltaWei": null
},
{
"note": "Review-only patch is not auto-applied for measurement.",
"after": "uint256 cached = milestones[milestoneId]; // reuse cached value",
"before": "milestones[milestoneId] read 2 times",
"ruleId": "cache-repeated-sload",
"safety": "review",
"status": "skipped",
"l2GasDelta": 100,
"l1DaDeltaWei": null
},
{
"note": "Review-only patch is not auto-applied for measurement.",
"after": "mapping(uint256 => uint256) bitmap; // pack 256 flags per slot",
"before": "mapping(bytes32 => bool) public hashExists;",
"ruleId": "bitmap-bools",
"safety": "review",
"status": "skipped",
"l2GasDelta": 20000,
"l1DaDeltaWei": null
}
],
"version": "archon.gasMeasurement.v1",
"measuredAt": "2026-06-16T16:01:47.798Z",
"rulesetHash": "2d06f97f17d244f7843669741b41824fccd21f988f914513a5a7025ddb5a429b",
"contractHash": "f229c5f2c2b9ef6dc1552caf87a0668bad38c94f5a87eb41460c4a20a34bd76c"
},
"opportunities": [
{
"id": "cache-repeated-sload",
"file": "MantleMilestoneRegistry.sol",
"after": "uint256 cached = hashExists[milestoneHash]; // reuse cached value",
"patch": {
"newText": "hashExists[milestoneHash]",
"oldText": "hashExists[milestoneHash]"
},
"title": "Cache repeated storage read",
"where": "MantleMilestoneRegistry.sol:57",
"before": "hashExists[milestoneHash] read 3 times",
"safety": "review",
"newText": "hashExists[milestoneHash]",
"oldText": "hashExists[milestoneHash]",
"category": "storage",
"severity": "info",
"lineStart": 57,
"rationale": "Repeated SLOADs should be cached in stack/memory when state cannot change between reads.",
"confidence": 0.7,
"estL1Delta": null,
"estL2Delta": 200,
"annualizedBasis": "Static deterministic estimate. Exact runtime deltas require queued Foundry snapshots with representative inputs.",
"estimatedGasSaved": 200,
"estimatedDataBytesSaved": null
},
{
"id": "cache-repeated-sload",
"file": "MantleMilestoneRegistry.sol",
"after": "uint256 cached = milestones[milestoneId]; // reuse cached value",
"patch": {
"newText": "milestones[milestoneId]",
"oldText": "milestones[milestoneId]"
},
"title": "Cache repeated storage read",
"where": "MantleMilestoneRegistry.sol:64",
"before": "milestones[milestoneId] read 2 times",
"safety": "review",
"newText": "milestones[milestoneId]",
"oldText": "milestones[milestoneId]",
"category": "storage",
"severity": "info",
"lineStart": 64,
"rationale": "Repeated SLOADs should be cached in stack/memory when state cannot change between reads.",
"confidence": 0.7,
"estL1Delta": null,
"estL2Delta": 100,
"annualizedBasis": "Static deterministic estimate. Exact runtime deltas require queued Foundry snapshots with representative inputs.",
"estimatedGasSaved": 100,
"estimatedDataBytesSaved": null
},
{
"id": "bitmap-bools",
"file": "MantleMilestoneRegistry.sol",
"after": "mapping(uint256 => uint256) bitmap; // pack 256 flags per slot",
"patch": {
"newText": " mapping(bytes32 => bool) public hashExists; // REVIEW: high-volume bool flags can be bitmap-packed",
"oldText": " mapping(bytes32 => bool) public hashExists;"
},
"title": "Bitmap-pack boolean flags",
"where": "MantleMilestoneRegistry.sol:28",
"before": "mapping(bytes32 => bool) public hashExists;",
"safety": "review",
"newText": " mapping(bytes32 => bool) public hashExists; // REVIEW: high-volume bool flags can be bitmap-packed",
"oldText": " mapping(bytes32 => bool) public hashExists;",
"category": "storage",
"severity": "medium",
"lineStart": 28,
"rationale": "Bitmap packing can reduce many boolean SSTOREs from one slot per flag to one slot per 256 flags.",
"confidence": 0.62,
"estL1Delta": null,
"estL2Delta": 20000,
"annualizedBasis": "Static deterministic estimate. Exact runtime deltas require queued Foundry snapshots with representative inputs.",
"estimatedGasSaved": 20000,
"estimatedDataBytesSaved": null
}
]
}
},
"scanId": "f1f048bd-69b3-41b8-86ad-18cc4c1cba78",
"createdAt": "2026-06-16T16:03:12.443Z",
"riskScore": 24,
"contractName": "MantleMilestoneRegistry",
"severityCounts": {
"low": 0,
"high": 0,
"info": 2,
"medium": 1,
"critical": 0
},
"executiveSummary": "Archon completed a read-only Mantle Mainnet audit of MantleMilestoneRegistry and found 3 deterministic findings. The highest-priority issue is Cache repeated storage read, with risk score 24/100 based on severity-weighted findings. The `hashExists` mapping is read on line 57 to check whether a milestone hash is already registered. The value could be stored in a local variable if it is reused later in the function, but no additional reads are shown. The optimizer flag suggests caching this SLOAD, though the current snippet does not demonstrate a repeated read benefit. If the function were longer and again referenced `hashExists[milestoneHash]`, caching would save gas. Review the recommended fixes and run regression tests before deployment."
},
"schema": "archon.proof.metadata.v1",
"erc8004": {
"verifiedConfig": true,
"agentIdentityRef": "eip155:5000:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432:97",
"identityRegistry": "0x8004A169FB4a3325136EB29fA0ceB6D2e539a432",
"reputationRegistry": "0x8004BAa17C55a88189AE136b182e5fdA19dE9b63",
"validationRegistry": null
},
"product": "Archon",
"findings": [
{
"id": "4dffa472-9ff4-4cdc-ad4d-7f7f9cc1754b",
"title": "Cache repeated storage read",
"category": "mantle-gas-optimizer/storage/cache-repeated-sload",
"location": {
"file": "MantleMilestoneRegistry.sol",
"lineEnd": 57,
"lineStart": 57
},
"severity": "info"
},
{
"id": "df3a3254-d7da-4888-afdd-dea898f87ef4",
"title": "Cache repeated storage read",
"category": "mantle-gas-optimizer/storage/cache-repeated-sload",
"location": {
"file": "MantleMilestoneRegistry.sol",
"lineEnd": 64,
"lineStart": 64
},
"severity": "info"
},
{
"id": "9ac07837-3eae-4022-8202-d9e542934f93",
"title": "Bitmap-pack boolean flags",
"category": "mantle-gas-optimizer/storage/bitmap-bools",
"location": {
"file": "MantleMilestoneRegistry.sol",
"lineEnd": 28,
"lineStart": 28
},
"severity": "medium"
}
]
}
ipfs://QmSU1sbgrr4VPTGAF3apK8HrxR3Umn1cjqx9vFeGFE9iZL