Skip to main content
In Railnet smart contracts, a Yield Source is connected via a Vehicle adapter. See Glossary for all terminology.
Integrating your protocol with Railnet means creating a Vehicle adapter that wraps your yield source using the STEAM standard (State Transition Engine for Asset Management). Once deployed, your yield source becomes composable with any Strategy on Railnet, giving asset managers a standardized way to allocate capital into your protocol.

What you will build

A Vehicle adapter implements the IVehicle interface, which defines a universal lifecycle for deposits and redemptions through a state machine. Your adapter handles the protocol-specific logic (calling your contracts, managing positions) while Railnet handles orchestration, fee management, and access control. The integration path depends on your protocol’s withdrawal mechanics:
  • Standard vaults (immediate deposits and withdrawals) produce the simplest adapters. Examples include Aave, Compound, and standard ERC-4626 vaults.
  • Custom protocols (cooldown periods, withdrawal queues, or per-address restrictions) require async adapters with keeper automation. Examples include Ethena and Syrup.

Two paths to integration

Wrap an existing vault

Connect a standard ERC-4626 vault to Railnet — the plug-and-play path for protocols with immediate deposits and withdrawals.

Build a custom adapter

Handle withdrawal delays, cooldown periods, and per-address restrictions with the async adapter pattern.

Value proposition

By connecting your yield source to Railnet, you gain access to the entire distribution network:
  • Instant distribution — asset managers across Railnet can allocate capital to your protocol through the standardized STEAM interface
  • No bilateral integrations — one adapter serves every Strategy and Conduit on the network
  • Automated operations — keepers handle routine async transitions, so your protocol works seamlessly even with cooldown periods or withdrawal queues
  • Composability — your yield source can be included in multi-source Strategies alongside Aave, Morpho, tokenized bonds, and other protocols

Vehicle adapter inheritance hierarchy

Every adapter inherits from a structured hierarchy that maximizes code reuse while allowing protocol-specific specialization:
IVehicle (Interface)
    BaseVehicle (Abstract)
        SingleAssetBaseVehicle (Abstract)
            AaveV3Vehicle
            CompoundV3Vehicle
            ERC4626Vehicle
            EthenaVehicle
            SyrupVehicle
        MultiVehicle
  • IVehicle defines the STEAM lifecycle methods: create, resume, unlock, recover, plus view methods like state, estimate, and totalAssets.
  • BaseVehicle implements ERC20 shares, query management, the facet pattern (to stay within the 24KB bytecode limit), and reentrancy protection.
  • SingleAssetBaseVehicle adds default routing, input/output validation, and share pricing math for single-asset adapters.
  • Concrete Vehicles implement the actual protocol interaction logic — your code lives here.

What you implement

When you create a new adapter, you focus on:
  1. Protocol interaction — the logic to deposit into and withdraw from your yield source.
  2. State transitions — defining when a query moves from PROCESSING to UNLOCKING (synchronously in create() or asynchronously via a keeper).
  3. Capacity checks — implementing _maxDeposit and _maxRedeem based on your protocol’s liquidity and constraints.
Everything else — share accounting, fee management, access control, module execution — is handled by the base contracts.

Additional resources

Set up keeper automation

Automate async adapter operations with keeper bots that monitor state and execute transitions.

Write adapter tests

Validate your adapter with Railnet’s testing framework. Inherit 100+ state machine tests automatically.

Supported protocols

See all supported DeFi protocols, native adapters, and factory addresses.

Create a Conduit

Build a Conduit on top of your yield source for direct end-user access.