In Railnet smart contracts, an Allocation Strategy is implemented as a MultiVehicle. See Glossary for all terminology.
If you are a Conduit owner deploying a strategy you will own and delegate to an asset manager, see Use a Strategy instead.
Prerequisites
- A wallet with funds — the deposit asset (e.g. USDC) for the initial deposit and ETH for gas
- The
FACTORY_SPAWNrole on the Multi-Vehicle factory (or access to a public factory) - The factory must not be deprecated
Every Allocation Strategy deployment requires an initial deposit. This is a security measure to prevent inflation attacks (zero-share vulnerability). The shares minted from this deposit are sent to the burn address and can never be withdrawn.
Deploy External Access Control (EAC)
Railnet uses an External Access Control contract to provide Role-Based Access Control (RBAC) across all strategies you operate. You define roles and grant them to different addresses from this single contract.You must deploy at least one EAC before creating any Allocation Strategy.Parameters:
initialDelay— delay for admin operations (in seconds), set to0for immediate accessinitialDefaultAdmin— the address grantedDEFAULT_ADMIN_ROLEinitialRoles— array of initial role attributions (can be empty and configured later)deploymentSalt— salt for deterministic CREATE2 deployment
Deploy Fee Manager (optional)
The Fee Manager contract handles all fee-related operations for your Allocation Strategy: performance fees, management fees, deposit fees, and redemption fees. You can configure initial fee rates, maximum fee caps, and fee recipients.If you do not need fees, you can pass the zero address (
0x0000...0000) when deploying the Allocation Strategy.Parameters:accessControl— your EAC contract addressinitialFees— fee rates in basis points (1 bps = 0.01%)initialMaxFees— maximum fee caps that can never be exceededinitialRecipients— fee recipients with their share in bps (must sum to 10,000)deploymentSalt— salt for deterministic CREATE2 deployment
Approve the initial deposit
When creating an Allocation Strategy, you select a single deposit asset (e.g. USDC). You must make an initial deposit (at least 1 unit of the asset) to protect against inflation attacks.Approve the Multi-Vehicle Factory to spend the required amount on the ERC-20 token contract.
Deploy the Allocation Strategy
Deploy the full Allocation Strategy ecosystem in a single transaction. The factory creates the MultiVehicle, Sector Accounting Engine, Queue Strategy Engine, Sub Query Engine, and Query Redeem Queue — all correctly linked and initialized.Parameters:
asset— the underlying deposit asset (e.g. USDC)name— the ERC-20 token name for Allocation Strategy sharessymbol— the ERC-20 token symbol for Allocation Strategy sharesinitialInterceptions— interceptor rules for reward distribution (can be empty)accessControl— your EAC contract addressfeeManager— Fee Manager address (or zero address for no fees)modulesManager— Modules Manager address (or zero address)salts— collection of deployment salts for all underlying contractsinitialDepositSize— amount of the initial deposit (in asset decimals)initialExpectedSupply— minimum expected supply after initial deposit (generally1e18)
What you deployed
Your Allocation Strategy ecosystem now consists of five interconnected contracts:| Contract | Purpose |
|---|---|
| MultiVehicle | Main Allocation Strategy contract. Users deposit and receive ERC-20 shares. |
| Sector Accounting Engine | Tracks all asset allocations across yield sources and idle sectors. |
| Queue Strategy Engine | Defines deposit/redeem priority queues for automated allocation. |
| Sub Query Engine | Executes deposit and redeem queries on yield sources. |
| Query Redeem Queue | Handles asynchronous redemption processing. |
Next steps
Operate an Allocation Strategy
Authorize yield sources, configure allocation queues, and operate your Allocation Strategy.
Configure fees
Set up fee structures for your Allocation Strategy.