A decentralized savings application where users can lock XLM tokens for a specific period and earn guaranteed interest rewards.
- 🔒 Time-Locked Savings: Lock XLM for 30, 60, 90, or 180 days
- 💰 Guaranteed Interest: Earn 5-18% APY based on lock period
- 📊 Real-Time Dashboard: Track savings progress with live countdown
- ⛓️ Blockchain Secured: Built on Stellar with Soroban smart contracts
- 🚫 No Early Withdrawal: Funds automatically released after lock period
┌─────────────┐ ┌─────────────┐ ┌──────────────┐
│ React │─────▶│ Node.js │─────▶│ MongoDB │
│ Frontend │ │ Backend │ │ Database │
└─────────────┘ └─────────────┘ └──────────────┘
│
│
▼
┌─────────────────────────────────────────────────┐
│ Stellar Blockchain + Soroban │
│ (Smart Contracts) │
└─────────────────────────────────────────────────┘
🎥 Watch the demo on Google Drive
- Node.js v16+ and npm
- MongoDB v4+
- Rust (for Soroban contracts)
- Stellar CLI (soroban-cli)
mkdir stellar-timelock-savings
cd stellar-timelock-savingscd frontend
npm installcd ../backend
npm installcd ../contracts
# Install Rust (if not installed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Add wasm target
rustup target add wasm32-unknown-unknown
# Install Soroban CLI
cargo install --locked soroban-cli
# Build contract
soroban contract buildCreate frontend/.env:
REACT_APP_API_URL=http://localhost:5000/apiCreate backend/.env:
PORT=5000
MONGODB_URI=mongodb://localhost:27017/stellar-timelock
NODE_ENV=development# Using MongoDB service
sudo systemctl start mongod
# OR using Docker
docker run -d -p 27017:27017 --name mongodb mongo:latestcd backend
npm run devcd frontend
npm startThe app will open at http://localhost:3000
cd contracts
# Configure Stellar CLI for testnet
soroban config network add --global testnet \
--rpc-url https://soroban-testnet.stellar.org:443 \
--network-passphrase "Test SDF Network ; September 2015"
# Create identity
soroban config identity generate --global alice
# Fund account (get test XLM)
soroban config identity fund alice --network testnet
# Deploy contract
soroban contract deploy \
--wasm target/wasm32-unknown-unknown/release/timelock_contract.wasm \
--source alice \
--network testnet
# Save the contract ID that's returned- Get a Stellar wallet (use Stellar Laboratory)
- Fund your testnet account from Stellar Friendbot
- Enter your public key and secret key
- Choose amount and lock period
- Click "Create Lock & Earn Interest"
- Go to "My Accounts" tab
- Wait for countdown to reach zero
- Click "Withdraw" button
- Enter your secret key
- Funds + interest transferred to your wallet
cd contracts
cargo testGet all time-lock accounts
Create new time-lock account
{
"walletAddress": "GXXX...",
"amount": 100,
"lockPeriod": 30,
"interest": 5,
"txHash": "abc123..."
}Withdraw from account (after unlock time)
Get platform statistics
- Frontend: React, Tailwind CSS, Stellar SDK, Axios
- Backend: Node.js, Express, MongoDB, Mongoose
- Blockchain: Stellar, Soroban (Rust)
- Testing: Jest, Cargo Test
| Lock Period | APY |
|---|---|
| 30 Days | 5% |
| 60 Days | 8% |
| 90 Days | 12% |
| 180 Days | 18% |
# Check if MongoDB is running
sudo systemctl status mongod
# Start MongoDB
sudo systemctl start mongod- Ensure you're using testnet with funded account
- Check network connection
- Verify secret key is correct
# Update Rust
rustup update
# Clean and rebuild
cargo clean
soroban contract build- ✅ Frontend UI Complete
- ✅ Backend API Complete
- ✅ Smart Contract Complete
- ✅ MongoDB Integration
- ✅ Stellar SDK Integration
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing) - Open Pull Request
MIT License - feel free to use for learning and projects!
For issues and questions:
- Create an issue on GitHub
- Check Stellar documentation: https://developers.stellar.org
- Soroban docs: https://soroban.stellar.org
Built with ❤️ using Stellar Blockchain