Repository navigation
ZK-073: Redesign relayer binding and zero-relayer semantics across SDK and contract code #349
Copy link
Copy link
Labels
area: withdrawWithdrawal circuit constraints and proof semanticsWithdrawal circuit constraints and proof semanticsbountyEligible for Drips Wave bounty reviewEligible for Drips Wave bounty reviewcircuitsNoir circuit and proving workNoir circuit and proving workcomplexity: highDrips complexity: high / 200 pointsDrips complexity: high / 200 pointspriority: highCritical path work for the current waveCritical path work for the current wavesecuritySecurity review, audit prep, and hardening workSecurity review, audit prep, and hardening worktestingCoverage, fixtures, fuzzing, and regression workCoverage, fixtures, fuzzing, and regression workwave: zk-2Wave 2: ZK parity, backend, and deployment hardeningWave 2: ZK parity, backend, and deployment hardening
Description
Wave: PrivacyLayer ZK Wave 2
Issue Key: ZK-073
Area: withdraw
Priority: High
Drips Complexity: High
Summary
Recipient binding is not the only mismatch. Relayer handling still mixes zero-field sentinels, decoded addresses, and fee rules in ways that are easy to misapply across stacks.
Relevant Code
- sdk/src/encoding.ts
- sdk/src/proof.ts
- circuits/withdraw/src/spend.nr
- contracts/privacy_pool/src/core/withdraw.rs
- contracts/privacy_pool/src/utils/address_decoder.rs
- contracts/privacy_pool/src/utils/validation.rs
Scope
- Define one relayer binding contract for no-relayer, relayer-with-fee, and malformed-relayer cases.
- Align SDK serialization, circuit validation, and Soroban withdraw handling around that contract.
- Cover fee zero, relayer zero, and relayer mismatch cases in end-to-end tests.
Acceptance Criteria
- Relayer handling no longer depends on ad hoc zero-address assumptions in multiple modules.
- The contract accepts only relayer encodings that the SDK can produce canonically.
- Regression tests distinguish absent relayer from malformed relayer cleanly.
Out of Scope
- New wallet UX and non-ZK frontend polish
- Unrelated Soroban business logic outside the withdrawal proof boundary
Dependencies
- ZK-036
- ZK-072
Validation
- Inspect derived checks:
node scripts/zk_ticket_check.mjs --issue-key ZK-073 - Run derived checks:
node scripts/zk_ticket_check.mjs --issue-key ZK-073 --run - Pull requests should include
Wave Issue Key: ZK-073in the title or body.
References
- sdk/src/encoding.ts
- sdk/src/proof.ts
- circuits/withdraw/src/spend.nr
- contracts/privacy_pool/src/core/withdraw.rs
- contracts/privacy_pool/src/utils/address_decoder.rs
- contracts/privacy_pool/src/utils/validation.rs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: withdrawWithdrawal circuit constraints and proof semanticsWithdrawal circuit constraints and proof semanticsbountyEligible for Drips Wave bounty reviewEligible for Drips Wave bounty reviewcircuitsNoir circuit and proving workNoir circuit and proving workcomplexity: highDrips complexity: high / 200 pointsDrips complexity: high / 200 pointspriority: highCritical path work for the current waveCritical path work for the current wavesecuritySecurity review, audit prep, and hardening workSecurity review, audit prep, and hardening worktestingCoverage, fixtures, fuzzing, and regression workCoverage, fixtures, fuzzing, and regression workwave: zk-2Wave 2: ZK parity, backend, and deployment hardeningWave 2: ZK parity, backend, and deployment hardening
Activity
Mrchinedum commentedon Apr 26, 2026
@Mrchinedum has applied to work on this issue as part of the Stellar Wave Program's 4th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Mrchinedum to this issue.
drips-wave commentedon Apr 26, 2026
Congratulations, @soomtochukwu! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on April 29, 2026.
🧑💻 @soomtochukwu: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.
Warning
When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.
🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.
🌊 Happy Wave 🌊
slendereater-sketch commentedon May 5, 2026
/attempt
harishn1408 commentedon May 5, 2026
⚡ Syndicate Flash-Response: Initial Architecture
I have analyzed this issue and am currently deploying a full fix.
Initial Proposed Architecture:
Full PR incoming in < 5 minutes.
🚀 Conway Syndicate | Wallet: 0x3E8D731Cb653e9B68Aa9c7E19889c1dD14Ea2180
harishn1408 commentedon May 6, 2026
⚡ Syndicate Flash-Response: Initial Architecture
I have analyzed this issue and am currently deploying a full fix.
Initial Proposed Architecture:
Full PR incoming in < 5 minutes.
🚀 Conway Syndicate | Wallet: 0x3E8D731Cb653e9B68Aa9c7E19889c1dD14Ea2180
harishn1408 commentedon May 6, 2026
⚡ Syndicate Flash-Response: Initial Architecture
I have analyzed this issue and am currently deploying a full fix.
Initial Proposed Architecture:
Full PR incoming in < 5 minutes.
🚀 Conway Syndicate | Wallet: 0x3E8D731Cb653e9B68Aa9c7E19889c1dD14Ea2180
laolaoqi commentedon May 11, 2026
🏢 Bid: AI-Assisted Delivery
I'm interested in taking this on. I run an AI-augmented development pipeline that delivers production-quality code with human-level review.
✅ What I bring
📋 Proposed Timeline: 5-7 days
I'll start immediately upon assignment and deliver within the estimated timeframe with regular checkpoints.
💰 Payment
0x6c21794E27C34E93cd0049918d04Da58FC72595c(ETH/BSC/Polygon/Arbitrum — any EVM chain)🔗 Track Record
I have successfully delivered multiple bounty issues across Web3 infrastructure, monitoring stacks, SDK work, and content sprints. References available on request.
Let me know if you'd like a more detailed technical proposal. I can break down the approach, architecture, and implementation steps before starting.
laolaoqi commentedon May 11, 2026
Bid - ZK-073: Redesign relayer binding and zero-relayer semantics
I can take on this high-complexity ZK wave 2 task. The scope involves cleaning up relayer handling across SDK encoding, Noir circuits, and Solidity withdraw logic - replacing zero-field sentinels with a unified binding strategy.
What I bring:
Timeline: 7-10 days depending on scope clarification
Payment Address: 0x6c21794E27C34E93cd0049918d04Da58FC72595c
laolaoqi commentedon May 11, 2026
Bid - ZK-073: Relayer binding redesign across SDK, circuits, and contract
I can handle this full-stack ZK refactor. Here's my approach:
What I'll deliver:
Timeline: 7-10 days for full implementation, including cross-module testing
Technical capability:
Wallet for payout: 0x6c21794E27C34E93cd0049918d04Da58FC72595c
I'm familiar with ZK-036 and ZK-072 dependencies. Ready to start.
WuMingDa-10 commentedon May 18, 2026
Bounty Claim
GitHub Username: WuMingDa-10
Action Completed:
Expected Reward: As specified in the bounty
Please verify and distribute rewards. Thank you!
tranha80 commentedon May 30, 2026
Dear Hiring Manager,
I am writing to express my keen interest in the ZK-073 project: "Redesign relayer binding and zero-relayer semantics across SDK and contract code" for the PrivacyLayer ZK Wave 2. As a seasoned Freelancer with extensive experience in ZK circuit design, secure smart contract development (Rust, Soroban), and robust SDK implementation, I am confident in my ability to deliver a comprehensive and high-quality solution to this critical "High Priority" and "High Drips Complexity" issue.
Understanding the Challenge:
I recognize the core problem described: the current relayer handling suffers from ambiguity due to mixed "zero-field sentinels," decoded addresses, and fee rules. This inconsistency across the SDK, ZK circuits, and Soroban contracts creates a brittle system prone to misapplication, potential security vulnerabilities, and difficulties in reasoning about the system's state. The reliance on ad hoc zero-address assumptions across multiple modules is a clear indicator for the need of a unified, canonical approach.
My Proposed Solution & Approach:
My strategy will focus on establishing a robust and unambiguous relayer binding contract, ensuring seamless and secure integration across all relevant components:
sdk/src/encoding.ts,sdk/src/proof.ts), the ZK circuit's validation rules (circuits/withdraw/src/spend.nr), and the Soroban contract's handling (contracts/privacy_pool/src/core/withdraw.rs,contracts/privacy_pool/src/utils/address_decoder.rs,contracts/privacy_pool/src/utils/validation.rs) with the newly defined canonical contract. This ensures that a relayer encoded by the SDK is always correctly interpreted and validated by the circuit and contract, and vice-versa.Terrajlz commentedon Jul 6, 2026
I'd like to work on this.
GitHub: https://github.com/terrajlz
Payout (MetaMask / USDC on Base): 0xFbF5E1F071Be8fe0FB171257c3eE2b5B894FBB6E
Recent work:
I can deliver clean, tested code with security audit. Turnaround: 24 hours. Ready to start immediately.
rushikeshgarad2024-dev commentedon Sep 21, 2026
I have implemented the complete solution for ZK-073 in PR #458 (#458).
Solution Overview:
Wave Issue Key: ZK-073
Stellar Payout Address:
GC5U46IS25KYFKNHDXEHR3KTQB3DVIBM4NW5BH4MVUE2G77STCJP4IHFthemaksat commentedon Sep 21, 2026
I have submitted a solution for this issue in PR #466. Full implementation and verification included. Payout wallet (Solana):
2BTCUUTviLNDtZDRBhPBTwSXZMrTttPJNbGevMXBBMKK