-
Notifications
You must be signed in to change notification settings - Fork 35
Feature: Add interest rate model configuration endpoint #87
Copy link
Copy link
Open
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave programenhancementNew feature or requestNew feature or requestmediumDifficulty: MediumDifficulty: Mediumsmart-contractsSoroban smart contractsSoroban smart contracts
Description
Problem
Interest rate parameters in interest_rate.rs are initialized once but there's no way to query the current model parameters or adjust them without redeployment.
Context
DeFi protocols need to adjust interest rates based on market conditions. Governance should be able to update rate parameters.
Proposed Solution
Add query and update functions:
pub fn get_interest_rate_config(env: Env) -> InterestRateConfig { ... }
pub fn update_interest_rate_config(env: Env, admin: Address, config: InterestRateConfig) -> Result<(), Error> { ... }Acceptance Criteria
- Query function returns current interest rate parameters
- Admin can update parameters (with authorization)
- Parameter validation (rates within bounds)
- Events emitted on parameter changes
- Tests for query and update
Technical Notes
- File:
stellar-lend/contracts/hello-world/src/interest_rate.rs
Constraints
- Admin-only updates with governance controls
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave programenhancementNew feature or requestNew feature or requestmediumDifficulty: MediumDifficulty: Mediumsmart-contractsSoroban smart contractsSoroban smart contracts