Skip to main content

Borrowing More

borrowMore() increases the outstanding debt on an existing loan, reusing the collateral already deposited. The additional funds are disbursed to the loan’s configured destination (chain, asset and address from the original borrow).

When it’s available

Borrow More draws against the loan’s remaining borrow capacity. It is rejected when the loan is:
  • Fully repaid — there is no active position to borrow against
  • Liquidated — no collateral remains
  • At capacity — the requested amount exceeds the position’s available borrow room
The requested amount is validated against live on-chain borrow capacity before the workflow starts.

Prerequisites

import { BorrowSDK } from '@satsterminal/sdk';

const sdk = new BorrowSDK({
  apiKey: process.env.SATS_API_KEY,
  walletProvider,
});
You need the originalBorrowId of an active loan (from getLoanHistory() or the result of the original executeBorrow()).

Increase the loan

const result = await sdk.borrowMore(loanId, '500', {
  // disbursementFeeBps: 50,          // optional payout fee override (bps)
  trackWorkflow: true,
  callbacks: {
    onStatusUpdate: (status) => console.log(status.label),
    onComplete: () => console.log('Additional funds disbursed!'),
    onError: (error) => console.error(error),
  },
});

console.log('Borrow more transaction:', result.transactionId);
console.log('Workflow:', result.workflowId);
borrowAmount is denominated in the loan asset (e.g. USDC). The loan chain is inferred from the original loan; pass options.chain only to override it.

Workflow stages

Because the collateral already exists, borrow-more skips bridging and runs:
StageDescription
PREPARING_LOANPreparing the additional borrow
LOAN_CONFIRMEDDebt increased on-chain
PREPARING_DISBURSEMENTPreparing payout of the new funds
DISBURSEMENT_COMPLETEDFunds sent to the destination
COMPLETEDWorkflow finished

Monitoring status

If you do not use callbacks, poll the transaction directly:
const status = await sdk.getBorrowMoreStatus(result.transactionId);
console.log(status.status);

// All borrow-more transactions for a loan:
const history = await sdk.getBorrowMoreTransactions(loanId);

Error handling

try {
  await sdk.borrowMore(loanId, '500');
} catch (error) {
  if (error.message.includes('available borrow room')) {
    // Requested amount exceeds capacity — lower the amount or add collateral first
  }
}
To increase your borrow capacity before borrowing more, add collateral with depositMore().