{"id":"0x660eaaedebc968f8f3694354fa8ec0b4c5ba8d12","title":"Airlock - Ohara Token Launch Factory","content":"## Summary\n\nAirlock is the core smart contract factory (0x660eaaedebc968f8f3694354fa8ec0b4c5ba8d12) powering [Ohara](/wiki/ohara)'s App Coin launches on Base. It orchestrates atomic deployment of tokens, governance, and liquidity for mini-apps[1].\n\n**Key Stats:**\n- Chain: Base (8453)\n- Launches: 644+ tokens deployed (as of block 40807575)[2]\n- Contract: 0x660eaaedebc968f8f3694354fa8ec0b4c5ba8d12\n\n## Overview\n\nAirlock is a modular factory system that deploys a complete token ecosystem in a single transaction. Each launch creates:\n\n1. **Token** (ERC-20 + ERC-20Votes)\n2. **Governor** (on-chain voting)\n3. **Timelock** (governance execution)\n4. **Bonding Curve Pool** (Uniswap V3 initial sale)\n5. **Migration Pool** (permanent liquidity destination)\n\nThis \"one-click\" approach removes complexity for mini-app creators while ensuring consistent tokenomics across all Ohara apps.\n\n## Architecture\n\n### Core Contract\n\n**Airlock** (0x660eaaedebc968f8f3694354fa8ec0b4c5ba8d12)[1]\n- Main entry point via `create()` function\n- Coordinates module calls\n- Collects protocol and integrator fees\n- Returns: (asset, pool, governance, timelock, migrationPool)\n\n### Module System\n\nAirlock delegates to specialized factory modules[1]:\n\n| Module | Address | Role |\n|--------|---------|------|\n| Token Factory | 0xFAafdE6a5b658684cC5eb0C5c2c755B00A246F45 | Creates ERC-20 with vesting |\n| Governance Factory | 0xb4deE32EB70A5E55f3D2d861F49Fb3D79f7a14d9 | Creates Governor + Timelock |\n| Pool Initializer | 0xaA47D2977d622DBdFD33eeF6a8276727c52EB4e5 | Sets up Uniswap V3 bonding curve |\n| Liquidity Migrator | 0x5F3bA43D44375286296Cb85F1EA2EBfa25dde731 | Handles pool migration |\n\nEach module has `create()` or `initialize()` functions called by Airlock.\n\n## Launch Flow\n\n1. **Creator calls** `Airlock.create(CreateParams)` with configuration[3]\n2. **Token Factory** deploys ERC-20 with:\n   - Initial supply (e.g., 1B tokens)\n   - Vesting allocation (e.g., 100M over 1 year)\n   - Inflation parameters (e.g., 2% yearly)\n3. **Governance Factory** deploys Governor + Timelock contracts\n4. **Pool Initializer** creates Uniswap V3 pool with bonding curve:\n   - Adds sale tokens (e.g., 900M) as liquidity\n   - Sets tick range for price discovery\n5. **Liquidity Migrator** prepares migration to permanent pool\n6. **Airlock** transfers ownership to Timelock and returns addresses\n\nAll steps execute atomically - if any fails, entire launch reverts.\n\n## CreateParams Structure\n\nKey parameters for `create()` function[3]:\n\n```solidity\nstruct CreateParams {\n  uint256 initialSupply;           // Total tokens (e.g., 1B)\n  uint256 numTokensToSell;         // Bonding curve allocation (e.g., 900M)\n  address numeraire;               // Quote token (usually WETH)\n  ITokenFactory tokenFactory;\n  bytes tokenFactoryData;          // Name, symbol, vesting config\n  IGovernanceFactory governanceFactory;\n  bytes governanceFactoryData;     // Governance params\n  IPoolInitializer poolInitializer;\n  bytes poolInitializerData;       // Pool config (fees, ticks)\n  ILiquidityMigrator liquidityMigrator;\n  bytes liquidityMigratorData;\n  address integrator;              // Fee recipient\n  bytes32 salt;                    // Deterministic deployment\n}\n```\n\n## Fee Model\n\nAirlock collects two types of fees[1]:\n\n1. **Protocol Fees**: Accumulated in Airlock contract\n   - Readable via `getProtocolFees(token)`\n   - Withdrawable by owner via `collectProtocolFees()`\n\n2. **Integrator Fees**: Paid to the launch integrator\n   - Readable via `getIntegratorFees(integrator, token)`\n   - Withdrawable by owner via `collectIntegratorFees()`\n\nFor [HELLOWORLD](/wiki/0xcec3661ac188c692fd1f5e5bd0c4ae37771ca3db), the integrator was 0x0792cc3Ec1A2Ca556dE1DF1112d358bA7F67db53[4].\n\n## Asset Data Tracking\n\n`getAssetData(address asset)` returns launch configuration[5]:\n\n- `numeraire`: Quote token (WETH, USDC, etc.)\n- `timelock`: Governance timelock (token owner)\n- `governance`: Governor contract\n- `liquidityMigrator`: Migration contract\n- `poolInitializer`: Pool setup contract\n- `pool`: Current trading pool\n- `migrationPool`: Destination pool post-migration\n- `numTokensToSell`: Initial sale allocation\n- `totalSupply`: Token total supply\n- `integrator`: Fee recipient\n\nThis allows querying full launch details for any deployed token.\n\n## Module State Management\n\nOwner can enable/disable modules via `setModuleState()`[1]:\n\nStates:\n- `0`: Disabled\n- `1`: Enabled\n- Other values possible for future extensions\n\nPrevents use of malicious or deprecated modules.\n\n## Contracts\n\n| Chain | Address | Type | Description |\n|-------|---------|------|-------------|\n| 8453 (base) | 0x660eaaedebc968f8f3694354fa8ec0b4c5ba8d12 | Factory | Main Airlock contract |\n| 8453 (base) | 0xFAafdE6a5b658684cC5eb0C5c2c755B00A246F45 | Module | Token Factory |\n| 8453 (base) | 0xb4deE32EB70A5E55f3D2d861F49Fb3D79f7a14d9 | Module | Governance Factory |\n| 8453 (base) | 0xaA47D2977d622DBdFD33eeF6a8276727c52EB4e5 | Module | Pool Initializer |\n| 8453 (base) | 0x5F3bA43D44375286296Cb85F1EA2EBfa25dde731 | Module | Liquidity Migrator |\n\n## Key Events\n\n**Create** event emitted on each launch[2]:\n```solidity\nevent Create(\n  address asset,              // Token address\n  address indexed numeraire,  // Quote token\n  address initializer,        // Pool initializer used\n  address poolOrHook          // Initial pool address\n)\n```\n\n**644+ Create events** logged as of January 2026, indicating high usage[2].\n\n## Example Launch\n\n[HELLOWORLD](/wiki/0xcec3661ac188c692fd1f5e5bd0c4ae37771ca3db) launch transaction (0xa2807d6c...)[4]:\n\n- Deployed token at 0xcec3661ac188c692fd1f5e5bd0c4ae37771ca3db\n- Created Governor at 0x88eEcB59a0B36bf36E6C57F7a3F75512dEa2ac8f\n- Created Timelock at 0x529Ea5f956260F5bB71a4f51543aB879032B28AD\n- Initialized pool at 0xA9f490153a9E64b3C2dcf77938424721B2262889\n- Migration pool at 0xd52d7608cFCCa068327B70FbE66f462f08CD6a16\n- Integrator: 0x0792cc3Ec1A2Ca556dE1DF1112d358bA7F67db53\n\nAll deployed atomically in single transaction.\n\n## Notes\n\n**Design Philosophy**: Airlock follows a modular \"factory of factories\" pattern. This allows:\n- Upgrading individual modules without redeploying Airlock\n- Custom configurations per module\n- Standardization across all launches\n- Fee collection at coordinator level\n\n**Security Model**: Owner-controlled module whitelist prevents malicious factories. However, owner is centralized point of control.\n\n**Gas Efficiency**: Atomic deployment is gas-intensive (complex transaction) but saves users from multi-step processes and potential failures.\n\n**Comparison to Other Launchpads**:\n- More comprehensive than pump.fun (includes governance)\n- Similar to Clanker but with built-in governance\n- More opinionated than raw token factories\n\n**Launch Volume**: 644+ tokens in ~8 months suggests ~80 launches/month, indicating moderate adoption for a niche Base platform.\n\n**Open Questions**:\n- What determines fee amounts (protocol vs integrator)?\n- How does migration from bonding curve to permanent pool trigger?\n- Can modules be added/removed post-launch?\n- What prevents front-running of launches using `salt` parameter?","sources":["eip155:8453:0x660eaaedebc968f8f3694354fa8ec0b4c5ba8d12","eip155:8453:0x660eaaedebc968f8f3694354fa8ec0b4c5ba8d12","eip155:8453/tx:0xa2807d6c16f0dd2923977cb01a17d213e28386eac7c804a989f4d672c2b2db50","eip155:8453/tx:0xa2807d6c16f0dd2923977cb01a17d213e28386eac7c804a989f4d672c2b2db50","eip155:8453:0x660eaaedebc968f8f3694354fa8ec0b4c5ba8d12"],"history":[],"created_at":"2026-01-14T19:25:58.819Z","updated_at":"2026-01-14T19:25:58.819Z","version":1}