RottenVille Docs
  • RottenVille FAQ
  • Getting Started
    • Solana Wallet - MINT
  • IMPORTANT INFORMATION & DEFINITIONS
    • Discord Bot & Community
      • Bot Commands
      • NFT Community Dictionary
    • Web Section Rarity
  • TECHNOLOGY
    • Decentralization & Blockchain
      • Smart Contracts
      • Decentralized Applications (dapps)
      • Tokens & Crypto
      • Proof of Stake (PoS)
      • Liquidity Pool
      • Decentralized Autonomous Organization (DAO)
      • Web 3.0
    • Solana Blockchain
    • Metaplex
    • RottenVille Implementation
Powered by GitBook
On this page
  1. TECHNOLOGY
  2. Decentralization & Blockchain

Smart Contracts

Transactions between parties in current systems are usually conducted in a centralized form, which requires the involvement of a trusted third party (a bank, company, government) this could result in security issues and high transaction fees, the Decentralization Technology from a Blockchain allows make a peer-2-peer transaction method without a third party.

A smart contract is an executable code that runs on the blockchain to facilitate, execute and enforce the terms of an agreement between untrusted parties. It can be thought of as a system that releases digital assets to all or some of the involved parties once the pre-defined rules have been met. Compared to traditional contracts, smart contracts do not rely on a trusted third party to operate, resulting in low transaction costs. Smart contracts can be applied to different applications (smart properties, e-commerce, game industries, art, and music rights management).

Many different definitions of a smart contract have been discussed in the literature. The definition of a Smart Contract has been classified into two categories.

  • Smart Contract Code: Smart contract Code means “code that is stored, verified, and executed on a blockchain”. The capability of this smart contract depends entirely on the programming language used to express the contract and the features of the blockchain.

  • Smart Legal Contract: Smart Legal Contract means code to complete or substitute legal contracts. The capability of this smart contract does not depend on the technology, but instead on legal, political, and business institutions.

A smart contract has an account balance, private storage, and executable code. The contract’s state comprises the storage and the balance of the contract. The state is stored on the blockchain and is updated each time the contract is invoked. Each contract will be assigned to a unique address of 20 bytes. Once the contract is deployed into the blockchain, the contract code cannot be changed. To run a contract, users can simply send a transaction to the contract’s address. This transaction will then be executed by every consensus node (called miners) in the network to reach a consensus on its output. The contract’s state will then be updated accordingly. The contract can, based on the transaction it receives, read/write to its private storage, store money into its account balance, send/receive messages, images, music, or money from users/other contracts, or even create new contracts.

There are two types of smart contracts.

  • Deterministic: A deterministic smart contract is a smart contract that when it is run, does not require any information from an external party (from outside the blockchain).

  • Non-Deterministic: A non-deterministic smart contract is a contract that depends on information (called oracles or data feeds) from an external party. For example, a contract that requires the current weather information to be run, which is not available on the blockchain.

ALHARBY, Maher; VAN MOORSEL, Aad. Blockchain-based smart contracts: A systematic mapping study. arXiv preprint arXiv:1710.06372, 2017.

PreviousDecentralization & BlockchainNextDecentralized Applications (dapps)

Last updated 3 years ago