{
  "id": 15318136,
  "title": "Gas Optimization Audit: Gemini",
  "url": "https://urgent.news/2026/10/18/gas-optimization-audit-gemini",
  "topic": "ai",
  "section": "AI",
  "published": "2026-10-18T00:56:08.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/dannydoes_2abdf9c/gas-optimization-audit-gemini-3048"
  },
  "original_language": "en",
  "account": "On 18th October 2026, Gemini conducted a gas optimization audit on its Target Protocol, aimed at identifying inefficiencies, quantifying potential savings, and surfacing gas-related attack vectors that could impact user experience or protocol stability. The audit encompassed all on-chain contracts involved in user deposits, withdrawals, order-matching, and fee distribution.\n\nThe audit methodology included static analysis using Slither, MythX, and custom gas-profiling scripts, along with dynamic profiling on the mainnet and L2 (Arbitrum, Optimism). Review of compiler settings, storage layout, calldata handling, and external-call patterns were also carried out.\n\nKey findings from the audit include:\n1. Storage-slot fragmentation in OrderBook and UserBalances, leading to approximately 12% excess gas per order.\n2. Unchecked loops over dynamic arrays causing quadratic gas growth during batch-settlement (worst-case 1.8 million gas per transaction).\n3. Redundant require checks on immutable values increasing gas by around 3% per call.\n4. Presence of missing custom errors and overuse of require(string) inflation bytecode size and runtime cost.\n5. Lack of gas caps in external-call patterns ('call{value: …}') creates potential for gas-griefing Distributed Denial of Service (DoS) attacks on Layer 2 (L2) where gas-price spikes are common.\n\nThe potential savings from implementing the recommendations are substantial, with an estimated overall reduction of around 18% on deposit/withdrawal (approximately 30,000 gas per transaction), 22% reduction on order-matching (approximately 45,000 gas per match), and 12% reduction on batch-settlement (around 120,000 gas per batch). This could amount to approximately $3.2 million in annual gas fee savings, assuming 1 million transactions per year at an average gas price of 30 gwei.\n\nThe risk score assigned to the protocol is 4 out of 10, indicating a functionally sound contract with gas-related inefficiencies and minor DoS vectors that may impact user experience and increase operating costs, particularly under high-load L2 conditions. The recommended prioritized technical recommendations include storage packing, loop optimizations, and implementing custom errors. It is advised to deploy a gas-budgeted upgrade through Gemini's proxy pattern within the next 4-6 weeks to address these issues.",
  "summary": "Gas Optimization Audit: Gemini Target Protocol : Gemini (TVL: $5340.2M) Gemini – Gas‑Optimization Audit Protocol TVL: ≈ $5.34 B (Ethereum + L2) Audit Scope: All on‑chain contracts that handle user deposits, withdrawals, order‑matching, and fee distribution. The focus is on gas‑efficiency , execution‑cost reduction , and mitigation of gas‑related attack vectors (e.g., gas‑griefing, out‑of‑gas…",
  "key_points": [
    "Gemini conducted gas optimization audit on Target Protocol on 18th October 2026",
    "Identified storage-slot fragmentation causing 12% excess gas per order",
    "Estimated potential savings of $3.2 million annually with 18% overall reduction"
  ],
  "editors_take": "Addressing these technical inefficiencies transforms the Target Protocol from a functionally sound system into a more cost-effective platform while mitigating specific denial-of-service risks during high-load periods on Layer 2.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}