Skip to main content
Schema: stellar.defi Table: fact_liquidity_pools Type: Base Table Stellar rolled out Automated Market Makers to its network in Nov 2021, which improves liquidity between asset pairs while incentivizing users to stake money in pools. Liquidity pools provide a simple, non-interactive way to trade large amounts of capital and enable high volumes of trading. Liquidity pools can be created between asset pairs and algorithmically controls the supply of the assets to give the best exchange rate while not requiring an orderbook in order to execute the trade. For each trade executed through a liquidity pool, the users with staked liquidity in the pool earn fees, which are distributed automatically to their accounts. Users can deposit and withdraw money in the pools; trades only execute via path payment operation. Learn more about Stellar data concepts: https://developers.stellar.org/docs/learn/fundamentals/stellar-data-structures

Columns

Column NameData TypeDescription
LIQUIDITY_POOL_IDTEXTUnique identifier for a liquidity pool. There cannot be duplicate pools for the same asset pair. Once a pool has been created for the asset pair, another cannot be created.
CLOSED_ATTIMESTAMP_NTZTimestamp when the ledger was closed and committed to the network. Ledgers are expected to close ~every 5 seconds.
BLOCK_TIMESTAMPTIMESTAMP_NTZ
TYPETEXTThe mechanism that calculates pricing and division of shares for the pool. With the initial AMM rollout, the only type of liquidity pool allowed to be created is a constant product pool.
FEENUMBERThe number of basis points charged as a percentage of the trade in order to complete the transaction. The fees earned on all trades are divided amongst pool shareholders and distributed as an incentive to keep money in the pools.
TRUSTLINE_COUNTNUMBERTotal number of accounts with trustlines authorized to the pool. To create a trustline, an account must trust both base assets before trusting a pool with the asset pair.
POOL_SHARE_COUNTFLOATParticipation in a liquidity pool is represented by a pool share.
ASSET_A_TYPETEXTThe identifier for type of asset code, can be an alphanumeric with 4 characters, 12 characters or the native asset to the network, XLM.
ASSET_A_CODETEXTThe 4 or 12 character code representation of the asset on the network.
ASSET_A_ISSUERTEXTThe account address of the original asset issuer that created the asset.
ASSET_A_IDNUMBERThe Farm Hash encoding of Asset Code + Asset Issuer + Asset Type. This field is optimized for cross table joins since integer joins are less expensive than the original asset id components.
ASSET_A_AMOUNTFLOATThe raw number of tokens locked in the pool for one of the two asset pairs in the liquidity pool.
ASSET_B_TYPETEXTThe identifier for type of asset code, can be an alphanumeric with 4 characters, 12 characters or the native asset to the network, XLM.
ASSET_B_CODETEXTThe 4 or 12 character code representation of the asset on the network.
ASSET_B_ISSUERTEXTThe account address of the original asset issuer that created the asset.
ASSET_B_IDNUMBERThe Farm Hash encoding of Asset Code + Asset Issuer + Asset Type. This field is optimized for cross table joins since integer joins are less expensive than the original asset id components.
ASSET_B_AMOUNTFLOATThe raw number of tokens locked in the pool for one of the two asset pairs in the liquidity pool.
LAST_MODIFIED_LEDGERNUMBERThe ledger sequence number when the ledger entry was last modified. Deletions do not count as a modification and will report the prior modification sequence number.
LEDGER_ENTRY_CHANGENUMBERCode that describes the ledger entry change type that was applied to the ledger entry.
DELETEDBOOLEANIndicates whether the ledger entry (account, claimable balance, trust line, offer, liquidity pool) has been deleted or not. Once an entry is deleted, it cannot be recovered.
BATCH_IDTEXTString representation of the run id for a given DAG in Airflow. Takes the form of “scheduled__<batch_end_date>-<dag_alias>”. Batch ids are unique to the batch and help with monitoring and rerun capabilities.
BATCH_RUN_DATETIMESTAMP_NTZThe start date for the batch interval. When taken with the date in the batch_id, the date represents the interval of ledgers processed. The batch run date can be seen as a proxy of closed_at for a ledger.
BATCH_INSERT_TSTIMESTAMP_NTZThe timestamp in UTC when a batch of records was inserted into the database. This field can help identify if a batch executed in real time or as part of a backfill. The timestamp should not be used during ad hoc analysis and is useful for data engineering purposes.
LEDGER_SEQUENCENUMBERThe sequence number of the ledger.
FACT_LIQUIDITY_POOLS_IDTEXTUnique primary key for the dimension table, used as the main identifier for each record.
INSERTED_TIMESTAMPTIMESTAMP_NTZTimestamp when this record was inserted.
MODIFIED_TIMESTAMPTIMESTAMP_NTZTimestamp when this record was last modified.