Borrow an asset from Aave using a Credit Account.
Bundles an optional swap, collateral supply, and borrow into a single atomic Safe transaction.
token_in equals collateral_token, the tokens are supplied directly as collateral.token_in differs from collateral_token, a swap is performed first via 1inch.The Credit Account must already be created via /v2/credit/create_account and funded with token_in.
The address that owns the Credit Account.
Blockchain network.
base, ethereum, arbitrum Token currently held in the Credit Account to use as input. If the same as collateral_token, no swap is performed.
"USDC"
"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
Amount of token_in to use (in token units, not wei).
x > 0100
Aave reserve token to supply as collateral.
"WETH"
"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
Asset to borrow from Aave.
"DAI"
"0x6b175474e89094c44da98b954eedeac495271d0f"
Amount to borrow (in token units, not wei).
x > 050
The interest rate mode for the borrow position.
stable, variable "variable"
Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%). Only used when a swap is needed.
0 <= x <= 1000.5
If true, returns EIP-712 signature data instead of an unsigned transaction.
The EOA owner's signature of the Permit2 PermitTransferFrom typed data. When provided, the borrow bundle will first pull token_in from the owner's EOA into the Credit Account via Permit2. Obtain by calling /v2/credit/transfer and signing the returned EIP-712 data.
The nonce used in the Permit2 signature (from the signed typed data).
x >= 0The deadline timestamp used in the Permit2 signature (from the signed typed data).
x >= 0Successful Response
Unsigned transaction to execute the borrow bundle. Present when gas_sponsorship is false.
EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship is true.
Estimated amount of collateral token received from swap. Only present when token_in differs from collateral_token.