Developers
Architecture
How the factory, hook, fee ledger, and Uniswap v4 fit together.
Overview
Arklis tokens are plain ERC-20s that trade in Uniswap v4 pools. Four Arklis contracts sit around the standard Uniswap v4 deployment on each network. No API key and no Arklis server are needed to index or trade: everything below is on-chain.
Contracts and their jobs
- DirectLaunchFactoryDeploys the token, opens and seeds its pool, burns the LP position, emits launch events
- Launch
- HookTakes the fee from the native side of every swap and reports it to the ledger
- Swap
- DirectFeeSplitterSplits each fee into per-address ledgers and pays claims
- Fees
- Fee sourceFee rates and the referrer registry the ledger reads
- Config
Lifecycle of a token
createDirectPool
The creator calls the factory. It deploys aMemeTokenwith 1,000,000,000 supply and 6 decimals, and registers the creator on the fee ledger.Pool opens
The factory initialises a v4 pool with currency0 = native, currency1 = token, fee 0, tick spacing 200, and the network's hook. All supply is added one-sided from the lowest usable tick to the config'stickUpper.LP burned
The position NFT is minted to the factory and moved to0x…dEaDin the same transaction.DirectPoolOpenedis emitted with the pool id and metadata URI.Optional first buy
Ifmsg.valueis non-zero the factory swaps it for the creator and emitsInitialBuy. The hook takes the normal fee.Trading
Anyone swaps through the Universal Router or any v4 router. On each swap the hook takes the fee and the ledger emitsFeeSplit.
Launch function
DirectLaunchFactorysolidity
function createDirectPool(
string name,
string symbol,
string uri, // pass "" — the event then carries token.tokenURI()
uint256 configId // Arc 0–3, Robinhood Chain 4–7
) payable returns (address token); // msg.value = optional initial buyWhere to go next
- Contract addresses for every network.
- Indexing to discover tokens and read trades and prices.
- Swap integration to route trades.