feat: Zero-Knowledge Anonymous Provider Staking & Shielded Reputation Proofs (#427) - #429
Conversation
… proofs (Nullifier-Systems#427) - Add shielded_stake_commitments and shielded_provider_nullifiers DB tables - Implement POST /provider/shielded-stake for depositing into shielded pool - Implement POST /provider/shielded-stake/verify with nullifier double-spend prevention - Add GET /provider/shielded-stake/status/:commitmentHash endpoint - Add GET /provider/shielded-stake/merkle-root endpoint - Implement SELECT FOR UPDATE to prevent nullifier race conditions - Add generateShieldedCommitment and verifyShieldedCommitment crypto helpers - Build ShieldedStakingModal React component with multi-step flow - Add 9 passing unit tests covering deposit, verify, double-spend, and invalid proof scenarios - Register shielded staking routes in Fastify app
|
@devJaja is attempting to deploy a commit to the jotelfootball-tech's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Hey @devJaja — nice work on the ZK anonymous provider staking & shielded reputation proofs feature! 👏 Contracts CI and node build are both green, but before we can merge there are a couple of things to sort out: Merge conflicts in apps/api/src/app.ts, locales/en.json, and locales/es.json — can you resolve these against main? Ping me once those are resolved and I'll get this reviewed and merged. 🙏 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Summary
Implements a zero-knowledge shielded staking pool that allows providers to deposit collateral and verify minimum stake compliance via zk-SNARK proofs, without revealing their public wallet address.
Changes
Database Layer
032_add_shielded_provider_staking.sql: Createsshielded_stake_commitmentsandshielded_provider_nullifierstables with indexesBackend
shielded-staking.ts: POST /provider/shielded-stake, POST /provider/shielded-stake/verify, GET status and merkle-root endpointscrypto.ts: AddedgenerateShieldedCommitment()andverifyShieldedCommitment()helpersConcurrency Safety
SELECT FOR UPDATEon nullifiers to prevent race-condition double-spending during concurrent verification requestsSmart Contracts
lib.rs: Registeredshielded_stakingmodule in the reputation contractFrontend
ShieldedStakingModal.tsx: React component with multi-step flow (generate proof, deposit, verify) using Catppuccin Mocha stylingTests
Acceptance Criteria
Closes #427