Skip to main content

Smart Contracts

Wasp Node Smart Contracts

Smart contracts are software applications that run on a distributed network with multiple validators executing and validating the same code. This prevents tampering with the execution of the program and ensures that the application behaves as expected.

Applications You Can Trust

As you can be certain that the code that is being executed will never change, this results in applications you can trust. This allows you to use smart contracts for applications where there was a trust issue. The rules of the smart contract define what the contract can and can not do, making it a decentralized and a predictable decision maker.

Smart contracts are used for all kinds of purposes. A recurring reason to use a smart contract would be to automate a certain action without needing a centralized entity to enforce it. For example, a smart contract could exchange a certain amount of IOTA tokens for a certain amount of land ownership. That smart contract would accept both the IOTA tokens and the land ownership and predictably exchange them between both parties. It excludes the risk of one of the parties not delivering on their promise: with a smart contract, code is law.

Scalable Smart Contracts

Anyone could deploy a smart contract to a public smart contract chain. Once it is deployed, nobody will be able to change or delete it. Smart contracts can communicate with one another, and you can invoke programmed public functions on a smart contract to trigger its execution or check its state.

Smart contracts do not run on just a single computer. Instead, each validator of the blockchain has to run it, compare the results with others, and synchronize the state of the network. They need to wait while their messages are carried over the Internet, which introduces delays that you cannot solve with quicker software or faster computers, and this issue will only get worse if you try to add more validators to the network. With enough requests, any blockchain network will get congested, and its execution fees will ramp up.

As IOTA Smart Contracts run many independent chains, it spreads out the load and creates a network of a much larger scale. At the same time, it provides advanced means of communication between its chains and preserves the ability to create complex, composed smart contracts.