Vault Security Hardening: Admin Overrides, Investor Caps, Transfer Safety, and Lock-Up Enforcement#251
Open
Nanle-code wants to merge 1 commit into
Open
Conversation
…improved admin controls - Issue StellarYield#101: Factory now supports per-vault admin, zkme_verifier, and cooperator overrides - Issue StellarYield#105: Added investor participant counter with maximum investor cap enforcement - Issue StellarYield#104: Enhanced asset transfer failure handling with balance checks and atomicity documentation - Issue StellarYield#103: Implemented share transfer lock-up period with bypass for matured vaults Key features: - Per-vault admin configuration in factory - Investor counting and cap enforcement in deposit/mint - Lock-up period enforcement for transfers/redeems - Improved error handling and vault balance checks - Admin functions to update investor caps and lock-up periods - Comprehensive view functions for monitoring Closes StellarYield#101, StellarYield#105, StellarYield#104, StellarYield#103
Author
|
@Jayy4rl Review this |
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.
Overview
This PR delivers a comprehensive security hardening of the vault system by addressing four critical issues:
Closes #101
Closes #105
Closes #104
Closes #103
The changes introduce:
All enhancements are implemented with backward compatibility preserved.
Key Improvements
1. Per-Vault Admin Configuration (Fixes #101)
vault_adminzkme_verifiercooperatorcreate_single_rwa_vaultcreate_single_rwa_vault_fullcreate_single_rwa_vault_batchbatch_create_vaultsVaultCreatedevent to include admin metadata2. Investor Count Tracking and Cap Enforcement (Fixes #105)
InvCountMaxInvestorsDepTimestampdeposit()mint()MaxInvestorsReachedset_max_investors()investor_count()max_investors()lock_up_remaining()3. Safe Cross-Contract Asset Transfers (Fixes #104)
InsufficientVaultBalancevault_asset_balance()4. Share Lock-Up Period Enforcement (Fixes #103)
LockUpPeriodtransfer()transfer_from()withdraw()redeem()redeem_at_maturity()from lock-up restrictionsSharesLockedset_lock_up_period()lock_up_remaining()Technical Notes
Checklist
Closes
Closes #101, #105, #104, #103