Estimated Effort: 3 weeks / 9 days
Impacted Subsystems / Files:
contracts/phase-protocol/src/lib.rs
components/fusion-chamber.tsx
lib/phase-protocol.ts
Context & Problem Statement:
Utility NFTs currently store energy_level_bp in PhaseState inside contracts/phase-protocol/src/lib.rs, but energy decays statically without an on-chain mechanism to stake artifacts in the Chamber to boost their energy level or earn yield.
Technical Requirements & Scope:
- Implement
stake_artifact(token_id, lock_duration_ledgers) and unstake_artifact(token_id) methods in Soroban contract.
- Calculate energy level recharge dynamically based on locked duration.
- Prevent transfers of staked artifacts while locked.
- Update
FusionChamber component in components/fusion-chamber.tsx with staking UI visualizers.
Multi-File Change Surface:
Modifies Rust contract contracts/phase-protocol/src/lib.rs, adds client transaction builders, and updates Chamber state management in components/fusion-chamber.tsx.
Acceptance Criteria:
Suggested Approach / Investigation Steps:
- Add
StakedArtifact storage struct and implementation methods in Rust.
- Write contract unit tests covering unauthorized early unstake attempts.
- Build UI controls in Chamber terminal for setting lock duration.
Estimated Effort: 3 weeks / 9 days
Impacted Subsystems / Files:
contracts/phase-protocol/src/lib.rscomponents/fusion-chamber.tsxlib/phase-protocol.tsContext & Problem Statement:
Utility NFTs currently store
energy_level_bpinPhaseStateinsidecontracts/phase-protocol/src/lib.rs, but energy decays statically without an on-chain mechanism to stake artifacts in the Chamber to boost their energy level or earn yield.Technical Requirements & Scope:
stake_artifact(token_id, lock_duration_ledgers)andunstake_artifact(token_id)methods in Soroban contract.FusionChambercomponent incomponents/fusion-chamber.tsxwith staking UI visualizers.Multi-File Change Surface:
Modifies Rust contract
contracts/phase-protocol/src/lib.rs, adds client transaction builders, and updates Chamber state management incomponents/fusion-chamber.tsx.Acceptance Criteria:
Suggested Approach / Investigation Steps:
StakedArtifactstorage struct and implementation methods in Rust.