> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gauntlet.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Provisioner

> Depositor-facing entry and exit flows for multi-depositor vaults

## Overview

The `Provisioner` contract is the depositor-facing entry point for [MultiDepositorVault](/contract-reference/multi-depositor-vault) vaults. It sits between depositors and the underlying vault, managing share accounting, deposit/redeem requests, and cross-chain entry and exit flows. Depositors interact with the Provisioner to mint vault units on deposit and burn them on redemption.

The Provisioner supports two interaction models: synchronous deposits (immediate vault unit minting) and asynchronous requests (order-based fulfillment by a solver). The async model is essential for cross-chain operations where CCTP bridging introduces latency.

For the conceptual overview of how the Provisioner fits into cross-chain vault operations, see [Cross-Chain](/guides/concepts/supported-protocols/aera-v3/cross-chain).

## Functions

### deposit

Deposits assets and mints vault units synchronously. The Provisioner calculates the exchange rate using the `OracleRegistry` and mints units directly to the depositor.

**Signature:**

```solidity theme={null}
function deposit(uint256 assets, address receiver) external returns (uint256 shares)
```

| Parameter  | Type      | Description                               |
| ---------- | --------- | ----------------------------------------- |
| `assets`   | `uint256` | Amount of underlying assets to deposit    |
| `receiver` | `address` | Address to receive the minted vault units |

**Returns:** Number of vault units minted.

### mint

Mints a specific number of vault units by depositing the required assets.

**Signature:**

```solidity theme={null}
function mint(uint256 shares, address receiver) external returns (uint256 assets)
```

| Parameter  | Type      | Description                               |
| ---------- | --------- | ----------------------------------------- |
| `shares`   | `uint256` | Number of vault units to mint             |
| `receiver` | `address` | Address to receive the minted vault units |

**Returns:** Amount of assets deposited.

### requestDeposit

Places an asynchronous deposit request. A solver (typically the guardian) fulfills the request in a later transaction. Used for cross-chain deposits where bridging introduces latency.

**Signature:**

```solidity theme={null}
function requestDeposit(uint256 assets, address receiver, address owner) external returns (uint256 requestId)
```

| Parameter  | Type      | Description                                   |
| ---------- | --------- | --------------------------------------------- |
| `assets`   | `uint256` | Amount of assets to deposit                   |
| `receiver` | `address` | Address to receive vault units when fulfilled |
| `owner`    | `address` | Address that owns the deposit request         |

**Returns:** Unique request ID for tracking.

### requestRedeem

Places an asynchronous redemption request. The solver fulfills the request after the guardian completes exit flows and assets are available.

**Signature:**

```solidity theme={null}
function requestRedeem(uint256 shares, address receiver, address owner) external returns (uint256 requestId)
```

| Parameter  | Type      | Description                                         |
| ---------- | --------- | --------------------------------------------------- |
| `shares`   | `uint256` | Number of vault units to redeem                     |
| `receiver` | `address` | Address to receive underlying assets when fulfilled |
| `owner`    | `address` | Address that owns the redemption request            |

**Returns:** Unique request ID for tracking.

### redeem

Redeems vault units for underlying assets synchronously.

**Signature:**

```solidity theme={null}
function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets)
```

| Parameter  | Type      | Description                              |
| ---------- | --------- | ---------------------------------------- |
| `shares`   | `uint256` | Number of vault units to redeem          |
| `receiver` | `address` | Address to receive the underlying assets |
| `owner`    | `address` | Address that owns the vault units        |

**Returns:** Amount of underlying assets received.

### claimDeposit

Claims vault units from a fulfilled deposit request.

**Signature:**

```solidity theme={null}
function claimDeposit(uint256 requestId, address receiver) external returns (uint256 shares)
```

| Parameter   | Type      | Description                        |
| ----------- | --------- | ---------------------------------- |
| `requestId` | `uint256` | ID of the deposit request to claim |
| `receiver`  | `address` | Address to receive the vault units |

**Returns:** Number of vault units received.

### claimRedeem

Claims underlying assets from a fulfilled redemption request.

**Signature:**

```solidity theme={null}
function claimRedeem(uint256 requestId, address receiver) external returns (uint256 assets)
```

| Parameter   | Type      | Description                           |
| ----------- | --------- | ------------------------------------- |
| `requestId` | `uint256` | ID of the redemption request to claim |
| `receiver`  | `address` | Address to receive the assets         |

**Returns:** Amount of assets received.

## Events

### Deposit

Emitted when a synchronous deposit completes.

```solidity theme={null}
event Deposit(address indexed sender, address indexed receiver, uint256 assets, uint256 shares)
```

### DepositRequested

Emitted when an async deposit request is placed.

```solidity theme={null}
event DepositRequested(uint256 indexed requestId, address indexed owner, uint256 assets)
```

### RedeemRequested

Emitted when an async redemption request is placed.

```solidity theme={null}
event RedeemRequested(uint256 indexed requestId, address indexed owner, uint256 shares)
```

### DepositClaimed

Emitted when a fulfilled deposit request is claimed.

```solidity theme={null}
event DepositClaimed(uint256 indexed requestId, address indexed receiver, uint256 shares)
```

### RedeemClaimed

Emitted when a fulfilled redemption request is claimed.

```solidity theme={null}
event RedeemClaimed(uint256 indexed requestId, address indexed receiver, uint256 assets)
```

## Errors

### Provisioner\_\_RequestNotFulfilled

Thrown when attempting to claim a request that has not yet been fulfilled by the solver.

```solidity theme={null}
error Provisioner__RequestNotFulfilled(uint256 requestId)
```

### Provisioner\_\_InsufficientAssets

Thrown when the deposit amount is below the minimum or the vault cannot cover the redemption.

```solidity theme={null}
error Provisioner__InsufficientAssets()
```

### Provisioner\_\_NotOwner

Thrown when an unauthorized address attempts to cancel or modify a request.

```solidity theme={null}
error Provisioner__NotOwner()
```

## Inheritance

`Provisioner` is a standalone contract that interacts with `MultiDepositorVault`:

* **Provisioner** -- Depositor-facing deposit/redeem and async request management
  * Uses [MultiDepositorVault](/contract-reference/multi-depositor-vault) for asset custody
  * Uses `OracleRegistry` for exchange rate calculations (see [Periphery](/contract-reference/periphery))

<Info>
  This page was manually created as a baseline. Run the [contract reference generation pipeline](/contract-reference/overview#generation-pipeline) to update with complete NatSpec documentation from the Solidity source.
</Info>
