Skip to content

legitmaxwu/whirlwind

Repository files navigation



Tax-Compliant Private Trades on Osmosis. Paper


Project Structure

  • web: Web demo
  • contracts: CosmWasm contracts
  • circuits: Circom circuits, script for building proving/verification keys
  • generate-data: Generate data for SNARK proofs
  • generate-proofs: Generate SNARK proofs

Videos

Overview

Whirlwind allows for temporarily private trades on Osmosis until withdrawal.

Using Whirlwind

  1. User deposits funds from main wallet into Whirlwind via an anonymity pool.
  2. They can now swap privately using a burner wallet. (Link between wallets is hidden from public)
  3. Once the user is done swapping, they may withdraw funds back to the main wallet. (At this stage the link between wallets is revealed)

Security

The contract fails if:

  1. It does not preserve anonymity until withdrawal
  2. You cannot track where the original depositor withdrew funds to (becoming a regulatory disaster)
  3. User can steal pool's funds
  4. Contract loses user's funds

Vectors of failure:

  • SNARK verification. Each verifier has different risks associated
  • Ownership hash tampering
  • Pool whitelisting and updates
  • Withdrawals (is it correct to source)

Future Work

  • Output denom should be inferred from the passed in routes
  • Will Osmosis support CW-20s?
  • Bigger root history size
  • Handle any string for wallet address input

Acknowledgements