The smart contracts wont built into Daedalus. Daedalus will use any smart contract created, it will just estimates its execution fee for creating a proper tx that the Cardano network (the nodes) will accept.
The smart contracts will be stored on the chain, to be precise: in transactions when they introduced to the network, i.e. a payment in a tx is referring to a smart contract address (as script hash), that smart contract (the whole script of which hash is equal to the to the script address) must be added to the transaction itself.
But, it can be created anywhere out of the chain (even Daedalus can have some feature, in the future, to create a smart-contract in itself), and it can be stored in Daedalus (as an imported or embedded/predefined script) or even it just can be just published on a webpage or in some github repo etc. So, there are lot of possibilities.
So, smart contracts can be verified off-the-chain, by any party.
Also, as I said, Daedalus must calculate the execution cost in advance, and only full-nodes are capable of doing that (atm) due to the fact that smart contracts (non-native scripts) currently only implemented as Plutus Core script (which is a Haskell derivative). iOS based wallet implementations cannot have this feature as Plutus Core use TemplateHaskell for converting Data
structures between off-chain and on-chain. Android might have this feature enabled if they build that Haskell code as a library on a Haskell Stage2 (or 3 I cannot recall) android GHC compiler.
I am not sure how a complex smart contract could be fee-estimated
in advance based on the user data (redeem
Data) on non-full-nodes based wallets. I assume IOG will introduce some API for the relevant packages/tools/packages.
So, you need to distinguish between 3 parties:
- the validation nodes, which validate the tx-es that contain one or more smart-contracts (the transaction validation is stateless, have no clue about the global Ledger state so they need every info locally to be able to validate the script, that’s why the scrip together with it’s reference (the script address, in the input which is an UtxO, which is the hash of the script and some prefix) is included. This is not really accurate but leave it as it is now for simplicity
- The developers (who use Haskell capable tools for creating contract like Plutus Application Platform, playground etc.), who create the smart contracts.
- The users who use the already created smart contracts using some wallet-capable tools (
directly
for example Daedalus full-node wallet with some embeded, imported etc scripts or indirectly
by for example a light wallet such as Yoroi through some API or similar or any mix and match. Who is aware of the Ledger state.