{
  "abi": [],
  "allSourcePaths": {
    "14": "contracts/WadRayMath.sol",
    "40": "interfaces/IRiskModule.sol",
    "7": "contracts/Policy.sol"
  },
  "ast": {
    "absolutePath": "contracts/Policy.sol",
    "exportedSymbols": {
      "IRiskModule": [
        17857
      ],
      "Policy": [
        5952
      ],
      "WadRayMath": [
        11252
      ]
    },
    "id": 5953,
    "license": "Apache-2.0",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 5646,
        "literals": [
          "solidity",
          "^",
          "0.8",
          ".0"
        ],
        "nodeType": "PragmaDirective",
        "src": "39:23:7"
      },
      {
        "absolutePath": "contracts/WadRayMath.sol",
        "file": "./WadRayMath.sol",
        "id": 5648,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 5953,
        "sourceUnit": 11253,
        "src": "63:44:7",
        "symbolAliases": [
          {
            "foreign": {
              "id": 5647,
              "name": "WadRayMath",
              "nodeType": "Identifier",
              "overloadedDeclarations": [],
              "src": "71:10:7",
              "typeDescriptions": {}
            },
            "nameLocation": "-1:-1:-1"
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "interfaces/IRiskModule.sol",
        "file": "../interfaces/IRiskModule.sol",
        "id": 5650,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 5953,
        "sourceUnit": 17858,
        "src": "108:58:7",
        "symbolAliases": [
          {
            "foreign": {
              "id": 5649,
              "name": "IRiskModule",
              "nodeType": "Identifier",
              "overloadedDeclarations": [],
              "src": "116:11:7",
              "typeDescriptions": {}
            },
            "nameLocation": "-1:-1:-1"
          }
        ],
        "unitAlias": ""
      },
      {
        "abstract": false,
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "library",
        "documentation": {
          "id": 5651,
          "nodeType": "StructuredDocumentation",
          "src": "168:284:7",
          "text": " @title Policy library\n @dev Library for PolicyData struct. This struct represents an active policy, how the premium is\n      distributed, the probability of payout, duration and how the capital is locked.\n @custom:security-contact security@ensuro.co\n @author Ensuro"
        },
        "fullyImplemented": true,
        "id": 5952,
        "linearizedBaseContracts": [
          5952
        ],
        "name": "Policy",
        "nameLocation": "461:6:7",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "id": 5654,
            "libraryName": {
              "id": 5652,
              "name": "WadRayMath",
              "nodeType": "IdentifierPath",
              "referencedDeclaration": 11252,
              "src": "478:10:7"
            },
            "nodeType": "UsingForDirective",
            "src": "472:29:7",
            "typeName": {
              "id": 5653,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "493:7:7",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            }
          },
          {
            "constant": true,
            "id": 5657,
            "mutability": "constant",
            "name": "SECONDS_IN_YEAR",
            "nameLocation": "531:15:7",
            "nodeType": "VariableDeclaration",
            "scope": 5952,
            "src": "505:55:7",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 5655,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "505:7:7",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": {
              "hexValue": "3331353336303030653138",
              "id": 5656,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "549:11:7",
              "typeDescriptions": {
                "typeIdentifier": "t_rational_31536000000000000000000000_by_1",
                "typeString": "int_const 31536000000000000000000000"
              },
              "value": "31536000e18"
            },
            "visibility": "internal"
          },
          {
            "constant": true,
            "id": 5660,
            "mutability": "constant",
            "name": "SECONDS_IN_YEAR_RAY",
            "nameLocation": "620:19:7",
            "nodeType": "VariableDeclaration",
            "scope": 5952,
            "src": "594:59:7",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 5658,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "594:7:7",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": {
              "hexValue": "3331353336303030653237",
              "id": 5659,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "642:11:7",
              "typeDescriptions": {
                "typeIdentifier": "t_rational_31536000000000000000000000000000000_by_1",
                "typeString": "int_const 3153...(27 digits omitted)...0000"
              },
              "value": "31536000e27"
            },
            "visibility": "internal"
          },
          {
            "canonicalName": "Policy.PolicyData",
            "id": 5686,
            "members": [
              {
                "constant": false,
                "id": 5662,
                "mutability": "mutable",
                "name": "id",
                "nameLocation": "741:2:7",
                "nodeType": "VariableDeclaration",
                "scope": 5686,
                "src": "733:10:7",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                },
                "typeName": {
                  "id": 5661,
                  "name": "uint256",
                  "nodeType": "ElementaryTypeName",
                  "src": "733:7:7",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  }
                },
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 5664,
                "mutability": "mutable",
                "name": "payout",
                "nameLocation": "757:6:7",
                "nodeType": "VariableDeclaration",
                "scope": 5686,
                "src": "749:14:7",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                },
                "typeName": {
                  "id": 5663,
                  "name": "uint256",
                  "nodeType": "ElementaryTypeName",
                  "src": "749:7:7",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  }
                },
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 5666,
                "mutability": "mutable",
                "name": "premium",
                "nameLocation": "777:7:7",
                "nodeType": "VariableDeclaration",
                "scope": 5686,
                "src": "769:15:7",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                },
                "typeName": {
                  "id": 5665,
                  "name": "uint256",
                  "nodeType": "ElementaryTypeName",
                  "src": "769:7:7",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  }
                },
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 5668,
                "mutability": "mutable",
                "name": "scr",
                "nameLocation": "798:3:7",
                "nodeType": "VariableDeclaration",
                "scope": 5686,
                "src": "790:11:7",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                },
                "typeName": {
                  "id": 5667,
                  "name": "uint256",
                  "nodeType": "ElementaryTypeName",
                  "src": "790:7:7",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  }
                },
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 5670,
                "mutability": "mutable",
                "name": "lossProb",
                "nameLocation": "815:8:7",
                "nodeType": "VariableDeclaration",
                "scope": 5686,
                "src": "807:16:7",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                },
                "typeName": {
                  "id": 5669,
                  "name": "uint256",
                  "nodeType": "ElementaryTypeName",
                  "src": "807:7:7",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  }
                },
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 5672,
                "mutability": "mutable",
                "name": "purePremium",
                "nameLocation": "875:11:7",
                "nodeType": "VariableDeclaration",
                "scope": 5686,
                "src": "867:19:7",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                },
                "typeName": {
                  "id": 5671,
                  "name": "uint256",
                  "nodeType": "ElementaryTypeName",
                  "src": "867:7:7",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  }
                },
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 5674,
                "mutability": "mutable",
                "name": "premiumForEnsuro",
                "nameLocation": "1003:16:7",
                "nodeType": "VariableDeclaration",
                "scope": 5686,
                "src": "995:24:7",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                },
                "typeName": {
                  "id": 5673,
                  "name": "uint256",
                  "nodeType": "ElementaryTypeName",
                  "src": "995:7:7",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  }
                },
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 5676,
                "mutability": "mutable",
                "name": "premiumForRm",
                "nameLocation": "1094:12:7",
                "nodeType": "VariableDeclaration",
                "scope": 5686,
                "src": "1086:20:7",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                },
                "typeName": {
                  "id": 5675,
                  "name": "uint256",
                  "nodeType": "ElementaryTypeName",
                  "src": "1086:7:7",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  }
                },
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 5678,
                "mutability": "mutable",
                "name": "premiumForLps",
                "nameLocation": "1181:13:7",
                "nodeType": "VariableDeclaration",
                "scope": 5686,
                "src": "1173:21:7",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                },
                "typeName": {
                  "id": 5677,
                  "name": "uint256",
                  "nodeType": "ElementaryTypeName",
                  "src": "1173:7:7",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  }
                },
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 5681,
                "mutability": "mutable",
                "name": "riskModule",
                "nameLocation": "1286:10:7",
                "nodeType": "VariableDeclaration",
                "scope": 5686,
                "src": "1274:22:7",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_contract$_IRiskModule_$17857",
                  "typeString": "contract IRiskModule"
                },
                "typeName": {
                  "id": 5680,
                  "nodeType": "UserDefinedTypeName",
                  "pathNode": {
                    "id": 5679,
                    "name": "IRiskModule",
                    "nodeType": "IdentifierPath",
                    "referencedDeclaration": 17857,
                    "src": "1274:11:7"
                  },
                  "referencedDeclaration": 17857,
                  "src": "1274:11:7",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IRiskModule_$17857",
                    "typeString": "contract IRiskModule"
                  }
                },
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 5683,
                "mutability": "mutable",
                "name": "start",
                "nameLocation": "1309:5:7",
                "nodeType": "VariableDeclaration",
                "scope": 5686,
                "src": "1302:12:7",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint40",
                  "typeString": "uint40"
                },
                "typeName": {
                  "id": 5682,
                  "name": "uint40",
                  "nodeType": "ElementaryTypeName",
                  "src": "1302:6:7",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint40",
                    "typeString": "uint40"
                  }
                },
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 5685,
                "mutability": "mutable",
                "name": "expiration",
                "nameLocation": "1327:10:7",
                "nodeType": "VariableDeclaration",
                "scope": 5686,
                "src": "1320:17:7",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint40",
                  "typeString": "uint40"
                },
                "typeName": {
                  "id": 5684,
                  "name": "uint40",
                  "nodeType": "ElementaryTypeName",
                  "src": "1320:6:7",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint40",
                    "typeString": "uint40"
                  }
                },
                "visibility": "internal"
              }
            ],
            "name": "PolicyData",
            "nameLocation": "716:10:7",
            "nodeType": "StructDefinition",
            "scope": 5952,
            "src": "709:633:7",
            "visibility": "public"
          },
          {
            "body": {
              "id": 5872,
              "nodeType": "Block",
              "src": "1817:1172:7",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 5707,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 5705,
                          "name": "premium",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 5692,
                          "src": "1831:7:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "id": 5706,
                          "name": "payout",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 5694,
                          "src": "1842:6:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "1831:17:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "5072656d69756d2063616e6e6f74206265206d6f7265207468616e207061796f7574",
                        "id": 5708,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1850:36:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_af5c05252c080d604ccd8359d83427d1bd8edd1d5bbfa9cff6011c82112818b0",
                          "typeString": "literal_string \"Premium cannot be more than payout\""
                        },
                        "value": "Premium cannot be more than payout"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_af5c05252c080d604ccd8359d83427d1bd8edd1d5bbfa9cff6011c82112818b0",
                          "typeString": "literal_string \"Premium cannot be more than payout\""
                        }
                      ],
                      "id": 5704,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "1823:7:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 5709,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1823:64:7",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 5710,
                  "nodeType": "ExpressionStatement",
                  "src": "1823:64:7"
                },
                {
                  "assignments": [
                    5713
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 5713,
                      "mutability": "mutable",
                      "name": "policy",
                      "nameLocation": "1911:6:7",
                      "nodeType": "VariableDeclaration",
                      "scope": 5872,
                      "src": "1893:24:7",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                        "typeString": "struct Policy.PolicyData"
                      },
                      "typeName": {
                        "id": 5712,
                        "nodeType": "UserDefinedTypeName",
                        "pathNode": {
                          "id": 5711,
                          "name": "PolicyData",
                          "nodeType": "IdentifierPath",
                          "referencedDeclaration": 5686,
                          "src": "1893:10:7"
                        },
                        "referencedDeclaration": 5686,
                        "src": "1893:10:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_PolicyData_$5686_storage_ptr",
                          "typeString": "struct Policy.PolicyData"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 5714,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1893:24:7"
                },
                {
                  "expression": {
                    "id": 5719,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "expression": {
                        "id": 5715,
                        "name": "policy",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5713,
                        "src": "1923:6:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                          "typeString": "struct Policy.PolicyData memory"
                        }
                      },
                      "id": 5717,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "riskModule",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 5681,
                      "src": "1923:17:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_IRiskModule_$17857",
                        "typeString": "contract IRiskModule"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "id": 5718,
                      "name": "riskModule",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5690,
                      "src": "1943:10:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_IRiskModule_$17857",
                        "typeString": "contract IRiskModule"
                      }
                    },
                    "src": "1923:30:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IRiskModule_$17857",
                      "typeString": "contract IRiskModule"
                    }
                  },
                  "id": 5720,
                  "nodeType": "ExpressionStatement",
                  "src": "1923:30:7"
                },
                {
                  "expression": {
                    "id": 5725,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "expression": {
                        "id": 5721,
                        "name": "policy",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5713,
                        "src": "1959:6:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                          "typeString": "struct Policy.PolicyData memory"
                        }
                      },
                      "id": 5723,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "premium",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 5666,
                      "src": "1959:14:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "id": 5724,
                      "name": "premium",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5692,
                      "src": "1976:7:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1959:24:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 5726,
                  "nodeType": "ExpressionStatement",
                  "src": "1959:24:7"
                },
                {
                  "expression": {
                    "id": 5731,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "expression": {
                        "id": 5727,
                        "name": "policy",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5713,
                        "src": "1989:6:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                          "typeString": "struct Policy.PolicyData memory"
                        }
                      },
                      "id": 5729,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "payout",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 5664,
                      "src": "1989:13:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "id": 5730,
                      "name": "payout",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5694,
                      "src": "2005:6:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1989:22:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 5732,
                  "nodeType": "ExpressionStatement",
                  "src": "1989:22:7"
                },
                {
                  "expression": {
                    "id": 5737,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "expression": {
                        "id": 5733,
                        "name": "policy",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5713,
                        "src": "2017:6:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                          "typeString": "struct Policy.PolicyData memory"
                        }
                      },
                      "id": 5735,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "lossProb",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 5670,
                      "src": "2017:15:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "id": 5736,
                      "name": "lossProb",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5696,
                      "src": "2035:8:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2017:26:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 5738,
                  "nodeType": "ExpressionStatement",
                  "src": "2017:26:7"
                },
                {
                  "expression": {
                    "id": 5755,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "expression": {
                        "id": 5739,
                        "name": "policy",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5713,
                        "src": "2049:6:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                          "typeString": "struct Policy.PolicyData memory"
                        }
                      },
                      "id": 5741,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "purePremium",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 5672,
                      "src": "2049:18:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "arguments": [],
                      "expression": {
                        "argumentTypes": [],
                        "expression": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "arguments": [],
                                  "expression": {
                                    "argumentTypes": [],
                                    "expression": {
                                      "id": 5748,
                                      "name": "riskModule",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 5690,
                                      "src": "2111:10:7",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IRiskModule_$17857",
                                        "typeString": "contract IRiskModule"
                                      }
                                    },
                                    "id": 5749,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "moc",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 17821,
                                    "src": "2111:14:7",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
                                      "typeString": "function () view external returns (uint256)"
                                    }
                                  },
                                  "id": 5750,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2111:16:7",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "expression": {
                                  "id": 5746,
                                  "name": "lossProb",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5696,
                                  "src": "2095:8:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 5747,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "rayMul",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 11144,
                                "src": "2095:15:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256,uint256) pure returns (uint256)"
                                }
                              },
                              "id": 5751,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2095:33:7",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "id": 5742,
                                  "name": "payout",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5694,
                                  "src": "2070:6:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 5743,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "wadToRay",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 11251,
                                "src": "2070:15:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                  "typeString": "function (uint256) pure returns (uint256)"
                                }
                              },
                              "id": 5744,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2070:17:7",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 5745,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "rayMul",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 11144,
                            "src": "2070:24:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 5752,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2070:59:7",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 5753,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "rayToWad",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 11225,
                        "src": "2070:68:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                          "typeString": "function (uint256) pure returns (uint256)"
                        }
                      },
                      "id": 5754,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "2070:70:7",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2049:91:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 5756,
                  "nodeType": "ExpressionStatement",
                  "src": "2049:91:7"
                },
                {
                  "expression": {
                    "id": 5771,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "expression": {
                        "id": 5757,
                        "name": "policy",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5713,
                        "src": "2146:6:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                          "typeString": "struct Policy.PolicyData memory"
                        }
                      },
                      "id": 5759,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "scr",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 5668,
                      "src": "2146:10:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 5770,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "arguments": [
                          {
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "expression": {
                                    "id": 5762,
                                    "name": "riskModule",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 5690,
                                    "src": "2173:10:7",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IRiskModule_$17857",
                                      "typeString": "contract IRiskModule"
                                    }
                                  },
                                  "id": 5763,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "scrPercentage",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 17816,
                                  "src": "2173:24:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
                                    "typeString": "function () view external returns (uint256)"
                                  }
                                },
                                "id": 5764,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "2173:26:7",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 5765,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "rayToWad",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 11225,
                              "src": "2173:35:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                "typeString": "function (uint256) pure returns (uint256)"
                              }
                            },
                            "id": 5766,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2173:37:7",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "expression": {
                            "id": 5760,
                            "name": "payout",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5694,
                            "src": "2159:6:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 5761,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "wadMul",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 11048,
                          "src": "2159:13:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                            "typeString": "function (uint256,uint256) pure returns (uint256)"
                          }
                        },
                        "id": 5767,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "2159:52:7",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "-",
                      "rightExpression": {
                        "expression": {
                          "id": 5768,
                          "name": "policy",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 5713,
                          "src": "2214:6:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                            "typeString": "struct Policy.PolicyData memory"
                          }
                        },
                        "id": 5769,
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "purePremium",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 5672,
                        "src": "2214:18:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "2159:73:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2146:86:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 5772,
                  "nodeType": "ExpressionStatement",
                  "src": "2146:86:7"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 5777,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "expression": {
                            "id": 5774,
                            "name": "policy",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5713,
                            "src": "2246:6:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                              "typeString": "struct Policy.PolicyData memory"
                            }
                          },
                          "id": 5775,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "scr",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 5668,
                          "src": "2246:10:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "!=",
                        "rightExpression": {
                          "hexValue": "30",
                          "id": 5776,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "2260:1:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "src": "2246:15:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "5343522063616e2774206265207a65726f",
                        "id": 5778,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2263:19:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_67bb100d9a2e7b047480860d372285199227e404fffaa7b78ea1bae81edcc591",
                          "typeString": "literal_string \"SCR can't be zero\""
                        },
                        "value": "SCR can't be zero"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_67bb100d9a2e7b047480860d372285199227e404fffaa7b78ea1bae81edcc591",
                          "typeString": "literal_string \"SCR can't be zero\""
                        }
                      ],
                      "id": 5773,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "2238:7:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 5779,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2238:45:7",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 5780,
                  "nodeType": "ExpressionStatement",
                  "src": "2238:45:7"
                },
                {
                  "expression": {
                    "id": 5789,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "expression": {
                        "id": 5781,
                        "name": "policy",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5713,
                        "src": "2289:6:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                          "typeString": "struct Policy.PolicyData memory"
                        }
                      },
                      "id": 5783,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "start",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 5683,
                      "src": "2289:12:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint40",
                        "typeString": "uint40"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "arguments": [
                        {
                          "expression": {
                            "id": 5786,
                            "name": "block",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": -4,
                            "src": "2311:5:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_block",
                              "typeString": "block"
                            }
                          },
                          "id": 5787,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "timestamp",
                          "nodeType": "MemberAccess",
                          "src": "2311:15:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "id": 5785,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "nodeType": "ElementaryTypeNameExpression",
                        "src": "2304:6:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_uint40_$",
                          "typeString": "type(uint40)"
                        },
                        "typeName": {
                          "id": 5784,
                          "name": "uint40",
                          "nodeType": "ElementaryTypeName",
                          "src": "2304:6:7",
                          "typeDescriptions": {}
                        }
                      },
                      "id": 5788,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "2304:23:7",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint40",
                        "typeString": "uint40"
                      }
                    },
                    "src": "2289:38:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint40",
                      "typeString": "uint40"
                    }
                  },
                  "id": 5790,
                  "nodeType": "ExpressionStatement",
                  "src": "2289:38:7"
                },
                {
                  "expression": {
                    "id": 5795,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "expression": {
                        "id": 5791,
                        "name": "policy",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5713,
                        "src": "2333:6:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                          "typeString": "struct Policy.PolicyData memory"
                        }
                      },
                      "id": 5793,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "expiration",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 5685,
                      "src": "2333:17:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint40",
                        "typeString": "uint40"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "id": 5794,
                      "name": "expiration",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5698,
                      "src": "2353:10:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint40",
                        "typeString": "uint40"
                      }
                    },
                    "src": "2333:30:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint40",
                      "typeString": "uint40"
                    }
                  },
                  "id": 5796,
                  "nodeType": "ExpressionStatement",
                  "src": "2333:30:7"
                },
                {
                  "expression": {
                    "id": 5821,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "expression": {
                        "id": 5797,
                        "name": "policy",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5713,
                        "src": "2369:6:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                          "typeString": "struct Policy.PolicyData memory"
                        }
                      },
                      "id": 5799,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "premiumForLps",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 5678,
                      "src": "2369:20:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "arguments": [
                        {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "components": [
                                {
                                  "arguments": [
                                    {
                                      "id": 5815,
                                      "name": "SECONDS_IN_YEAR_RAY",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 5660,
                                      "src": "2513:19:7",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "components": [
                                        {
                                          "commonType": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          },
                                          "id": 5812,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "leftExpression": {
                                            "arguments": [],
                                            "expression": {
                                              "argumentTypes": [],
                                              "expression": {
                                                "id": 5803,
                                                "name": "riskModule",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 5690,
                                                "src": "2428:10:7",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_contract$_IRiskModule_$17857",
                                                  "typeString": "contract IRiskModule"
                                                }
                                              },
                                              "id": 5804,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "memberName": "scrInterestRate",
                                              "nodeType": "MemberAccess",
                                              "referencedDeclaration": 17831,
                                              "src": "2428:26:7",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
                                                "typeString": "function () view external returns (uint256)"
                                              }
                                            },
                                            "id": 5805,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "kind": "functionCall",
                                            "lValueRequested": false,
                                            "names": [],
                                            "nodeType": "FunctionCall",
                                            "src": "2428:28:7",
                                            "tryCall": false,
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "nodeType": "BinaryOperation",
                                          "operator": "*",
                                          "rightExpression": {
                                            "components": [
                                              {
                                                "commonType": {
                                                  "typeIdentifier": "t_uint40",
                                                  "typeString": "uint40"
                                                },
                                                "id": 5810,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "lValueRequested": false,
                                                "leftExpression": {
                                                  "expression": {
                                                    "id": 5806,
                                                    "name": "policy",
                                                    "nodeType": "Identifier",
                                                    "overloadedDeclarations": [],
                                                    "referencedDeclaration": 5713,
                                                    "src": "2460:6:7",
                                                    "typeDescriptions": {
                                                      "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                                                      "typeString": "struct Policy.PolicyData memory"
                                                    }
                                                  },
                                                  "id": 5807,
                                                  "isConstant": false,
                                                  "isLValue": true,
                                                  "isPure": false,
                                                  "lValueRequested": false,
                                                  "memberName": "expiration",
                                                  "nodeType": "MemberAccess",
                                                  "referencedDeclaration": 5685,
                                                  "src": "2460:17:7",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_uint40",
                                                    "typeString": "uint40"
                                                  }
                                                },
                                                "nodeType": "BinaryOperation",
                                                "operator": "-",
                                                "rightExpression": {
                                                  "expression": {
                                                    "id": 5808,
                                                    "name": "policy",
                                                    "nodeType": "Identifier",
                                                    "overloadedDeclarations": [],
                                                    "referencedDeclaration": 5713,
                                                    "src": "2480:6:7",
                                                    "typeDescriptions": {
                                                      "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                                                      "typeString": "struct Policy.PolicyData memory"
                                                    }
                                                  },
                                                  "id": 5809,
                                                  "isConstant": false,
                                                  "isLValue": true,
                                                  "isPure": false,
                                                  "lValueRequested": false,
                                                  "memberName": "start",
                                                  "nodeType": "MemberAccess",
                                                  "referencedDeclaration": 5683,
                                                  "src": "2480:12:7",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_uint40",
                                                    "typeString": "uint40"
                                                  }
                                                },
                                                "src": "2460:32:7",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_uint40",
                                                  "typeString": "uint40"
                                                }
                                              }
                                            ],
                                            "id": 5811,
                                            "isConstant": false,
                                            "isInlineArray": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "nodeType": "TupleExpression",
                                            "src": "2459:34:7",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint40",
                                              "typeString": "uint40"
                                            }
                                          },
                                          "src": "2428:65:7",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "id": 5813,
                                      "isConstant": false,
                                      "isInlineArray": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "TupleExpression",
                                      "src": "2427:67:7",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 5814,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "rayDiv",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 11193,
                                    "src": "2427:74:7",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 5816,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2427:115:7",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "id": 5817,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "2417:133:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 5818,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "rayToWad",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 11225,
                            "src": "2417:142:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256) pure returns (uint256)"
                            }
                          },
                          "id": 5819,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2417:144:7",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "expression": {
                            "id": 5800,
                            "name": "policy",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5713,
                            "src": "2392:6:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                              "typeString": "struct Policy.PolicyData memory"
                            }
                          },
                          "id": 5801,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "scr",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 5668,
                          "src": "2392:10:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 5802,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "wadMul",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 11048,
                        "src": "2392:17:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                        }
                      },
                      "id": 5820,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "2392:175:7",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2369:198:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 5822,
                  "nodeType": "ExpressionStatement",
                  "src": "2369:198:7"
                },
                {
                  "expression": {
                    "id": 5839,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "expression": {
                        "id": 5823,
                        "name": "policy",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5713,
                        "src": "2573:6:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                          "typeString": "struct Policy.PolicyData memory"
                        }
                      },
                      "id": 5825,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "premiumForEnsuro",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 5674,
                      "src": "2573:23:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "arguments": [
                        {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "id": 5833,
                                  "name": "riskModule",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5690,
                                  "src": "2657:10:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IRiskModule_$17857",
                                    "typeString": "contract IRiskModule"
                                  }
                                },
                                "id": 5834,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "ensuroFee",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 17826,
                                "src": "2657:20:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
                                  "typeString": "function () view external returns (uint256)"
                                }
                              },
                              "id": 5835,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2657:22:7",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 5836,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "rayToWad",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 11225,
                            "src": "2657:31:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                              "typeString": "function (uint256) pure returns (uint256)"
                            }
                          },
                          "id": 5837,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2657:33:7",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "components": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 5830,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 5826,
                                  "name": "policy",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5713,
                                  "src": "2600:6:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                                    "typeString": "struct Policy.PolicyData memory"
                                  }
                                },
                                "id": 5827,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "purePremium",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 5672,
                                "src": "2600:18:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "+",
                              "rightExpression": {
                                "expression": {
                                  "id": 5828,
                                  "name": "policy",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5713,
                                  "src": "2621:6:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                                    "typeString": "struct Policy.PolicyData memory"
                                  }
                                },
                                "id": 5829,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "premiumForLps",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 5678,
                                "src": "2621:20:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "2600:41:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "id": 5831,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "2599:43:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 5832,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "wadMul",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 11048,
                        "src": "2599:50:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                        }
                      },
                      "id": 5838,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "2599:97:7",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2573:123:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 5840,
                  "nodeType": "ExpressionStatement",
                  "src": "2573:123:7"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 5851,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 5849,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 5846,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "expression": {
                                "id": 5842,
                                "name": "policy",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5713,
                                "src": "2717:6:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                                  "typeString": "struct Policy.PolicyData memory"
                                }
                              },
                              "id": 5843,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "purePremium",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 5672,
                              "src": "2717:18:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "+",
                            "rightExpression": {
                              "expression": {
                                "id": 5844,
                                "name": "policy",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5713,
                                "src": "2738:6:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                                  "typeString": "struct Policy.PolicyData memory"
                                }
                              },
                              "id": 5845,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "premiumForEnsuro",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 5674,
                              "src": "2738:23:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "2717:44:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "+",
                          "rightExpression": {
                            "expression": {
                              "id": 5847,
                              "name": "policy",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5713,
                              "src": "2764:6:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                                "typeString": "struct Policy.PolicyData memory"
                              }
                            },
                            "id": 5848,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "premiumForLps",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 5678,
                            "src": "2764:20:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2717:67:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "id": 5850,
                          "name": "premium",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 5692,
                          "src": "2788:7:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "2717:78:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "5072656d69756d206c657373207468616e206d696e696d756d",
                        "id": 5852,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2803:27:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_a61f1af97dcb1cd06048c6fa1fdecc4762079c3e993023bb8acddf567c1ca61a",
                          "typeString": "literal_string \"Premium less than minimum\""
                        },
                        "value": "Premium less than minimum"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_a61f1af97dcb1cd06048c6fa1fdecc4762079c3e993023bb8acddf567c1ca61a",
                          "typeString": "literal_string \"Premium less than minimum\""
                        }
                      ],
                      "id": 5841,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "2702:7:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 5853,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2702:134:7",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 5854,
                  "nodeType": "ExpressionStatement",
                  "src": "2702:134:7"
                },
                {
                  "expression": {
                    "id": 5868,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "expression": {
                        "id": 5855,
                        "name": "policy",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5713,
                        "src": "2842:6:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                          "typeString": "struct Policy.PolicyData memory"
                        }
                      },
                      "id": 5857,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "premiumForRm",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 5676,
                      "src": "2842:19:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 5867,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 5864,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 5861,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 5858,
                            "name": "premium",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5692,
                            "src": "2870:7:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "-",
                          "rightExpression": {
                            "expression": {
                              "id": 5859,
                              "name": "policy",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5713,
                              "src": "2886:6:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                                "typeString": "struct Policy.PolicyData memory"
                              }
                            },
                            "id": 5860,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "purePremium",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 5672,
                            "src": "2886:18:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2870:34:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "-",
                        "rightExpression": {
                          "expression": {
                            "id": 5862,
                            "name": "policy",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5713,
                            "src": "2913:6:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                              "typeString": "struct Policy.PolicyData memory"
                            }
                          },
                          "id": 5863,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "premiumForLps",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 5678,
                          "src": "2913:20:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "2870:63:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "-",
                      "rightExpression": {
                        "expression": {
                          "id": 5865,
                          "name": "policy",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 5713,
                          "src": "2942:6:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                            "typeString": "struct Policy.PolicyData memory"
                          }
                        },
                        "id": 5866,
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "premiumForEnsuro",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 5674,
                        "src": "2942:23:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "2870:95:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2842:123:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 5869,
                  "nodeType": "ExpressionStatement",
                  "src": "2842:123:7"
                },
                {
                  "expression": {
                    "id": 5870,
                    "name": "policy",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 5713,
                    "src": "2978:6:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                      "typeString": "struct Policy.PolicyData memory"
                    }
                  },
                  "functionReturnParameters": 5703,
                  "id": 5871,
                  "nodeType": "Return",
                  "src": "2971:13:7"
                }
              ]
            },
            "documentation": {
              "id": 5687,
              "nodeType": "StructuredDocumentation",
              "src": "1346:278:7",
              "text": "#if_succeeds {:msg \"premium preserved\"} premium == (newPolicy.premium);\n #if_succeeds\n    {:msg \"premium distributed\"}\n    premium == (newPolicy.purePremium + newPolicy.premiumForLps +\n                newPolicy.premiumForRm + newPolicy.premiumForEnsuro);"
            },
            "id": 5873,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "initialize",
            "nameLocation": "1636:10:7",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5699,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5690,
                  "mutability": "mutable",
                  "name": "riskModule",
                  "nameLocation": "1664:10:7",
                  "nodeType": "VariableDeclaration",
                  "scope": 5873,
                  "src": "1652:22:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IRiskModule_$17857",
                    "typeString": "contract IRiskModule"
                  },
                  "typeName": {
                    "id": 5689,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 5688,
                      "name": "IRiskModule",
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 17857,
                      "src": "1652:11:7"
                    },
                    "referencedDeclaration": 17857,
                    "src": "1652:11:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IRiskModule_$17857",
                      "typeString": "contract IRiskModule"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5692,
                  "mutability": "mutable",
                  "name": "premium",
                  "nameLocation": "1688:7:7",
                  "nodeType": "VariableDeclaration",
                  "scope": 5873,
                  "src": "1680:15:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5691,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1680:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5694,
                  "mutability": "mutable",
                  "name": "payout",
                  "nameLocation": "1709:6:7",
                  "nodeType": "VariableDeclaration",
                  "scope": 5873,
                  "src": "1701:14:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5693,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1701:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5696,
                  "mutability": "mutable",
                  "name": "lossProb",
                  "nameLocation": "1729:8:7",
                  "nodeType": "VariableDeclaration",
                  "scope": 5873,
                  "src": "1721:16:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5695,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1721:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5698,
                  "mutability": "mutable",
                  "name": "expiration",
                  "nameLocation": "1750:10:7",
                  "nodeType": "VariableDeclaration",
                  "scope": 5873,
                  "src": "1743:17:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint40",
                    "typeString": "uint40"
                  },
                  "typeName": {
                    "id": 5697,
                    "name": "uint40",
                    "nodeType": "ElementaryTypeName",
                    "src": "1743:6:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint40",
                      "typeString": "uint40"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1646:118:7"
            },
            "returnParameters": {
              "id": 5703,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5702,
                  "mutability": "mutable",
                  "name": "newPolicy",
                  "nameLocation": "1806:9:7",
                  "nodeType": "VariableDeclaration",
                  "scope": 5873,
                  "src": "1788:27:7",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                    "typeString": "struct Policy.PolicyData"
                  },
                  "typeName": {
                    "id": 5701,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 5700,
                      "name": "PolicyData",
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 5686,
                      "src": "1788:10:7"
                    },
                    "referencedDeclaration": 5686,
                    "src": "1788:10:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_PolicyData_$5686_storage_ptr",
                      "typeString": "struct Policy.PolicyData"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1787:29:7"
            },
            "scope": 5952,
            "src": "1627:1362:7",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 5900,
              "nodeType": "Block",
              "src": "3073:171:7",
              "statements": [
                {
                  "expression": {
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "arguments": [
                          {
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 5895,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "components": [
                                {
                                  "commonType": {
                                    "typeIdentifier": "t_uint40",
                                    "typeString": "uint40"
                                  },
                                  "id": 5891,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "expression": {
                                      "id": 5887,
                                      "name": "policy",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 5876,
                                      "src": "3172:6:7",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                                        "typeString": "struct Policy.PolicyData memory"
                                      }
                                    },
                                    "id": 5888,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "expiration",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 5685,
                                    "src": "3172:17:7",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint40",
                                      "typeString": "uint40"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "-",
                                  "rightExpression": {
                                    "expression": {
                                      "id": 5889,
                                      "name": "policy",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 5876,
                                      "src": "3192:6:7",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                                        "typeString": "struct Policy.PolicyData memory"
                                      }
                                    },
                                    "id": 5890,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "start",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 5683,
                                    "src": "3192:12:7",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint40",
                                      "typeString": "uint40"
                                    }
                                  },
                                  "src": "3172:32:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint40",
                                    "typeString": "uint40"
                                  }
                                }
                              ],
                              "id": 5892,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "3171:34:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint40",
                                "typeString": "uint40"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "*",
                            "rightExpression": {
                              "expression": {
                                "id": 5893,
                                "name": "policy",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5876,
                                "src": "3208:6:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                                  "typeString": "struct Policy.PolicyData memory"
                                }
                              },
                              "id": 5894,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "scr",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 5668,
                              "src": "3208:10:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "3171:47:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "expression": {
                            "arguments": [
                              {
                                "id": 5884,
                                "name": "SECONDS_IN_YEAR",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5657,
                                "src": "3138:15:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "expression": {
                                  "id": 5881,
                                  "name": "policy",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5876,
                                  "src": "3092:6:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                                    "typeString": "struct Policy.PolicyData memory"
                                  }
                                },
                                "id": 5882,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "premiumForLps",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 5678,
                                "src": "3092:29:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 5883,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "wadMul",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 11048,
                              "src": "3092:45:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 5885,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3092:62:7",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 5886,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "wadDiv",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 11097,
                          "src": "3092:78:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                            "typeString": "function (uint256,uint256) pure returns (uint256)"
                          }
                        },
                        "id": 5896,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "3092:127:7",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "id": 5897,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "wadToRay",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 11251,
                      "src": "3092:145:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                        "typeString": "function (uint256) pure returns (uint256)"
                      }
                    },
                    "id": 5898,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3092:147:7",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 5880,
                  "id": 5899,
                  "nodeType": "Return",
                  "src": "3079:160:7"
                }
              ]
            },
            "id": 5901,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "interestRate",
            "nameLocation": "3002:12:7",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5877,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5876,
                  "mutability": "mutable",
                  "name": "policy",
                  "nameLocation": "3033:6:7",
                  "nodeType": "VariableDeclaration",
                  "scope": 5901,
                  "src": "3015:24:7",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                    "typeString": "struct Policy.PolicyData"
                  },
                  "typeName": {
                    "id": 5875,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 5874,
                      "name": "PolicyData",
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 5686,
                      "src": "3015:10:7"
                    },
                    "referencedDeclaration": 5686,
                    "src": "3015:10:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_PolicyData_$5686_storage_ptr",
                      "typeString": "struct Policy.PolicyData"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3014:26:7"
            },
            "returnParameters": {
              "id": 5880,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5879,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 5901,
                  "src": "3064:7:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5878,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3064:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3063:9:7"
            },
            "scope": 5952,
            "src": "2993:251:7",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 5934,
              "nodeType": "Block",
              "src": "3331:216:7",
              "statements": [
                {
                  "assignments": [
                    5910
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 5910,
                      "mutability": "mutable",
                      "name": "secs",
                      "nameLocation": "3345:4:7",
                      "nodeType": "VariableDeclaration",
                      "scope": 5934,
                      "src": "3337:12:7",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 5909,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "3337:7:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 5916,
                  "initialValue": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 5915,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "expression": {
                        "id": 5911,
                        "name": "block",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": -4,
                        "src": "3352:5:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_magic_block",
                          "typeString": "block"
                        }
                      },
                      "id": 5912,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "timestamp",
                      "nodeType": "MemberAccess",
                      "src": "3352:15:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "expression": {
                        "id": 5913,
                        "name": "policy",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5904,
                        "src": "3370:6:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                          "typeString": "struct Policy.PolicyData memory"
                        }
                      },
                      "id": 5914,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "start",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 5683,
                      "src": "3370:12:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint40",
                        "typeString": "uint40"
                      }
                    },
                    "src": "3352:30:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3337:45:7"
                },
                {
                  "expression": {
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "arguments": [
                          {
                            "id": 5929,
                            "name": "SECONDS_IN_YEAR_RAY",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5660,
                            "src": "3502:19:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "expression": {
                            "arguments": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 5926,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 5922,
                                  "name": "secs",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5910,
                                  "src": "3457:4:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "*",
                                "rightExpression": {
                                  "arguments": [
                                    {
                                      "id": 5924,
                                      "name": "policy",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 5904,
                                      "src": "3477:6:7",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                                        "typeString": "struct Policy.PolicyData memory"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                                        "typeString": "struct Policy.PolicyData memory"
                                      }
                                    ],
                                    "id": 5923,
                                    "name": "interestRate",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 5901,
                                    "src": "3464:12:7",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_struct$_PolicyData_$5686_memory_ptr_$returns$_t_uint256_$",
                                      "typeString": "function (struct Policy.PolicyData memory) pure returns (uint256)"
                                    }
                                  },
                                  "id": 5925,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "3464:20:7",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "3457:27:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "expression": {
                                    "expression": {
                                      "id": 5917,
                                      "name": "policy",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 5904,
                                      "src": "3401:6:7",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                                        "typeString": "struct Policy.PolicyData memory"
                                      }
                                    },
                                    "id": 5918,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "scr",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 5668,
                                    "src": "3401:19:7",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "id": 5919,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "wadToRay",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 11251,
                                  "src": "3401:37:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                    "typeString": "function (uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 5920,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3401:39:7",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 5921,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "rayMul",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 11144,
                              "src": "3401:55:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 5927,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3401:84:7",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 5928,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "rayDiv",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 11193,
                          "src": "3401:100:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                            "typeString": "function (uint256,uint256) pure returns (uint256)"
                          }
                        },
                        "id": 5930,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "3401:121:7",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "id": 5931,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "rayToWad",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 11225,
                      "src": "3401:139:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                        "typeString": "function (uint256) pure returns (uint256)"
                      }
                    },
                    "id": 5932,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3401:141:7",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 5908,
                  "id": 5933,
                  "nodeType": "Return",
                  "src": "3388:154:7"
                }
              ]
            },
            "id": 5935,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "accruedInterest",
            "nameLocation": "3257:15:7",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5905,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5904,
                  "mutability": "mutable",
                  "name": "policy",
                  "nameLocation": "3291:6:7",
                  "nodeType": "VariableDeclaration",
                  "scope": 5935,
                  "src": "3273:24:7",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                    "typeString": "struct Policy.PolicyData"
                  },
                  "typeName": {
                    "id": 5903,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 5902,
                      "name": "PolicyData",
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 5686,
                      "src": "3273:10:7"
                    },
                    "referencedDeclaration": 5686,
                    "src": "3273:10:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_PolicyData_$5686_storage_ptr",
                      "typeString": "struct Policy.PolicyData"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3272:26:7"
            },
            "returnParameters": {
              "id": 5908,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5907,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 5935,
                  "src": "3322:7:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5906,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3322:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3321:9:7"
            },
            "scope": 5952,
            "src": "3248:299:7",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 5950,
              "nodeType": "Block",
              "src": "3623:47:7",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "arguments": [
                          {
                            "id": 5946,
                            "name": "policy",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5938,
                            "src": "3657:6:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                              "typeString": "struct Policy.PolicyData memory"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                              "typeString": "struct Policy.PolicyData memory"
                            }
                          ],
                          "expression": {
                            "id": 5944,
                            "name": "abi",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": -1,
                            "src": "3646:3:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_abi",
                              "typeString": "abi"
                            }
                          },
                          "id": 5945,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "memberName": "encode",
                          "nodeType": "MemberAccess",
                          "src": "3646:10:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$",
                            "typeString": "function () pure returns (bytes memory)"
                          }
                        },
                        "id": 5947,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "3646:18:7",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "id": 5943,
                      "name": "keccak256",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": -8,
                      "src": "3636:9:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                        "typeString": "function (bytes memory) pure returns (bytes32)"
                      }
                    },
                    "id": 5948,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3636:29:7",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "functionReturnParameters": 5942,
                  "id": 5949,
                  "nodeType": "Return",
                  "src": "3629:36:7"
                }
              ]
            },
            "id": 5951,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "hash",
            "nameLocation": "3560:4:7",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5939,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5938,
                  "mutability": "mutable",
                  "name": "policy",
                  "nameLocation": "3583:6:7",
                  "nodeType": "VariableDeclaration",
                  "scope": 5951,
                  "src": "3565:24:7",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_PolicyData_$5686_memory_ptr",
                    "typeString": "struct Policy.PolicyData"
                  },
                  "typeName": {
                    "id": 5937,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 5936,
                      "name": "PolicyData",
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 5686,
                      "src": "3565:10:7"
                    },
                    "referencedDeclaration": 5686,
                    "src": "3565:10:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_PolicyData_$5686_storage_ptr",
                      "typeString": "struct Policy.PolicyData"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3564:26:7"
            },
            "returnParameters": {
              "id": 5942,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5941,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 5951,
                  "src": "3614:7:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 5940,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "3614:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3613:9:7"
            },
            "scope": 5952,
            "src": "3551:119:7",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          }
        ],
        "scope": 5953,
        "src": "453:3219:7",
        "usedErrors": []
      }
    ],
    "src": "39:3634:7"
  },
  "bytecode": "60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220661d2cbc751c160a9a5de771ec0cc136e190614807cfb773f98fb02c12fb431364736f6c63430008060033",
  "bytecodeSha1": "1ce946f6a4eaa185320328620ccf999b9e86db7c",
  "compiler": {
    "evm_version": "istanbul",
    "optimizer": {
      "enabled": true,
      "runs": 200
    },
    "version": "0.8.6+commit.11564f7e"
  },
  "contractName": "Policy",
  "coverageMap": {
    "branches": {
      "14": {},
      "40": {},
      "7": {}
    },
    "statements": {
      "14": {},
      "40": {},
      "7": {}
    }
  },
  "dependencies": [
    "IRiskModule",
    "WadRayMath"
  ],
  "deployedBytecode": "73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220661d2cbc751c160a9a5de771ec0cc136e190614807cfb773f98fb02c12fb431364736f6c63430008060033",
  "deployedSourceMap": "453:3219:7:-:0;;;;;;;;",
  "language": "Solidity",
  "natspec": {
    "author": "Ensuro",
    "custom:security-contact": "security@ensuro.co",
    "details": "Library for PolicyData struct. This struct represents an active policy, how the premium is      distributed, the probability of payout, duration and how the capital is locked.",
    "kind": "dev",
    "methods": {},
    "title": "Policy library",
    "version": 1
  },
  "offset": [
    453,
    3672
  ],
  "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH7 0x1D2CBC751C160A SWAP11 0x5D 0xE7 PUSH18 0xEC0CC136E190614807CFB773F98FB02C12FB NUMBER SGT PUSH5 0x736F6C6343 STOP ADDMOD MOD STOP CALLER ",
  "pcMap": {
    "0": {
      "offset": [
        453,
        3672
      ],
      "op": "PUSH20",
      "path": "7",
      "value": "0x0"
    },
    "21": {
      "fn": null,
      "offset": [
        453,
        3672
      ],
      "op": "ADDRESS",
      "path": "7"
    },
    "22": {
      "fn": null,
      "offset": [
        453,
        3672
      ],
      "op": "EQ",
      "path": "7"
    },
    "23": {
      "fn": null,
      "offset": [
        453,
        3672
      ],
      "op": "PUSH1",
      "path": "7",
      "value": "0x80"
    },
    "25": {
      "fn": null,
      "offset": [
        453,
        3672
      ],
      "op": "PUSH1",
      "path": "7",
      "value": "0x40"
    },
    "27": {
      "fn": null,
      "offset": [
        453,
        3672
      ],
      "op": "MSTORE",
      "path": "7"
    },
    "28": {
      "fn": null,
      "offset": [
        453,
        3672
      ],
      "op": "PUSH1",
      "path": "7",
      "value": "0x0"
    },
    "30": {
      "fn": null,
      "offset": [
        453,
        3672
      ],
      "op": "DUP1",
      "path": "7"
    },
    "31": {
      "fn": null,
      "offset": [
        453,
        3672
      ],
      "op": "REVERT",
      "path": "7"
    }
  },
  "sha1": "5b3ea959c6222321572a791f1c07e069816a2f0e",
  "source": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\nimport {WadRayMath} from \"./WadRayMath.sol\";\nimport {IRiskModule} from \"../interfaces/IRiskModule.sol\";\n\n/**\n * @title Policy library\n * @dev Library for PolicyData struct. This struct represents an active policy, how the premium is\n *      distributed, the probability of payout, duration and how the capital is locked.\n * @custom:security-contact security@ensuro.co\n * @author Ensuro\n */\nlibrary Policy {\n  using WadRayMath for uint256;\n\n  uint256 internal constant SECONDS_IN_YEAR = 31536000e18; /* 365 * 24 * 3600 * 10e18 */\n  uint256 internal constant SECONDS_IN_YEAR_RAY = 31536000e27; /* 365 * 24 * 3600 * 10e27 */\n\n  // Active Policies\n  struct PolicyData {\n    uint256 id;\n    uint256 payout;\n    uint256 premium;\n    uint256 scr;\n    uint256 lossProb; // original loss probability (in ray)\n    uint256 purePremium; // share of the premium that covers expected losses\n    // equal to payout * lossProb * riskModule.moc\n    uint256 premiumForEnsuro; // share of the premium that goes for Ensuro (if policy won)\n    uint256 premiumForRm; // share of the premium that goes for the RM (if policy won)\n    uint256 premiumForLps; // share of the premium that goes to the liquidity providers (won or not)\n    IRiskModule riskModule;\n    uint40 start;\n    uint40 expiration;\n  }\n\n  /// #if_succeeds {:msg \"premium preserved\"} premium == (newPolicy.premium);\n  /// #if_succeeds\n  ///    {:msg \"premium distributed\"}\n  ///    premium == (newPolicy.purePremium + newPolicy.premiumForLps +\n  ///                newPolicy.premiumForRm + newPolicy.premiumForEnsuro);\n  function initialize(\n    IRiskModule riskModule,\n    uint256 premium,\n    uint256 payout,\n    uint256 lossProb,\n    uint40 expiration\n  ) internal view returns (PolicyData memory newPolicy) {\n    require(premium <= payout, \"Premium cannot be more than payout\");\n    PolicyData memory policy;\n    policy.riskModule = riskModule;\n    policy.premium = premium;\n    policy.payout = payout;\n    policy.lossProb = lossProb;\n    policy.purePremium = payout.wadToRay().rayMul(lossProb.rayMul(riskModule.moc())).rayToWad();\n    policy.scr = payout.wadMul(riskModule.scrPercentage().rayToWad()) - policy.purePremium;\n    require(policy.scr != 0, \"SCR can't be zero\");\n    policy.start = uint40(block.timestamp);\n    policy.expiration = expiration;\n    policy.premiumForLps = policy.scr.wadMul(\n      (\n        (riskModule.scrInterestRate() * (policy.expiration - policy.start)).rayDiv(\n          SECONDS_IN_YEAR_RAY\n        )\n      ).rayToWad()\n    );\n    policy.premiumForEnsuro = (policy.purePremium + policy.premiumForLps).wadMul(\n      riskModule.ensuroFee().rayToWad()\n    );\n    require(\n      policy.purePremium + policy.premiumForEnsuro + policy.premiumForLps <= premium,\n      \"Premium less than minimum\"\n    );\n    policy.premiumForRm =\n      premium -\n      policy.purePremium -\n      policy.premiumForLps -\n      policy.premiumForEnsuro;\n    return policy;\n  }\n\n  function interestRate(PolicyData memory policy) internal pure returns (uint256) {\n    return\n      policy\n        .premiumForLps\n        .wadMul(SECONDS_IN_YEAR)\n        .wadDiv((policy.expiration - policy.start) * policy.scr)\n        .wadToRay();\n  }\n\n  function accruedInterest(PolicyData memory policy) internal view returns (uint256) {\n    uint256 secs = block.timestamp - policy.start;\n    return\n      policy\n        .scr\n        .wadToRay()\n        .rayMul(secs * interestRate(policy))\n        .rayDiv(SECONDS_IN_YEAR_RAY)\n        .rayToWad();\n  }\n\n  function hash(PolicyData memory policy) internal pure returns (bytes32) {\n    return keccak256(abi.encode(policy));\n  }\n}\n",
  "sourceMap": "453:3219:7:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;453:3219:7;;;;;;;;;;;;;;;;;",
  "sourcePath": "contracts/Policy.sol",
  "type": "library"
}