v1
latestOpenAPI 3.1.02026-07-24223580832.9 KBlendborrow
Deposit with approval
Returns unsigned transactions for ERC-20 approval when allowance is below the deposit amount, plus the protocol deposit transaction. Without batchOption, data is an ordered array [approveTxn?, depositTxn]. With batchOption EIP-5792 or EIP-7702 (supported chains), returns a single batched payload. Same request parameters as Deposit per protocol.
💡 Compute Unit Value: 230 (Fixed)
post/defi/v1/lendborrow/deposit-with-approval
Request body
Example request
{
"lendborrowId": "1000",
"asset": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amount": "10000",
"onBehalfOf": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
"from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
"gas": "100000",
"gasPriority": "low",
"enableFee": false,
"batchOption": "EIP-5792",
"batcherContract": "0x9c933f9d2efd76ce25b0d3dde84d3f94e78a50ca",
"useCustomVaults": false,
"to": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
"market": "USDC",
"marketId": "0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5",
"vaultAddress": "0xa258C4606Ca8206D8aA700cE2143D7db854D168c",
"collateral": false
}Response
Successful response
Example response
{
"status": 200,
"msg": "success",
"data": [
{
"chainId": "1",
"from": "0x3806a6b1A5fCe178AB64E55c652D46e669BC2318",
"to": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"value": "0",
"gas": "55000",
"data": "0x095ea7b300000000000000000000000087870Bca3F3fD6335C3F4ce8392D69350B4fA4E20000000000000000000000000000000000000000000000000000000000002710",
"referenceId": "7fb853868e4749879ef57d96aae5b9a2"
},
{
"chainId": "1",
"from": "0x3806a6b1A5fCe178AB64E55c652D46e669BC2318",
"to": "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2",
"value": "0",
"gas": "200000",
"data": "0xe8eda9df0000000000000000",
"referenceId": "7fb853868e4749879ef57d96aae5b9a2"
}
]
}