Core concepts

Repayment & default

What repay and claimCollateral each move, and why Lendr calls this default rather than liquidation.

An active listing has exactly two possible endings, and which one happens is entirely up to the borrower's decision to repay before the clock runs out.

Repay

repayclaimCollateral
CallerBorrower onlyLender only
Preconditionstatus == activestatus == active and now >= startTime + duration
MovesloanAmount + interestOwed(id) USDG → lendercollateralAmount → lender
CollateralReturned in full to borrowerForfeited to lender
Resulting statusrepaiddefaulted

Both are single, all-or-nothing calls — there's no partial repayment that returns a proportional slice of collateral, and no partial claim.

Why not "liquidation"

Liquidation, in the Aave/Compound sense, implies a third party can step in and forcibly close a position once a health factor crosses a threshold — something the protocol computes continuously from a price feed. Lendr has no price feed on-chain and no health factor. The only trigger claimCollateral checks is a timestamp. Whether the collateral is worth more or less than the debt at that moment is irrelevant to whether the call succeeds — it succeeds purely because the term is over and the loan wasn't repaid.

No grace period

The instant now >= startTime + duration, repay and claimCollateral are both simultaneously callable. Whichever transaction lands first on-chain determines the outcome — there's no cushion after maturity reserved for the borrower to still repay.