Contract Details
Tech Stack
Python 3.10+
Chains
Any EVM
Description
Python pricing engine for DeFi coverage products. Scores and prices smart contract exploit risk, stablecoin depeg risk, and oracle failure risk. Supports configurable risk tiers, protocol-specific adjustments, and formatted premium quotes.
Features
- ✓ Three risk models: smart contract, depeg, oracle
- ✓ Configurable risk tiers with base rates
- ✓ Protocol-specific risk adjustments
- ✓ TVL-weighted scoring with age discounts
- ✓ Formatted premium quotes with breakdowns
- ✓ JSON-serializable output for API integration
- ✓ Comprehensive pytest suite
- ✓ Zero heavy dependencies (stdlib + dataclasses)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; /// @title Risk Premium Engine /// @notice Python pricing engine for smart contract, depeg, and oracle coverage. contract RiskPremiumEngine { address public immutable owner; uint256 public constant VERSION = 1; event Initialized(address indexed deployer); constructor() { owner = msg.sender; emit Initialized(msg.sender); } // ... full implementation in purchased package }