Lend

Deposit into a vault with an EVM account

Changed on

Deposits the vault's underlying asset (e.g. USDC) from an EVM account into a vault. The account signs an EIP-2612 permit authorizing the deposit, and the token approval and deposit are executed in a single transaction. The transaction hash is returned in the response. For deposits from EVM Smart Accounts, use depositToVaultWithEvmSmartAccount instead. The amount field accepts human-readable amounts as decimal strings (e.g., "1.5", "25.50") in the standard unit denomination of the vault's underlying asset.

post/v2/evm/accounts/{address}/lend/deposit

Request

  • Base URL
    https://api.cdp.coinbase.com/platform
  • Auth
    HTTP bearer

Path parameters

address, string required

The 0x-prefixed address of the EVM account to deposit from.

Headers

X-Wallet-Auth, string required

A JWT signed using your Wallet Secret, encoded in base64. Refer to the Generate Wallet Token section of our Authentication docs for more details on how to generate your Wallet Token.

X-Idempotency-Key, string

An optional string request header for making requests safely retryable. When included, duplicate requests with the same key will return identical responses. Refer to our Idempotency docs for more information on using idempotency keys.

Request body

DepositToVaultWithEvmAccountRequest required
object

A request to deposit the vault's underlying asset (e.g. USDC) into a vault from an EVM account. The account signs an EIP-2612 permit authorizing the deposit, and the token approval and deposit are executed in a single transaction.

maxSlippageBps, integer

The maximum share-price movement tolerated between calldata construction and onchain execution, in basis points. The deposit reverts if the vault's share price moves beyond this bound. A guard of 100 bps (i.e. 1%) is applied when omitted.

Example request

{
  "vaultId": "vault_019f5f10-096a-7a23-86df-f479650d813f",
  "amount": "25.50",
  "receiver": "0x1234567890123456789012345678901234567890"
}

Response

Successfully broadcast the deposit.

EoaVaultDepositResponse required

The result of a vault deposit from an EOA after broadcast.

transactionHash, string required

The hash of the broadcast deposit transaction, as a 0x-prefixed hex string.

Example response

{
  "transactionHash": "0xf8f98fb6726fc936f24b2007df5cb20e2b8444ff3dfaa2a929335f432a9be2e7"
}

Changes

    • warning

      added the new policy_not_applicable enum value to the errorType response property for the response status

    • warning

      added the new policy_not_applicable enum value to the errorType response property for the response status

    • warning

      added the new policy_not_applicable enum value to the errorType response property for the response status

    7 more changes in this revision