π§ Stellar Insured Decentralized Insurance Infrastructure on Stellar Soroban & Polkadot ink!
Stellar Insured is a suite of smart contracts that powers decentralized insurance products across the Stellar (Soroban) and Polkadot (ink!) ecosystems.
The protocol enables transparent policy issuance, deterministic claims processing, decentralized risk pools, DAO governance, and on-chain slashing mechanisms. All critical insurance logic is executed on-chain, ensuring security, transparency, and auditability.
The platform is designed for:
Policyholders Liquidity providers DAO participants Auditors Developers Insurance protocol operators β¨ Features Insurance policy lifecycle management Multi-stage claims processing workflow Decentralized liquidity risk pools Automated claims settlement DAO-based governance On-chain slashing mechanism Configurable voting thresholds and quorum requirements Progressive penalties for malicious actors Fully auditable smart contract execution Dual-framework architecture (ink! + Soroban) π Architecture
The protocol spans 20 contract crates across two frameworks. The Stellar Insured line (Soroban) handles policy lifecycle, claims, risk pools, governance, and slashing. The PropChain line (ink!) covers property tokenization, fractional ownership, compliance, AI valuation, oracles, and more.
Soroban contracts (stellar-insured):
policyβ Insurance policy managementclaimsβ Multi-stage claims processingrisk_poolβ Liquidity risk poolgovernanceβ DAO governanceslashingβ On-chain slashing and penaltiesbridgeβ Cross-chain property-token bridgeescrowβ Property transaction escrowlibβ Shared Soroban library
ink! contracts (propchain):
ai-valuation,analytics,compliance_registry,fees,fractional,insurance,ipfs-metadata,oracle,property-token,proxy,traits,zk-compliance
See stellar-insured-contracts/contracts/README.md for the full breakdown. π Contract Overview
- Policy Contract
Manages insurance policy issuance, renewal, cancellation, and expiration.
Capabilities Issue policies Renew active policies Cancel policies Manage policy lifecycle Retrieve policy information Core Functions initialize(admin, risk_pool)
issue_policy( holder, coverage_amount, premium_amount, duration_days, policy_type )
get_policy(policy_id)
renew_policy(policy_id, duration_days)
cancel_policy(policy_id)
expire_policy(policy_id)
get_stats() 2. Claims Contract
Processes insurance claims using a deterministic multi-stage approval workflow.
Claim Lifecycle Submitted β UnderReview β Approved / Rejected β Settled (Approved only) Workflow Rules Only administrators can transition claim states. Claims cannot be settled before approval. Invalid state transitions are prevented. Core Functions initialize(admin, policy_contract, risk_pool)
submit_claim(policy_id, amount)
start_review(claim_id)
approve_claim(claim_id)
reject_claim(claim_id)
settle_claim(claim_id)
get_claim(claim_id)
get_stats() 3. Risk Pool Contract
Provides liquidity used to settle approved insurance claims.
Capabilities Accept liquidity deposits Handle withdrawals Reserve funds for claims Execute claim payouts Track provider positions Core Functions initialize( admin, xlm_token, min_provider_stake )
deposit_liquidity(provider, amount)
withdraw_liquidity(provider, amount)
payout_claim(recipient, amount)
get_pool_stats()
get_provider_info(provider) 4. Governance Contract
DAO governance system used to manage protocol decisions.
Governance Features Proposal creation Community voting Quorum enforcement Proposal execution Slashing proposal management Proposal analytics Core Functions initialize( admin, token_contract, voting_period_days, min_voting_percentage, min_quorum_percentage, slashing_contract )
create_proposal( title, description, execution_data, threshold_percentage )
vote( proposal_id, vote_weight, is_yes )
finalize_proposal(proposal_id)
execute_proposal(proposal_id)
create_slashing_proposal( target, role, reason, amount, evidence, threshold )
execute_slashing_proposal(proposal_id) Query Functions get_proposal(proposal_id)
get_active_proposals()
get_all_proposals()
get_vote_record( proposal_id, voter )
get_proposal_stats(proposal_id) 5. Slashing Contract
Provides a governance-controlled mechanism for penalizing malicious or negligent actors.
Supported Roles Oracle providers Claim submitters Governance participants Liquidity providers Features Configurable penalties Progressive punishment system Repeat offender tracking Cooldown periods Treasury or pool fund redirection Emergency pause controls Core Functions initialize( admin, governance_contract, risk_pool_contract )
configure_penalty_parameters( role, reason, percentage, destination, multiplier, cooldown )
slash_funds( target, role, reason, amount )
add_slashable_role(role)
remove_slashable_role(role)
get_slashing_history( target, role )
get_violation_count( target, role )
can_be_slashed( target, role )
pause()
unpause()
π Admin Ownership & Rotation
Every Soroban contract β policy, claims, risk_pool, governance, slashing, bridge
and escrow β exposes the same two-step, time-locked admin transfer, the Soroban
counterpart of src/OwnershipTransfer.sol's transferOwnership β
acceptOwnership flow. The implementation is shared: stellar_insured_lib::admin.
The admin never moves in a single call. The current admin nominates a successor, and the nomination only takes effect when the successor accepts it, so an address that cannot sign β a typo, a key on the wrong network β can never strand the contract.
Core Functions
transfer_admin(new_admin, delay_seconds) // current admin nominates accept_admin() // nominee accepts; admin changes here cancel_admin_transfer() // current admin withdraws the nomination get_pending_admin() // the outstanding nomination, if any get_admin() // the current admin
Timing rules
delay_secondsmust be between 1 hour (MIN_TRANSFER_DELAY_SECONDS) and 30 days (MAX_TRANSFER_DELAY_SECONDS). The nomination is public for that whole window, so a stolen key cannot silently rotate itself out before operators can callcancel_admin_transfer.- Once eligible, a nomination stays acceptable for 7 days
(
ACCEPTANCE_WINDOW_SECONDS), after which it must be made again. - A new nomination replaces any outstanding one and restarts the time lock.
Errors from this flow are AdminError, numbered from 900 so its codes never
collide with the per-contract error enums.
π§βπ» Technology Stack Layer Technology Blockchain Stellar (Soroban) & Polkadot (ink!) Smart Contracts Soroban SDK + ink! Language Rust Testing Soroban Test Framework / cargo-contract Runtime Soroban VM / Substrate (Polkadot) π¦ Getting Started Prerequisites
- Rust (latest stable)
- Stellar CLI + cargo-contract (for ink!) Install Dependencies rustup update cargo install stellar-cli cargo install cargo-contract --locked π¨ Build Contracts
Contracts are organized in a Cargo workspace under stellar-insured-contracts/:
cd stellar-insured-contracts cargo build --release
Or build individual contracts:
cd stellar-insured-contracts/contracts/policy && cargo build --release cd stellar-insured-contracts/contracts/claims && cargo build --release cd stellar-insured-contracts/contracts/risk_pool && cargo build --release cd stellar-insured-contracts/contracts/governance && cargo build --release cd stellar-insured-contracts/contracts/slashing && cargo build --release π§ͺ Run Tests
cd stellar-insured-contracts && cargo test
cd stellar-insured-contracts && cargo test --package propchain-insurance π Network Configuration Component Value Network Stellar Testnet Execution Soroban VM Wallets Non-Custodial Stellar Wallets π Deployment
Deploy each compiled WASM contract using Stellar CLI:
stellar contract deploy --wasm stellar-insured-contracts/target/wasm32-unknown-unknown/release/stellar_insured_policy.wasmInitialize contracts in dependency order:
- Risk Pool
- Policy
- Claims
- Slashing
- Governance
Use the provided deployment script:
stellar-insured-contracts/scripts/deploy.sh --network localStart a local development node:
stellar-insured-contracts/scripts/local-node.sh startπ Security
Security is a first-class concern throughout the protocol.
Security Controls Deterministic execution Explicit authorization checks Multi-stage claim validation Settlement restrictions Comprehensive state validation Event-based audit trails Governance-controlled slashing Minimal trusted off-chain assumptions Production Recommendations Independent security audits Rate limiting Monitoring and alerting Multi-signature governance controls π Resources Stellar Documentation Soroban Documentation Rust Documentation π€ Contributing
We welcome contributions from both the Stellar and Polkadot ecosystems.
Contribution Process
- Fork the repository
- Create a feature branch
- Add tests for all changes
- Follow Rust, Soroban, and ink! best practices
- Submit a Pull Request
See structure.md to navigate the codebase and stellar-insured-contracts/Cargo.toml for the workspace layout. π License
MIT License
Built with Rust, Soroban, and Stellar to create transparent, decentralized insurance infrastructure. π