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

# Gas Station

> Pre-fund native token reserves to cover network fees on behalf of your users

The Gas Station solves one of the most common UX friction points in crypto applications: requiring users to hold native tokens just to pay network fees.

Without a Gas Station, a user who holds USDC on Solana still needs SOL to pay for the transaction fee. With a Gas Station, your platform pre-funds SOL (or ETH, BNB, etc.) and covers fees on behalf of your users — they only need to hold the token they actually want to send.

***

## How It Works

1. You add a gas station asset for a specific chain (e.g., SOL for Solana)
2. You fund the gas station wallet with native tokens
3. When a user initiates a transaction on that chain, the platform draws from the gas station to pay the network fee automatically
4. You monitor the gas station balance and top it up as needed

> [!NOTE]
>
> The Gas Station covers **network fees only**. Transaction amounts are still drawn from the user's wallet.

***

## Add a Gas Station Asset

**POST** `/assets/add-station-asset`

Creates a gas station wallet for a specific chain. The ticker must be the chain's native token.

**chain** `string` *required*

The blockchain to create a gas station for (e.g., `solana`, `ethereum`).

**ticker** `string` *required*

The native gas token for that chain. Must match the chain's native currency.

| Chain | Required Ticker |
| - | - |
| Ethereum | `ETH` |
| Solana | `SOL` |
| Polygon | `POL` |
| BSC | `BNB` |
| Base | `ETH_BASE` |
| Arbitrum | `ETH_ARBITRUM` |
| Optimism | `ETH_OPTIMISM` |
| XDC | `XDC` |

```bash cURL theme={null}
curl -X POST https://crypto-api.yativo.com/api/v1/assets/add-station-asset \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "chain": "solana",
    "ticker": "SOL"
  }'
```

```typescript TypeScript theme={null}
const gasStation = await client.assets.addStation({
  chain: 'solana',
  ticker: 'SOL',
});
console.log('Gas station address:', gasStation.address);
```

```python Python theme={null}
gas_station = client.assets.add_station(
    chain='solana',
    ticker='SOL',
)
print('Gas station address:', gas_station['address'])
```

```json Response theme={null}
{
  "id": "station_01abc123",
  "chain": "solana",
  "ticker": "SOL",
  "address": "GasStationXxKXtg2CW87d97TXJSDpbD5jBkheTqA83TZ",
  "balance": "0",
  "status": "active",
  "created_at": "2026-03-26T10:00:00Z"
}
```

Send SOL to the `address` to fund the gas station.

***

## Get Gas Station Assets

**POST** `/assets/get-station-assets`

Returns all gas station wallets and their current balances.

```bash cURL theme={null}
curl -X POST https://crypto-api.yativo.com/api/v1/assets/get-station-assets \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

```typescript TypeScript theme={null}
const stations = await client.assets.getStations();
```

```json Response theme={null}
{
  "station_assets": [
    {
      "id": "station_01abc123",
      "chain": "solana",
      "ticker": "SOL",
      "address": "GasStationXxKXtg2CW87d97TXJSDpbD5jBkheTqA83TZ",
      "balance": "5.2",
      "balance_usd": "750.40",
      "status": "active"
    },
    {
      "id": "station_02def456",
      "chain": "ethereum",
      "ticker": "ETH",
      "address": "0xGasStationAddr...",
      "balance": "0.05",
      "balance_usd": "125.00",
      "status": "active"
    }
  ]
}
```

***

## Monitoring & Top-Up

> [!WARNING]
>
> If the gas station runs out of native tokens, transactions on that chain will fail with an insufficient gas error. Monitor your gas station balance and set up top-up procedures before going to production.

### Low-balance alerts

When a gas station can no longer cover a transaction, Yativo emails your account owner. You can add recipients, get warned earlier at a balance you choose, and set this per network.

```
GET  /v1/gas-station-alerts/config          # your alert settings
PUT  /v1/gas-station-alerts/config          # create or update a setting
DELETE /v1/gas-station-alerts/config/{id}   # remove a setting
GET  /v1/gas-station-alerts/status          # gas stations currently alerting
POST /v1/gas-station-alerts/test            # send a test alert
```

| Field | Description |
| - | - |
| `network` | Chain the setting applies to, e.g. `SOL`. Leave out for a default that covers every network without its own setting |
| `recipient_emails` | Extra email addresses to notify |
| `threshold_amount` | Warn when the balance falls below this. `null` (default) alerts only when the station can't cover a transaction |
| `notify_account_owner` | Also email the account owner |
| `cooldown_minutes` | Minimum minutes between repeat alerts (at least 1) |
| `enabled` | Turn the setting on or off |

```bash theme={null}
curl -X PUT 'https://crypto-api.yativo.com/api/v1/gas-station-alerts/config' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "network": "SOL",
    "recipient_emails": ["ops@example.com"],
    "threshold_amount": 1.5
  }'
```

Saving the same `network` again updates that setting instead of adding a new one.

***

## Best Practices

> [accordion] Start with a conservative buffer
>
> When launching, fund each gas station with enough native tokens to cover several hundred transactions. Monitor actual consumption in the first week to calibrate your top-up schedule.

> [accordion] Get warned before a station runs dry
>
> Set a `threshold_amount` in your [low-balance alerts](#low-balance-alerts) so you're warned before a station runs dry, and check `GET /v1/gas-station-alerts/status` from your monitoring. Don't rely on manual checks in production.

> [accordion] Create a separate gas station per chain
>
> Each chain requires its own gas station. If you support 5 chains, you need 5 gas station wallets.

> [accordion] Account for gas price spikes
>
> On Ethereum and other congested networks, gas prices can spike dramatically. Keep a larger buffer on high-usage chains to survive short-term price spikes.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.