What is a smart contract? How code runs deals on a blockchain

By SendPay Business · · 2 min read

What is a smart contract? How code runs deals on a blockchain

A smart contract is a small program stored on a blockchain that runs by itself when set conditions are met. Nobody has to press a button or approve it: the code does what it was written to do.

How they workWhat they are used forThe risks

How they work

The code and its rules are published on the blockchain, where anyone can read them. When someone sends a transaction that meets the conditions, every computer on the network runs the code and agrees on the result. Each run costs a small network fee, often called gas.

What they are used for

  1. Creating tokens and NFTs.
  2. Crypto lending and trading apps, often called DeFi.
  3. Holding funds until conditions are met.

The risks

Once published, a smart contract is hard or impossible to change, so a bug can be exploited before anyone can fix it. In 2016 a flaw in a project called The DAO let an attacker drain millions of ether. The phrase "code is law" also means there is often nobody to appeal to.

Where SendPay fits

SendPay platforms let your customers buy, sell and hold crypto under your own brand, with assets held with regulated partners. SendPay does not offer DeFi or smart contract tools.

Build it

Create your own financial platform.

Pick a template, name it, brand it, preview every page before you pay. Your brand, your users, your fees.

Build my platform →

Questions people ask

What does an Ethereum transaction cost?

Work out a gas fee in ETH and in your currency.

Gas fee calculator →
What is Ethereum?

The best-known smart contract blockchain.

What is Ethereum? →
What is DeFi?

Finance apps built on smart contracts.

What is DeFi? →
What is a gas fee?

The cost of running a transaction.

What is a crypto gas fee? →

Read next

This guide is general information, not legal or financial advice. SendPay Business is a technology company, not a bank, and does not take deposits; regulated services on the platforms are provided by licensed partners. PayPal, Patreon and Substack are named as reference points only and are not affiliated with SendPay Business.