Description
None of the storage entries (projects, investments, whitelist) track when they were created or last modified. Timestamps would enable:
- Time-based queries and analytics
- Audit trails
- Time-based business logic (e.g., maturity dates)
Current Code Locations
project_registry/src/types.rs — ProjectData
investment_vault/src/types.rs — VaultKey
Recommendation
- Add
created_at: u64 and updated_at: u64 fields to ProjectData
- Add timestamp to investment records
- Use
env.ledger().timestamp() for consistent timestamps
Severity
Low — Improves auditability and enables time-based features.
Description
None of the storage entries (projects, investments, whitelist) track when they were created or last modified. Timestamps would enable:
Current Code Locations
project_registry/src/types.rs— ProjectDatainvestment_vault/src/types.rs— VaultKeyRecommendation
created_at: u64andupdated_at: u64fields to ProjectDataenv.ledger().timestamp()for consistent timestampsSeverity
Low — Improves auditability and enables time-based features.