AppLayer
  • Welcome to AppLayer Docs
  • Introducing AppLayer
    • A Primer on Smart Contracts
    • The Problem With EVMs
    • What is AppLayer?
  • How AppLayer works
    • Validators
    • Sentinels
    • Application Chains
    • Bridging
      • AppLayer-to-AppLayer Data Bridging
      • AppLayer-to-AppLayer Token Bridging
      • AppLayer-to-External Bridging (Ethereum, Solana, etc.)
  • Understanding rdPoS
    • Blockchains overview
    • How rdPoS works
    • Validator implementations
    • Slashing
  • BDK implementation
    • The utils folder
    • The contract folder
    • The core folder
    • Transactions and Blocks
    • Database
    • Contract call handling
    • RLP (Recursive-Length Prefix)
    • P2P Overview
    • P2P Encoding
  • Understanding contracts
    • Solidity ABI
    • Internal and external contract calls
    • Setting up the development environment
    • Contract Tester
  • Precompiled contracts
    • Types of pre-compiled contracts
    • Dynamic and Protocol Contracts
    • SafeVariables and commit/revert logic
    • How to code a precompiled contract
    • Creating a Dynamic Contract (Simple)
      • Simple Contract Header
      • Simple Contract Source
      • Deploying and testing
    • Creating a Dynamic Contract (Advanced)
    • Creating a Protocol Contract (Advanced)
  • EVM contracts
    • State management and VM instance creation
    • Seamless C++/EVM integration
    • C++ to other contract calls
    • EVM to other contract calls
    • Executing contract calls via EVMC
    • Calling EVM contracts from C++
    • Calling C++ contracts from EVM
  • Getting started with AppLayer Testnet
  • Join our Community
  • Get in Touch
  • Glossary
Powered by GitBook
On this page
  1. Introducing AppLayer

A Primer on Smart Contracts

The building blocks of decentralized finance

PreviousIntroducing AppLayerNextThe Problem With EVMs

Last updated 1 year ago

In the field of cryptocurrencies, smart contracts are pieces of code that can run on a blockchain and enforce certain rules or logic, much like real-world contracts. However, due to the inherent programmability provided by blockchain technology, smart contracts can go much further than that, acting as a foundation to build decentralized applications and concepts such as DeFi, while eliminating the necessity of "trust" usually provided by a third-party on a traditional real-world contract.

Although a fairly old concept in theory, smart contracts in practice have been popularized by the blockchain and its implementation of a virtual machine - the "Ethereum Virtual Machine", or - that made it possible to deploy and interact with them. Other coins such as , and have followed along with their own implementations as time went on.

has a good explanation of smart contracts in EVM and most major scaling solutions for Ethereum use the same unsustainable technology, introducing the same issues of scalability in every deployed layer.

Ethereum
EVM
Avalanche
Tron
Bitcoin Cash
Ethereum's website