Comment on page
Credit delegation allows a depositor to deposit funds in the protocol to earn interest, and delegate borrowing power (i.e. their credit) to other users. The enforcement of the loan and its terms are agreed upon between the depositor and borrowers, which can be either off-chain via legal agreements or on-chain via smart contracts.
- The supplier (aka delegator) to earn extra yield on top of the yield they already earn from the protocol,
- The borrowers (aka delegatees) to access an uncollateralized loan.
- delegator can only borrow
STABLECOINSeMode category asset.
- in case delegator approve credit to delegatee for non
STABLECOINScategory (for eg. weth), then borrow would revert.
The delegatee cannot abuse credit approval to liquidate delegator i.e. if the borrow puts delegator's position in HF <
HEALTH_FACTOR_LIQUIDATION_THRESHOLD, then borrow will fail.
This is done for each debt token that needs to be delegated.
The delegator does not need to already have supplied funds in the protocol to
approveDelegation(). However, before the delegatee executes
borrow(), there must be sufficient collateral supplied by delegator in the protocol.
The borrower's available credit is reduced by the borrowed amount.