Instead of the obfuscation of a smart contract, a much lighter solution is secure multi-party computation (sMPC, reference: https://en.wikipedia.org/wiki/Secure_multi-party_computation), which is a type of cryptographic system where parties jointly compute a function encompassing all of their inputs while keeping those private. Each party initially receives access to a share of the inputs by the sender (or dealer) and computes a function over that share. The outputs are sent back to the sender, who can then assemble the final output without any party having knowledge about more than their initial share.
Simplified, sMPC works as follows:
- A dealer, D, wants to compute a function, F, over an input, I.
- D selects ...