---
updatedAt: 2026-05-14T11:27:34.000Z
---

Fetch the complete documentation index at: https://docs.blockdaemon.com/llms.txt. Use this file to discover all available pages before exploring further. Append .md to any documentation page URL to get its markdown version.

# Deposit

Facilitate the deposit of assets into lending protocols by specifying the asset, deposit amount, and optionally, a recipient address. This endpoint is designed for users to start earning interest or to use their deposited collateral for borrowing. Gas optimization settings ensure that the deposit transaction is both efficient and cost‐effective.

> 💡 
**Compute Unit Value:** `230` (Fixed)

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "contact": {
      "name": "Blockdaemon",
      "email": "info@blockdaemon.com"
    },
    "description": "The Blockdaemon DeFi API provides a single interface to a multitude of DeFi projects and blockchains",
    "title": "Blockdaemon DeFi API",
    "version": "1.0.0",
    "x-logo": {
      "altText": "Blockdaemon logo",
      "backgroundColor": "#fafafa",
      "url": "https://storage.googleapis.com/blockdaemon-app-static-images/marketing/PNG/dark-logo.png"
    }
  },
  "externalDocs": {
    "description": "Blockdaemon DeFi documentation",
    "url": "http://www.blockdaemon.com/api/defi"
  },
  "servers": [
    {
      "url": "https://svc.blockdaemon.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "`X-API-Key: <Token>` header must be set to authenticate API requests.You can create tokens in the \"Configure\" tab of your API access area at https://app.blockdaemon.com."
      }
    },
    "schemas": {
      "_lendborrow_deposit_Request": {
        "type": "object",
        "properties": {
          "lendborrowId": {
            "type": "string",
            "description": "The unique ID to specify the lending and borrowing protocol for routing relevant queries or transactions.",
            "enum": [
              "1000",
              "1003",
              "1005",
              "1200",
              "1208",
              "1203",
              "1204",
              "1205",
              "1206",
              "1207",
              "1100",
              "1300",
              "1302",
              "1400",
              "1401",
              "1402",
              "1403",
              "1404"
            ],
            "example": "1000"
          },
          "asset": {
            "type": "string",
            "description": "Token address of the asset to deposit.",
            "example": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
          },
          "amount": {
            "type": "string",
            "description": "Number of tokens, specified in the token's smallest denomination (base units). Do not send human-readable decimal values. Examples: 1 WETH (18 decimals) = \"1000000000000000000\"; 1 USDC (6 decimals) = \"1000000\".",
            "example": "1000000000000000000"
          },
          "onBehalfOf": {
            "type": "string",
            "description": "Public address of the user on whose behalf the deposit action will be executed.",
            "example": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402"
          },
          "from": {
            "type": "string",
            "description": "Blockchain address of the sender. For EVM chains, use a checksummed hex address (e.g., 0xABCDEF...). This address must hold sufficient balance and will sign the transaction.",
            "example": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402"
          },
          "gas": {
            "type": "string",
            "description": "Maximum number of gas units to allocate for the transaction, as an integer string (e.g., '200000'). If omitted, gas is estimated automatically. Note: this is gas units, not wei or gwei.",
            "example": "100000"
          },
          "gasPriority": {
            "type": "string",
            "description": "Specifies the priority level for gas fees (e.g., 'low', 'medium', or 'high'), which influences the transaction speed and cost.",
            "example": "low"
          },
          "enableFee": {
            "type": "boolean",
            "description": "Flag to include a basis points fee transaction alongside the main transaction when set to true.",
            "example": false
          },
          "batchOption": {
            "type": "string",
            "description": "Transaction batching standard to use. Supported values: 'EIP-5792' (wallet-level batching via wallet_sendCalls) or 'EIP-7702' (EOA code delegation via batcherContract). Requires batcherContract when using EIP-7702.",
            "enum": [
              "EIP-5792",
              "EIP-7702"
            ],
            "example": "EIP-5792"
          },
          "batcherContract": {
            "type": "string",
            "description": "The EOA address of the batcher that will be used to execute the transaction when using EIP-7702 batching. If not provided, the default batcher contract for the chain will be used.",
            "example": "0x9c933f9d2efd76ce25b0d3dde84d3f94e78a50ca"
          },
          "simulate": {
            "type": "boolean",
            "description": "When true, dry-runs the transaction batch via eth_simulateV1 and returns a simulate field with status and error on each transaction.",
            "example": false
          },
          "useCustomVaults": {
            "type": "boolean",
            "description": "A boolean flag to scope the API request. If true, the request will be processed using the partner's dedicated vaults. If false or omitted, it uses the standard public pools.",
            "example": false
          },
          "to": {
            "type": "string",
            "description": "Blockchain address of the recipient. For EVM chains, use a checksummed hex address (e.g., 0xABCDEF...).",
            "example": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402"
          },
          "market": {
            "type": "string",
            "description": "The market of the asset, such as USDC or WETH. Defaults to USDC.",
            "example": "USDC"
          },
          "marketId": {
            "type": "string",
            "description": "Specifies the market Id of any market in Morpho.",
            "example": "0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5"
          },
          "vaultAddress": {
            "type": "string",
            "description": "Specifies the vaultAddress of any vault in Morpho.",
            "example": "0xa258C4606Ca8206D8aA700cE2143D7db854D168c"
          },
          "collateral": {
            "type": "boolean",
            "description": "Specifies the condition for depositing the token as a supply to earn the yields only or use it as collateral to borrow loan asset.",
            "example": false
          }
        },
        "required": [
          "amount",
          "onBehalfOf",
          "from"
        ],
        "description": "The request body for a /defi/v1/lendborrow/deposit",
        "example": {
          "lendborrowId": "1000",
          "asset": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
          "amount": "1000000000000000000",
          "onBehalfOf": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
          "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
          "gas": "100000",
          "gasPriority": "low",
          "enableFee": false,
          "batchOption": "EIP-5792",
          "batcherContract": "0x9c933f9d2efd76ce25b0d3dde84d3f94e78a50ca",
          "simulate": false,
          "useCustomVaults": false,
          "to": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
          "market": "USDC",
          "marketId": "0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5",
          "vaultAddress": "0xa258C4606Ca8206D8aA700cE2143D7db854D168c",
          "collateral": false
        }
      }
    }
  },
  "tags": [
    {
      "name": "lendborrow",
      "description": "API endpoints for operations related to lending and borrowing"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "paths": {
    "/defi/v1/lendborrow/deposit": {
      "post": {
        "tags": [
          "lendborrow"
        ],
        "summary": "Deposit",
        "description": "Facilitate the deposit of assets into lending protocols by specifying the asset, deposit amount, and optionally, a recipient address. This endpoint is designed for users to start earning interest or to use their deposited collateral for borrowing. Gas optimization settings ensure that the deposit transaction is both efficient and cost‐effective.\n\n> 💡 \n**Compute Unit Value:** `230` (Fixed)",
        "operationId": "lendborrowDeposit",
        "requestBody": {
          "required": true,
          "description": "The request body for a /defi/v1/lendborrow/deposit",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/_lendborrow_deposit_Request"
              },
              "example": {
                "lendborrowId": "1000",
                "asset": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
                "amount": "1000000000000000000",
                "onBehalfOf": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
                "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
                "gas": "100000",
                "gasPriority": "low",
                "enableFee": false,
                "batchOption": "EIP-5792",
                "batcherContract": "0x9c933f9d2efd76ce25b0d3dde84d3f94e78a50ca",
                "simulate": false,
                "useCustomVaults": false,
                "to": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
                "market": "USDC",
                "marketId": "0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5",
                "vaultAddress": "0xa258C4606Ca8206D8aA700cE2143D7db854D168c",
                "collateral": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "description": "Numeric status code indicating success or failure of the API call",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Human-readable message describing the API result or error"
                    },
                    "data": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "chainId": {
                              "type": "string",
                              "description": "Blockchain network identifier (EVM chain ID, Solana chain name, etc.)",
                              "example": "1"
                            },
                            "from": {
                              "type": "string",
                              "description": "Sender's wallet address",
                              "example": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402"
                            },
                            "to": {
                              "type": "string",
                              "description": "Recipient's wallet address",
                              "example": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402"
                            },
                            "value": {
                              "type": "string",
                              "description": "Amount being transferred or involved in a transaction",
                              "example": "10"
                            },
                            "gas": {
                              "type": "string",
                              "description": "Gas limit for the transaction",
                              "example": "100000"
                            },
                            "gasPrice": {
                              "type": "string",
                              "description": "Price per gas unit for the transaction",
                              "example": "10000"
                            },
                            "data": {
                              "type": "string",
                              "description": "Main payload object or array returned by the API",
                              "example": "0x40e53eb7000000000000000000000000000000000000000000000000000000000016e360"
                            },
                            "estimationCheck": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "boolean"
                                }
                              ],
                              "description": "Flag or value indicating transaction fee/estimate status"
                            },
                            "referenceId": {
                              "type": "string",
                              "description": "Unique ID for tracking a specific transaction or operation",
                              "example": "8eec8150896e4fdaa26d4d1a1338d676"
                            },
                            "simulate": {
                              "type": "object",
                              "description": "Present when the request used `simulate: true`; eth_simulateV1 summary (omitted when simulation was not run).",
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "success",
                                    "failure"
                                  ]
                                },
                                "error": {
                                  "type": "string",
                                  "nullable": true,
                                  "description": "Failure reason when status is failure; null when status is success"
                                }
                              },
                              "required": [
                                "status",
                                "error"
                              ]
                            }
                          },
                          "required": [
                            "chainId",
                            "from",
                            "data",
                            "referenceId",
                            "estimationCheck",
                            "to",
                            "value"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "createFeeTxn": {
                              "type": "object",
                              "properties": {
                                "chainId": {
                                  "type": "string",
                                  "description": "Blockchain network identifier (EVM chain ID, Solana chain name, etc.)",
                                  "example": "1"
                                },
                                "from": {
                                  "type": "string",
                                  "description": "Sender's wallet address",
                                  "example": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402"
                                },
                                "to": {
                                  "type": "string",
                                  "description": "Recipient's wallet address",
                                  "example": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402"
                                },
                                "value": {
                                  "type": "string",
                                  "description": "Amount being transferred or involved in a transaction",
                                  "example": "10"
                                },
                                "gasPrice": {
                                  "type": "string",
                                  "description": "Price per gas unit for the transaction",
                                  "example": "10000"
                                },
                                "gas": {
                                  "type": "string",
                                  "description": "Gas limit for the transaction",
                                  "example": "100000"
                                },
                                "simulate": {
                                  "type": "object",
                                  "description": "Present when the request used `simulate: true` with `enableFee: true`; fee leg eth_simulateV1 summary.",
                                  "properties": {
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "success",
                                        "failure"
                                      ]
                                    },
                                    "error": {
                                      "type": "string",
                                      "nullable": true,
                                      "description": "Failure reason when status is failure; null when status is success"
                                    }
                                  },
                                  "required": [
                                    "status",
                                    "error"
                                  ]
                                }
                              },
                              "required": [
                                "chainId",
                                "from",
                                "to",
                                "value"
                              ]
                            },
                            "depositTxn": {
                              "type": "object",
                              "properties": {
                                "chainId": {
                                  "type": "string",
                                  "description": "Blockchain network identifier (EVM chain ID, Solana chain name, etc.)",
                                  "example": "1"
                                },
                                "from": {
                                  "type": "string",
                                  "description": "Sender's wallet address",
                                  "example": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402"
                                },
                                "to": {
                                  "type": "string",
                                  "description": "Recipient's wallet address",
                                  "example": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402"
                                },
                                "value": {
                                  "type": "string",
                                  "description": "Amount being transferred or involved in a transaction",
                                  "example": "10"
                                },
                                "gas": {
                                  "type": "string",
                                  "description": "Gas limit for the transaction",
                                  "example": "100000"
                                },
                                "gasPrice": {
                                  "type": "string",
                                  "description": "Price per gas unit for the transaction",
                                  "example": "10000"
                                },
                                "data": {
                                  "type": "string",
                                  "description": "Main payload object or array returned by the API",
                                  "example": "0x40e53eb7000000000000000000000000000000000000000000000000000000000016e360"
                                },
                                "estimationCheck": {
                                  "oneOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "boolean"
                                    }
                                  ],
                                  "description": "Flag or value indicating transaction fee/estimate status"
                                },
                                "referenceId": {
                                  "type": "string",
                                  "description": "Unique ID for tracking a specific transaction or operation",
                                  "example": "8eec8150896e4fdaa26d4d1a1338d676"
                                },
                                "simulate": {
                                  "type": "object",
                                  "description": "Present when the request used `simulate: true`; eth_simulateV1 summary (omitted when simulation was not run).",
                                  "properties": {
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "success",
                                        "failure"
                                      ]
                                    },
                                    "error": {
                                      "type": "string",
                                      "nullable": true,
                                      "description": "Failure reason when status is failure; null when status is success"
                                    }
                                  },
                                  "required": [
                                    "status",
                                    "error"
                                  ]
                                }
                              },
                              "required": [
                                "chainId",
                                "from",
                                "data",
                                "referenceId",
                                "estimationCheck",
                                "to",
                                "value"
                              ]
                            }
                          },
                          "required": [
                            "createFeeTxn",
                            "depositTxn"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "from": {
                              "type": "string"
                            },
                            "chainId": {
                              "type": "string"
                            },
                            "referenceId": {
                              "type": "string"
                            },
                            "methodUsed": {
                              "type": "string",
                              "enum": [
                                "EIP-5792",
                                "EIP-7702"
                              ]
                            },
                            "calls": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "to": {
                                    "type": "string"
                                  },
                                  "value": {
                                    "type": "string"
                                  },
                                  "data": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "to",
                                  "value",
                                  "data"
                                ]
                              }
                            }
                          },
                          "required": [
                            "from",
                            "chainId",
                            "referenceId",
                            "methodUsed",
                            "calls"
                          ]
                        },
                        {
                          "title": "Generated schema for EIP-7702",
                          "type": "object",
                          "properties": {
                            "from": {
                              "type": "string"
                            },
                            "chainId": {
                              "type": "string"
                            },
                            "referenceId": {
                              "type": "string"
                            },
                            "methodUsed": {
                              "type": "string"
                            },
                            "to": {
                              "type": "string"
                            },
                            "data": {
                              "type": "string"
                            },
                            "value": {
                              "type": "string"
                            },
                            "batcherContract": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "from",
                            "chainId",
                            "referenceId",
                            "methodUsed",
                            "to",
                            "data",
                            "value",
                            "batcherContract"
                          ]
                        }
                      ]
                    }
                  },
                  "example": {
                    "status": 200,
                    "msg": "success",
                    "data": {
                      "chainId": "1",
                      "from": "0x829bFB482331b9Dc2BEcb5483ecA79c0578c3A45",
                      "to": "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2",
                      "value": "0",
                      "gas": "408298",
                      "estimationCheck": true,
                      "data": "0xe8eda9df00000000000000000000000065afadd39029741b3b8f0756952c74678c9cec93000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000829bfb482331b9dc2becb5483eca79c0578c3a450000000000000000000000000000000000000000000000000000000000000000",
                      "referenceId": "7fb853868e4749879ef57d96aae5b9a2"
                    }
                  }
                }
              }
            }
          }
        },
        "x-bd-cu": "230",
        "x-bd-cu-type": "fixed",
        "x-internal": false
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```