FreeholdHook on Ethereum
Uniswap v4 Hook Contract 0x88e7528ea2360b6bda0ddae17d8655f726f28088 on Ethereum · Custom pricing · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 6
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 0
What it does
Routes swaps between sDAI and registered synthetic fiat tokens (such as GBPF or JPYF) by minting or redeeming them at an oracle rate with zero slippage, so traders get fixed-rate conversions and the pool itself holds no liquidity.
How it works step by step
- Records each registered pool's synthetic token and which currency is sDAI, validated against factory-deployed tokens
- Intercepts swaps in beforeSwap and takes the input currency from the PoolManager
- Buys synthetic tokens by minting them with sDAI, and sells them by redeeming them back to sDAI
- Returns before-swap deltas so the PoolManager settles the hook-provided amounts; no dynamic fee is set
- Exposes effectiveLiquidity so aggregators can gauge the sDAI backing and total backing obligation
- Swap behaviour
- On every swap in a registered pool, beforeSwap takes the input token from the PoolManager, calls the synthetic token's mint (sDAI in) or redeem (token in), and settles the output back to the PoolManager. Only exact-input and exact-output swaps are supported, with previewed amounts for exact-output.
- Liquidity behaviour
- No liquidity callbacks. The pool holds no real liquidity; sDAI backing is deposited into a shared FreeholdPool by the token on mint and withdrawn on redeem.
- Fee behaviour
- The hook returns no dynamic fee override (0). Fees are taken inside the token contract: mintFeeBps (max 10bp) on sDAI input and redeemFeeBps (max 50bp) on sDAI output, accrued as sDAI and flushed to the fixed FEE_RECIPIENT. The pool's own fee setting does not apply to hook-routed swaps.
- Owner & admin controls
- Factory ADMIN (hardcoded) can deploy tokens and set the pool once; the token and hook have no owner, pause, upgrade or parameter-change functions. The hook creator (FEE_RECIPIENT-controlled path) can only register pools and rescue stray ERC-20s to the fee recipient.
Enabled Uniswap v4 callbacks
beforeSwap, beforeSwapReturnDelta
beforeSwap: intercepts every swap on registered pools and routes it through SyntheticFiatToken mint/redeem at the oracle rate. beforeSwapReturnDelta: returns specified and unspecified deltas so the PoolManager settles the hook-provided amounts instead of pool liquidity.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: The factory ADMIN can deploy new SyntheticFiatToken instances that share the same sDAI pool; a malicious or oracle-rigged token could drain shared collateral. The ADMIN cannot alter existing tokens, the hook, or user balances. Fee recipient is immutable and receives fees and DSR surplus.
Risk to user funds: Swappers' sDAI and synthetic tokens pass through the hook and are held by the shared FreeholdPool while backing is kept there. Funds can be affected by oracle errors or a malicious token deployed by the ADMIN against the shared pool, but no party can freeze, seize or block individual user balances.
Security findings
- [medium] Shared collateral pool with admin-gated token deployment: Only the hardcoded ADMIN can deploy tokens, and all tokens share one sDAI pool. A token with a manipulated price feed adapter could mint or redeem against the shared collateral.
- [medium] Oracle dependency for all swap pricing: Swaps are priced by the token's PriceFeedAdapter, and the circuit breaker only limits moves of 50bp per update. If the oracle is wrong or stale within those limits, trades execute at the bad price with zero slippage.
- [low] Hook takes and settles tokens via return deltas: In _exactOutputBuy and _exactOutputSell the hook settles using previewed amounts and returns deltas; the tokens and sDAI moved are determined by the hook, so pool managers must hold sufficient balances for the take and settle sequence.
- [low] Backing can be under-recorded after appreciation: Redeem caps totalBackingDai at zero when the target currency appreciates, silently absorbing the shortfall into the DSR surplus rather than reverting, which can leave backing under-collateralised in DAI terms.
- [info] No pause, upgrade or blacklist controls on swaps: The hook has no owner, pause or upgrade path. Pool registration is restricted to the creator and rescue sends stray tokens to the hardcoded fee recipient.
Contract details
- Verified source
- Yes (FreeholdHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 7,178 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, return-delta
Pools using FreeholdHook
- INRF / sDAI (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- AUDF / sDAI (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- sDAI / NZDF (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- sDAI / EURF (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- sDAI / JPYF (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- GBPF / sDAI (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today