> ## Documentation Index
> Fetch the complete documentation index at: https://pessoal-86816071.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Environment

> Complete reference for the .env file used by protocol adapters, Ranger, and vault operations.

# Environment

The runtime auto-loads `.env` and `.env.local`.

Start from:

```bash theme={null}
cp .env.example .env
```

## Drift

| Variable                    | Description                                      |
| --------------------------- | ------------------------------------------------ |
| `DRIFT_RPC_URL`             | RPC used by the Drift adapter                    |
| `DRIFT_OWNER_ADDRESS`       | Expected Drift owner address                     |
| `DRIFT_ENV`                 | Drift environment, usually `mainnet-beta`        |
| `DRIFT_MARKET_INDEX`        | Spot market index                                |
| `DRIFT_MARKET_SYMBOL`       | Spot market symbol                               |
| `DRIFT_SUB_ACCOUNT_ID`      | Drift subaccount ID                              |
| `DRIFT_USER_NAME`           | Drift user name used during init                 |
| `DRIFT_INCLUDE_ATA_IXS`     | Whether to include ATA creation instructions     |
| `DRIFT_INIT_USER_IF_NEEDED` | Whether to auto-init a missing user              |
| `DRIFT_COMMITMENT`          | Solana commitment level                          |
| `DRIFT_SMOKE_MODE`          | `deposit` or `withdraw` for `drift-smoke.ts`     |
| `DRIFT_LIVE_ACTION`         | `deposit` or `withdraw` for `drift-live-send.ts` |
| `DRIFT_LIVE_AMOUNT_USD`     | USD-sized notional used by `drift-live-send.ts`  |

## Kamino

| Variable                | Description                    |
| ----------------------- | ------------------------------ |
| `KAMINO_RPC_URL`        | RPC used by the Kamino adapter |
| `KAMINO_OWNER_ADDRESS`  | Expected Kamino owner address  |
| `KAMINO_MARKET_ADDRESS` | Kamino market address          |
| `KAMINO_RESERVE_SYMBOL` | Reserve symbol, usually `USDC` |

## Ranger and vault

| Variable                       | Description                                     |
| ------------------------------ | ----------------------------------------------- |
| `VAULT_RPC_URL`                | RPC used by vault operator CLIs                 |
| `RANGER_RPC_URL`               | RPC used by Ranger runtime                      |
| `VAULT_ADDRESS`                | Vault PDA if already known                      |
| `VAULT_PROGRAM_ID`             | Deployed program ID                             |
| `VAULT_DEPOSIT_MINT`           | Base asset mint, usually mainnet `USDC`         |
| `VAULT_NAME`                   | Human-readable vault name                       |
| `RANGER_ALLOW_SIMULATED_STEPS` | Allows hybrid runs with non-live strategy paths |
| `SOLANA_SKIP_PREFLIGHT`        | Toggle Solana preflight checks                  |
| `COBO_MPC_PUBKEY`              | Optional manager pubkey override                |
| `RANGER_EXECUTOR_PUBKEY`       | Optional executor pubkey override               |

## Vault lifecycle

| Variable                             | Description                                       |
| ------------------------------------ | ------------------------------------------------- |
| `VAULT_SHARE_MINT_KEYPAIR_PATH`      | Keypair file for the share mint                   |
| `VAULT_TREASURY_KEYPAIR_PATH`        | Keypair file for the vault treasury token account |
| `VAULT_USER_KEYPAIR_PATH`            | Optional keypair for vault user actions           |
| `VAULT_ADMIN_ACTION`                 | Admin action for `vault-admin.ts`                 |
| `VAULT_USER_ACTION`                  | User action for `vault-user.ts`                   |
| `VAULT_DEPOSIT_AMOUNT_USDC`          | Deposit amount in raw mint units                  |
| `VAULT_WITHDRAW_SHARE_AMOUNT`        | Share burn amount in raw units                    |
| `VAULT_WITHDRAWAL_REQUEST_ID`        | Withdrawal request id used for finalize           |
| `VAULT_STRATEGY_ID`                  | Strategy id used by strategy admin actions        |
| `VAULT_STATUS_STRATEGY_ID`           | Optional strategy filter for `vault-status.ts`    |
| `VAULT_STATUS_OWNER_ADDRESS`         | Optional owner for withdrawal inspection          |
| `VAULT_STATUS_WITHDRAWAL_REQUEST_ID` | Optional withdrawal request filter                |

## Strategy manifests

| Variable                                 | Description                 |
| ---------------------------------------- | --------------------------- |
| `STRATEGY_MARGINFI_CANARY_MANIFEST_PATH` | MarginFi manifest file path |
| `STRATEGY_PERENA_EXOTIC_MANIFEST_PATH`   | Perena manifest file path   |

## Signers

| Variable                       | Description                 |
| ------------------------------ | --------------------------- |
| `COBO_MPC_KEYPAIR_PATH`        | COBO manager signer file    |
| `RANGER_EXECUTOR_KEYPAIR_PATH` | Ranger executor signer file |
| `VAULT_AUTHORITY_KEYPAIR_PATH` | Vault authority signer file |

## Important unit note

Amounts like `VAULT_DEPOSIT_AMOUNT_USDC=1000000` are raw token units.

For a `6` decimal `USDC` mint:

* `1000000` = `1 USDC`
* `10000000` = `10 USDC`
