ZKP2P

ZKP2P

A trustless P2P USD <-> USDC fiat onramp powered by ZK proofs and Venmo

ZKP2P

ZKP2P

A trustless P2P USD <-> USDC fiat onramp powered by ZK proofs and Venmo

The problem ZKP2P solves

New users face huge barriers to onboard funds onto web3

Users must register for a centralized exchange (e.g. Coinbase) or use centralized fiat onramps which charge high fees (e.g. 5%)

Crypto natives are unable to offboard funds into the real world

Only institutional accounts had direct access to convert USDC to USD. Existing P2P solutions either require meeting in person (e.g., LocalBitcoins) or rely on a centralized intermediary (e.g., OTC desks)

ZKP2P

ZKP2P enables an on-chain user to trade USDC for USD with a Venmo user using ZK proofs of email DKIM signatures. This is an use case built on top of ZK Email

Challenges we ran into

Setting up the development environment

  • We had 8M+ constraints for our hack, so we needed to set up an EC2 instance to compile and generate proving keys. We followed the best practices for large circuits and used the the AWS z1d line of machines
  • Proving key generation took 15-30 min depending on how many CPUs we were using. Compilation took around 9 min

Regexing the Venmo confirmation email

  • Regex was a pain to work with especially in Circom. Luckily the ZK-email regex scripts helped a lot with converting regex into Circom templates
  • Connecting the regex inputs to the UI

Covering edge cases to ensure the trade is trustless. We designed the flow below

  • User cannot grief market maker by posting an order with no intention of completing the off-chain Venmo charge
  • Market maker cannot grief users by never intending to fill order
  • No race conditions if 2 users want to fill the same order
  • We came up with the onramp user initiated order flow to mitigate these edge cases

Tracks Applied (1)

Scroll

Verification of our groth16 circuits is on Scroll. Takes advantage of cheap fees and high EVM compatibility (i.e precomp...Read More

Scroll

Technologies used

Discussion