Smart contract and secret contract

After running the demo Millionaire, I am a bit of confused about the difference between smart contract and secret contract.

I understand the secret contract is mainly designed to handle the dapp logic(in the Millionaire demo are how to add_millionaire and compute_richest).

But what’s the function of the smart contract (i.e. Sample.sol and Migrations.sol) ? :thinking:

Looking forward to the reply.

Hi @stan_yi – can you confirm which tutorial / code resource you’re working from? We have a few that have become outdated floating around and I want to make sure we’re both discussing the same one.

@stan_yi you can take a look at Salad code base, which better distinguishes the differences between smart contract and secret contracts.

In Salad, Ethereum smart contract is used to hold funds that are to be mixed and can be triggered by the Enigma secret contract. The secret contract takes in encrypted recipient addresses from mixers (sensitive data) and shuffles these inputs in a privacy preserving manner


thanks for your attention, I ran the demo from this repo

thanks, I will try it later