feat: support dev buys via rehype - #544
Merged
Merged
Conversation
Gas Benchmark SummaryStatus: 0 regression(s), 6 improvement(s), 27 below-threshold change(s). Changed Facets
Top Improvements
1 more significant change(s) hidden below. All significant changes by sectionMigration costs
|
z80dev
reviewed
Aug 14, 2026
z80dev
reviewed
Aug 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Using transient storage we can open a temporary window for the first buy atomically bundled with an
Airlock.createcall to be exempted from non-protocol fees assessed by the rehype hook. By redesigningBundlersuch that it calls into Uniswap'sPoolManagerdirectly, we can further constrain access to this window within the hook to the bundler only, such that ERC-4337 AA userOp bundling cannot inadvertently trigger the exemption. In this way, dev buys can be enabled only for the first swap atomically combined via our bundler explicitly. Any integrators or wrappers will have to call into our bundler, rather than delegating control to their own contracts. Only one exact-input buy using the configured numeraire is allowed, multi-hop routing is not supported. All of this preparation takes place within pool initialization, and because transient storage is used, these preparations are dropped if no buy transaction is bundled on launch. Dev buys can optionally be vested with an optional cliff and configurable durations as well.Motivation
Many teams and integrators have asked for the ability to perform "dev buys", which is understood to be a fee exemption on the first post-market creation swap for teams launching new assets. Many teams configure their launches with an aggressive anti-sniper decaying fee, often starting at 80%, so this can make it difficult for them to acquire tokens from the market first. This mechanism allows them the exclusive privilege to buy without non-protocol fees assessed, without having to worry about timing their entry along the decaying tax curve. The tokens purchased can also be vested to increase community confidence.
Changes
Bundlerto atomically create a market and execute one exact-input buy directly through Uniswap v4’sPoolManager.