Decentralized Savings & Investment Platform on Stellar
Nestera is a decentralized savings and investment protocol built on Stellar using Soroban smart contracts. It enables individuals and communities to save transparently using stablecoins, with flexible, locked, goal-based, and group savings mechanisms enforced fully on-chain.
The project solves the problem of opaque, centralized savings platforms in emerging markets by providing a non-custodial, transparent alternative where users maintain full control of their funds. Nestera is designed for developers, contributors, and financial communities interested in building open, composable savings infrastructure using low-fee, fast-finality blockchain primitives.
- Non-custodial savings via Soroban smart contracts
- Flexible and locked savings with deterministic interest logic
- Goal-based savings with automated milestones
- Group savings pools with shared rules and governance
- Native USDC-based savings on Stellar testnet
- Web interface for seamless contract interaction
-
Frontend (
apps/web)
Next.js application for interacting with Nestera smart contracts. Provides user interface for creating savings accounts, depositing funds, and tracking progress. -
Backend (
apps/api)
Node.js API for off-chain services such as indexing contract events, sending notifications, managing user metadata, and aggregating analytics. -
Smart Contracts (
contracts/)
Soroban smart contracts written in Rust that manage all savings logic, fund custody, interest calculations, and withdrawal rules.
/
βββ apps/
β βββ web/ # Next.js frontend
β βββ api/ # Node.js backend API
βββ contracts/ # Soroban smart contracts (Rust)
βββ packages/ # Shared utilities and types
βββ scripts/ # Deployment and automation scripts
βββ tests/ # Integration and E2E tests
βββ README.md
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher) - Download
- npm or yarn - Comes with Node.js
- Rust (stable toolchain) - Install
- Soroban CLI - Instructions below
- Stellar testnet account - We'll create this in setup
- Clone the repository
- Set up smart contracts
- Set up backend API
- Set up frontend
- Run tests
git clone https://github.com/your-org/nestera.git
cd nesteracargo install --locked stellar-cli --features optOr use the install script:
curl -fsSL https://github.com/stellar/stellar-cli/raw/main/install.sh | shVerify installation:
stellar --versionstellar network add --global testnet \
--rpc-url https://soroban-testnet.stellar.org:443 \
--network-passphrase "Test SDF Network ; September 2015"stellar keys generate --global alice --network testnetGet your address:
stellar keys address aliceFund your account using Friendbot:
curl "https://friendbot.stellar.org?addr=$(stellar keys address alice)"Verify balance:
stellar account balance --id alice --network testnetcd contracts
cargo build --target wasm32-unknown-unknown --releasestellar contract deploy \
--wasm target/wasm32-unknown-unknown/release/nestera_contract.wasm \
--source alice \
--network testnetSave the contract ID output - you'll need it for frontend and backend setup.
stellar contract invoke \
--id YOUR_CONTRACT_ID \
--source alice \
--network testnet \
-- initialize \
--admin $(stellar keys address alice)cd apps/api
npm installCreate .env in apps/api/:
PORT=3001
NODE_ENV=development
# Stellar Network
STELLAR_NETWORK=testnet
SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
HORIZON_URL=https://horizon-testnet.stellar.org
# Contract
CONTRACT_ID=YOUR_DEPLOYED_CONTRACT_ID
# Database (if using)
DATABASE_URL=postgresql://user:password@localhost:5432/nestera
# Optional
REDIS_URL=redis://localhost:6379npm run migratenpm run devBackend should now be running at http://localhost:3001
curl http://localhost:3001/healthcd apps/web
npm installCreate .env.local in apps/web/:
# Stellar Network
NEXT_PUBLIC_STELLAR_NETWORK=testnet
NEXT_PUBLIC_SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
NEXT_PUBLIC_HORIZON_URL=https://horizon-testnet.stellar.org
# Contract
NEXT_PUBLIC_CONTRACT_ID=YOUR_DEPLOYED_CONTRACT_ID
# Backend API
NEXT_PUBLIC_API_URL=http://localhost:3001
# Wallet Connect (optional)
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID=your_project_idnpm run devFrontend should now be running at http://localhost:3000
npm run build
npm startcd contracts
cargo testcd apps/api
npm testRun with coverage:
npm run test:coveragecd apps/web
npm testRun E2E tests (requires running backend and deployed contracts):
npm run test:e2eFrom project root:
npm run test:integration- Network Passphrase:
Test SDF Network ; September 2015 - RPC URL:
https://soroban-testnet.stellar.org:443 - Horizon URL:
https://horizon-testnet.stellar.org - Friendbot:
https://friendbot.stellar.org
- Main Savings Contract:
CXXXXXX...(Update after deployment) - USDC Token:
CBIELTK6YBZJU5UP2WWQEUCYKLPU6AUNZ2BQ4WWFEIE3USCIHMXQDAMA
Error: insufficient balance
Solution: Fund your account using Friendbot:
curl "https://friendbot.stellar.org?addr=$(stellar keys address alice)"Error: Failed to connect wallet
Solution:
- Ensure you have Freighter wallet installed
- Switch wallet to Testnet network
- Check that
NEXT_PUBLIC_STELLAR_NETWORK=testnetin.env.local
Error: RPC connection timeout
Solution:
- Verify RPC URL is correct in
.env - Check Stellar testnet status: https://status.stellar.org
- Try alternative RPC:
https://soroban-testnet.stellar.org:443
Error: wasm32-unknown-unknown target not found
Solution: Add wasm target:
rustup target add wasm32-unknown-unknownError: Network connection error
Solution: Ensure contracts are deployed and environment variables are set correctly in test config.
- Stellar Documentation: developers.stellar.org
- Soroban Docs: soroban.stellar.org/docs
- Off-Chain Oracle Architecture: contracts/README.md
- Soroban Examples: github.com/stellar/soroban-examples
We welcome contributions from the community! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Follow the setup instructions above
- Make your changes
- Write/update tests
- Ensure all tests pass (
npm testin relevant directory) - Commit your changes (
git commit -m 'Add amazing feature') - Push to your branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Rust (Contracts): Follow Rust standard formatting (
cargo fmt) - TypeScript (Frontend/Backend): Use ESLint and Prettier configs provided
- Commits: Use conventional commits (e.g.,
feat:,fix:,docs:) - Tests: Write tests for new features and bug fixes
- Provide clear description of changes
- Reference any related issues
- Ensure CI checks pass
- Update documentation if needed
- Add screenshots for UI changes
- GitHub Issues: Bug reports and feature requests
- GitHub Discussions: Questions and general discussion
- Discord: Join our Telegram
- Email: dev@nestera.io (if available)
- β Core savings contract
- β Basic web interface
- π§ Group savings pools
- π§ Interest calculation optimization
- Goal-based savings UI
- Notification system
- Mobile app (Flutter)
- Mainnet deployment
- Cross-chain savings
- Yield strategies integration
- DAO governance
- Advanced analytics dashboard
This project is licensed under the MIT License - see the LICENSE file for details.
- Stellar Development Foundation for Soroban platform
- Drips Wave for grants and support
- Open-source contributors and testers
Need help? Here's how to get support:
- Check the Troubleshooting section
- Search existing issues
- Open a new issue with detailed information
- Join our Discord community (if available)
Built with β€οΈ on Stellar