archon.audit.report
100.0
1,000,000 free RPC requestsJust a wallet, via x402.
Start buildingFor agent 97 on Mantle Mainnet · 2026-07-03
https://archonaudit.xyz/app/proofs
{
"chain": {
"name": "Mantle Mainnet",
"chainId": 5000
},
"report": {
"id": "7627b256-5339-48ed-9512-3cad76e30ffe",
"scope": {
"pragma": "^0.8.24",
"network": "mantle-mainnet",
"lineCount": 101,
"protocols": [
"mETH",
"cmETH",
"USDY",
"Aave V3",
"Merchant Moe",
"Agni"
],
"sourceKind": "paste",
"aiReasoning": {
"hits": 0,
"total": 8,
"misses": 8,
"batches": 4,
"reasons": {},
"skipped": 0,
"enriched": 7,
"provider": "tokenhub",
"timeoutMs": 75000,
"fallbackCount": 1,
"providersUsed": [
"Tencent Cloud TokenHub (deepseek-v4-pro)",
"OpenAI (gpt-4o-mini)"
]
},
"reducedMode": null,
"solcVersion": "0.8.24",
"gasOptimizer": {
"pricing": {
"mode": "calibrated-receipts",
"pricedAt": "2026-07-03T08:40:58.444Z",
"l2GasPriceWei": "50000100000",
"deployDataFeeMnt": "0.008451028158646236",
"deployDataFeeWei": "8451028158646236",
"calldataZeroBytes": 47,
"calibrationErrorPct": 0,
"calldataGasEstimate": 37740,
"calldataNonZeroBytes": 2347,
"creationBytecodeBytes": 2394
},
"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": "0x76bbc7204717529c3567f1a079f27c3efb47a51db02597071ced9c60f5c0636a",
"measurement": {
"forge": {
"ok": false,
"error": "Error (7576): Undeclared identifier.",
"command": "forge test --gas-report",
"attempted": true,
"gasReport": null
},
"source": "deterministic-estimate",
"status": "degraded",
"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 arbiter; … bool public buyerApproved;",
"ruleId": "storage-packing",
"safety": "review",
"status": "skipped",
"l2GasDelta": 20000,
"l1DaDeltaWei": null
},
{
"note": "Foundry measurement unavailable; deterministic rule estimate retained and clearly labeled.",
"after": "error SellerCannotBeBuyer(); … if (!(condition)) revert SellerCannotBeBuyer();",
"before": "require(_seller != msg.sender, \"Seller cannot be buyer\");",
"ruleId": "custom-errors",
"safety": "safe",
"status": "estimated",
"l2GasDelta": 120,
"l1DaDeltaWei": null
},
{
"note": "Foundry measurement unavailable; deterministic rule estimate retained and clearly labeled.",
"after": "require(msg.value != 0, \"Zero deposit\");",
"before": "require(msg.value > 0, \"Zero deposit\");",
"ruleId": "nonzero-comparison",
"safety": "safe",
"status": "estimated",
"l2GasDelta": 3,
"l1DaDeltaWei": null
}
],
"version": "archon.gasMeasurement.v1",
"measuredAt": "2026-07-03T08:40:58.696Z",
"rulesetHash": "02f42e47cd6d78752595a561b2f7af326ac8dcd813f64214f1a129a3d6858f75",
"contractHash": "76bbc7204717529c3567f1a079f27c3efb47a51db02597071ced9c60f5c0636a"
},
"opportunities": [
{
"id": "storage-packing",
"file": "ApogeeEscrow.sol",
"after": "Group adjacent bool/address/small uint fields together and place full-slot fields after them.",
"patch": {
"newText": " address public arbiter; // REVIEW: reorder adjacent small storage fields with nearby small fields to reduce SSTORE/SLOAD slots",
"oldText": " address public arbiter;"
},
"title": "Pack small storage variables into fewer slots",
"where": "ApogeeEscrow.sol:14",
"before": "address public arbiter; … bool public buyerApproved;",
"safety": "review",
"newText": " address public arbiter; // REVIEW: reorder adjacent small storage fields with nearby small fields to reduce SSTORE/SLOAD slots",
"oldText": " address public arbiter;",
"category": "storage",
"severity": "medium",
"lineStart": 14,
"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": "custom-errors",
"file": "ApogeeEscrow.sol",
"after": "error SellerCannotBeBuyer(); … if (!(condition)) revert SellerCannotBeBuyer();",
"patch": {
"newText": " if (!(_seller != msg.sender)) revert SellerCannotBeBuyer();",
"oldText": " require(_seller != msg.sender, \"Seller cannot be buyer\");"
},
"title": "Replace long revert string with custom error",
"where": "ApogeeEscrow.sol:49",
"before": "require(_seller != msg.sender, \"Seller cannot be buyer\");",
"safety": "safe",
"newText": " if (!(_seller != msg.sender)) revert SellerCannotBeBuyer();",
"oldText": " require(_seller != msg.sender, \"Seller cannot be buyer\");",
"category": "deployment",
"severity": "info",
"lineStart": 49,
"rationale": "Custom errors reduce deployment bytecode and revert-path gas while preserving typed failure semantics.",
"confidence": 0.9,
"estL1Delta": 22,
"estL2Delta": 120,
"annualizedBasis": "Static deterministic estimate. Exact runtime deltas require queued Foundry snapshots with representative inputs.",
"estimatedGasSaved": 120,
"estimatedDataBytesSaved": 22
},
{
"id": "nonzero-comparison",
"file": "ApogeeEscrow.sol",
"after": "require(msg.value != 0, \"Zero deposit\");",
"patch": {
"newText": " require(msg.value != 0, \"Zero deposit\");",
"oldText": " require(msg.value > 0, \"Zero deposit\");"
},
"title": "Use != 0 for unsigned non-zero checks",
"where": "ApogeeEscrow.sol:58",
"before": "require(msg.value > 0, \"Zero deposit\");",
"safety": "safe",
"newText": " require(msg.value != 0, \"Zero deposit\");",
"oldText": " require(msg.value > 0, \"Zero deposit\");",
"category": "computation",
"severity": "info",
"lineStart": 58,
"rationale": "For unsigned integers, != 0 is equivalent for non-zero checks and can compile slightly cheaper.",
"confidence": 0.7,
"estL1Delta": null,
"estL2Delta": 3,
"annualizedBasis": "Static deterministic estimate. Exact runtime deltas require queued Foundry snapshots with representative inputs.",
"estimatedGasSaved": 3,
"estimatedDataBytesSaved": null
}
]
}
},
"scanId": "0624d7ea-7bf4-43aa-8717-0d46dcb5e4b2",
"createdAt": "2026-07-03T08:42:43.385Z",
"riskScore": 41,
"contractName": "ApogeeEscrow",
"severityCounts": {
"low": 4,
"high": 0,
"info": 3,
"medium": 1,
"critical": 0
},
"executiveSummary": "Archon completed a read-only Mantle Mainnet audit of ApogeeEscrow and found 8 deterministic findings. The highest-priority issue is Reentrancy Events, with risk score 41/100 based on severity-weighted findings. Potential reentrancy issue due to external call before state change. 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": "fcf788e0-e762-4ef1-ad74-f492400aa947",
"title": "Reentrancy Events",
"category": "reentrancy-events",
"location": {
"file": "ApogeeEscrow.sol",
"lineEnd": 100,
"lineStart": 90
},
"severity": "low"
},
{
"id": "d8adfdc7-4f02-415e-9b78-3d89ebb06e8f",
"title": "Low Level Calls",
"category": "low-level-calls",
"location": {
"file": "ApogeeEscrow.sol",
"lineEnd": 100,
"lineStart": 90
},
"severity": "info"
},
{
"id": "af576f16-697b-4cfa-b775-4766ff0609d3",
"title": "Immutable States",
"category": "immutable-states",
"location": {
"file": "ApogeeEscrow.sol",
"lineEnd": 14,
"lineStart": 14
},
"severity": "low"
},
{
"id": "036ff3d8-b2e4-4195-ba2a-9f583e5b276d",
"title": "Immutable States",
"category": "immutable-states",
"location": {
"file": "ApogeeEscrow.sol",
"lineEnd": 13,
"lineStart": 13
},
"severity": "low"
},
{
"id": "33377000-8788-49d2-8593-4ecfdea91e52",
"title": "Immutable States",
"category": "immutable-states",
"location": {
"file": "ApogeeEscrow.sol",
"lineEnd": 12,
"lineStart": 12
},
"severity": "low"
},
{
"id": "cf5dcfcd-0d51-497c-b046-b994a5697648",
"title": "Pack small storage variables into fewer slots",
"category": "mantle-gas-optimizer/storage/storage-packing",
"location": {
"file": "ApogeeEscrow.sol",
"lineEnd": 14,
"lineStart": 14
},
"severity": "medium"
},
{
"id": "fb1768bd-50a6-45be-9d3a-b98544ced24b",
"title": "Replace long revert string with custom error",
"category": "mantle-gas-optimizer/deployment/custom-errors",
"location": {
"file": "ApogeeEscrow.sol",
"lineEnd": 49,
"lineStart": 49
},
"severity": "info"
},
{
"id": "79f572a8-eb5f-4c2c-9a57-b77f90084344",
"title": "Use != 0 for unsigned non-zero checks",
"category": "mantle-gas-optimizer/computation/nonzero-comparison",
"location": {
"file": "ApogeeEscrow.sol",
"lineEnd": 58,
"lineStart": 58
},
"severity": "info"
}
]
}
ipfs://QmRQn646e18D2xK9pWcW7ex5D1d7LYQWPHS4Tbq47CqzCb