LayerXcom / zero-chain

A privacy-preserving blockchain on Substrate
https://layerxcom.github.io/zerochain-book/
GNU General Public License v3.0
260 stars 42 forks source link

Add conf_whitelist module #89

Open osuketh opened 5 years ago

osuketh commented 5 years ago

Instead of storing the whitelisted accounts in on-chain, it is stored in off-chain as a Merkle tree by the specific asset maintainer. In order to ensure the validity for the lists, they need to commit the Merkle root and send zkproof to on-chain. So, the soundness is based on that of zkp. All users need to send merkle proof when they invoke the can_transfer function which returns true only if the sender is in the whitelist(i.e. merkle root corresponding to the asset Id)

osuketh commented 5 years ago

The maintainer of the whitelist can update the Merkle root whenever they want. It's just the trade-off between their maintenance cost and UX.