Bank-of-JubJub / base

This repo includes the base contracts and circuits for the Bank of JubJub.
MIT License
12 stars 4 forks source link

Enable withdrawals for accounts with 0 balance #34

Open critesjosh opened 9 months ago

critesjosh commented 9 months ago

sending tokens directly to a stealth address would pose some difficulties. The stealth address would have no ETH to pay for the transaction to transfer the tokens, and getting ETH into the address without compromising privacy is its own challenge. The easiest and cheapest solution to this issue is to have tokens instead held by the contract, and support withdrawal of the tokens using meta-transactions that only require a signature from the stealth address. This lets the recipient pay the gas fee for the withdrawal transaction in tokens, and the relayer will pay the ETH fee

https://github.com/ScopeLift/umbra-protocol/blob/master/umbra-js%2FREADME.md

Someone could use this method with WETH that unwraps when withdrawn to get ETH in their account for tx fees