> ## Documentation Index
> Fetch the complete documentation index at: https://docs.allium.so/llms.txt
> Use this file to discover all available pages before exploring further.

# User Actions 🌱

> Perpl collateral deposits and withdrawals on Monad.

### Table Details

| Property | Value |
| - | - |
| Table Name | `monad.perpetuals.user_actions` |
| Table Status | Beta 🌱 |
| Unique Key | `block_timestamp`, `unique_id` |

`monad.perpetuals.user_actions` has one row per AUSD collateral deposit to or withdrawal from a Perpl account. `action_type` distinguishes a deposit from a withdrawal. Transfers from the protocol to accounts (rebates, rewards, builder payouts) are not user actions.

Coverage is Perpl (`project = 'perpl'`, `protocol = 'perpl'`, `version = 'v1'`). See [Perpl](https://docs.allium.so/historical-data/perpetuals/perpl.md) for venue notes.

### Table Columns

| Column Name | Data Type | Description |
| - | - | - |
| project | VARCHAR(16777216) | The perpetuals project. |
| protocol | VARCHAR(16777216) | The specific protocol within the project. |
| version | VARCHAR(16777216) | Protocol version. |
| chain | VARCHAR(16777216) | Blockchain network. |
| action\_type | VARCHAR(16777216) | Direction of the collateral movement: deposit or withdrawal. |
| event\_name | VARCHAR(16777216) | Protocol event that recorded the deposit or withdrawal. |
| pool\_address | VARCHAR(42) | Exchange contract that holds the collateral. |
| user\_address | VARCHAR(42) | Wallet that deposited or withdrew. |
| token\_address | VARCHAR(42) | Collateral token address (AUSD). |
| token\_symbol | VARCHAR(16777216) | Collateral token symbol. |
| token\_decimals | NUMBER(38,0) | Number of decimals of the collateral token. |
| raw\_amount\_str | VARCHAR(16777216) | Raw token amount as a string. |
| amount | NUMBER(38,6) | Token amount adjusted for decimals. |
| usd\_amount | NUMBER(38,6) | Amount in USD. |
| usd\_exchange\_rate | FLOAT | USD price of the token used for `usd_amount`. |
| extra\_fields | VARIANT | Protocol-specific detail: Perpl account id and the account balance after the movement. |
| transaction\_hash | VARCHAR(66) | Transaction hash. |
| transaction\_index | NUMBER(38,0) | Position of the transaction within the block. |
| transaction\_from\_address | VARCHAR(42) | Address that signed and submitted the transaction. |
| transaction\_to\_address | VARCHAR(42) | Address the transaction was sent to. |
| log\_index | NUMBER(38,0) | Position of the event log within the transaction. |
| topic0 | VARCHAR(66) | First topic of the event log (the event signature hash). |
| block\_number | NUMBER(38,0) | Block number containing the event. |
| block\_timestamp | TIMESTAMP\_NTZ(9) | Block timestamp of the event. |
| block\_hash | VARCHAR(66) | Hash of the block containing the event. |
| unique\_id | VARCHAR(16777216) | Unique identifier for the row. |
| \_created\_at | TIMESTAMP\_NTZ(9) | Timestamp of when the entry was created in the database. |
| \_updated\_at | TIMESTAMP\_NTZ(9) | Timestamp of when the entry was last updated in the database. |

### Sample Query

```sql theme={null}
SELECT block_timestamp, user_address, action_type, usd_amount, transaction_hash
FROM monad.perpetuals.user_actions
WHERE block_timestamp >= current_date - 30
  AND project = 'perpl'
ORDER BY block_timestamp DESC
LIMIT 100;
```
