Skip to content

Latest commit

Β 

History

16 Commits

Folders and files

Repository files navigation

πŸ“’ Documentation Has Moved!

The latest and most accurate documentation for Exhibition is now hosted externally.


Exhibition

Version Next.js Network License

Deterministic primary market infrastructure for an enshrined financial system.

Live App β†’


Overview

Exhibition is a primary market infrastructure protocol built on Nexus Layer 1 β€” a blockchain purpose-built for intelligent markets and high-performance financial applications.

It enables projects to launch tokens, raise funds, and bootstrap on-chain liquidity through an integrated AMM β€” with every parameter configured upfront, enforced by the protocol, and immutable once capital enters.

The core thesis is simple: if it matters, it must be configured before capital enters and deterministically executed.

Three core principles guide the system:

  • Deterministic β€” Launch configurations β€” token supply, fund goal, soft cap, token price, liquidity allocation (minimum 70%), lock duration, and vesting schedule β€” are set before capital enters and enforced on-chain. No discretionary execution. No post-launch amendments.
  • Verifiable β€” These exact configurations are fully visible before and during a launch. Contributors can independently confirm what they're entering into before capital moves, and audit exactly how it was executed after.
  • Protected β€” Contributors are safeguarded by enforced soft caps, a permissionless pull-refund mechanism, optional vesting schedules for purchased tokens, locked liquidity, and an emergency refund path if the project owner fails to finalize within the protocol deadline.

Features

Token Launch

  • Configure launches with fixed funding goals, soft caps, contribution limits, timelines, and liquidity percentage
  • Protocol-enforced liquidity bootstrapping β€” a preconfigured percentage of raised capital is automatically allocated to the AMM
  • Liquidity is locked at creation and remains immutable for the configured duration
  • Vesting schedules with configurable cliff, duration, interval, and initial release
  • Deterministic full refunds if the soft cap is not met
  • Enforced liquidity finalization deadlines with fallback refund paths

AMM

  • Constant product automated market maker
  • Native liquidity creation from launch capital
  • Time-weighted average price (TWAP) oracle
  • Liquidity position tracking β€” unrealized and realized earnings per position
  • Liquidity lock enforcement for launch-created pools

Platform

  • exNEX portal β€” wrap/unwrap native NEX to exNEX
  • Testnet faucet β€” request EXH and USDX
  • Real-time pricing derived directly from on-chain pool reserves
  • Unified portfolio view β€” LP positions, earnings, and lock status
  • Project metadata β€” off-chain launch descriptions, social links, and media managed via a backend API

Tech Stack

Layer Technology
Framework Next.js 16 (App Router, Turbopack)
Blockchain wagmi 2 + viem + RainbowKit 2
State valtio, TanStack Query
UI Tailwind CSS v4, shadcn/ui (Radix)
Forms react-hook-form + zod
Language TypeScript
Network Nexus Testnet

Network

| Property | Value |


Contracts

All contracts are deployed and live on Nexus Testnet. No local deployment required.

Contract Address
Exhibition 0xe69e3E1C5B448c2E594Fd33f0400907798907DF5
ExhibitionAMM 0x5A8891C782A65083D490814755A167c6bD1b4C13
ExhibitionLPTokens 0xbf131952cb4Ffc16134989532Eb0aB60d563Af5D
ExhibitionFactory 0x88b4CcB1d0820C8BE944F8C6B6950252e7835982
USDX 0x25Ec99546f11Cd98454Dc65f314C72423CB30d57
exNEX 0xA6168C17807e2c914e4546a2D2040056974bD39f
EXH 0xa8286B8e01665d03A183aDd918beb0f318939233

Getting Started

Prerequisites

Installation

git clone https://github.com/ExhibitionDefi/exhibitiondapp
cd exhibitiondapp
npm install

Environment Variables

Create a .env.local file in the root:

# Contracts
NEXT_PUBLIC_EXHIBITION_ADDRESS=
NEXT_PUBLIC_EXHIBITION_AMM_ADDRESS=
NEXT_PUBLIC_EXHIBITION_LP_TOKENS_ADDRESS=
NEXT_PUBLIC_EXHIBITION_FACTORY_ADDRESS=

# Tokens
NEXT_PUBLIC_NEXUS_USD_ADDRESS=
NEXT_PUBLIC_EXHIBITION_NEX_ADDRESS=
NEXT_PUBLIC_EXH_ADDRESS=

# Network
NEXT_PUBLIC_NEXUS_CHAIN_ID=3945
NEXT_PUBLIC_NEXUS_CHAIN_NAME=Nexus Testnet
NEXT_PUBLIC_NEXUS_TESTNET_RPC_URL=https://testnet.rpc.nexus.xyz
NEXT_PUBLIC_NEXUS_TESTNET_EXPLORER_URL=https://testnet.explorer.nexus.xyz

# WalletConnect
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=your_project_id_here

# BACKEND API URLs
NEXT_PUBLIC_API_URL=

Development

npm run dev

Open http://localhost:3000 in your browser.

Build

npm run build
npm start

Project Structure

src/
β”œβ”€β”€ app/                       # Next.js App Router pages
β”‚   β”œβ”€β”€ page.tsx               # Landing page
β”‚   β”œβ”€β”€ launches/              # Launch list + detail pages
β”‚   β”œβ”€β”€ amm/                   # Swap, liquidity, pools pages
β”‚   β”œβ”€β”€ portfolio/             # LP positions page
β”‚   β”œβ”€β”€ dashboard/             # User launches + contributions
β”‚   └── faucet/                # Faucet + exNEX portal
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ ui/                    # shadcn/ui + custom components
β”‚   β”œβ”€β”€ layout/                # Navbar, Footer, PageWrapper
β”‚   β”œβ”€β”€ launch/                # Launch cards, panels, wizard
β”‚   └── amm/                   # Swap, liquidity, pool components
β”œβ”€β”€ hooks/
β”‚   β”œβ”€β”€ contracts/ 
β”‚   β”‚   β”œβ”€β”€ exhibition/        # Exhibition contract hooks
β”‚   β”‚   β”œβ”€β”€ amm/               # AMM contract hooks + derived hooks (pricing, token list)
β”‚   β”‚   └── tokens/            # ERC20 approvals, balances, faucet, and NEX wrap/unwrap
β”‚   β”œβ”€β”€ auth/                  # Auth + project metadata (backend API)
β”‚   β”œβ”€β”€ ui/                    # Debounce, Modal, Toast
β”‚   └── wizard/                # Create launch wizard state
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ abis/                  # Contract ABIs
β”‚   β”œβ”€β”€ apiClient.ts           # Custom fetch wrapper β€” base URL, CSRF headers, auth cookies, typed request helpers
β”‚   β”œβ”€β”€ constants.ts           # Block constants, status maps
β”‚   β”œβ”€β”€ contracts.ts           # Contract addresses + ABIs
β”‚   β”œβ”€β”€ formatters/            # Display formatting utilities
β”‚   β”œβ”€β”€ sanitizers/            # Input sanitization
β”‚   β”œβ”€β”€ tokenLogos.ts          # Static token logo resolver
β”‚   β”œβ”€β”€ validators/            # Zod schemas for wizard
β”‚   β”œβ”€β”€ parseContractError.ts  # Shared contract error parser β€” extracts revert reasons, classifies rejections
β”‚   β”œβ”€β”€ tokenMetadataCache.ts  # Module-level ERC20 metadata cache β€” persists across renders, never resets on refetch
β”‚   └── wagmi.ts               # Wagmi + RainbowKit config
β”œβ”€β”€ providers/                 # React context providers
└── types/                     # TypeScript type definitions

Error Handling

All contract write hooks follow a consistent error handling pattern:

  • User rejection β€” if the user rejects in their wallet, the hook returns 'rejected' and resets silently. No error state is set.
  • Contract revert β€” if the contract reverts, the hook returns 'error' with the revert reason extracted via viem's ContractFunctionRevertedError.
  • Network / RPC failure β€” if the RPC drops or times out, the hook returns 'error' with the short error message. The app does not crash.
  • No throws β€” write hooks never throw. All errors are captured and surfaced via the error: string | null field and isError: boolean flag returned from the hook.

All write hooks return Promise<WriteResult> where WriteResult = 'success' | 'rejected' | 'error', powered by the shared parseContractError utility in lib/parseContractError.ts.


Launch Lifecycle

Created (Upcoming)
  ↓ Owner deposits project tokens
Active β€” open for contributions
  ↓ Hard cap reached instantly  OR  duration ends β†’ anyone calls finalizeProject()
Successful β€” funding goal met, soft cap reached
  ↓ Owner deposits liquidity tokens + calls finalizeLiquidityAndReleaseFunds()
Completed β€” liquidity locked in AMM, tokens claimable

── Alternative paths ──────────────────────────────────────────
Active      β†’ Failed      β€” soft cap not reached after end block
Failed      β†’ Refundable  β€” first contributor calls requestRefund()
Successful  β†’ Refundable  β€” owner misses liquidity deadline; anyone calls requestEmergencyRefund()

Supported Wallets

  • MetaMask
  • Rainbow
  • CoinbaseWallet
  • Trust Wallet
  • WalletConnect (all compatible wallets)

Contributing

This project is currently in testnet phase. Contributions, bug reports, and feedback are welcome via GitHub Issues.


License

MIT


Built by the @wucklace

App β€’ GitHub β€’ Twitter