♾️3.6 Claim
When a DebtPosition is repaid, either willingly or forcibly through a liquidation, all of the related lender(s), so all the CreditPosition(s) owners, can claim their share of the repaid amount, with accrued interests, since when the USDC enters in the protocol it is deposited into the Variable Pool (Aave v3). Therefore, it generates some yield that belongs to the lender(s), even if they are not directly credited to them.
The reason for Claim
is that the borrower can't repay each lender involved in a DebtPosition directly, because, during the loan lifetime, each lender can exit his credit to multiple lenders. Therefore, at repayment the borrower would be forced to run through a loop of an arbitrarily large amount of lenders, making this repayment potentially unfeasible on-chain because of gas limitations.
Since a push approach wouldn't be scalable, the protocol uses a pull approach.
The downside here is the lender liquidity gets fragmented into multiple claimable entities. The purpose of Claim
is to re-aggregate it.
The Claim
method is permissionless. Anybody can claim credit on behalf of a lender. Of course, the effect is that credit is going to be credited to the actual lender and not the caller.
Since claiming means interacting with the blockchain in write mode, so consuming gas, each partial credit exit is charged a "fragmentation fee" so that the protocol can both:
fund its bots to do the housekeeping related to calling the
Claim
method to reduce the liquidity fragmentation andlater define an incentive for 3rd party claims on behalf of lenders
Also, borrowers who want to borrow from a lender may choose to claim on the lender's behalf to re-aggregate the liquidity and proceed with borrowing more this way.
Last updated