Borrow
Last updated
Was this helpful?
Last updated
Was this helpful?
The borrow function transfers an asset from the protocol to the user, and creates a borrow balance which begins accumulating interest based on the for the asset. The amount borrowed must be less than the user's and the market's available liquidity.
To borrow Ether, the borrower must be 'payable' (solidity).
SErc20 / SEther
msg.sender
: The account to which borrowed funds shall be transferred.
borrowAmount
: The amount of the underlying asset to be borrowed.
RETURN
: 0 on success, otherwise an
Solidity
Web3 1.0