
privatestargatefinance.eth
stargate.finance with a privacy layer on top
About
The problem it solves private stargate finance aims to be exactly that, https://stargate.finance, but allowing for private transfers of ERC20s across chain. stargate finance currently has $340M US TVL and has transferred over $64B US worth of volume cross chains - how much more could this value be if it supported private cross chain transfers as well? as well as having cross chain transfers, private stargate finance enables same chain encrypted ERC20 transfers pretty efficiently and with a nice UX (less than 5 seconds proving time for all proof generations)
How it's made
Challenges we ran into I wrote the core ZK circuits and contracts for private stargate finance last weekend at the web3privacy now hackathon. The goal of this hackathon was to build a nice UI for the protocol that is entirely decentralised, running on ipfs (at https://privatestargatefinance.eth.limo) and only requiring an ETH RPC to get all data that the user needs to transact. The existing core functionality of the circuits and contracts are: - deposit (move from standard ERC20 to encrypted ERC20) - transfer (encrypted transfer) - warp (cross chain private transfer) - withdraw (move from encrypted ERC20 -> standard ERC20) However, as part of this UI integration, I had to build: - note sharing (ensuring that users can share notes via encrypted onchain calldata) - multiple chain merkle tree state management - build the account model out, and into the browser (I use passkey to store an encrypted mnemonic) The thing that I was not expecting to be as difficult as what it is was the UTXO arithmetic required to make transfers and warps compatible with a nice user interface. This combined with the retrieval of emitted Events on the contract programmatically and cleanly has been quite a pain.