Imagine that we are in a room you and me, and that we have made a program for a system of probability. And we do not want to know the result, first we are going to do the program that flips a coin randomly, except that if we want to see the result, it must be recorded to be able to read it, except that In this case, the result must go to the safenet.
The first question is that we have made the algorithm, we know it, and have the decryption key, except that to be sure not to know the key, we will ask the blockchain to generate a random decryption key, and give us a smart contract, it will convey the coin to safenet.
So the smart contract is only the vehicle of the coin that we fliped. The computation will be used to flip the piece elsewhere. We will not have the decryption key.
Please explain what you are trying to say more formally and mathematically because that is nearly incoherent. If you cannot express your algorithm mathematically, then there's zero chance you can implement it.