📝Smart Contracts

Architecture Overview

Onmi.fun's smart contract system is designed around minimal trust assumptions and maximum transparency. Every core action — token creation, buying, selling, and graduation — is executed on-chain with no off-chain dependencies.

Core Contracts

Contract
Responsibility

TokenFactory: 0x.....

Deploys new token contracts on creation

BondingCurve: 0x.....

Manages pricing logic, buy/sell execution, reserves

GraduationRouter: 0x.....

Handles DEX migration and LP locking on graduation

FeeCollector: 0x.....

Routes protocol fees to treasury


Security Principles

1. Non-Upgradeable Deployment

Token contracts deployed via Onmi.fun are immutable by default. Once deployed, the bonding curve logic cannot be changed — protecting traders from rug-via-upgrade attacks.

2. No Admin Mint / Burn

The creator has zero special privileges over token supply after deployment. There is no owner function to mint additional tokens or forcibly burn circulating supply.

3. Liquidity Lock on Graduation

When a token graduates, LP tokens are sent to the zero address (0x000...dead). This makes the DEX liquidity permanently inaccessible — a hard guarantee against liquidity removal.

4. Reentrancy Protection

All state-changing functions (buy, sell, graduate) are protected with reentrancy guards (nonReentrant modifier) to prevent flash loan and callback exploits.

5. Slippage Protection

All buy and sell functions accept a minAmountOut parameter, giving traders protection against sandwich attacks and front-running.

Last updated