Skip to main content

Build on Harbor

Sequenced path for another protocol to integrate Harbor without a Harbor-hosted REST or WebSocket API. Prefer the thin @harbor/sdk for quotes and calldata, or call on-chain views + dry-runs directly with the published address/ABI package.

Pre-production vs live

Live on Ethereum mainnet today: markets (ha / hs), minters (Minter_v2), stability pools, price aggregators, zaps where listed.
Not live for production integration: Harbor Yield Compounders and hyTOKENS — see hy / ERC-7575.

The shortest supported path into Harbor.

Read in this order

  1. Token taxonomy — ha / hs / hy / AC / pool shares
  2. Addresses and ABIs — published JSON + market pages
  3. SDK@harbor/sdk consumer guide (quoteMint, getPrice, encodeTx, …)
  4. Pricing — minter prices vs aggregator latestAnswer vs Chainlink examples
  5. Mint and redeem — approve → dry-run → tx
  6. Zaps — ETH/stETH/USDC convenience wrap + genesis/minter
  7. Market state and fees — CR, incentive bands, config()
  8. Stability pools — ha-only deposits, claims, rebalance receipts
  9. Harbor Swap — DEX routing for Harbor Yield / keepers (not mint)
  10. Oracle adapters — Chainlink-shaped wrappers (spec; not deployed)
  11. hy / ERC-7575 — Compounder = ERC-4626; hy = ERC-7575 (design only until mainnet)

Architecture and rebalance narratives (product + process flows): Contract architecture, Rebalance, Technical overview.

SDK surface

Shipped as @harbor/sdk (baofinance/harbor-sdk 0.2.0):

MethodOn-chain source
getAddresses(marketId)mainnet-v1.json
getPrice(market)Minter peggedTokenPrice / leveragedTokenPrice; aggregator latestAnswer
getMarketState(market)collateralRatio, leverageRatio, config()
quoteMint / quoteRedeem*DryRun views on the minter
encodeTxmint* / redeem* + ERC-20 approve
encodeZapGenesis / minter zap calldata
swap.getRouteLookup (from, to) on Swapper_v1 (pass swapper into the client)
swap.encodeSwapEncode a call to a supplied executor
swap.encodeRouteSwapgetRoute then encode that executor (convenience)

Still eng follow-on: Chainlink-shaped oracle adapters; npm registry publish of @harbor/sdk. There is no public REST/WebSocket API.

Product vs tech docs

SurfaceUse for
DocumentationUser-facing protocol, yield, TIDE, risks
This sectionIntegrator path: addresses, quotes, txs, prices
Contracts / MarketsFunction-level and per-market SoT