Non-custodial recurring payment scheduler on Stellar Soroban.
🚀 Deployed on Stellar Testnet
Contract ID: CAS5UCX4OPDXDSKZN2IM4DMJ6J34YIFKQTONXCW2GBR3P5E6TLKVVNM7
📊 View on Stellar Expert | 🔬 View on Stellar Lab
⚠️ Important: Users must approve tokens separately before creating schedules. The contract no longer handles token approval internally to avoid complex authorization issues.
Stellasure enables users to set up recurring payments on Stellar without giving up custody of their funds. Users authorize a payment schedule once, and payments are automatically executed at specified intervals by permissionless relayers.
- Non-custodial: Users maintain full control of their funds
- Flexible Payment Modes: Equal split or fixed amount per recipient
- Multi-recipient Support: Send to multiple addresses in one schedule
- Permissionless Execution: Anyone can trigger due payments
- Full Control: Payers can reschedule, update, or cancel anytime
- Event Emissions: All actions emit events for UI/relayer tracking
- Token Support: Works with USDC, XLM, and any Stellar token
# Ensure you have stellar-cli installed
stellar --versionstellar contract buildcargo test./deploy.sh testnet aliceSee DEPLOYMENT.md for detailed deployment instructions.
create_schedule- Create a new recurring payment scheduleexecute_schedule- Execute a due payment (permissionless)reschedule- Modify the next payment dateupdate_schedule- Update amount, interval, or split modecancel- Stop recurring payments permanently
get_schedule- Retrieve schedule details by IDget_user_schedules- Get all schedule IDs for a user
Total amount is divided equally among all recipients.
SplitMode::EqualSplitEach recipient receives the full specified amount.
SplitMode::FixedAmount┌─────────────┐
│ Payer │ Creates schedule, authorizes token transfers
└──────┬──────┘
│
▼
┌─────────────────────┐
│ Stellasure Contract │ Stores schedules, enforces rules
└─────────┬───────────┘
│
▼
┌─────────────┐
│ Relayer │ Monitors schedules, triggers execution
└─────────────┘
│
▼
┌─────────────┐
│ Recipients │ Receive payments automatically
└─────────────┘
stellasure/
├── contracts/
│ └── stellasure/
│ ├── src/
│ │ ├── lib.rs # Main contract logic
│ │ └── test.rs # Comprehensive test suite
│ └── Cargo.toml
├── Cargo.toml
├── DEPLOYMENT.md # Deployment guide
├── deploy.sh # Deployment script
└── README.md
- Authorization: Only payers can modify their schedules
- Timing Enforcement: Payments can only execute when due
- Event Transparency: All actions emit events
- Validation: Strict input validation on all parameters
Run the full test suite:
cargo testTests cover:
- Schedule creation with validation
- Equal split and fixed amount execution
- Authorization checks
- Rescheduling and updates
- Cancellation
- Edge cases and error conditions
| Event | Description |
|---|---|
created |
Schedule created |
executed |
Payment executed |
resched |
Schedule rescheduled |
updated |
Schedule parameters updated |
cancel |
Schedule cancelled |
- Subscriptions: Monthly service payments
- Payroll: Regular salary distributions
- DCA: Dollar-cost averaging for investments
- Allowances: Recurring allowance payments
- Bill Payments: Automated recurring bills
stellar contract invoke \
--id <TOKEN_CONTRACT_ID> \
--source <YOUR_IDENTITY> \
--network testnet \
-- \
approve \
--from <YOUR_ADDRESS> \
--spender CAS5UCX4OPDXDSKZN2IM4DMJ6J34YIFKQTONXCW2GBR3P5E6TLKVVNM7 \
--amount 9223372036854775807 \
--expiration_ledger 3110400stellar contract invoke \
--id CAS5UCX4OPDXDSKZN2IM4DMJ6J34YIFKQTONXCW2GBR3P5E6TLKVVNM7 \
--source <YOUR_IDENTITY> \
--network testnet \
-- \
create_schedule \
--payer <YOUR_ADDRESS> \
--recipients '["<RECIPIENT_ADDRESS>"]' \
--token <TOKEN_CONTRACT_ID> \
--amount 10000000 \
--interval_secs 86400 \
--start_ts <FUTURE_TIMESTAMP> \
--split_mode FixedAmountstellar contract invoke \
--id CAS5UCX4OPDXDSKZN2IM4DMJ6J34YIFKQTONXCW2GBR3P5E6TLKVVNM7 \
--source <YOUR_IDENTITY> \
--network testnet \
-- \
execute_schedule \
--schedule_id 1