feat: implement time-locked savings wallet with interest accrual - #429
Merged
ayomideadeniran merged 3 commits intoMay 1, 2026
Merged
Conversation
|
@Hallab7 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
|
pr under review, if i find any wrong implementation i will notify you. |
2 similar comments
Contributor
|
pr under review, if i find any wrong implementation i will notify you. |
Contributor
|
pr under review, if i find any wrong implementation i will notify you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR implements a complete time-locked savings wallet system with interest accrual and early withdrawal penalties. Users can create savings accounts with configurable lock periods (1 day to 1 year), earn continuous compound interest, and withdraw funds either after maturity (penalty-free) or early (with a 10% penalty).
What this PR accomplishes:
Why it is needed:
Traditional savings accounts lack transparency and user control. This decentralized solution provides full visibility into savings, interest calculations, and withdrawal terms while maintaining blockchain security and immutability.
Key Features:
Files Added:
contracts/src/savings_wallet.rs- Core savings contractcontracts/src/interest_accrual.rs- Interest calculation servicecontracts/src/tests/savings_tests.rs- Test suitecontracts/src/savings_standalone_test.rs- Standalone testsfrontend/src/components/savings/SavingsDashboard.tsx- UI componentfrontend/src/components/savings/index.ts- Module exportsfrontend/src/components/savings/SavingsIntegration.example.tsx- Integration examplesFiles Modified:
contracts/src/lib.rs- Added module declarationscontracts/src/tests.rs- Added test module inclusionTotal: 9 new files, 2 modified, ~1,713 lines of code
Reference Issues
closes #396
Type of Change
Checklist: