Skip to content
Back to skills

Read Sherwood Markets

ASecurity

Read Sherwood lending markets, positions, oracle status and halt state on Robinhood Chain with the read-side SDK or the local read API. Use when the user asks about a Sherwood market, whether a position is healthy or liquidatable, or why a price feed is dark.

  • 6 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 11, 2026
blockchainbashapi

Works with

  • cli
  • api

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned November 11, 2026

npx -y skills add nirholas/sherwood --skill read-sherwood-markets --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Read Sherwood Markets?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Read Sherwood Markets
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nirholas-read-sherwood-markets/badge)](https://www.skillsdirectory.com/skills/nirholas-read-sherwood-markets)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: read-sherwood-markets
description: Read Sherwood lending markets, positions, oracle status and halt state on Robinhood Chain with the read-side SDK or the local read API. Use when the user asks about a Sherwood market, whether a position is healthy or liquidatable, or why a price feed is dark.
---

# Read Sherwood markets

Sherwood is halt-aware lending against tokenized equities on Robinhood Chain (`eip155:4663`). It is a pnpm monorepo: `contracts/` (Foundry), `packages/sdk` (`@sherwood/sdk`, read-side client), `apps/api` (read API that also serves the web app), `apps/keeper`, `apps/reporter`, `apps/web`. Nothing is published to npm: clone the repo and run `pnpm install && pnpm -r build`. This skill only reads. It never signs or sends transactions: do not deploy, supply, borrow or liquidate for the user without showing the exact action and getting a yes.

## SDK

```ts
import { createPublicClient, http } from "viem";
import { SherwoodClient, PriceStatus, robinhoodChain, PUBLIC_RPC_URLS, formatUsd } from "@sherwood/sdk";

const publicClient = createPublicClient({ chain: robinhoodChain, transport: http(PUBLIC_RPC_URLS[0]) });
const client = new SherwoodClient(publicClient, { oracle: ORACLE, factory: FACTORY });
```

`ORACLE` and `FACTORY` are the deployed `SherwoodOracle` and `SherwoodFactory` addresses (see `docs/deployment.md`).

| Method | Returns |
|---|---|
| `listMarkets()` | Market addresses from the factory. |
| `getMarket(market)` | Market state, including oracle status. |
| `getPosition(market, user)` / `getPositionSummary(market, user)` | Position and health, computed as the contracts compute it (`liquidatable`, health factor). |
| `getOracleView(asset)` | Price status and raw price (`rawX26`, 1e26 scale). |
| `getCorporateAction(asset)` | Pending corporate action for a token. |

Helpers: `healthFactor`, `isSolvent`, `maxBorrow`, `maxWithdrawCollateral`, `utilization`, `borrowRatePerYear`, `formatUsd`, and `EQUITY_ASSETS`, `assetBySymbol(symbol)`, `assetByAddress(address)` for the registry of listed tokens.

Always check `status`: if it is not `PriceStatus.OK` the feed is shielded (halted, or the pool and attestation disagree), and borrowing is blocked. Report that state instead of a price.

## Read API

```bash
RHC_RPC_URL=https://rpc.mainnet.chain.robinhood.com \
SHERWOOD_FACTORY=0x... SHERWOOD_ORACLE=0x... PORT=8790 \
pnpm --filter @sherwood/api start
```

GET only, JSON, bigints as strings: `/api/health`, `/api/markets`, `/api/markets/:market`, `/api/markets/:market/position/:user`, `/api/assets`, `/api/oracle/:asset`, `/api/corporate-action/:asset`. Env: `SHERWOOD_FACTORY` and `SHERWOOD_ORACLE` (required), `RHC_RPC_URL`, `CACHE_SECONDS` (default 10), `WEB_ROOT`, `PORT` (default 8790).

## Worked example

1. `client.listMarkets()` then `client.getMarket(m)` for each to find the market for an equity.
2. `client.getPositionSummary(market, user)`: if `summary.market.status !== PriceStatus.OK`, say the feed is shielded and why (`docs/halts.md`, `docs/oracle.md`). Otherwise report `liquidatable` and the health factor.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in blockchain →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.