Skip to content

fix:redeem supplier yield via exchange rate - #13

Merged
Benup211 merged 1 commit into
feat/lending-poolfrom
fix/borrow-rate-supplier
Aug 19, 2026
Merged

fix:redeem supplier yield via exchange rate#13
Benup211 merged 1 commit into
feat/lending-poolfrom
fix/borrow-rate-supplier

Conversation

@Benup211

Copy link
Copy Markdown
Owner
  • Supply mints amount / exchange_rate lTokens and withdrawal redeems
    ltoken_balance × exchange_rate, so borrower interest (net of the
    reserve slice) reaches suppliers through exchange-rate growth instead
    of leaking to treasury sweeps.
  • Track total_supplied in scaled (lToken) units: supply caps project
    face value before comparing and the reserve slice in accrue_interest
    becomes exact.
  • Reset the exchange rate to 1.0 when the market fully drains so the
    next genesis supply is backed 1:1; it stays grown across debt
    repayment while supply remains.
  • liquidate accrues both debt markets so the close factor and health
    check see principal + accrued interest on each side.
  • get_underlying_balance quotes lTokens at the exchange rate.
  • Regression tests for mint/redeem scaling, the underlying-balance
    view, and the drain-reset rule; docs updated.

- Supply mints amount / exchange_rate lTokens and withdrawal redeems
  ltoken_balance × exchange_rate, so borrower interest (net of the
  reserve slice) reaches suppliers through exchange-rate growth instead
  of leaking to treasury sweeps.
- Track total_supplied in scaled (lToken) units: supply caps project
  face value before comparing and the reserve slice in accrue_interest
  becomes exact.
- Reset the exchange rate to 1.0 when the market fully drains so the
  next genesis supply is backed 1:1; it stays grown across debt
  repayment while supply remains.
- liquidate accrues both debt markets so the close factor and health
  check see principal + accrued interest on each side.
- get_underlying_balance quotes lTokens at the exchange rate.
- Regression tests for mint/redeem scaling, the underlying-balance
  view, and the drain-reset rule; docs updated.
@Benup211
Benup211 merged commit 7d4aac4 into feat/lending-pool Aug 19, 2026
0 of 2 checks passed
@Benup211
Benup211 deleted the fix/borrow-rate-supplier branch August 19, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant