Protocol Subgraphs

The Rio Network has curated a set of protocol subgraphs on Goldsky to speed web3 decentralized application (dApp) development.

Holesky Testnet Subgraphs

GraphQL Schema

Issuer

A liquid restaking token issuer instance.

type Issuer @entity {
  id: ID!
  address: Bytes!
  tokensIssued: Int!
  tokens: [LiquidRestakingToken!] @derivedFrom(field: "issuer")
}
Coordinator

The withdrawal queue contract for a liquid restaking token.

type Coordinator @entity {
  id: ID!
  address: Bytes!
  restakingToken: LiquidRestakingToken!
}
Withdrawal Queue

The withdrawal queue contract for a liquid restaking token.

type WithdrawalQueue @entity {
  id: ID!
  address: Bytes!
  restakingToken: LiquidRestakingToken!
}
Operator Registry

The operator registry contract for a liquid restaking token.

type OperatorRegistry @entity {
  id: ID!
  address: Bytes!
  restakingToken: LiquidRestakingToken!
}
Liquid Restaking Token

A liquid restaking token.

type LiquidRestakingToken @entity {
  id: ID!

  address: Bytes!
  symbol: String!
  name: String!

  createdTimestamp: BigInt!
  totalSupply: BigDecimal!
  totalValueETH: BigDecimal
  totalValueUSD: BigDecimal
  exchangeRateETH: BigDecimal
  exchangeRateUSD: BigDecimal
  percentAPY: BigDecimal # APY based on a 14-day moving average.

  issuer: Issuer!
  coordinator: Coordinator! @derivedFrom(field: "restakingToken")
  assetRegistry: AssetRegistry! @derivedFrom(field: "restakingToken")
  operatorRegistry: OperatorRegistry! @derivedFrom(field: "restakingToken")
  avsRegistry: AVSRegistry! @derivedFrom(field: "restakingToken")
  depositPool: DepositPool! @derivedFrom(field: "restakingToken")
  withdrawalQueue: WithdrawalQueue! @derivedFrom(field: "restakingToken")
  rewardDistributor: RewardDistributor! @derivedFrom(field: "restakingToken")

  priceFeeds: [PriceFeed!] @derivedFrom(field: "usedBy")
  underlyingAssets: [UnderlyingAsset!] @derivedFrom(field: "restakingToken")
}
User

A user who has interacted with a liquid restaking token.

type User @entity {
  id: ID!
  address: Bytes!
  balance: BigDecimal!
  deposits: [Deposit!] @derivedFrom(field: "user")
  withdrawalRequests: [WithdrawalRequest!] @derivedFrom(field: "user")
  withdrawalClaims: [WithdrawalClaim!] @derivedFrom(field: "user")
}
Deposit

A deposit made by a user.

type Deposit @entity(immutable: true) {
  id: ID!
  user: User!
  sender: Bytes!
  assetIn: Asset!
  amountIn: BigDecimal!
  amountOut: BigDecimal!
  restakingToken: LiquidRestakingToken!
  restakingTokenPriceUSD: BigDecimal
  userBalanceBefore: BigDecimal!
  userBalanceAfter: BigDecimal!
  valueUSD: BigDecimal
  timestamp: BigInt!
  blockNumber: BigInt!
  tx: Bytes!
}
Deposit Pool

The deposit pool contract for a liquid restaking token.

type DepositPool @entity {
  id: ID!
  address: Bytes!
  restakingToken: LiquidRestakingToken!
}
Reward Distributor

The reward distributor contract for a liquid restaking token.

type RewardDistributor @entity {
  id: ID!
  address: Bytes!
  restakingToken: LiquidRestakingToken!
}
Withdrawal Request

A withdrawal request made by a user.

type WithdrawalRequest @entity {
  id: ID!
  user: User!
  sender: Bytes!
  epoch: WithdrawalEpoch!
  assetOut: Asset!
  sharesOwed: BigDecimal!
  amountIn: BigDecimal!
  restakingToken: LiquidRestakingToken!
  restakingTokenPriceUSD: BigDecimal
  userBalanceBefore: BigDecimal!
  userBalanceAfter: BigDecimal!
  valueUSD: BigDecimal
  timestamp: BigInt!
  blockNumber: BigInt!
  tx: Bytes!
  logIndex: BigInt!

  isClaimed: Boolean!
  claim: WithdrawalClaim
}
Withdrawal Claim

A withdrawal claim made by a user. Multiple withdrawal requests from the same user in the same epoch are claimed together.

type WithdrawalRequest @entity {
  id: ID!
  user: User!
  sender: Bytes!
  epoch: WithdrawalEpoch!
  assetOut: Asset!
  sharesOwed: BigDecimal!
  amountIn: BigDecimal!
  restakingToken: LiquidRestakingToken!
  restakingTokenPriceUSD: BigDecimal
  userBalanceBefore: BigDecimal!
  userBalanceAfter: BigDecimal!
  valueUSD: BigDecimal
  timestamp: BigInt!
  blockNumber: BigInt!
  tx: Bytes!
  logIndex: BigInt!

  isClaimed: Boolean!
  claim: WithdrawalClaim
}
Withdrawal Epoch Status

All possible statuses for a withdrawal epoch.

enum WithdrawalEpochStatus {
  ACTIVE
  QUEUED
  SETTLED
}
Withdrawal Epoch

A withdrawal epoch for a given underlying asset.

type WithdrawalEpoch @entity {
  id: ID!
  epoch: BigInt!
  asset: Asset!
  status: WithdrawalEpochStatus!
  restakingToken: LiquidRestakingToken!
  queuedTimestamp: BigInt
  settledTimestamp: BigInt
  sharesOwed: BigDecimal!
  assetsReceived: BigDecimal!
  shareValueOfAssetsReceived: BigDecimal!
  amountToBurnAtSettlement: BigDecimal!
  aggregateRoot: Bytes
  requests: [WithdrawalRequest!] @derivedFrom(field: "epoch")
  claims: [WithdrawalClaim!] @derivedFrom(field: "epoch")
  requestCount: Int!
  claimCount: Int!
}
Underlying Asset

An underlying asset for a liquid restaking token.

type UnderlyingAsset @entity {
  id: ID!
  address: Bytes!
  restakingToken: LiquidRestakingToken!
  asset: Asset!
  strategy: Bytes!
  depositCap: BigDecimal!
  priceFeed: PriceFeed!

  balance: BigDecimal!
  balanceInDepositPool: BigDecimal!
  balanceInEigenLayer: BigDecimal!
}
Asset

Asset metadata.

type Asset @entity {
  id: ID!
  symbol: String!
  name: String!
  decimals: Int!
  address: Bytes!
  latestUSDPrice: BigDecimal # Latest price of asset in USD.
  latestUSDPriceTimestamp: BigInt # Timestamp at which the `latestUSDPrice` was updated.
}
Asset Registry

The asset registry contract for a liquid restaking token.

type AssetRegistry @entity {
  id: ID!
  address: Bytes!
  restakingToken: LiquidRestakingToken!
}
AVS Registry

The AVS registry contract for a liquid restaking token.

type AVSRegistry @entity {
  id: ID!
  address: Bytes!
  restakingToken: LiquidRestakingToken!
}
Price Source

The underlying source of a Rio price feed.

type PriceSource @entity {
  id: ID!
  address: Bytes!
  priceFeed: PriceFeed!
}
Price Feed

A Rio price feed for an asset.

type PriceFeed @entity {
  id: ID!
  address: Bytes!
  priceSource: PriceSource @derivedFrom(field: "priceFeed")
  feedType: String!
  description: String!
  decimals: Int!
  usedBy: [LiquidRestakingToken!]!
  baseAsset: Asset!
  quoteAssetSymbol: String!
  assetPair: String!
  price: BigDecimal
  lastUpdatedTimestamp: BigInt
}
Operator Metadata

A Rio Operator metadata.

type OperatorMetadata @entity {
  id: ID!
  name: String
  website: String
  description: String
  logo: String
  twitter: String
}
Operator

A Rio Operator entity.

type Operator @entity {
  id: ID!
  address: Bytes!
  metadataURI: String!
  metadata: OperatorMetadata
  delegator: OperatorDelegator! @derivedFrom(field: "operator")
  delegationApprover: Bytes
  stakerOptOutWindowBlocks: BigInt
}
Operator Delegator

A Rio Operator Delegator entity.

type OperatorDelegator @entity {
  id: ID!
  address: Bytes!
  delegatorId: Int!
  operator: Operator!
  manager: Bytes!
  earningsReceiver: Bytes!
  restakingToken: LiquidRestakingToken!
  validators: [Validator!] @derivedFrom(field: "delegator")
  unusedValidatorKeyCount: BigInt!
  depositedValidatorKeyCount: BigInt!
  exitedValidatorKeyCount: BigInt!
  totalValidatorKeyCount: BigInt!
}
Validator Key Index

An internal entity used for validator key lookups.

type ValidatorKeyIndex @entity {
  id: ID! # The ID is the concatenation of the delegator ID and the key index.
  keyIndex: BigInt!
  validator: Validator!
}
Validator

A Rio Operator Validator entity.

type Validator @entity {
  id: ID! # The ID is the validator public key.
  keyIndex: BigInt!
  status: ValidatorStatus!
  delegator: OperatorDelegator!
  publicKey: Bytes!
  keyUploadTimestamp: BigInt!
  keyUploadTx: Bytes!
}
Validator Status

Represents the potential states of an operator's validator.

enum ValidatorStatus {
  UNUSED
  DEPOSITED
  EXITED
}

Last updated

Was this helpful?