LogoLogo
Open a Support Ticket!GridPlus.ioDiscordLattice Manager
  • Welcome!
  • Setup
    • Lattice1 Device Setup
  • Lattice1
    • Lattice1 Introduction
    • Lattice1 Security Features
      • Lattice1 Random Number Generation
    • How the Lattice1 Makes Transactions Readable with ABI Decoding
      • Advanced ABI Decoding
    • How to Manage Your Seed Phrase
    • Lattice1 Power Supply
    • Supported Digital Assets
    • Lattice1 WiFi Troubleshooting
    • Lattice1 Firmware Reference
    • Lattice1 Guides 🛠️
      • Update the Firmware
      • Verify That Your Lattice1 Is Authentic
      • View the Seed Phrase on Your Lattice and SafeCard
      • Claim Your "Verified Lattice1 Owner" POAP and Discord Role
      • Establish a Connection With Your Lattice1 via SSH
      • Connect to WiFi Using SSH
      • Disable Wifi When Connected via Ethernet Using SSH
      • Managing ETH Validator Keys
  • SafeCards
    • Introduction to SafeCards
    • Setting up a New SafeCard
    • SafeCard Operations
    • Lattice1 Doesn't Recognize the Inserted SafeCard
    • SafeCard CLI
  • Apps & Integrations
    • Lattice Manager
      • Managing Your Bitcoin Wallet
      • Creating Custom Address Tags
      • Using the Wallet Explorer
      • Connecting Your Lattice to Your Own Private Endpoint
      • Lattice Manager Troubleshooting
      • How to View the XPUB of Your Bitcoin Wallet
    • MetaMask
      • Installing MetaMask
      • Connecting to MetaMask
      • Advanced MetaMask Setup
      • MetaMask Troubleshooting
    • NuFi
      • Connecting to NuFi
    • Frame
      • Installing Frame
      • Connecting to Frame
      • Advanced Frame Setup
    • Rabby
      • Connecting to Rabby
      • Rabby Troubleshooting
    • MyCrypto
      • Connecting to MyCrypto
      • MyCrypto Troubleshooting
    • Ambire Wallet
      • Connecting to Ambire
    • Eidoo App (Mobile)
  • Additional Resources
    • Payment, Shipping, Delivery
    • GridPlus Affiliate Program
    • Developer Resources
    • GridPlus Brand Assets
    • Bug Bounty & Responsible Disclosure Policy
  • Blockchain Basics
    • Introduction
    • Wallets
    • A Brief Introduction to Private Keys
    • Blocks & Consensus Mechanism
    • UTXO vs. Account Model
    • Bitcoin
    • Ethereum
      • Smart Contracts
      • ERC-20 tokens
      • NFTs
      • Layer 2s
Powered by GitBook
On this page
  • Using Smart Contracts
  • Safety
  1. Blockchain Basics
  2. Ethereum

Smart Contracts

PreviousEthereumNextERC-20 tokens

Last updated 2 years ago

A smart contract is a computer program that directly controls the transfer of digital currencies or assets between parties under certain conditions. Smart contracts are executed on the Ethereum Virtual Machine which can be thought of as a computer that runs all over the world on each ethereum node, hence you may see Ethereum referred to as the world computer. Smart contracts are independent of any central authority, making them transparent and secure by design and once deployed onto the blockchain a smart contract cannot be stopped. They are also self-executing, which means they automatically execute when all conditions are met, so no one needs to oversee the operation after a smart contract is deployed on the blockchain. On Ethereum, smart contracts are created in a programming language called Solidity, which is similar in design to C++, Python and JavaScript with many object oriented features.

Smart contracts are currently used for a wide range of applications, including real estate transactions, financial derivatives, gaming and any other arbitrary program imaginable. Some notable examples are included in the image below:

This list of smart contracts was pulled directly from Ultrasound.Money which sorts them by how much network resources have been used to run them. Each of these smart contracts use gas as people call them, meaning that ETH is spent/burnt to run the programs on the Ethereum EVM.

Most smart contracts are paired with a webpage front-end creating what is referred to as a dApp (decentralized application)

Using Smart Contracts

Smart contracts have an associated address just like your accounts have addresses. The main difference is that a contract address also has what is called an ABI (Application Binary Interface) that can take in certain parameters and, given that the parameters are sufficient, the smart contract will then execute and perform its pre-programmed functions. For most dApps, this interface is neatly tucked away in the background and all the end user interacts with is a polished front-end website.

Safety

Anyone can create a contract on Ethereum and name it anything they like, so always be certain you are interacting with the contract you expect, especially if you are interacting with a newly released contract or project.

A good way to view a token/contract and confirm it's legitimacy is by using a blockchain explorer like Etherscan.io and make sure that the token metrics match what you expect regarding the contract address, token holders, and transaction analytics. Here is an example from etherscan's page for the DAI Stablecoin contract:

Notice that there are nearly 500k holders and 16 million transactions on mainnet Ethereum with this contract. This gives a certainty that this is the correct contract address for DAI as these metrics would be extremely expensive to fake using a newer malicious contract.

Now that we can see that this is the correct DAI token, we may wish to add this to our Lattice1's address tags list making it so every time we interact with the DAI contract our Lattice1 screen displays the name DAI instead of the contract address.