Skip to content

Conversation

@Teolhyn
Copy link
Member

@Teolhyn Teolhyn commented Sep 16, 2025

Summary of Changes

Instead of loans storing the amount of tokens for collateral, convert them to pool shares instead. This way also the collateral gains interest over time without complex changes to architecture.

Considerations

This is VERY CRITICAL change that must be tested and reviewed thoroughly. As we now store shares, there's a need to change from shares->tokens and vice versa quite a bit, so we must be careful that correct parameters are used.

Related Issue

Author checklist

  1. Does your pull request change contract endpoint?
  • Yes, changes in loan_manager
    • Test was added in loan_manager.rs
  • Yes, changes in loan_pool
    • Test was added in loan_pool.rs
  • No
  1. Does your pull request demand a new deployment of contracts
  • Yes
  • No

@Teolhyn Teolhyn force-pushed the feat/interest-from-collateral branch from cca4a26 to d811071 Compare October 23, 2025 07:08
@Teolhyn Teolhyn force-pushed the feat/interest-from-collateral branch from d811071 to bc5353c Compare October 23, 2025 07:11
@Teolhyn Teolhyn force-pushed the feat/interest-from-collateral branch 2 times, most recently from 009f019 to f234fdb Compare November 11, 2025 20:30
@Teolhyn Teolhyn force-pushed the feat/interest-from-collateral branch from f234fdb to 91df76b Compare November 14, 2025 20:28
@Teolhyn Teolhyn changed the title draft: feat: use shares instead of tokens for collateral to include interest feat: use shares instead of tokens for collateral to include interest Nov 14, 2025
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.

2 participants