ABIs for the routers, RWA factory/fee router, token and locker, plus a guide to path building, quotes, the token API, and fee claiming.
Qian is a multichain exchange and payments layer for every asset. This repo holds its on-chain contracts: launch a token, and its full supply goes straight into a locked Uniswap position that anyone can trade. MIT licensed. No proxies, and no admin key over user funds.
The core contracts carry the same addresses on every chain (Robinhood Chain, Base, Ethereum), because each one was deployed from a fresh key at nonce 0. This repo is the Robinhood Chain copy (chainId 4663); the addresses below hold on every chain.
Deployed addresses
| Contract | Address |
|---|---|
| QianLocker | 0x73Da198D58fFD43B5754a2d72D989cab1c9aF0ce |
| QianFactoryV3 | 0xaC83b491b76Dd686db516c0fE9152320c83618a7 |
| QianFactoryV4 | 0x750d0bc66baa12CF1710a8ba939B97DB4aD005c3 |
| QianFeeRouter | 0xDe598E5F0b428B38EFaA6e887458FEF70bFA9436 |
| QianSwapRouter | 0xEE540d2496cfFDf17E29a04bcd7b6dc795C61d66 |
| Create2Factory | 0x175ae2c5EC7edaD3eE88e892C677bBDE815A2803 |
| GuardHook | 0xa27D4eef437Ab754074c8C9E6bCbC55184dE2000 |
Every address above is source-verified on https://robinhoodchain.blockscout.com.
How it works
- Two factories.
QianFactoryV3andQianFactoryV4mint a fixed 1,000,000,000-supply ERC20 and seed the whole supply as one-sided liquidity in a Uniswap V3 or V4 pool. - QianLocker takes ownership of that LP position at launch. The contract is immutable and exposes no withdrawal path, so the liquidity stays where it is.
- Creator fees.
QianFeeRouter.collectFees(token)is a permissionless call that routes a token's accrued trading fees to its creator. The receiver lives in the locker, and the controller can reassign it for a community takeover. The token's owncreatorfield stays fixed as the record of who launched it. - Creator tax is the Uniswap V4 pool fee, anywhere from 0.5% to 20%, picked at launch. It lives in the PoolKey, so it never changes after that. V3 pools use the fixed 1% tier.
- QianSwapRouter handles user trades: buy or sell any Qian token for ETH, with a 1% platform fee on the WETH leg. It keeps no balances between trades.
Token
A launched token is ERC20 plus Burnable, and little beyond that. owner()
returns the zero address, so it reads as renounced. There is no mint, pause,
blacklist, or transfer hook. It stores immutable platform and creator
records, a MAX_SUPPLY, and its IPFS metadata through metadata() and
tokenURI().
Hooks
GuardHook is the only hook we deploy. It limits pool initialization to the
factory, which stops anyone from front-running a launch and bricking it. At trade
time it does nothing: every swap-time flag reads false, so the Uniswap V4
PoolManager never calls it on a swap. Qian launches ship with no fee, tax, or
anti-snipe hook.
Real-world asset pairs (RWA)
Robinhood Chain carries tokenized stocks as plain ERC20s. Three contracts put them to work on Qian. All three route against existing Uniswap V4 pools; the underlying asset stays with its issuer.
- QianRWAFactory launches tokens paired to an approved quote asset (a
tokenized stock or USDG) instead of WETH. The launch works like the core
factories: full supply into a locked one-sided Uniswap V4 position. The quote
is a per-launch parameter against a controller allowlist, and each quote carries
its own liquidity tiers. ETH sent above the deploy fee becomes a same-transaction
dev buy: the factory routes it through
QianRWARouteralong the caller's path, bounded by the caller'sdevBuyMinOut, and appends the new pool itself so the final hop cannot be spoofed. Nobody can trade the token before its creator. - QianRWAFeeRouter splits a quote-paired token's accrued trading fees and
pays them out as plain ERC20 transfers of the quote. A transfer the recipient
cannot take, for example when a stock issuer blocklists the address, accrues
to
owedinstead of reverting;claimOwedreleases it later. One blocked address never wedges a collect for everyone else. - QianRWARouter trades RWA tokens for ETH along a caller-supplied V4 pool
path, exact-in with a 1% fee on the WETH leg.
swap()does the same for ERC20-in/ERC20-out routes, fee on the input asset. The router keeps no balances between transactions.
This stack is Robinhood-only and runs on its own locker and guard hook. Full
record in chains/robinhood-rwa-deployment.json; every address is
source-verified on https://robinhoodchain.blockscout.com.
| Contract | Address |
|---|---|
| QianRWAFactory (V2, dev buy) | 0x04953F4322BB1b800C438a9426cDacfCD9785860 |
| QianRWAFactory V1 | 0x5A4ecC6fb7Ab62EC69cB0902397A5EB0a3Cb16D3 |
| QianRWAFeeRouter | 0xc3a89be96b8BDb1123d2Fa40f18000e3FB1A7aAf |
| QianRWARouter | 0x8495A347f71e819dB9e5eC12c1FC64C79DbD8708 |
| QianLocker (RWA stack) | 0x38ceAf1eF6528Aa5775820696A7D14e64136a22d |
| GuardHook (RWA stack) | 0x2725462a10d14d863ce9a2ec5d95895d7d65a000 |
Layout
dtm-v3/contracts: Uniswap V3 factory stack (QianFactoryV3,QianToken, LP provider)dtm-v4/contracts: Uniswap V4 factory stack, the sharedQianLocker,QianFeeRouter, andQianSwapRouter, plusGuardHookand the RWA stack (QianRWAFactory,QianRWAFeeRouter,QianRWARouter)abi/: ready-to-use ABIs for integrators — see INTEGRATING.mdchains/: chain config and deployed addresses
Build
Solidity 0.8.24 with the optimizer on: 200 runs for the V3 tree, 1 run for the V4
tree, viaIR enabled. Each contract's exact verified build lives on https://robinhoodchain.blockscout.com;
this repo is the plain-source mirror.
Dependencies
The contracts build against the canonical Uniswap deployments on each chain. There's no forked or vendored AMM code in this repo; only the interfaces they call are kept in-tree (dtm-v4/contracts/interfaces).
- Uniswap V3: v3-core and v3-periphery
- Uniswap V4: v4-core (PoolManager)
The router, quoter, and pool-manager addresses for each chain are listed in chains/.
Security
See SECURITY.md for the security model, the design tradeoffs, and how to report a vulnerability.
License
MIT
