OPNXSWAP
A decentralized token swap built on the IOPN network.
by andromedacripto17 · submitted Jun 21, 2026
Community votes
0
Voting opens when this submission reaches the Top 10 stage.
Overall score
—/ 100
Weighted average across the 5 judging criteria.
Description
01/03
What the builder said.
Written by the team, rendered as the markdown they typed in the submission wizard.
What we built
OPN Mini Swap is a minimal Uniswap V2-style AMM DEX deployed on the IOPn Testnet (chainId 984), with a built-in faucet so reviewers can claim test tokens and run a full swap end-to-end without needing pre-existing balances.
6 contracts deployed, all pragma solidity =0.8.20, zero external dependencies:
OPNSwapFactory— creates and indexes liquidity pairs via deterministic CREATE2 (pair addresses are predictable, immune to front-running).OPNSwapRouter— the entry point for swaps and liquidity. Every state-changing call enforces an on-chaindeadlineplus an explicitamountOutMin/amountInMaxslippage check — real guarantees, not just UI hints. User tokens flow straight to the Pair viatransferFrom; they never sit in the Router's balance.WOPN— Wrapped OPN, a WETH9-style wrapper for the native token, checks-effects-interactions onwithdraw.TestToken— minimal ERC-20, deployed twice (TKA / TKB) to form the tradeable pair.Faucet— 10 TKA per wallet, 24h cooldown. No mint power: it only redistributes a balance the owner funds manually, so a worst-case compromise leaks at most its own reserve.
Two supporting files complete the system: OPNSwapPair (the AMM pool — constant-product invariant, LP mint/burn) and OPNSwapERC20 (base ERC-20 the Pair inherits to issue LP tokens).
Why this design
OPN Chain is fully EVM-compatible, so instead of trusting an undocumented third-party router, every contract here is deployed from scratch on the audited Uniswap V2 pattern — Factory + Pair + Router, 0.3% fee, reentrancy-safe by construction. No OpenZeppelin, no proxies, no upgradeability: access control, the ERC-20 standard, and the fixed-point math are all hand-written, keeping the whole system small enough to read end-to-end in one sitting.
Testnet only. Tokens carry no real value; contracts are unaudited — do not deploy to mainnet or use with real funds.
Roadmap
02/03
What ships next.
The builder's own next-quarter plan. Use it to gauge follow-through and ambition.
Q1 2026 — Hardening & audit prep
- Third-party security review of the Factory/Pair/Router trio before any move past testnet.
- Add a Hardhat fuzz-testing suite (Echidna or Foundry invariant tests) on top of the existing Chai test suite, targeting the constant-product invariant and the Faucet cooldown logic.
- Gas profiling pass on
OPNSwapRouterandOPNSwapPairswap paths.
Q2 2026 — Feature completeness
- Multi-hop swap routing in the frontend UI (the Router already supports
path[], the UI currently only wires direct pairs). - LP position dashboard: add/remove liquidity from the UI, not just via scripts.
- Price charts and historical swap activity, indexed from on-chain events.
Q3 2026 — Beyond testnet
- Formal audit and remediation cycle.
- Mainnet deployment plan contingent on audit results — no mainnet deploy happens without it.
- Governance/timelock for
feeToSetter, replacing the current single-owner control.
This roadmap reflects an early-stage testnet demo: the priority order is security review first, feature breadth second, and mainnet last — deliberately, since a DEX handling real funds inherits all the risk these contracts haven't been audited against yet.
On-chain proof
03/03
6 contracts on OPN Chain.
The chain itself confirmed every deployment is valid, signed by the builder's wallet, and inside the season's window.