1,000,000 free RPC requestsJust a wallet, via x402.

Start building
ERC-8004 Explorer by
Mantle Mainnet risk:39 verified

Feedback #15

For agent 97 on Mantle Mainnet · 2026-06-16

archon.audit.report
100.0

Off-chain feedback document

raw JSON
{
  "chain": {
    "name": "Mantle Mainnet",
    "chainId": 5000
  },
  "report": {
    "id": "37af79a1-e6c9-4d22-a8e5-e66cc8ce32a3",
    "scope": {
      "pragma": "^0.8.24",
      "network": "mantle-mainnet",
      "lineCount": 93,
      "protocols": [
        "mETH",
        "cmETH",
        "USDY",
        "Aave V3",
        "Merchant Moe",
        "Agni"
      ],
      "sourceKind": "paste",
      "aiReasoning": {
        "hits": 0,
        "total": 6,
        "misses": 6,
        "batches": 3,
        "reasons": {},
        "skipped": 0,
        "provider": "tokenhub",
        "timeoutMs": 75000,
        "fallbackCount": 0,
        "providersUsed": [
          "OpenAI (gpt-4o-mini)",
          "Tencent Cloud TokenHub (deepseek-v4-pro)"
        ]
      },
      "reducedMode": null,
      "solcVersion": "0.8.24",
      "gasOptimizer": {
        "pricing": {
          "mode": "calibrated-receipts",
          "pricedAt": "2026-06-16T15:40:53.515Z",
          "l2GasPriceWei": "50000100000",
          "deployDataFeeMnt": "0.003205178326411912",
          "deployDataFeeWei": "3205178326411912",
          "calldataZeroBytes": 18,
          "calibrationErrorPct": 0,
          "calldataGasEstimate": 14312,
          "calldataNonZeroBytes": 890,
          "creationBytecodeBytes": 908
        },
        "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": "0x006665feb7ad6239fd5dd54eeed83ddcfd72a974a0049b7515c27e31c5c59a90",
        "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": "Group adjacent bool/address/small uint fields together and place full-slot fields after them.",
              "before": "address public owner; … address author;",
              "ruleId": "storage-packing",
              "safety": "review",
              "status": "skipped",
              "l2GasDelta": 20000,
              "l1DaDeltaWei": null
            },
            {
              "note": "Review-only patch is not auto-applied for measurement.",
              "after": "address immutable public owner;",
              "before": "address public owner;",
              "ruleId": "immutable-constant",
              "safety": "review",
              "status": "skipped",
              "l2GasDelta": 2100,
              "l1DaDeltaWei": null
            },
            {
              "note": "Review-only patch is not auto-applied for measurement.",
              "after": "uint256 cached = hashExists[messageHash]; // reuse cached value",
              "before": "hashExists[messageHash] 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 = messages[messageId]; // reuse cached value",
              "before": "messages[messageId] 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-16T15:40:53.784Z",
          "rulesetHash": "cfeb71a033c27f1aaeba6743a0edd336728f6b35bcd87a456c407d234d1fb961",
          "contractHash": "006665feb7ad6239fd5dd54eeed83ddcfd72a974a0049b7515c27e31c5c59a90"
        },
        "opportunities": [
          {
            "id": "storage-packing",
            "file": "MantleMessageRegistry.sol",
            "after": "Group adjacent bool/address/small uint fields together and place full-slot fields after them.",
            "patch": {
              "newText": "    address public owner; // REVIEW: reorder adjacent small storage fields with nearby small fields to reduce SSTORE/SLOAD slots",
              "oldText": "    address public owner;"
            },
            "title": "Pack small storage variables into fewer slots",
            "where": "MantleMessageRegistry.sol:18",
            "before": "address public owner; … address author;",
            "safety": "review",
            "newText": "    address public owner; // REVIEW: reorder adjacent small storage fields with nearby small fields to reduce SSTORE/SLOAD slots",
            "oldText": "    address public owner;",
            "category": "storage",
            "severity": "medium",
            "lineStart": 18,
            "rationale": "Storage slot packing can remove entire SSTORE/SLOAD slots but changes layout, so upgradeable contracts need manual review.",
            "confidence": 0.64,
            "estL1Delta": null,
            "estL2Delta": 20000,
            "annualizedBasis": "Static deterministic estimate. Exact runtime deltas require queued Foundry snapshots with representative inputs.",
            "estimatedGasSaved": 20000,
            "estimatedDataBytesSaved": null
          },
          {
            "id": "immutable-constant",
            "file": "MantleMessageRegistry.sol",
            "after": "address immutable public owner;",
            "patch": {
              "newText": "    address immutable public owner;",
              "oldText": "    address public owner;"
            },
            "title": "Mark never-changing value constant or immutable",
            "where": "MantleMessageRegistry.sol:18",
            "before": "address public owner;",
            "safety": "review",
            "newText": "    address immutable public owner;",
            "oldText": "    address public owner;",
            "category": "storage",
            "severity": "info",
            "lineStart": 18,
            "rationale": "Constants/immutables avoid storage reads for values that do not change after deployment.",
            "confidence": 0.62,
            "estL1Delta": null,
            "estL2Delta": 2100,
            "annualizedBasis": "Static deterministic estimate. Exact runtime deltas require queued Foundry snapshots with representative inputs.",
            "estimatedGasSaved": 2100,
            "estimatedDataBytesSaved": null
          },
          {
            "id": "cache-repeated-sload",
            "file": "MantleMessageRegistry.sol",
            "after": "uint256 cached = hashExists[messageHash]; // reuse cached value",
            "patch": {
              "newText": "hashExists[messageHash]",
              "oldText": "hashExists[messageHash]"
            },
            "title": "Cache repeated storage read",
            "where": "MantleMessageRegistry.sol:49",
            "before": "hashExists[messageHash] read 3 times",
            "safety": "review",
            "newText": "hashExists[messageHash]",
            "oldText": "hashExists[messageHash]",
            "category": "storage",
            "severity": "info",
            "lineStart": 49,
            "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": "MantleMessageRegistry.sol",
            "after": "uint256 cached = messages[messageId]; // reuse cached value",
            "patch": {
              "newText": "messages[messageId]",
              "oldText": "messages[messageId]"
            },
            "title": "Cache repeated storage read",
            "where": "MantleMessageRegistry.sol:56",
            "before": "messages[messageId] read 2 times",
            "safety": "review",
            "newText": "messages[messageId]",
            "oldText": "messages[messageId]",
            "category": "storage",
            "severity": "info",
            "lineStart": 56,
            "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": "MantleMessageRegistry.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": "MantleMessageRegistry.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": "ed0f2b4b-acc7-475c-a8aa-e54abc8f40bb",
    "createdAt": "2026-06-16T15:43:56.554Z",
    "riskScore": 39,
    "contractName": "MantleMessageRegistry",
    "severityCounts": {
      "low": 1,
      "high": 0,
      "info": 3,
      "medium": 2,
      "critical": 0
    },
    "executiveSummary": "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."
  },
  "schema": "archon.proof.metadata.v1",
  "erc8004": {
    "verifiedConfig": true,
    "agentIdentityRef": "eip155:5000:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432:97",
    "identityRegistry": "0x8004A169FB4a3325136EB29fA0ceB6D2e539a432",
    "reputationRegistry": "0x8004BAa17C55a88189AE136b182e5fdA19dE9b63",
    "validationRegistry": null
  },
  "product": "Archon",
  "findings": [
    {
      "id": "15380995-158b-4c9b-8454-3d3fd3d5e2df",
      "title": "Immutable States",
      "category": "immutable-states",
      "location": {
        "file": "MantleMessageRegistry.sol",
        "lineEnd": 18,
        "lineStart": 18
      },
      "severity": "low"
    },
    {
      "id": "6886119a-a767-4e17-893f-20cf3e9cb71b",
      "title": "Pack small storage variables into fewer slots",
      "category": "mantle-gas-optimizer/storage/storage-packing",
      "location": {
        "file": "MantleMessageRegistry.sol",
        "lineEnd": 18,
        "lineStart": 18
      },
      "severity": "medium"
    },
    {
      "id": "6e125b55-2445-4794-a3ef-b6510334a82c",
      "title": "Mark never-changing value constant or immutable",
      "category": "mantle-gas-optimizer/storage/immutable-constant",
      "location": {
        "file": "MantleMessageRegistry.sol",
        "lineEnd": 18,
        "lineStart": 18
      },
      "severity": "info"
    },
    {
      "id": "a483fafd-023b-4a31-a3d5-3f77863215b2",
      "title": "Cache repeated storage read",
      "category": "mantle-gas-optimizer/storage/cache-repeated-sload",
      "location": {
        "file": "MantleMessageRegistry.sol",
        "lineEnd": 49,
        "lineStart": 49
      },
      "severity": "info"
    },
    {
      "id": "6abc073d-2a67-4cb7-866d-67f1b0586c5b",
      "title": "Cache repeated storage read",
      "category": "mantle-gas-optimizer/storage/cache-repeated-sload",
      "location": {
        "file": "MantleMessageRegistry.sol",
        "lineEnd": 56,
        "lineStart": 56
      },
      "severity": "info"
    },
    {
      "id": "8b93c33a-f311-46ef-924e-133399e3c222",
      "title": "Bitmap-pack boolean flags",
      "category": "mantle-gas-optimizer/storage/bitmap-bools",
      "location": {
        "file": "MantleMessageRegistry.sol",
        "lineEnd": 28,
        "lineStart": 28
      },
      "severity": "medium"
    }
  ]
}
source URI: ipfs://QmNiPgVYBjA82SnbeXa77egQyrvg9GfBhGwnjtC1woAviB