> For the complete documentation index, see [llms.txt](https://docs.liquyn.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.liquyn.com/readme.md).

# Liquyn Credit

Liquyn is a HyperEVM fixed-rate credit desk: USDC loans for 30, 90 or 180 days secured by WHYPE or Kinetiq's staked kHYPE. It is positioned against HyperCore's native variable-rate lending: the product is rate certainty for a term. Lenders receive a transferable lqUSDC token per maturity. The site uses the "Street" design layer (`src/app/street.css`): 1990s trading-floor motifs — ticker tape, CRT rate board, trade tickets, rubber stamps, tractor-feed term sheets — on a white Swiss grid.

## Fixed-term credit (`FixedTermHypePool` v2)

* **Oracle without an operator key.** `HyperCorePerpOracle` reads HyperCore's HYPE oracle price through the HyperEVM read precompile (`0x…0807`) and rejects it if the mark price (`0x…0806`) diverges past a bound. `StakedHypeOracle` prices kHYPE as HYPE × Kinetiq redemption rate × (1 − haircut).
* **Staked collateral.** One pool per collateral and maturity; kHYPE markets deploy when Kinetiq addresses are set.
* **Transferable lender positions.** Pool shares are an ERC-20 (`lqUSDC-90D`, 6 decimals).
* **Refinance.** `HyperLendRefinancer` moves a HyperLend variable USDC loan and its collateral into a fixed market in one flash-loan transaction (borrower approves the aToken and sets the router as a delegate).
* **Idle cash.** `HyperLendCashAdapter` supplies undeployed USDC to HyperLend above an owner-set buffer; everything is pulled back at maturity.
* **Liquidation auction.** Anyone opens an auction on an unhealthy or matured position; the liquidator incentive rises from 1% to the market maximum over ten minutes.

Preview terms (`previewTerms` in `src/lib/credit/benchmark.ts`) mirror the deploy defaults (7/8/9% for 30/90/180 days, 60% WHYPE LTV, 55% kHYPE LTV, 25 bps origination) and are labelled "Preview" wherever a market is not deployed.

## Local development

* Node.js 24 or newer
* `npm ci`
* `npm run dev`

With no credit contract addresses, the platform opens in **Interactive demo** mode. Borrow, Earn (`/earn`), Notes and Pools share a browser-session simulation. Users can issue and fund notes, repay and claim, supply and withdraw USDC, and deposit HYPE, borrow and repay through the pool. Every sample balance, rate, price and result is illustrative. Demo actions do not ask for a wallet signature. **Reset demo** restores the seed data. `/credit/lend` redirects to `/earn`.

The demo and onchain data adapters are separate. When all public addresses are configured, the platform starts in live mode and verifies risk settings and HYPE oracle reads before showing transaction controls. A failed read shows the specific unavailable reason and a link to the demo; sample data is never displayed in the live market. Configure `NEXT_PUBLIC_CREDIT_FACTORY_ADDRESS`, `NEXT_PUBLIC_CREDIT_POOL_ADDRESS`, `NEXT_PUBLIC_USDC_TOKEN_ADDRESS`, `NEXT_PUBLIC_WHYPE_ADDRESS` and `NEXT_PUBLIC_HYPEREVM_RPC_URL` in the runtime environment and Vercel project before enabling live mode.

## Checks and deployment

* `npm run type-check`
* `npm run lint`
* `npm test`
* `npm run build`
* `npm run deploy:hyperevm` (requires token addresses, owner, price updater and a funded deployer)

The deployment script appends the credit oracle, note factory and pool to `deployments.json` without replacing historical deployment records. See `docs/production-deployment-guide.md` for the preserved deployment procedure.

The UI and contracts are an implementation starting point. Review oracle operations, parameter values, liquidation incentives and contract security before enabling or funding a live market.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.liquyn.com/readme.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
