Skip to main content

Harbor Swap

Harbor Swap is a token routing registry (direct DEX executors + optional aggregators). It does not mint ha/hs and does not change yield math.

Use it when a Harbor Yield vault or keeper needs to move one asset to another (e.g. fxSAVE ↔ wstETH). For mint/redeem, use the minter (or zaps).

Contract SoT: Harbor Swap. Yield consumer: hy / ERC-7575 (pre-prod).

Production status

Registry + direct executors live on harbor-swap main. Velora as primary aggregator is still an open PR (velora-swap / #3). Do not assume a mainnet swapper address until it is listed on a market / yield deploy page.

Routing for Harbor Yield and keepers. Not mint or redeem.

Two modes

ModeCallerSlippage / floor
DirectHot path (compound on HarborYield)Executor minAmountOutPerUnitIn (rate floor: out per 1e18 in spent)
AggregatorDiscretionary (redistribute)Consumer absolute minAmountOut (or equivalent); keeper supplies routerData; role-gated on the consumer

Adapters are callable; safety is consumer role + the mode-appropriate minimum + executor envelope. Do not assume the per-unit rate bound covers aggregator redistribute. Selector allowlists do not validate swap parameters.

What to integrate (when addresses exist)

  1. Resolve swapper (CREATE3 key swapper) — do not hard-code; predict via Harbor deploy helpers.
  2. Direct: getRoute(from, to) then executor swap with a real minAmountOutPerUnitIn.
  3. Aggregator: Velora Market API (GET /prices, POST /transactions/:chainId) with userAddress = adapter proxy; optional 1inch Pathfinder; set an absolute output floor on the Yield call.
  4. Treat routerData as untrusted.

CREATE3 keys and Velora/1inch notes: Harbor Swap.

Not for

  • Quoting ha/hs mint or redeem (use minter dry-runs)
  • Reading Harbor oracle prices (use Pricing)
  • Generic DEX aggregation for your own users unless you are the Harbor Yield keeper path