Minting Process Flow
This document describes minting and redeeming ha (pegged) and hs (Sail / leveraged) tokens via the market minter.
Live minters are Minter_v2. Numeric examples below are illustrative only. For integration, use *DryRun views — Mint and redeem. Function SoT: Minter.

Overview
| Token | Role |
|---|---|
| Pegged (ha) | Anchored claim on the market peg |
| Leveraged (hs / Sail) | Residual NAV of collateral vs ha |
Users deposit wrapped collateral (e.g. fxSAVE, wstETH). Prefer that path over zaps when you already hold wrapped collateral — Zaps.
Mint (public API)
Signatures (Minter_v2):
mintPeggedToken(uint256 wrappedCollateralIn, address receiver, uint256 minPeggedOut);
mintLeveragedToken(uint256 wrappedCollateralIn, address receiver, uint256 minLeveragedOut);
Step-by-step
- Approve wrapped collateral to the minter (or use a zap / permit path).
- Quote with
mintPeggedTokenDryRun/mintLeveragedTokenDryRun.- If incentive ratio is
1e18or taken/out amount is0, the action is disallowed at the current CR — do not send the tx. - Near band edges,
takenmay be less thanwrappedCollateralIn(partial fill).
- If incentive ratio is
- Set
minOutfrom the dry-run with your slippage buffer. - Execute
mintPeggedToken/mintLeveragedToken. - Protocol fees (when the incentive ratio is a fee) go to
feeReceiver. - Discounts (when the ratio is negative) are funded via
ReservePool.requestBonuswhen the reserve has balance — not “reserve allocation on mint.”
There is no public burnPeggedToken / burnLeveragedToken. Exit with redeem (below).
Illustrative ha mint (not a quote)
User holds 10 wrapped collateral units
↓
mintPeggedTokenDryRun(10e18) → incentiveRatio, wrappedFee, taken, peggedMinted, price, rate
↓
If allowed: mintPeggedToken(10e18, receiver, minPeggedOut)
↓
ha minted to receiver; fee (if any) → feeReceiver
Redeem (public API)
redeemPeggedToken(uint256 peggedIn, address receiver, uint256 minWrappedCollateralOut);
redeemLeveragedToken(uint256 leveragedIn, address receiver, uint256 minWrappedCollateralOut);
- Quote with the matching
*DryRun. - Burn path is internal to the minter (
Burn1Arg/Burn2Arg/BurnFromper market). Approve ha/hs to the minter only if the burn signature requires it. - Wrapped collateral returns to
receiver(subject to fees/discounts and CR bands).
Restricted paths
freeMint* / freeRedeem* require ZERO_FEE_ROLE (stability pool manager / protocol). External integrators use the public mint* / redeem* functions.