Repay an Aave debt and withdraw collateral from a Credit Account.
Bundles repayment, collateral withdrawal, and an optional swap into a single atomic Safe transaction.
token_out is None or equals withdraw_token, the withdrawn collateral is kept as-is.token_out differs from withdraw_token, a swap is performed after withdrawal via 1inch.The Credit Account must already have a borrow position created via /v2/credit/borrow.
The repay_token must be available in the Credit Account (or pulled from EOA via Permit2).
The address that owns the Credit Account.
Blockchain network.
base, ethereum, arbitrum The borrowed asset to repay (e.g. WETH). Must match the debt position's token.
"WETH"
"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
Amount of repay_token to repay (in token units, not wei).
x > 00.01
Collateral token to withdraw from Aave after repaying debt.
"USDC"
"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
Amount of collateral to withdraw (in token units, not wei).
x > 0100
The interest rate mode of the debt position being repaid. Must match the mode used when borrowing.
stable, variable "variable"
A token identifier - either a supported symbol (e.g., USDC, WETH) or a valid Ethereum address (0x...)
"WETH"
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 repay bundle will first pull repay_token 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 repay bundle. Present when gas_sponsorship is false.
EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship is true.
Estimated amount of token_out received from swap. Only present when token_out differs from withdraw_token.