Before we perform operations on the account we ask the wallet holder to use the ZK-Stark protocol to prove that after the operation their balance will in fact be > or = 0. If so then we perform the homomorphic operations.
This solution breaks the workflow of the EVM though.
What we can do is ask the spender to prove their balance is > 0. Normally this is trivial. The contract compares the balance to make sure the value is > 0 if so then continue. If the balance is encrypted then its undefined.
This is where ZK-Starks enter.
We need to know if an account balance will fall under 0 if a subtraction occurs. With homomorphic encryption you can perform various operations on data but you will never know what the encrypted values are unless you are the key holder.
This means no comparison or branching.
I ran into a huge issue with comparison of values in encrypted format. After almost a month of research and testing I concluded its impossible to compare two encrypted values in any meaningful way.
The solution, ZK-Starks + Homomorphic encryption.
The day the Declaration of Independence was signed:
Edward Rutledge - 26 years old
Thomas Jefferson - 33 years old
John Hancock - 39 years old
John Adams - 40 years old
Political leaders don’t need to be over the age of 70 in order to be competent.