This section briefs about all the available entities within Bunicorn Flexible Subgraph. Entities define the schema of the subgraph, and represent the data that can be queried. Each entity has a set of fields that store relevant information about the entity. To see an interactive sandbox of all entities see the Subgraph Explorer.
Each entity is defined with a value type, which will always be a base AssemblyScript type, or a custom type provided by The Graph's custom TypeScript library. For more information on value types see here.
The Buni entity stores aggregate information across all Flexible pools. It can be used to view stats about total liquidity, volume, amount of pools and more.
Information about a pool. Includes information about each token within the pool like balance per token or denorm weight. The pool entity mirrors the pool smart contract, and also contains aggregated information about use such as total liquidity, volume, amount and more.
The PoolToken stores information for a specific token in a pool that token is included in, along with the information of the pool itself.
This entity is used to store data about a user's liquidity shares.
A user entity is created for any address that provides liquidity to a flexible pool or swaps tokens on the platform. This entity can be used to track users' shares or exchange history.
Swap entities are created for each token swap within a pool. The Swap entity can be used to get things like swap size (in tokens and USD), caller, recipient and more.
To store the spot price of a token which is included in any flexible pool. The price is calculated by on-chain reserves and weights in the highest liquidity pool that includes this token.
Transaction entities actually represent an event created in each blockchain transaction done through Buni flexible pools. This tracks the transaction information such as block, timestamp, gas used, event type and more. For more information about event types, see smart contracts document.