DefaultHook on Base
Uniswap v4 Hook Contract 0x8dd4c756f183513850e874f7d1ffd0d7cb498080 on Base · Dynamic fee · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- <$0.01
- All-time volume
- $125.02K
- Pools using this hook
- 5
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 2,335
What it does
Charges traders a 1.5% swap fee unless the sending wallet holds a Bonsai NFT, in which case swaps in the pool are fee-free.
How it works step by step
- Runs beforeSwap on every swap in pools created from the Bonsai app.
- Reads tx.origin's Bonsai NFT balance through the DefaultSettings contract.
- Returns a 0% LP fee override to holders of any Bonsai NFT.
- Returns a 1.5% LP fee override to all other swappers.
- Does not take custody of tokens or change swap amounts.
- Swap behaviour
- On each swap, beforeSwap queries the Bonsai NFT balance of tx.origin via DefaultSettings and sets the LP fee to 0% if the balance is above zero, otherwise 1.5%. The hook returns zero delta and does not alter amounts.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- beforeSwap returns an override LP fee: 0 (0%) if the transaction origin (tx.origin) holds any Bonsai NFT, otherwise 15000 (1.5%), both flagged with OVERRIDE_FEE_FLAG. If tx.origin is zero it returns 1.5%. Fees are charged as LP fees by the PoolManager.
- Owner & admin controls
- No admin controls found. The hook has no owner, pause or upgrade function; the fee logic is read from a DefaultSettings contract set once in the constructor, and the bonsaiNFT address used by it is set once and not exposed as a setter in the provided source.
Enabled Uniswap v4 callbacks
beforeSwap
beforeSwap: sets the per-swap LP fee override based on the NFT holdings of tx.origin.
Security & trust assessment
Risk level: low (verified source, high confidence).
Who controls it: Essentially none at the hook level. The NFT contract and DefaultSettings are fixed at deployment, so no privileged key can change fees or block swaps through this hook.
Risk to user funds: The hook does not hold, move or block funds. Its only effect is the LP fee applied by the PoolManager, which is 0% or 1.5% depending on NFT ownership of tx.origin. A failure in the external NFT contract could block swaps.
Security findings
- [info] Fee discount keyed on tx.origin: Fee eligibility uses tx.origin, not msg.sender, so any wallet holding a Bonsai NFT gets 0% fees even when swapping through a contract or router, and a contract can route a holder's transaction to pay 0%.
- [low] External dependency in swap path: The fee depends on an external balanceOf call on the NFT contract during every swap; if that contract reverts, swaps in these pools revert too.
- [info] No token custody or delta changes: beforeSwap is a view function and the hook returns zero delta, so it does not take or redirect user tokens; funds are only exposed to the normal pool accounting.
Contract details
- Verified source
- Yes (DefaultHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 2,650 bytes
- Upgradeable proxy
- No
- Detected patterns
- self-unlock
Pools using DefaultHook
- ETH / BONSAI (Dynamic fee) — 24h volume $0, TVL <$0.01, 0 swaps today
- BONSAI / AGI (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / SATO (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / SNL (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- WETH / BONSAI (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today