Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📦 StellarKit Contracts

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.

License: MIT Stellar Network Rust


What is StellarKit Contracts?

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

Contracts

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

Project Structure

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

Quickstart

Prerequisites

1. Clone the repo

git clone https://github.com/stellarkit-lab-devtools/stellarkit-contracts.git
cd stellarkit-contracts

2. Build all contracts

stellar contract build

3. Run all tests

cargo test

4. Deploy a contract to Testnet

# Example: deploy the escrow contract
stellar contract deploy \
  --wasm target/wasm32-unknown-unknown/release/escrow.wasm \
  --network testnet \
  --source YOUR_SECRET_KEY

Contracts Overview

🔒 Escrow

Holds 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

Read the full escrow guide →


💸 Payment Splitter

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 →


⏳ Token Vesting

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 →


Documentation


Contributing

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.


Relationship to StellarKit API

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

License

MIT © StellarKit Lab Contributors

About

Production-ready Soroban smart contracts for the Stellar ecosystem

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages