Zapper Guide
How Hann Finance Zappers bundle multi-step CDP and swap actions into fewer transactions
This page explains what a Zapper is (an automation contract), when it helps, and what risks to watch for when you use it.
Not investment advice — Zapper flows can include stablecoin borrowing, leverage, and DEX swaps. These carry liquidation risk and potential loss.
At a glance
A Zapper bundles “approve → swap → CDP action → cleanup” into fewer user steps
It pulls required tokens, executes the route, and returns leftovers to the receiver (in one transaction)
Some flows can use Permit2 (signature-based approvals) to reduce approval friction
Some flows can use DEX flash swaps (temporary in-tx liquidity) to assist leverage routes
One diagram: what a zapper does
Why use a zapper?
Zappers are most useful when a position change normally takes multiple steps:
opening a Trove and swapping assets in the same flow
adjusting debt/collateral while routing through StableSwap + DEX actions
closing a position and converting collateral into a desired output token
How it works (conceptually)
Zappers in Hann Finance are designed around a few recurring patterns:
Manager/receiver controls: a Trove can enforce which “manager” and “receiver” are allowed to receive collateral during a route.
Stable phase + action phase: routes can separate a stable-asset swap leg from a more general action leg.
Leftovers sweep: the zapper snapshots balances and returns leftover tokens to the receiver (within a dust tolerance).
Budgets and invariants: leverage routes typically enforce caps (e.g., flash fee caps, final debt caps) and “unexpected token” guards.
Common zapper variants (by collateral)
SuperEarn USDT Zapper
Supports a collateral branch that uses a wrapper around a SuperEarn USDT receipt / yield token (if configured)
Leverage routes can bundle wrapping/unwrapping and leftovers handling into one transaction
Concept deep dive: Yield-bearing stable receipt tokens
Common flows
Use this for actions like: open Trove, add collateral, repay debt, withdraw collateral, close Trove.
Use this for leverage up/down flows that require temporary liquidity and a multi-hop route.
[TBD] Supported routes — Available leverage routes and collateral types are surfaced in the UI. Start with small sizes and conservative limits.
Risks and safety notes
Automation does not reduce liquidation risk. If your CR becomes unsafe due to price moves, interest accrual, or poor execution, your Trove can be liquidated.
Routes rely on min-out / max-in safeguards. If liquidity is thin or the market is stressed, your tx can revert — or execute with worse outcomes if your limits are too loose.
Permit2 can reduce approvals, but it is still an authorization. Always review the token, amount, and expiration in the signature payload.
Zapper flows touch multiple contracts (CDP + routers + DEX + wrappers). Bugs, misconfiguration, or oracle issues can cause losses.
High leverage + thin liquidity is brittle — start small and use conservative limits until you understand how routes behave in real market conditions.
FAQ
Will I get leftover tokens back?
Zapper flows use a “leftovers sweep” pattern: the contract tracks balances and returns leftover amounts to a receiver address, within a dust tolerance.
Why can my zapper tx revert?
Common reasons include: deadline exceeded, output bounds not satisfied, flash fee cap exceeded, or an unexpected final token after a route.
Next pages
DEX basics: StableSwap DEX
Looping (leverage concept): Loop Strategies
Liquidation mechanics: Borrowing & Liquidation
Redemption (peg defense): Redemptions & Risk
Terms: Glossary
Last updated