The borrow function transfers an asset from the protocol to the user, and creates a borrow balance which begins accumulating interest based on the Borrow Rate for the asset. The amount borrowed must be less than the user's Account Liquidity and the market's available liquidity.


function borrow(address qToken, uint amount) external;
  • msg.sender: The account to which borrowed funds shall be transferred.

  • qToken: The address of the qToken market to borrow.

  • amount: The amount of the underlying asset to be borrowed.


Qore qore = Qore(<qoreAddress>);
qore.borrow(<qTokenAddress>, <underlyingAmount>);


const qore = await ethers.getContractAt(<qoreABI>, <qoreAddress>);
await qore.borrow(<qTokenAddress>, <underlyingAmount>);

Last updated