Overview
Prepool enables community-pooled token launches. Contributors pool ETH together, and when conditions are met, the prepool deploys a token + bonding curve via the factory. All pooled ETH becomes the initial buy (equal footing for all contributors). After graduation, the prepool holds the Uniswap V4 LP position and acts as a V4 hook, distributing trading fees to contributors forever.
Each Prepool is a minimal proxy clone (EIP-1167) that also implements IHooks for the Uniswap V4 afterSwap callback.
Deployment Addresses
Implementation contract (clones are created per-prepool by LaunchFactory):| Network | Address |
|---|---|
| Ethereum | Coming soon |
| Base | Coming soon |
| BNB Chain | Coming soon |
| Sepolia | Coming soon |
Write Functions
contribute
contribute
to is the credited address. Reverts if below minContribution or already deployed/cancelled.deploy
deploy
minBalance reached and before deployTime expiry). Creates the token and bonding curve via the factory. All pooled ETH is used as the initial buy.withdrawTokens
withdrawTokens
claimFees
claimFees
cancel
cancel
deployTime) has passed. Creator or Makx team can cancel anytime before deployment. Releases the symbol reservation via LaunchFactory.releaseSymbol().refund
refund
collectLPFees
collectLPFees
distributeAccumulatedFees
distributeAccumulatedFees
afterSwap hook or the receive() fallback.withdrawTokenFees
withdrawTokenFees
makxTeam. Only callable after migration and once all contributors have exited.View Functions
Key State
Fee Distribution
Uses the Synthetix RewardPerToken pattern for gas-efficient proportional fee distribution.| Constant | Value |
|---|---|
TOKEN_LOCKUP | 48 hours |
MAKX_FEE_BPS | 5000 (50%) |
HOOK_FEE_BPS | 100 (1% of swap output) |
- Hook fee — 1% of swap output on every post-graduation Uniswap V4 trade
- LP fees — Collected from the Uniswap V4 LP position
- Platform fees — Sent directly by the bonding curve during trading
V4 Hook
The Prepool implementsafterSwap to take a 1% fee on swap output. The hook address must have the correct V4 flag bits set (bit 6: AFTER_SWAP, bit 2: AFTER_SWAP_RETURNS_DELTA), which is enforced by salt-mining during createPrepool.
Events
Errors
| Error | Condition |
|---|---|
AlreadyDeployed | Action not valid after deployment |
NotDeployed | Action requires deployment first |
AlreadyCancelled | Already cancelled |
NotCancelled | Refund before cancellation |
BelowMinContribution | Below minimum |
DeployConditionsNotMet | Conditions not satisfied |
TokensLocked | 48-hour lockup active |
AlreadyWithdrawn | Already exited |
NoContribution | No contribution found |
CannotCancel | Not authorized to cancel |
ContributorsStillActive | withdrawTokenFees while contributors remain |
NotMigrated | withdrawTokenFees before graduation |
TransferFailed | ETH transfer failed |
HookNotImplemented | Unused hook function called |