TheGraph subgraph indexing settlement events for the Setra protocol on Robinhood Chain.
Setra is the canonical settlement layer for tokenized equities. This subgraph indexes on-chain events from three core contracts:
- DVPEngine — Delivery versus payment settlements between counterparties
- AssetRegistry — Tokenized equity registration and lifecycle management
- NettingEngine — Multilateral netting epochs and trade aggregation
| Entity | Description |
|---|---|
Settlement |
Individual DVP settlement record |
BatchSettlement |
Batch settlement execution |
FailedSettlement |
Failed settlement with reason |
Asset |
Registered tokenized equity |
Issuer |
Asset issuer with portfolio tracking |
| Entity | Description |
|---|---|
DailyVolume |
Per-asset daily settlement volume |
NettingEpoch |
Netting cycle with participant metrics |
NettingTrade |
Individual trade within a netting epoch |
ProtocolStats |
Global protocol statistics |
{
settlements(first: 10, orderBy: blockTimestamp, orderDirection: desc) {
id
intentHash
buyer
seller
asset {
isin
tokenAddress
}
amount
price
blockTimestamp
}
}{
assets(first: 20, orderBy: totalVolume, orderDirection: desc) {
isin
tokenAddress
totalSettlements
totalVolume
active
issuer {
address
assetCount
}
}
}{
protocolStats(id: "1") {
totalSettlements
totalVolume
totalAssets
totalBatches
totalFailures
}
}{
dailyVolumes(first: 30, orderBy: date, orderDirection: desc) {
date
asset {
isin
}
volume
count
}
}{
nettingEpoches(first: 5, orderBy: epoch, orderDirection: desc) {
epoch
participantCount
netVolume
finalized
trades {
buyer
seller
amount
price
}
}
}- Node.js >= 18
- Docker & Docker Compose (for local Graph Node)
npm install
npm run codegen
npm run buildStart a local Graph Node with Docker:
docker-compose up -dCreate and deploy the subgraph locally:
npm run create-local
npm run deploy-localQuery at http://localhost:8000/subgraphs/name/setra/settlement.
npx graph auth --product hosted-service <access-token>
npm run deployMIT