# Deposits

Topping up an existing vault is a standard ERC‑4626 `deposit` call. No additional authorization or signatures are required — the wallet that created the vault (or any wallet explicitly granted deposit rights) can deposit at any time.

### Approve the vault

```ts
await walletClient.writeContract({
  address: underlyingToken,
  abi: erc20Abi,
  functionName: 'approve',
  args: [vault, amount],
})
```

### Deposit

```ts
const vaultAbi = [{
  type: 'function', stateMutability: 'nonpayable', name: 'deposit',
  inputs: [
    {name: 'assets',   type: 'uint256'},
    {name: 'receiver', type: 'address'},
  ],
  outputs: [{name: 'shares', type: 'uint256'}],
}] as const

const hash = await walletClient.writeContract({
  address: vault,
  abi: vaultAbi,
  functionName: 'deposit',
  args: [amount, receiver],  // receiver is usually the same wallet
})
```

Shares are minted to `receiver` immediately. The share price reflects the accumulated yield at the time of the transaction.

### Using `mint` instead of `deposit`

Standard ERC‑4626 semantics apply:

* `deposit(assets, receiver)` — you specify the asset amount, the vault calculates and mints shares.
* `mint(shares, receiver)` — you specify the share amount, the vault calculates and pulls assets.

Use `deposit` when you know the asset amount (most common). Use `mint` when you want a precise share count (rare).

### Using permit (one transaction)

For underlying tokens that support EIP‑2612 (e.g. USDC), you can skip the separate approval and deposit in a single transaction:

```ts
// 1. Generate a permit signature authorizing the vault to pull `amount` from the wallet
const {v, r, s, deadline} = await signPermit({...})

// 2. Call the permit variant directly on the vault
await walletClient.writeContract({
  address: vault,
  abi: /* depositWithPermit ABI */,
  functionName: 'depositWithPermit',
  args: [amount, receiver, deadline, v, r, s],
})
```

`depositWithPermit` runs the permit and the deposit atomically — if the permit signature is invalid or expired but the wallet already has sufficient allowance, the deposit still succeeds; otherwise the transaction reverts.

### New shares start earning immediately

Deposited assets sit in the vault until Tesseract's next management cycle picks them up and allocates them into positions. From your perspective, share price continues to accrue as before — you don't need to wait for allocation before shares start representing a yield-bearing position.

***

Continue to [**Instant Withdrawals**](/dedicated-client-vaults/integration-guide/scenario-a/instant-withdrawals.md) for the withdrawal flow.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tesseract.fi/dedicated-client-vaults/integration-guide/scenario-a/deposits.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
