Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Reveal, Feb 1 2024

Reveal, Feb 1 2024

Presentation of my Web3 Builders Alliance project, Reveal.

Mike MacCana

February 01, 2024
Tweet

More Decks by Mike MacCana

Other Decks in Technology

Transcript

  1. Mike M a cC a n a 20240201 Reveal An

    interesting solution to a boring problem
  2. IRS Form 8300 Requirement for crypto tr a ns a

    ctions l a rger th a n 10K USD from 1 J a n 2024
  3. Reveal stores Form8300 data • A transaction with reveal is

    just: • ComputeBudgetProgram.setComputeUnitLimit() • TokenProgram.transfer() • RevealProgram.reveal() • Receiver has data they need for IRS • Sender keeps their data private Just a nother instruction to a dd to your SPL tr a nsfers
  4. More on reveal() Just the sender-speci f ic p a

    rts of 8300 Just under 1K of d a t a Form a t is built / v a lid a ted entirely client-side & stored in PDA
  5. Tech Stack InitSpace macro because I hate adding numbers! ‘instructions’

    dir and functional style with Anchor’s ‘multiple’ template. Transactions composed of both SPL and Anchor instructions, via Anchor’s .instruction() converter to convert to web3.js instructions. web3js 1.x -> webcrypto bridge for client side encryption (still WIP!)
  6. Tech Stack Continued Tests are using node:test and node:assert, rather

    than mocha/chai. Tests put 5800 data in, make sure they can get it back out! Debug macro was useful for logging structs etc. Using Solana Explorer pointed at localhost was helpful - run own validator so it stays up after tests, then anchor test —skip-local-validator. It took me too long to work out that I need to provide the PDAs in the accounts list even when creating the PDA, so Solana can know which transactions overlap! Tests a nd Debugging