A library of production-ready, auditable Soroban smart contracts for the Stellar ecosystem — built to be deployed, forked, and extended by developers building on Stellar.
StellarKit Contracts is the smart contract companion to StellarKit API. Where StellarKit API handles querying and normalising Stellar network data, StellarKit Contracts provides the on-chain logic layer — reusable, well-tested Soroban contracts that developers can deploy directly or use as a foundation for their own applications.
Every contract in this library is:
- ✅ Written in Rust for the Soroban smart contract platform
- ✅ Fully tested with Soroban's native test framework
- ✅ Documented with inline comments and a dedicated guide
- ✅ Designed to be auditable — no hidden complexity
- ✅ Compatible with Stellar Testnet and Mainnet
| Contract | Description | Status |
|---|---|---|
escrow |
Holds funds until a condition is met, then releases to the beneficiary | 🚧 In Progress |
payment-splitter |
Splits incoming payments across multiple addresses by percentage | 🚧 In Progress |
token-vesting |
Releases tokens to a beneficiary on a time-based vesting schedule | 🚧 In Progress |
stellarkit-contracts/
├── contracts/
│ ├── escrow/ # Escrow contract
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── lib.rs # Contract entry point
│ │ ├── storage.rs # Storage helpers
│ │ ├── events.rs # Contract events
│ │ └── test.rs # Unit tests
│ ├── payment-splitter/ # Payment splitter contract
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── lib.rs
│ │ ├── storage.rs
│ │ ├── events.rs
│ │ └── test.rs
│ └── token-vesting/ # Token vesting contract
│ ├── Cargo.toml
│ └── src/
│ ├── lib.rs
│ ├── storage.rs
│ ├── events.rs
│ └── test.rs
├── docs/
│ ├── architecture.md # Design decisions and patterns
│ ├── getting-started.md # Quickstart for Soroban developers
│ ├── escrow.md # Escrow contract guide
│ ├── payment-splitter.md # Payment splitter guide
│ └── token-vesting.md # Token vesting guide
├── .github/
│ └── ISSUE_TEMPLATE/
│ ├── bug_report.md
│ └── feature_request.md
├── Cargo.toml # Rust workspace
├── CONTRIBUTING.md
└── README.md
- Rust (stable)
- Stellar CLI
git clone https://github.com/stellarkit-lab-devtools/stellarkit-contracts.git
cd stellarkit-contractsstellar contract buildcargo test# Example: deploy the escrow contract
stellar contract deploy \
--wasm target/wasm32-unknown-unknown/release/escrow.wasm \
--network testnet \
--source YOUR_SECRET_KEYHolds funds (XLM or any Stellar asset) in a secure on-chain escrow until a specified condition is met. The depositor locks funds, and the arbiter approves or rejects the release to the beneficiary.
Depositor → locks funds → Escrow Contract
Arbiter → approves → funds released to Beneficiary
Arbiter → rejects → funds returned to Depositor
Accepts incoming token payments and automatically splits them across a set of registered recipients according to pre-defined percentage shares. Useful for revenue sharing, royalty distribution, and team payment automation.
Sender → pays → Payment Splitter Contract → splits by % → Recipients
Read the full payment splitter guide →
Locks a token allocation for a beneficiary and releases it gradually over a vesting schedule — with an optional cliff period before any tokens are released. Useful for team token allocations and investor agreements.
Funder → deposits tokens → Vesting Contract
Beneficiary → claims → vested tokens released over time
Read the full token vesting guide →
- Getting Started
- Architecture & Design Decisions
- Escrow Contract Guide
- Payment Splitter Guide
- Token Vesting Guide
We welcome contributors of all levels. See CONTRIBUTING.md to get started.
This project participates in the Stellar Wave Program — open issues may carry Point rewards for contributors.
StellarKit Contracts and StellarKit API are designed to work together:
- Deploy a contract from this repo
- Query its on-chain state and transaction history through StellarKit API
- Use the TypeScript SDK to interact with both from your frontend
MIT © StellarKit Lab Contributors