Daemon canisters

From Internet Computer Wiki
Jump to: navigation, search

On the Internet Computer blockchain, you can create canister smart contracts that run like daemon processes — that is, you can configure them so that they are automatically activated by the network itself at specified block intervals.

When smart contracts are hosted on traditional blockchain networks, computations can be only be invoked by submitting a new transaction to their networks. This means that if, say, a DeFi (decentralized finance) smart contract needs to periodically perform some action, such as recording the latest asset prices published by DEXs (decentralized exchanges), a traditional off-chain system such as software running on a centralized cloud service must be configured to periodically submit transactions.

The approach that must be used with traditional blockchains is complex, fault prone, and introduces several problems native to centralization. For example, who will be responsible for running the centralized infrastructure, and would such a person become a de facto "controller" or "owner" of an otherwise decentralized financial system in the eyes of financial regulator?

The Internet Computer provides a means to avoid such problems, by allowing canister smart contracts to be configured so that they aer invoked by the blockchain itself, at some specified block interval.

Learn more here:

https://internetcomputer.org/docs/current/developer-docs/backend/periodic-tasks/

https://medium.com/dfinity/internet-computer-canister-timers-21cd3201b831