# Centrifuge \[Distribute Centrifuge pool yield, with the request cycle handled for you]

:::info
Railnet connects Centrifuge through the generic **`ERC7540Vehicle`** adapter.
:::

[Centrifuge](https://centrifuge.io) tokenizes funds and real-world asset pools. Participants subscribe and redeem through an asynchronous request cycle rather than an instant swap.

## At a glance

| | |
|---|---|
| **Protocol** | [Centrifuge](https://centrifuge.io), tokenized funds and RWA pools |
| **Yield** | Pool performance |
| **Vehicle** | `ERC7540Vehicle` (generic async adapter) |
| **Flows** | Queued both ways, batched per side |
| **Networks** | Ethereum mainnet |
| **Deposit assets** | The vault's `asset()` |
| **Status** | Available |

## How Railnet integrates it

Centrifuge vaults are asynchronous in both directions, so both modes take the ERC-7540 queue path, resolved per mode from the vault's ERC-165 answers. Each Query registers demand in a queue; the queue batches it into one `requestDeposit` or `requestRedeem` under the Vehicle's address and claims the result when the pool fulfils it, moving Queries `PROCESSING → UNLOCKING → SETTLED` under keepers. The Vehicle's position and accounting read `vault.share()`, since the Centrifuge vault itself is not an ERC-20. Its claim path truncates `maxDeposit` and converts through a D18 price, so minted shares can sit about 1 ppm below an optimistic `convertToShares` estimate.

## Considerations

* Pending time is the pool operator's cadence. Confirm it with the issuer before promising a withdrawal SLA.
* Set `initialExpectedSupply` as a true lower bound with a small buffer, or the D18 rounding blocks `finalize()`.
* Centrifuge pools can restrict who holds a share class. Check whether the Vehicle and its two queues need eligibility.
* This is credit and fund risk, not lending-market risk. See [Risk management](/strategies/risk-management).

## Spawn parameters

`vault` names the Centrifuge vault. This factory takes the seed deposit directly as `initialDepositSize`, plus queue parameters per mode: `requestThreshold` is the demand that must accumulate before a request goes out. Deposits are async, so `spawn()` leaves the Vehicle `PROCESSING` and `finalize()` enables it once the pool fulfils the seed request. Put a Conduit on it: [Quick start](/conduits/quick-start), [Integrate a Conduit](/developers/integrate-conduit).

```solidity [Solidity]
ERC7540VehicleFactory.SpawnParams memory params = ERC7540VehicleFactory.SpawnParams({
    vault: CENTRIFUGE_VAULT_ADDRESS,
    accessControl: accessControl,
    feeManager: FeeManager(address(0)),
    modulesManager: ModulesManager(address(0)),
    querySalt: bytes32(0),
    deploymentSalt: keccak256("platform-centrifuge-v1"),
    initialDepositSize: 1e6,
    initialExpectedSupply: 0.9999e18,              // Lower bound: D18 price rounding
    depositQueueParams: ERC7540VehicleFactory.QueueParams({
        allowRequestIncreases: true,
        requestThreshold: 1000e6
    }),
    redeemQueueParams: ERC7540VehicleFactory.QueueParams({
        allowRequestIncreases: true,
        requestThreshold: 1000e18
    }),
    registry: queryRegistry
});
```

## Next steps

<Cards>
  <Card title="Any ERC-7540 vault" description="Queue mechanics and live Vehicles." icon="layers" to="/yield-sources/erc-7540" />

  <Card title="Quick start" description="Specify your Conduit." icon="rocket" to="/conduits/quick-start" />
</Cards>
