Introduction
Felix is a suite of on-chain borrowing and lending products running on Hyperliquid L1. Its core mission is to let users unlock liquidity or earn yield with low friction and clear, risk-adjusted mechanics. Two primitives anchor the system: a Liquity V2-style CDP market that mints the USD-pegged stable-coin feUSD, and variable-rate Vanilla lending pools.
Key protocol roles mirror these designs:
- Borrowers / Minters (CDP): Deposit HYPE, UBTC, or LSTs to open positions and mint feUSD. They choose their interest rate and target LTV to match their risk appetite.
- Stability-Pool Depositors: Stake feUSD to absorb liquidations, earning streaming borrower interest, a share of up-front fees, and event-driven liquidation gains.
- Vanilla Lenders / Borrowers: Supply or borrow asset-native tokens (e.g., HYPE, HUSD, USDC) at a floating APY with P2P matching on top of the underlying pool.
feUSD is always redeemable for $1 worth of collateral, giving arbitrageurs a hard-backed peg mechanism.
Scope of the Engagement
Three Sigma executed one focused audit on Felix’s price-feed module between 23 July 2025 – 25 July 2025.
The review covered 198 non-comment, non-blank lines of Solidity across LST/underlying price feeds:
src/PriceFeeds/KHYPEPriceFeed.sol
, 119 nSLOCsrc/PriceFeeds/WSTHYPEPriceFeed.sol
, 79 nSLOC
Auditors: 2
Effort: 1.2 person-weeks
The primary objectives were to:
- validate price-composition logic for kHYPE/wstHYPE → HYPE → USD across canonical and market paths;
- check deviation-thresholds and redemption-path guards that mitigate oracle frontrunning;
- remove hidden dependencies on third-asset pegs (e.g., USDC/USD) and normalise decimals correctly;
- harden depeg handling and failure-mode fallbacks.
Challenges in Securing Over-Collateralised Stable-Coin Protocols
Oracle & Pricing Pitfalls
Stable-coin and lending systems live and die by safe collateral valuation.
- Hidden peg dependencies: Building HYPE/USD from HYPE/USDC implicitly assumes USDC/USD = 1.0. A USDC depeg skews all USD valuations that depend on HYPE/USD (cf. 3S-Felix-M01).
- Multi-hop conversions: Composed feeds (HYPE/USDC Ă— USDC/USD; LST/underlying Ă— underlying/USD) must normalise to 18 decimals to avoid $1-looks-like-$0.01 errors.
- Dual-price blending: Canonical vs. market quotes need clear tie-break rules (min for borrows, max for redemptions within deviation bands) to resist manipulation.
Decimal & Wrapper Mismatches
Supporting assets with non-18 decimals (e.g., 6-dec USDC) requires careful scaling:
- Truncation dust & rounding: Poor scaling in composed arithmetic silently burns value or flips branch conditions around deviation thresholds.
- Allowance / path mixups: Approvals and data-flow must target the actual wrapper/collateral token used in redemptions and zaps; otherwise leverage and redemption flows can revert.
Flash-Loan & Liquidation Edge Cases
While this engagement focused on price feeds, redemption economics and liquidation triggers are downstream of pricing:
- Over-broad deviation bands: If thresholds exceed oracle update rules, “use-max on redemption” can apply too often, harming peg fairness (cf. 3S-Felix-M02).
- LST market frictions: Assets such as kHYPE feature withdrawal queues (e.g., 7-day unstakes), which can widen market-vs-canonical gaps and raise frontrunning risk during volatile periods (see Informational note).
Audit Date: 2025-07-23
Language: Solidity
Type: Code Audit