A modern Web3 healthcare platform built on Stellar/Soroban that enables recurring insurance premium payments and contributor-driven issue management for medical insurance claims.
Healthcare Drips is built on Stellar for:
- β‘ Lightning-fast transactions (5-second blocks)
- π° Ultra-low fees (~$0.01 per transaction)
- π Native multi-signature support
- π Global accessibility with built-in DEX
- π High throughput (400+ TPS)
healthcare-drips/
βββ π¦ src/ # Stellar smart contracts
β βββ healthcare_drips.rs # Main contract logic
β βββ lib.rs # Module exports
β βββ main.rs # Entry point
β βββ tests.rs # Comprehensive tests
βββ π frontend/ # React dApp with Stellar SDK
βββ βοΈ scripts/ # Deployment and utilities
βββ π docs/ # Documentation
βββ π .github/ # Issue templates
βββ π¦ Cargo.toml # Rust project configuration
- Automated recurring payments for insurance premiums
- Flexible payment schedules (daily, weekly, monthly)
- Multi-token support (XLM, USDC, custom tokens)
- Emergency pause functionality
- Stellar native token transfers
- Issue-based funding for medical treatments
- Community voting on claim approvals
- Reputation system with 5 levels
- Transparent decision making
- Stellar multi-sig approvals
- Native multi-signature for large claims
- Role-based access control
- Atomic operations guarantee
- Built-in replay protection
- Bounded execution limits
- React-based with Stellar SDK
- Freighter wallet integration
- Real-time updates for claim status
- Mobile responsive design
- Rust 1.70+
- Soroban CLI
- Stellar account with XLM
- Freighter wallet (for frontend)
# Build the Stellar contract
cargo build --target wasm32v1-none --release
# Run tests
cargo test# Install Soroban CLI
cargo install soroban-cli
# Deploy contract
soroban contract deploy \
--wasm target/wasm32v1-none/release/healthcare_drips.wasm \
--source your_secret_key \
--network testnet
# Initialize contract
soroban contract invoke \
--id <CONTRACT_ID> \
--source your_secret_key \
-- \
initialize \
--admin your_public_keycd frontend
npm install
npm start// Create recurring premium payment
HealthcareDrips::create_premium_drip(
&env,
patient_address,
insurer_address,
token_address,
500_i128, // 5 XLM monthly
2592000_u64, // 30 days
);// Create medical treatment funding request
HealthcareDrips::create_issue(
&env,
patient_address,
IssueType::Surgery,
"Emergency Surgery".to_string(),
"Patient needs immediate surgery".to_string(),
10000_i128, // 100 XLM
"QmHash123".to_string(),
deadline_timestamp,
3_u32, // Required approvals
creator_address,
);// Multi-sig claim approval
HealthcareDrips::review_application(
&env,
issue_id,
contributor_address,
true, // Approved
"Good expertise match".to_string(),
reviewer_address,
);// Issue Types
pub enum IssueType {
EmergencyTreatment = 0,
Surgery = 1,
PreventiveCare = 2,
ChronicCondition = 3,
MentalHealth = 4,
Rehabilitation = 5,
MedicalEquipment = 6,
ResearchFunding = 7,
}
// Contributor Levels
pub enum ContributorLevel {
Junior = 0, // 1-5 contributions
Intermediate = 1, // 6-15 contributions
Senior = 2, // 16-30 contributions
Expert = 3, // 31-50 contributions
Master = 4, // 51+ contributions
}create_premium_drip()- Setup recurring paymentsprocess_premium_payment()- Execute paymentscreate_issue()- Create funding requestsapply_to_issue()- Contributor applicationsreview_application()- Multi-sig reviewsverify_contributor()- Contributor verification
- ISSUE_CREATOR: Can create issues
- REVIEWER: Can review applications
- APPROVER: Can approve issues
- CONTRIBUTOR: Can apply to issues
import { SorobanRpc, Contract, Address } from '@stellar/stellar-sdk';
// Initialize
const rpc = new SorobanRpc.Server('https://soroban-testnet.stellar.org');
const contract = new Contract(contractAddress);
// Call contract
const result = await contract.call('create_premium_drip', [
patientAddress.toScVal(),
insurerAddress.toScVal(),
tokenAddress.toScVal(),
ScVal.scvI128(premiumAmount),
ScVal.scvU64(interval),
]);// Connect wallet
const wallet = window.freighter;
const publicKey = await wallet.getPublicKey();
// Sign transaction
const signedTx = await wallet.signTransaction(transaction);| Feature | Ethereum | Stellar | Improvement |
|---|---|---|---|
| Transaction Fees | $20-100 | ~$0.01 | 99.9% cheaper |
| Block Time | ~15s | ~5s | 3x faster |
| Throughput | ~15 TPS | ~400 TPS | 25x higher |
| Multi-sig | Custom | Native | Built-in |
| Finality | ~1 min | ~10s | 6x faster |
- Funding: 1,000-50,000 XLM
- Approvals: 3 (Medical, Financial, Community)
- Timeline: 24-48 hours
- Funding: 5,000-100,000 XLM
- Approvals: 4 (Medical, Hospital, Financial, Community)
- Timeline: 3-5 business days
- Funding: 500-10,000 XLM
- Approvals: 2 (Medical, Community)
- Timeline: 2-3 business days
- Funding: 2,000-20,000 XLM/year
- Approvals: 3 (Medical, Financial, Community)
- Timeline: 5-7 business days
- Funding: 1,000-15,000 XLM
- Approvals: 3 (Mental Health, Financial, Community)
- Timeline: 3-4 business days
- Funding: 3,000-25,000 XLM
- Approvals: 3 (Medical, Financial, Community)
- Timeline: 4-5 business days
- Funding: 500-20,000 XLM
- Approvals: 2 (Medical, Financial)
- Timeline: 2-3 business days
- Funding: 10,000-200,000 XLM
- Approvals: 5 (Scientific, Ethical, Financial, Community, Medical)
- Timeline: 7-14 business days
- Application Review: +5 points
- Approved Application: +10 points
- Successful Contribution: +20 points
- Exceptional Impact: +50 points
- Junior: 10 HCT per approved application
- Intermediate: 25 HCT per approved application
- Senior: 50 HCT per approved application
- Expert: 100 HCT per approved application
- Master: 200 HCT per approved application
# Unit tests
cargo test
# Integration tests
cargo test -- --nocapture
# Specific test
cargo test test_create_premium_drip- β Contract initialization
- β Premium drip creation and processing
- β Issue management workflow
- β Contributor verification system
- β Application and review process
- β Access control and permissions
- β Error handling and edge cases
- Native Multi-sig: Built-in multi-signature support
- Atomic Operations: Transaction atomicity guaranteed
- Time-locks: Built-in time-lock operations
- Bounded Execution: Gas limits prevent infinite loops
- Replay Protection: Sequence numbers prevent replay attacks
- Role-based Access: Granular permission control
- Input Validation: Comprehensive parameter checking
- Error Handling: Proper error propagation
- Audit Trail: Complete transaction history
- View active premium drips
- Submit funding requests
- Track claim status
- Manage payment methods
- Browse funding opportunities
- Vote on claim approvals
- Track reputation score
- Earn rewards
- Manage system settings
- Override emergency claims
- Generate compliance reports
- Monitor platform health
# Build contract
cargo build --target wasm32v1-none --release
# Deploy to testnet
soroban contract deploy \
--wasm target/wasm32v1-none/release/healthcare_drips.wasm \
--source $SECRET_KEY \
--network testnet
# Initialize
soroban contract invoke \
--id $CONTRACT_ID \
--source $SECRET_KEY \
-- initialize --admin $PUBLIC_KEY# Deploy to mainnet
soroban contract deploy \
--wasm target/wasm32v1-none/release/healthcare_drips.wasm \
--source $SECRET_KEY \
--network public
# Initialize with enhanced security
soroban contract invoke \
--id $CONTRACT_ID \
--source $SECRET_KEY \
-- initialize --admin $PUBLIC_KEYWe welcome contributions! Please see our Contributing Guide.
- Fork this repository
- Create feature branch
- Implement with tests
- Submit pull request
- Earn HCT rewards
This project is licensed under the MIT License - see LICENSE file for details.
- GitHub Repository: https://github.com/akordavid373/Rishabh42-HealthCare-Insurance-Ethereum
- Stellar Documentation: https://soroban.stellar.org/docs/
- Soroban SDK: https://github.com/stellar/rs-soroban-sdk
- Freighter Wallet: https://freighter.app/
- Stellar Development Foundation for the Soroban platform
- Stellar Community for support and feedback
- Open-source contributors for making healthcare accessible
- Stellar contract development
- Comprehensive testing suite
- Frontend integration
- Testnet deployment
- Community beta testing
- Mainnet deployment
- Mobile app development
- Advanced features
- Healthcare partnerships
- DeFi integrations
- Advanced analytics
- API for third parties
- Global expansion
Join us in revolutionizing healthcare insurance with Stellar technology! ππ«
- β Smart Contracts: Complete and tested
- β Frontend Integration: Stellar SDK ready
- β Documentation: Comprehensive guides
- β Testing: Full test coverage
- β Deployment: Testnet ready
The Healthcare Drips platform is now ready for production deployment on Stellar with lightning-fast transactions and ultra-low fees! π