Index
The program can be any smart contract. We will be using the Cairo programming language to start with as that’s very efficient for ZK proving. However, eventually, support for more programs can be added. Every program in UNITS must be thought of as a fundamental provable unit (will come to what this means later).
As a developer, what you need to know is that if you deploy a program on UNITS
fn balanceOf(address)
. This allows someone to read the balance of any address
. The token developer can set authentication with the program that this function can either be called by
address
(prove by signing with public key of address)<aside> 💡
If we divide permissions into two types - read and write, then most of the current blockchain world ONLY enforces write permissions. This means, it’s impossible to change state of a token without authorisation from the owner of the token themselves.
However, one of the criteria of being a public blockchain is that nodes can join the network permissionlessly and replicate the state of the chain on their hardware. As a result, there’s no merit in defining read permissions. The entire state of any public chain can by synced on anyones hardware and there’s no confidentiality of state.
Yes, smart contracts have private functions even today. However, private functions today do NOT ensure data confidentiality. They only ensure that other smart contracts cannot call these functions.
This is different in UNITS. Over here, we’ve an operator who has read access to all data. However, we allow developers to define read ACLs in their program and we expect the UNITS operator to enforce the read ACLs. One thing to make clear here is that the only way read ACLs are enforced is via trust. It’s impossible to prove that the UNITS operator has not shared private data off chain to some actor. I believe there are some solutions to this in a post quantum world but we’re not there yet 😟.
It’s also important to mention that write ACLs are guaranteed via ZK. If the UNITS operator changes state of some token that they do NOT have permission for, they would NOT be able to generate a valid ZK proof for the same.
</aside>
At a fundamental level, every program inside UNITS must be assumed to be a provable block of code. As a developer, this means that