Skip to main content
This guide walks you through integrating a deployed Conduit into your platform. By the end, you’ll be able to show balances, handle deposits and withdrawals, preview operations with fees, and monitor positions through the Railnet API.
This guide assumes a Conduit has already been deployed for your platform. If you need to deploy one first, see Create a Conduit.

Prerequisites

  • Conduit address — the deployed Conduit contract on your target network
  • RPC endpoint — an Ethereum JSON-RPC provider (Alchemy, Infura, etc.)
  • Railnet API endpointhttps://graphql-enriched.staging.railnet.org/query (staging)

Read Conduit state

A Conduit exposes view functions you can call directly on-chain to display balances, share prices, and product status in your UI.

Product info

Balances and share price

Preview operations

Use estimate() to show users what they’ll receive after fees before they commit to a transaction. Use convert() for a pure conversion without fees (e.g., displaying portfolio value).
estimate() includes all fee types (deposit, redeem, management, performance). Use it for transaction previews. Use convert() for display-only share-to-asset conversions where fees don’t apply.

Handle deposits

Users deposit base assets (e.g., USDC) and receive Conduit shares representing proportional ownership. The Conduit handles all interaction with the underlying strategy.
1

Approve the Conduit

The user approves the Conduit to spend their tokens.
2

Create the deposit

The Conduit binds each query id to its creator: query.salt must equal keccak256(abi.encode(msg.sender, sourceSalt)), otherwise create reverts InvalidQuerySalt. This stops anyone else from occupying the id your user’s query would get.
The query’s owner and receiver are always the Conduit; the userAddress argument is who receives the minted cShares.
output.value is a floor enforced at the Vehicle output only. It ignores Conduit fees and the cShare exchange rate, so it does not bound what the user finally receives — set it from estimate() if you need slippage protection, or 0 to disable it.
For sync strategies (e.g., Aave, Compound), the deposit settles in the same transaction. The user receives shares immediately.For async strategies (e.g., Ethena, Syrup), the query enters PROCESSING. A keeper calls process() automatically when the underlying protocol is ready — the user doesn’t need to take any further action.

Handle withdrawals

Users burn Conduit shares and receive the underlying asset. Call createRedeemFromConduitShares — it converts the cShare amount to Vehicle shares at the current ratio and hands the assembled REDEEM query to the same create entrypoint. Building the query yourself only makes sense if you already hold a Vehicle-share figure; input.asset would then have to be the Vehicle address, never the Conduit’s.
No approve call is needed on either path. The Conduit recognizes a Vehicle-share input and burns the caller’s cShares through its internal ERC-20 primitives, so a withdrawal is a single transaction.
Same settlement behavior as deposits: sync strategies settle immediately, async strategies are settled automatically by keepers.
For async strategies, keepers monitor active queries and call process() when the underlying protocol is ready to settle. Your platform doesn’t need to build monitoring infrastructure, and users never need to return for a second transaction. The experience is identical for sync and async strategies from the user’s perspective.

Monitor with the Railnet API

The Railnet GraphQL API provides indexed on-chain data for building dashboards, tracking operations, and generating reports. Use it alongside on-chain view calls for a complete picture.
This is the staging endpoint. The production endpoint will be provided when available.
See the API reference for query conventions and core entities. Addresses are indexed lowercase, so filter them with _ilike, and every numeric value is returned as a decimal string in raw on-chain units.

Read Conduit configuration

One query replaces most of the view calls above, and adds fee configuration, compliance mode, and yield.
GraphQL

Query a user’s position

ConduitBalance holds the share balance of every holder of your Conduit’s token.
GraphQL

Track operation lifecycle

Each deposit or withdrawal is a ConduitQuery wrapping a STEAM Query. Read query.state for the current STEAM state, and query.input / query.output for the assets involved.
GraphQL
To surface a “pending operations” badge, filter out the two terminal states:
GraphQL

Poll for updates

Fetch position data on a regular interval to keep your UI current.
TypeScript
GraphQL errors come back with HTTP 200 in the errors array — check it explicitly instead of relying on the status code.

Next steps

Configure fees

Set up management, performance, deposit, and redeem fees for your Conduit.

Set up compliance

Configure allowlists, blocklists, and sanctions screening.

Conduit reference

Full technical reference for the Conduit contract.