Skip to content

Conversation

@mohammed7s
Copy link

Summary

A payment verifier that releases escrow based on knowledge of a pre-shared secret. Users prove payment by providing the correct OTP/secret that matches a pre-committed hash.

Notes

  • Word-based secrets: Uses human-readable passphrases converted to bytes32
    const secret = ethers.utils.formatBytes32String("horse battery staple magic");

  • Deposit-specific hashing: Prevents cross-deposit attacks by binding secrets to specific deposits
    hash = keccak256(abi.encodePacked(secret, payeeDetails))

  • Each deposit gets a unique hash even with the same secret due to payeeDetails salt

  • Attacker knowing one secret cannot compromise other deposits

  • No nullifiers needed - escrow prevents double-spending via intent removal

Use Case

Suitable for cash payouts where users can establish a secure side-channel to share word-based secrets after payment completion, trading external payment verification for simplicity and human-readable secrets.

@0xSachinK 0xSachinK marked this pull request as draft August 28, 2025 12:01
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