hermeznetwork / circuits

Implements hermez network zk-Snarks circuits
GNU Affero General Public License v3.0
55 stars 21 forks source link

withdrawal from internal accounts #42

Open krlosMata opened 3 years ago

krlosMata commented 3 years ago

Summary

Internal rollup accounts has etehreum address set to 0xFFF...FFF so no L1 transaction can be performed with them. Those accounts are cheaper at the time to create them but at the same time they have a strong caveat, no withdrawals could be done from this accounts since withdraeals are L1 transactions.

Proposal

Implement a withdrawalInternalAccount which would allow internal accounts to perform withdrawals. This function should implement a circuit where the user proves ownership of the Bjj public through a signature in a zk-proof.

Implementation

invocamanman commented 3 years ago

Proposal Update

instead of withdrawalInternalAccount we will implement withdrawalBjj Wich allows any user to withdraw the funds using a bjj signature ( allowing internal accounts to withdraw too!)

Implementation update

Spec withdrawal Bjj --> https://hackmd.io/nFX5gHYsSUWyAsB5s3PQRg