Supplying
Lending is not done by calling the kairos contract directly. To lend, one must follow those conditions:
- have erc20 in its wallet
- approve those erc20 in sufficient amount to the kairos contract
- sign erc712-compliant loan offers
Kairos can't lend assets from a supplier wallet without the explicit agreement of the lender in the form of a loan offer signed by the private key of its wallet.
The signed loan offers follow the form of the
Offer
struct
found in code. The contract exposes an
offerDigest
method
taking an offer
struct as argument and returning a bytes32
hash that can ecdsa signed
as-is to produce a valid signed loan offer.
There is no limit to the usage of a loan offer, the same offer can be used
multiple times, by the same borrowers or different ones, and the sum of the
funds transferred as a result of emitting a single offer can be arbitrarly
large.
All loan offers accept a single ERC721 nft as collateral (cf the collateral
field). All loan offers give access to borrow a single erc20
(assetToLend
field).
The Offer
struct gives the lender multiple ways to manage its risk:
- the amount the lender is willing to lend (
loanToValue
) - the maximum time the borrower can keep the loan without having to repay
or without the collateral going to liquidation (
duration
) - the date after which the loan offer can't be used anymore (
expirationDate
), provided as way to manage the changing market conditions. We expect this date to be usually placed a few hours after the date of signing. - the immutable interest rate, in the form of the kairos interest rate tranche
identifier (
tranche
). The lender can only chose this one from the limited set of valid tranches provided by the protocol (cf the admin doc for more details).
Once loans have been issued using a loan offer, an NFT is minted and sent to the lender that signed the offer. This NFT represents the rights a lender has on a particular loan. As multiple offers can be used by a borrower to borrow from a single NFT, a single loan can have multiple NFTs that we call supply position or provision representing claims on the interests that will be paid or on the sale of the nft used as collateral in case of liquidation. Supply position NFTs are publicly transferrable (I.e tradable) during the lifetime of the corresponding loan, including after the repay date or liquidation. A supply position NFT can be used once by its owner to claim the corresponding interests or share of liquidation, and doing so results in the NFT being burned.
The lender is taking a risk by providing offers as borrowers may not repay their
loan and the NFTs used as collateral may be liquidated, I.e sold in auction at
a price under the loan to value provided by the lender, I.e the amount it was willing
to lend for a certain NFT used as collateral. Considering that the liquidation
mechanism of kairos (which is a dutch auction) is able to sell all NFTs liquidated
at their fair market price, Kairos guarantees that the lender is at a loss only
if it made a mistake by signing an offer with a loanToValue
field higher for the
corresponding NFT than the fair market price of this NFT at any point in time during
the loan lifetime (including auction time). (We don't consider gas costs here).
While Kairos is permissionless on which erc721s can be used as collateral and which the erc20s can be lent, it is recommended to lenders not to supply erc20 which have uninitialized anti-ddos parameters. More on this subject in the borrowing, repaying and claiming pages.
In case of rapidly changing market conditions, we see the ability of the lender to revoke its token approvals to kairos as a mean of last resort to delete all its loan offers. The approach that led to this design is to consider that most lenders on the kairos protocol will use automated tools to provide offers on a wide range of NFTs, tokens and timeframes, competing with other lenders to offer the best terms without paying gas fees to do so.