Skip to content

How Do I Convert Borrowed Base Assets to Repay a Loan?

To repay a loan with a different token, swap enough of your Base assets into the exact token you owe, then repay the debt through your lending protocol. A swap alone does not reduce your loan. For the swap details, see how to swap tokens with BaseSwap; this guide focuses on getting the repayment completed after a pending or failed attempt.

Find out which transaction is still pending

A pending swap has not delivered tokens you can repay with yet. A pending repayment has not reduced your debt yet. Each is a separate onchain transaction: a request sent to the network and processed when included in a block.

For example, imagine you borrowed ETH and owe 500 USDC. You start a swap from ETH to USDC, but your wallet still shows “pending.” Until that swap completes, you cannot count its expected USDC toward repayment.

Ethereum.org explains that transactions from one wallet use sequential numbers called nonces. If one transaction is stuck, later transactions from that wallet may wait behind it. Check its status and nonce in a block explorer before trying again; sending another swap can leave you with competing transactions or duplicate actions.

Swap enough to cover the current debt

  1. Check the debt token and live amount due. Open the lending protocol where you borrowed, and confirm the wallet address, network, borrowed token, and current repayment amount. Interest can accrue, so the amount due may be higher than the amount you first borrowed. Aave’s documentation, for example, describes repayment as reducing or clearing a position and notes that debt includes accrued interest.
  2. Work out how much of your asset to convert. Compare the expected swap output with the amount due, then leave a modest buffer for price movement and interest. As an illustration, if your screen shows 500 USDC due, a quote for exactly 500 USDC may fall short before the swap settles. The output depends on the current exchange rate, pool liquidity, and the price impact of your trade.
  3. Make the swap and wait for its final status. BaseSwap is a decentralized exchange on Base where you can swap tokens. Check the token addresses, expected output, and minimum output before signing. The minimum output is the least the swap will accept; if the market moves past that limit, the transaction may fail rather than deliver too few tokens.

Repay after the converted tokens arrive

  1. Confirm the received balance and keep gas funds. After the swap succeeds, check your wallet balance for the repayment token. Keep some ETH for network gas, the fee that pays for transactions on Base. If you swap away all your ETH, you may have the right repayment token but no ETH to submit an approval or repayment.
  2. Approve the token if the lending protocol asks. An approval lets the protocol’s contract move a specific token from your wallet. It may be a separate transaction from repayment, so wait for its status too. Review the token and approved amount before signing; an approval does not itself pay down the loan.
  3. Submit the repayment and verify the debt afterward. Choose the intended partial or full amount, confirm the transaction, then check the loan position again after it settles. A successful swap is not proof of a successful repayment. Ethereum.org notes that a failed transaction can still consume gas, so check its final status before deciding what to retry.

If a transaction fails, first identify whether it was the swap, approval, or repayment. Read the failure reason, confirm the wallet still has enough tokens and ETH, and retry only the failed action once any earlier pending transaction is resolved. If the debt is near a liquidation threshold, act promptly and check the lending protocol’s own position data.

Takeaway: wait for the swap, confirm the right token arrived, then verify that the repayment reduced your debt.