Skip to main content
Providers are the upstream RPC endpoints that Lasso routes requests to. Each chain can have multiple providers with different priorities, capabilities, and access methods.

Provider Fields

Providers are defined in the providers list under each chain configuration.
id
string
required
Unique identifier for the provider within the chain. Used in metrics, logs, and provider-specific routing.
name
string
Display name shown in the dashboard and logs. Defaults to id if omitted.
url
string
required
HTTP RPC endpoint URL. Supports environment variable substitution.
*At least one of url or ws_url is required.
ws_url
string
WebSocket RPC endpoint URL. Required for subscriptions and real-time block tracking.
priority
integer
Routing priority. Lower values = higher priority. Used by the :priority strategy and as a tiebreaker in other strategies.
Common patterns:
  • 1-5: Your own nodes and premium providers
  • 10-20: Free public providers
  • 100+: Last-resort fallbacks
archival
boolean
default:"true"
Whether this provider serves historical/archival data. Non-archival providers are excluded for requests older than selection.archival_threshold.
subscribe_new_heads
boolean
Override chain-level websocket.subscribe_new_heads for this provider.
capabilities
object
Provider capabilities and limits. See Capabilities for details.

Basic Provider Example

Environment Variable Substitution

Provider URLs support ${ENV_VAR} substitution for API keys and secrets. Unresolved variables crash at startup to prevent silent misconfiguration.

Basic Substitution

Set the environment variable:

Multiple Variables

.env File Support

Lasso loads .env files from the project root if present:
System environment variables take precedence over .env values.

BYOK (Bring Your Own Keys)

Use your own provider API keys alongside public providers for better rate limits and reliability.

Example: Tiered Provider Setup

Benefits of BYOK

Paid provider plans typically offer 10-100x higher rate limits than free public endpoints.
Your own nodes and paid providers have dedicated capacity and SLAs.
Use free public providers for low-priority traffic and paid providers for critical requests.
Route sensitive requests to your own infrastructure while using public providers for general queries.

Provider Override

Bypass routing strategies and send requests directly to a specific provider:
Example:
Use cases:
  • Testing specific provider behavior
  • Debugging provider issues
  • Sending requests to providers with unique features

Common Provider Patterns

Archival + Pruned Combination

Lasso automatically routes historical requests to archival providers and recent requests to pruned providers.

WebSocket Fallback

Multi-Region Setup

Deploy Lasso nodes in each region and configure routing to prefer local providers.

Provider Configuration from default.yml

Here’s a real example from the included default.yml profile:

Best Practices

Provider IDs appear in metrics and logs. Use names like ethereum_llamarpc or base_alchemy that include both chain and provider.
WebSocket support enables real-time block tracking and reduces polling overhead.
Incorrect capability configuration can cause request failures. Test providers and document their actual limits.
Use priority tiers to control routing order: own nodes (1-5), paid providers (10-20), free providers (30-50), fallbacks (100+).
Use YAML comments to note rate limits, known issues, or special behavior.

Next Steps

Capabilities

Configure provider capabilities and error handling

Environment Variables

Learn about runtime configuration options