We use necessary cookies for site function. For analytics and marketing, we need your consent. You can change your mind anytime. Privacy Policy

Smart Contracts on Stellar
Stellar · Smart Contracts · Soroban

What are Smart Contracts and how you can build them on Stellar?

Olvis GilOlvis Gil  ·  EduNode  ·  5 min read

Smart contracts are self-executing contracts with the terms of the agreement directly written into code. They run on blockchain networks and automatically execute when predetermined conditions are met — no intermediary required.

Analogy: Think of a smart contract like a vending machine. You put in money, select your item, and the machine automatically dispenses it. No cashier, no trust required — just code.

What are Smart Contracts?

A smart contract is a program stored on a blockchain that runs when predetermined conditions are met. They are used to automate the execution of an agreement so that all participants can be immediately certain of the outcome, without any intermediary's involvement or time loss.

Smart Contracts on Stellar with Soroban

Soroban is Stellar's smart contract platform, designed to be developer-friendly, scalable, and interoperable. Built in Rust, Soroban contracts are compiled to WebAssembly (WASM) and run on the Stellar network. This makes them fast, secure, and highly efficient.

Key features of Soroban include: a developer-friendly SDK, predictable and low fees, built-in testing tools, and seamless integration with Stellar's existing payment infrastructure.

Building Your First Smart Contract

To get started with Soroban, you need to install the Rust toolchain and the Soroban CLI. Once set up, you can write, test, and deploy contracts directly to the Stellar testnet. The Soroban documentation at soroban.stellar.org provides comprehensive guides and examples.

Use Cases

Smart contracts on Stellar can be used for: decentralized exchanges (DEX), lending and borrowing protocols, tokenized assets, escrow services, and automated payment systems. The combination of Stellar's speed and Soroban's programmability opens up an entirely new world of financial applications.

Resources

[1] Soroban — Stellar Smart Contracts Platform

[2] Soroban is now live on Mainnet

Share this article
Olvis Gil
Olvis Gil

Founder of EduNode and MozartPay. Blockchain educator and smart contract developer based in Vienna, Austria.