Build your first hook
A hook tells Patchbay how to distribute a coin’s collected fees. You choose when it runs, who qualifies, and how the fees are split.
- 1
Choose the behavior
Pick an outcome in the workbench, or select Describe a hook and write the rule in your own words. Preview the proposed settings before applying them.
- 2
Try it with sample wallets
Open Test to see how different balances and holding times change the rewards. No funds move.
- 3
Attach it to a coin
Open Launch, add your coin’s details, and review the rule before signing.
A starting point: Reward loyal holders
Every 10 minutes, allocate 80% of received fees to eligible holders and 20% to the protocol buy-and-burn reserve. Longer holding times earn more weight, reaching 5× after 4 hours.
Default recipe settings. You can change these before launch.Describe a supported rule
Try: “Pay holders every hour by token balance. Give 90% of fees to holders.” The local creator translates supported phrases into editable settings. It lists defaults for anything you leave out and rejects phrases it cannot interpret. Your current hook stays unchanged until you select Use this hook.
The plain-English summary stays visible through Build, Test, and Launch. What can run? explains which capabilities are supported, which are local previews, and which are unavailable.
Choose a recipe
All recipes use the same three building blocks. The starting settings focus on a different outcome.
- Reward loyal holders
- More reward weight for time held.
- Pay holders regularly
- Share rewards by token balance every hour.
- Split collected fees
- 50% to holders. 50% to the protocol reserve.
- When
- Run every 10 minutes to 24 hours, in 10-minute increments.
- Who
- Set a minimum holding time. Weight rewards by loyalty, token balance, or equal shares per wallet.
- How much
- Split received fees between holders and the protocol buy-and-burn reserve. The shares total 100%.
A sale resets the holding streak and forfeits unpaid rewards. Equal-wallet weighting can be gamed by splitting tokens across wallets.
Hooks configure supported fee rules. They do not accept arbitrary code or route funds to arbitrary external wallets.
Test and save
Change the received fees, token balances, and holding times for three sample wallets. The preview uses the same allocation calculation as the worker. Each row explains its eligibility and reward weight. Follow the sample funds explains the fee split and any unallocated remainder.
- An ineligible wallet receives no allocation.
- If nobody qualifies, holder funds remain unallocated.
- Editing the rule or sample inputs resets the completed test.
It excludes transaction costs, account rent, payout minimums, and previously accrued rewards. It does not promise a transfer.
Keep a recipe you like
Your hook draft saves in this browser. Use the Recipe menu to save a named copy or export a JSON file. Import a file to move settings between browsers or remix someone else’s recipe. Imports contain validated settings, never executable code.
Launch your coin
The Launch step carries your current hook into coin setup. Add a name, ticker, image, optional links, and an optional first buy. Connect your wallet to prepare a Meteora Dynamic Bonding Curve launch.
Review the attached hook and displayed costs before signing. You can return to Build or Test without losing the coin details entered during this visit.
Check the schedule, eligibility, and allocation before you sign. Changing the workbench later does not change an existing coin.
How the rule is attached
The server binds the rule and its fingerprint to a launch ticket and token metadata. The browser checks the prepared transaction before requesting a signature. The worker verifies the created pool, creator, and metadata commitment before activating the rule.
Custom-hook launches currently use a generated mint. Uploaded reserved mints are refused until ownership can be proved.
How execution works
- On Solana
- The Meteora pool, trades, fees, and signed payout transactions. The rule fingerprint is committed through the coin’s metadata URI.
- In the worker
- Holding-time tracking, eligibility, reward calculations, fee claiming, and scheduling.
The operator controls the worker and its signing keys. Execution can be paused while a pool continues trading. The fingerprint makes a mismatched rule detectable; it does not enforce payouts by itself.
These are worker-managed fee rules, not Token-2022 transfer hooks. They do not run on every transfer.
Fees and payouts
Your split applies to fees the protocol actually receives. It does not apply to total trading volume or every fee charged by Meteora. Creator, protocol, and migration fees are separate from the hook’s allocation.
Holder rewards accrue per coin. Buy-and-burn allocations reserve funds for the protocol token, rather than automatically buying back each newly launched coin.
Small rewards may accumulate before a transfer. Network costs, account rent, payout caps, minimums, and worker availability still apply. A configured launch or sample preview does not establish that payouts are currently running.
View recorded payouts