IRCLBorrowers

Methods

borrow

function borrow(address to, uint256 amount) external nonpayable

Borrow funds from the pool against the order book. The to address has to have a borrowed role. It is not possible to borrow after the current loan maturity has passed

TickBorrowed event is declared in BorrowerLogic library

Parameters

Name
Type
Description

to

address

Receiving address of the borrowed funds

amount

uint256

Amount of funds to borrow Emits a {Borrowed} event and one {TickBorrowed} event per borrowed tick

repay

function repay() external nonpayable

Repay borrowed funds with interest to the pool emits a {Repaid} event and one {TickRepaid} event per repayed tick

TickRepaid event is declared in BorrowerLogic library

Events

Borrowed

event Borrowed(uint256 borrowedAmount, uint256 fees, address to)

Emitted during a borow

Parameters

Name
Type
Description

borrowedAmount

uint256

Amount of funds borrowed against the order book

fees

uint256

Total fees taken

to

address

Receiving address of the borrowed funds

Repaid

event Repaid(uint256 repaidAmount, uint256 fees)

Emitted during a repayment

Parameters

Name
Type
Description

repaidAmount

uint256

Total amount repaid by the borrower

fees

uint256

Total fees taken

Last updated