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.

circle-info

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

spinner

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

Manual flow

  • You call multiple contracts in sequence

  • More approvals + more room for mistakes

  • Harder to ensure leftover tokens get returned cleanly

Zapper flow

  • One “intent” becomes a pre-built route

  • Permit2 can reduce approvals (when supported)

  • Leftovers sweep returns dust back to a receiver

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)

WKAIA Zapper

  • Wraps native KAIA into WKAIA when needed

  • Can unwrap back to KAIA on withdrawal (depending on the flow)

HNKAIA Zapper

  • Supports HNKAIA (wrapped Kaia LST exposure) collateral branches

  • Leveraged variants can reduce intermediate swaps when the same token is used across steps

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

Common flows

Use this for actions like: open Trove, add collateral, repay debt, withdraw collateral, close Trove.

1

Step 1: Choose the action and receiver

Pick what you want to do and where outputs should go (your wallet, or a receiver address you control).

2

Step 2: Provide inputs

You provide the required input token(s) (collateral and/or USDHN). Depending on the flow, you may use an approval or a Permit2 signature.

3

Step 3: Zapper executes CDP calls

The zapper performs the necessary CDP calls (via BorrowerOperations) and may apply temporary manager/receiver settings for safety.

4

Step 4: Leftovers are returned

Any leftover tokens from swaps or rounding are returned to the receiver, and temporary permissions are restored.

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.

triangle-exclamation

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

Last updated