Skip to content

feat(student): Add SP Investment Vault (attendance-based risk/reward investment system for Spurti Points) - #88

Open
rishisaini1403-ship-it wants to merge 5 commits into
vicharanashala:mainfrom
rishisaini1403-ship-it:feature/sp-investment-vault
Open

feat(student): Add SP Investment Vault (attendance-based risk/reward investment system for Spurti Points)#88
rishisaini1403-ship-it wants to merge 5 commits into
vicharanashala:mainfrom
rishisaini1403-ship-it:feature/sp-investment-vault

Conversation

@rishisaini1403-ship-it

@rishisaini1403-ship-it rishisaini1403-ship-it commented Jul 15, 2026

Copy link
Copy Markdown

Overview

This PR introduces the SP Investment Vault for Spurti.

The Investment Vault is a gamified, attendance-based investment system that allows students to voluntarily lock their Spurti Points for a fixed duration and earn bonus rewards upon successful completion of the investment period while satisfying the required attendance criteria.

The feature promotes:

  • Delayed gratification
  • Consistency
  • Attendance commitment
  • Long-term student engagement
  • Gamified learning incentives
  • Responsible decision making

Features

  • Safe Plan (7 Days, 5% Bonus)
  • Growth Plan (15 Days, 15% Bonus)
  • Diamond Plan (30 Days, 30% Bonus)

Investment Workflow

Student selects:

  • Investment plan
  • Investment amount

Investment calculator displays:

  • Duration
  • Bonus percentage
  • Expected profit
  • Expected return

Confirmation modal

SP is locked

Attendance is evaluated during the investment period

Successful completion:

  • Principal + Bonus credited

OR

Failed completion:

  • Attendance requirement not met
  • Invested SP is forfeited
  • No bonus is awarded

Implemented Features

  • SP Investment Vault
  • Attendance-based investment mechanism
  • Attendance-based investment failure handling
  • Investment calculator
  • Confirmation modal
  • Expected profit calculations
  • Expected return calculations
  • Automatic investment resolution
  • Active investment tracking
  • Investment history
  • Validation and error handling
  • SP Bank transaction integration
  • Informational maturity notice

Why this feature?

The SP Investment Vault introduces a gamified risk vs reward mechanism into Spurti.

Students voluntarily invest their existing Spurti Points and are rewarded only if they satisfy the required attendance criteria during the investment period.

This feature encourages:

  • Consistency
  • Commitment
  • Long-term engagement
  • Self-discipline
  • Responsible decision making

By combining gamification with delayed gratification and accountability, the Investment Vault motivates students to remain engaged and committed throughout their learning journey.

Screenshots

1 2 3 4 5 6 7 8

…estamps

- Add env-gated hourly cron (INVESTMENT_RESOLVER_ENABLED) to close the
  lazy-resolution gap between maturity and credit
- Add 3-level investment status (active / matured-awaiting-credit / resolved)
  with exact invested/matured/credited timestamps on history cards
- Fix stale SP balance not refreshing after resolution
- Fix negative 'matures in -N days' edge case on active card
- Remove unreachable dead-code branches (cancelled status, active-in-history)
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.

1 participant