Interactive Demo

Experience the Storm Insurance Blockchain System in action with our interactive demonstrations. These simulations showcase the key features and workflows of the platform, allowing you to understand how the system works in real-world scenarios.

Claim Processing Simulation

Storm Damage Claim Simulator

This interactive demo simulates the entire lifecycle of a storm damage insurance claim on our blockchain platform. Enter the details below to start the simulation and see how the smart contract handles each step of the process.

Enter Claim Details

Hold Ctrl/Cmd to select multiple areas

Simulation results will appear here after you submit the form above.

Workflow Visualization

This interactive visualization demonstrates the complete workflow of a storm damage insurance claim on our blockchain platform. Each stage represents a key step in the process, showing how the smart contract coordinates activities between all stakeholders.

Storm Event Trigger

When a qualifying storm occurs, the system automatically identifies affected areas using weather data oracles and initiates the inspection process for properties with coverage.

Inspection Scheduling

The smart contract schedules inspections with qualified inspectors in the area, triggering a predetermined release of funds from the insurance provider's escrow account and notifying all parties.

Damage Assessment

Inspectors perform assessments using AI-powered tools to determine damage levels. Results are entered into the smart contract, with inspection data stored on IPFS and hashes recorded on-chain.

Budget Determination

Based on the assessment, the smart contract calculates the deductible and insurance budget for repairs, entering this information into the blockchain and notifying all parties.

Contractor Engagement

Participating contractors are notified and can schedule restoration work through the platform, triggering automatic buy orders and payments to suppliers for necessary materials.

Restoration and Quality Assurance

As restoration progresses, quality assurance professionals provide oversight and site management, ensuring work meets required standards and recording progress on the blockchain.

Milestone-Based Payments

The completion of each restoration stage automatically releases funds to the appropriate contractors and suppliers based on predefined milestones, with all transactions recorded on the blockchain.

Claim Completion

Upon successful completion of all work and final quality inspection, the claim is marked as complete on the blockchain, with all documentation permanently stored and accessible to authorized parties.

Smart Contract Explorer

This interactive explorer allows you to examine the key smart contracts that power the Storm Insurance Blockchain System. Select a contract to view its structure, functions, and interactions with other components.

SystemController

Central coordination contract that manages system-wide parameters and connects other modules.

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

/**
 * @title SystemController
 * @dev Central coordination contract for the Storm Insurance Blockchain System
 */
contract SystemController is Initializable, AccessControlUpgradeable, PausableUpgradeable {
    bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
    bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE");
    bytes32 public constant UPGRADER_ROLE = keccak256("UPGRADER_ROLE");
    
    // Module addresses
    address public userRegistryAddress;
    address public claimRegistryAddress;
    address public inspectionManagerAddress;
    address public paymentControllerAddress;
    address public tokenControllerAddress;
    address public governanceControllerAddress;
    address public oracleControllerAddress;
    
    // System parameters
    uint256 public minInspectorStake;
    uint256 public minContractorStake;
    uint256 public minInsuranceProviderStake;
    uint256 public minSupplierStake;
    
    // Events
    event ModuleUpdated(string moduleName, address moduleAddress);
    event SystemParameterUpdated(string paramName, uint256 value);
    event SystemInitialized(address admin);
    
    /**
     * @dev Initializes the contract with default parameters
     * @param admin Address of the system administrator
     */
    function initialize(address admin) public initializer {
        __AccessControl_init();
        __Pausable_init();
        
        _setupRole(DEFAULT_ADMIN_ROLE, admin);
        _setupRole(ADMIN_ROLE, admin);
        
        // Set default parameters
        minInspectorStake = 10000 * 10**18; // 10,000 AMB
        minContractorStake = 20000 * 10**18; // 20,000 AMB
        minInsuranceProviderStake = 50000 * 10**18; // 50,000 AMB
        minSupplierStake = 15000 * 10**18; // 15,000 AMB
        
        emit SystemInitialized(admin);
    }
    
    /**
     * @dev Updates a module address
     * @param moduleName Name of the module
     * @param moduleAddress Address of the module contract
     */
    function updateModule(string memory moduleName, address moduleAddress) 
        external 
        onlyRole(ADMIN_ROLE) 
    {
        require(moduleAddress != address(0), "Invalid module address");
        
        if (keccak256(abi.encodePacked(moduleName)) == keccak256(abi.encodePacked("UserRegistry"))) {
            userRegistryAddress = moduleAddress;
        } else if (keccak256(abi.encodePacked(moduleName)) == keccak256(abi.encodePacked("ClaimRegistry"))) {
            claimRegistryAddress = moduleAddress;
        } else if (keccak256(abi.encodePacked(moduleName)) == keccak256(abi.encodePacked("InspectionManager"))) {
            inspectionManagerAddress = moduleAddress;
        } else if (keccak256(abi.encodePacked(moduleName)) == keccak256(abi.encodePacked("PaymentController"))) {
            paymentControllerAddress = moduleAddress;
        } else if (keccak256(abi.encodePacked(moduleName)) == keccak256(abi.encodePacked("TokenController"))) {
            tokenControllerAddress = moduleAddress;
        } else if (keccak256(abi.encodePacked(moduleName)) == keccak256(abi.encodePacked("GovernanceController"))) {
            governanceControllerAddress = moduleAddress;
        } else if (keccak256(abi.encodePacked(moduleName)) == keccak256(abi.encodePacked("OracleController"))) {
            oracleControllerAddress = moduleAddress;
        } else {
            revert("Unknown module name");
        }
        
        emit ModuleUpdated(moduleName, moduleAddress);
    }
    
    /**
     * @dev Updates a system parameter
     * @param paramName Name of the parameter
     * @param value New value for the parameter
     */
    function updateSystemParameter(string memory paramName, uint256 value) 
        external 
        onlyRole(ADMIN_ROLE) 
    {
        if (keccak256(abi.encodePacked(paramName)) == keccak256(abi.encodePacked("minInspectorStake"))) {
            minInspectorStake = value;
        } else if (keccak256(abi.encodePacked(paramName)) == keccak256(abi.encodePacked("minContractorStake"))) {
            minContractorStake = value;
        } else if (keccak256(abi.encodePacked(paramName)) == keccak256(abi.encodePacked("minInsuranceProviderStake"))) {
            minInsuranceProviderStake = value;
        } else if (keccak256(abi.encodePacked(paramName)) == keccak256(abi.encodePacked("minSupplierStake"))) {
            minSupplierStake = value;
        } else {
            revert("Unknown parameter name");
        }
        
        emit SystemParameterUpdated(paramName, value);
    }
    
    /**
     * @dev Pauses the system in case of emergency
     */
    function pauseSystem() external onlyRole(ADMIN_ROLE) {
        _pause();
    }
    
    /**
     * @dev Unpauses the system
     */
    function unpauseSystem() external onlyRole(ADMIN_ROLE) {
        _unpause();
    }
    
    /**
     * @dev Checks if a module is registered
     * @param moduleAddress Address of the module to check
     * @return bool True if the module is registered
     */
    function isModuleRegistered(address moduleAddress) external view returns (bool) {
        return (
            moduleAddress == userRegistryAddress ||
            moduleAddress == claimRegistryAddress ||
            moduleAddress == inspectionManagerAddress ||
            moduleAddress == paymentControllerAddress ||
            moduleAddress == tokenControllerAddress ||
            moduleAddress == governanceControllerAddress ||
            moduleAddress == oracleControllerAddress
        );
    }
}

Key Functions

  • initialize(address admin) - Initializes the contract with default parameters
  • updateModule(string moduleName, address moduleAddress) - Updates a module address
  • updateSystemParameter(string paramName, uint256 value) - Updates a system parameter
  • pauseSystem() - Pauses the system in case of emergency
  • unpauseSystem() - Unpauses the system
  • isModuleRegistered(address moduleAddress) - Checks if a module is registered

Module Interactions

Interactive diagram showing SystemController interactions with other modules

Token Economics Simulator

This interactive simulator demonstrates the token economics of The Ambassador (AMB) utility token. Adjust the parameters to see how different scenarios affect token circulation, staking rewards, and platform economics.

Simulation Parameters

100,000,000 AMB
40%
5%
10%
2,000,000 AMB
5 Years

Token economics simulation results will appear here after adjusting parameters and running the simulation.