Grail
Parameters
| Parameter | Value | Meaning |
|---|
launchMarketCap | After deployment | The market cap at the first buy |
launchFee | After deployment | Fixed at deployment, at most 0.05 ETH |
guardBlocks | After deployment | How long the launch guard lasts, at most 50 |
guardMaxPerBlock | After deployment | The net outflow allowed per block |
TOTAL_SUPPLY | 1,000,000,000 | The supply of every token |
POOL_FEE | 10,000 (1%) | The Uniswap fee tier of every pool |
CREATOR_SHARE_BPS | 7,000 (70%) | The creator's share of collected fees |
External contracts
GrailLaunchpad
| Function | Access | What it does |
|---|
createToken(name, symbol, metadataURI, feeRecipient, minTokensOut) | Anyone | Launches a token. See Token launches |
predictTokenAddress(creator, name, symbol, metadataURI, feeRecipient) | View | The token's address before launch |
getLaunch(token) | View | The creator, creation block, fee recipient and position ID |
claimProtocolFees() | Anyone | Sends launch fees to the protocol fee recipient |
setProtocolFeeRecipient(recipient) | Owner | Changes the recipient, never to a reserved address |
pause() | Owner | Stops new launches, and trading is not affected |
GrailToken
| Function | What it does |
|---|
metadataURI() | A public link to the token's image, description and social links, fixed at launch. tokenURI() and contractURI() return the same link |
creator() | The wallet that launched the token |
factory() | The launchpad that created the token |
pool() | The token's 1% pool, computed from the factory |
guardAllowance() | What can still leave the pool in this block |
guardEndBlock() | The block at which the guard stops applying |
GrailLocker
| Function | Access | What it does |
|---|
collectFees(positionId) | Anyone | Collects the position's fees and pays 70% to the fee recipient and 30% to the protocol |
positions(positionId) | View | The token a position belongs to |
The locker has no function that withdraws or transfers a position.
Fee recipient rules
A fee recipient cannot be the zero address, the launchpad, the locker, WETH, the Uniswap factory or position manager, the token or its pool. It also cannot be an address in the deployment's blocked list: Uniswap's routers, Permit2 and Railgun's RelayAdapt, where fees would get stuck or could be taken by anyone. blockedRecipient(address) is public.
Grail is an independent project built on Railgun's public contracts and SDK. Railgun contributors do not run, review or endorse Grail, and they did not write this documentation. Their own documentation is at docs.railgun.org.