Developers
Search…
Borrow
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.

Qore

1
function borrow(address qToken, uint amount) external;
Copied!
  • 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.

Solidity

1
Qore qore = Qore(<qoreAddress>);
2
qore.borrow(<qTokenAddress>, <underlyingAmount>);
Copied!

Ethers.js

1
const qore = await ethers.getContractAt(<qoreABI>, <qoreAddress>);
2
await qore.borrow(<qTokenAddress>, <underlyingAmount>);
Copied!
Last modified 2mo ago
Copy link