# Automated Liquidity Manager

Key Tables:

* **Pools**: Information about liquidity pools, including details like pool address, token symbols, and liquidity amounts.
* **Position Snapshot**: Snapshot of user positions in liquidity pools, detailing their share in the pool and the associated value.
* **Pool Snapshot**: Snapshot of pool state over time, including fees earned, and liquidity supplied.
* **Events**: Tracks user activities like deposits, withdrawals, and changes to pool positions.

{% tabs %}
{% tab title="Pools" %}

| Property                                  | Description                                                                              | Type   |
| ----------------------------------------- | ---------------------------------------------------------------------------------------- | ------ |
| chain\_id                                 | The standard chain id.                                                                   | number |
| timestamp                                 | The timestamp this pool was created.                                                     | number |
| creation\_block\_number                   | The block number that this pool was created.                                             | number |
| strategy\_vault\_contract\_address        | The contract address of the strategy vault which manages the liquidity pool positions.   | string |
| liquidity\_pool\_address                  | The contract address of the underlying liquidity pool where liquidity are deposited into | string |
| strategy\_vault\_receipt\_token\_address  | The contract address of ERC20 token which represents the share of liquidity provided.    | string |
| strategy\_vault\_receipt\_token\_decimals | The decimal amount of the ERC20 receipt token.                                           | number |
| strategy\_vault\_receipt\_token\_symbol   | The symbol of the receipt token.                                                         | string |
| {% endtab %}                              |                                                                                          |        |

{% tab title="Position Snapshot" %}

| Property                           | Description                                                                                                       | Type   |
| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------ |
| timestamp                          | The timestamp of the snapshot.                                                                                    | number |
| block\_date                        | The timestamp truncated (ie, YYYY-MM-DD format for daily snapshots and YYYY-MM-DD HH:00:00 for hourly snapshots). | date   |
| chain\_id                          | The standard chain id.                                                                                            | number |
| strategy\_vault\_contract\_address | The address of the strategy vault this user has a position in.                                                    | string |
| user\_address                      | The address of the user who has a position in the strategy vault.                                                 | string |
| liquidity\_pool\_address           | The address of the underlying liquidity pool where liquidity are deposited into                                   | string |
| underlying\_token\_address         | The address of the supplied underlying token.                                                                     | string |
| underlying\_token\_index           | The index of the underlying token in the smart contract, default 0.                                               | number |
| underlying\_token\_amount          | The amount based on the user's share of the total underlying token, decimal normalized.                           | number |
| underlying\_token\_amount\_usd     | The amount based on the user's share of the total underlying token, in USD.                                       | number |
| total\_fees\_usd                   | The total amount of revenue and fees paid in this pool in the given snapshot, in USD.                             | number |
| {% endtab %}                       |                                                                                                                   |        |

{% tab title="Pool Snapshot" %}

| Property                           | Description                                                                                                       | Type   |
| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------ |
| timestamp                          | The timestamp of the snapshot.                                                                                    | number |
| block\_date                        | The timestamp truncated (ie, YYYY-MM-DD format for daily snapshots and YYYY-MM-DD HH:00:00 for hourly snapshots). | date   |
| chain\_id                          | The standard chain id.                                                                                            | number |
| strategy\_vault\_contract\_address | The address of the strategy vault this user has a position in.                                                    | string |
| liquidity\_pool\_address           | The address of the underlying liquidity pool where liquidity are deposited into                                   | string |
| underlying\_token\_address         | The address of the supplied underlying token.                                                                     | string |
| underlying\_token\_index           | The index of the underlying token in the smart contract, default 0.                                               | number |
| underlying\_token\_amount          | The amount of underlying token supplied in this pool, decimal normalized.                                         | number |
| underlying\_token\_amount\_usd     | The amount of underlying tokens supplied in this pool, in USD.                                                    | number |
| total\_fees\_usd                   | The total amount of revenue and fees paid in this pool in the given snapshot, in USD.                             | number |
| {% endtab %}                       |                                                                                                                   |        |

{% tab title="Events" %}

| Property                   | Description                                                                               | Type   |
| -------------------------- | ----------------------------------------------------------------------------------------- | ------ |
| timestamp                  | The timestamp of the transaction.                                                         | number |
| chain\_id                  | The standard id of the chain.                                                             | number |
| block\_number              | The block number of the trade.                                                            | number |
| log\_index                 | The event log                                                                             | number |
| transaction\_hash          | The hash of the transaction.                                                              | string |
| user\_address              | The address that initiates the transaction (ie, the transaction signer).                  | string |
| pool\_address              | The smart contract address of the pool.                                                   | string |
| underlying\_token\_address | The contract address of the underlying token or deposited token.                          | string |
| amount                     | The amount of token transacted, decimal normalized.                                       | number |
| amount\_usd                | The amount of token transacted, in USD.                                                   | number |
| event\_type                | The type of event, corresponds to the action taken by the user (ie, deposit, withdrawal). | string |
| {% endtab %}               |                                                                                           |        |
| {% endtabs %}              |                                                                                           |        |
