{
  "abi": [
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "previousAdmin",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "newAdmin",
          "type": "address"
        }
      ],
      "name": "AdminChanged",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "beacon",
          "type": "address"
        }
      ],
      "name": "BeaconUpgraded",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "bool",
          "name": "positive",
          "type": "bool"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "EarningsDistributed",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "enum IPolicyPoolConfig.GovernanceActions",
          "name": "action",
          "type": "uint8"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "GovernanceAction",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "MoneyDeinvested",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "MoneyInvested",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "account",
          "type": "address"
        }
      ],
      "name": "Paused",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "account",
          "type": "address"
        }
      ],
      "name": "Unpaused",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "implementation",
          "type": "address"
        }
      ],
      "name": "Upgraded",
      "type": "event"
    },
    {
      "inputs": [],
      "name": "GUARDIAN_ROLE",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "",
          "type": "bytes32"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "LEVEL1_ROLE",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "",
          "type": "bytes32"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "LEVEL2_ROLE",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "",
          "type": "bytes32"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "LEVEL3_ROLE",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "",
          "type": "bytes32"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "TWEAK_EXPIRATION",
      "outputs": [
        {
          "internalType": "uint40",
          "name": "",
          "type": "uint40"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "checkpoint",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "currency",
      "outputs": [
        {
          "internalType": "contract IERC20Metadata",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "deinvestAll",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "distributeEarnings",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getInvestmentValue",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "lastTweak",
      "outputs": [
        {
          "internalType": "uint40",
          "name": "",
          "type": "uint40"
        },
        {
          "internalType": "uint56",
          "name": "",
          "type": "uint56"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "liquidityMax",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "liquidityMiddle",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "liquidityMin",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "pause",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "paused",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "policyPool",
      "outputs": [
        {
          "internalType": "contract IPolicyPool",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "proxiableUUID",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "",
          "type": "bytes32"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "rebalance",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "paymentAmount",
          "type": "uint256"
        }
      ],
      "name": "refillWallet",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "newValue",
          "type": "uint256"
        }
      ],
      "name": "setLiquidityMax",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "newValue",
          "type": "uint256"
        }
      ],
      "name": "setLiquidityMiddle",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "newValue",
          "type": "uint256"
        }
      ],
      "name": "setLiquidityMin",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "min",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "middle",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "max",
          "type": "uint256"
        }
      ],
      "name": "setLiquidityMultiple",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "totalInvestable",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "unpause",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "newImplementation",
          "type": "address"
        }
      ],
      "name": "upgradeTo",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "newImplementation",
          "type": "address"
        },
        {
          "internalType": "bytes",
          "name": "data",
          "type": "bytes"
        }
      ],
      "name": "upgradeToAndCall",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    }
  ],
  "allSourcePaths": {
    "1": "contracts/BaseAssetManager.sol",
    "10": "contracts/PolicyPoolComponent.sol",
    "110": "node_modules/@openzeppelin/contracts/utils/math/Math.sol",
    "14": "contracts/WadRayMath.sol",
    "31": "interfaces/IAssetManager.sol",
    "32": "interfaces/IEToken.sol",
    "33": "interfaces/IExchange.sol",
    "34": "interfaces/IInsolvencyHook.sol",
    "35": "interfaces/ILPWhitelist.sol",
    "37": "interfaces/IPolicyPool.sol",
    "38": "interfaces/IPolicyPoolComponent.sol",
    "39": "interfaces/IPolicyPoolConfig.sol",
    "40": "interfaces/IRiskModule.sol",
    "69": "node_modules/@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol",
    "70": "node_modules/@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol",
    "72": "node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol",
    "73": "node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol",
    "74": "node_modules/@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol",
    "83": "node_modules/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol",
    "98": "node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"
  },
  "ast": {
    "absolutePath": "contracts/BaseAssetManager.sol",
    "exportedSymbols": {
      "BaseAssetManager": [
        1990
      ],
      "IAssetManager": [
        16509
      ],
      "IERC20": [
        16706
      ],
      "IEToken": [
        16628
      ],
      "IPolicyPool": [
        14671
      ],
      "IPolicyPoolConfig": [
        14792
      ],
      "Math": [
        16794
      ],
      "Policy": [
        5952
      ],
      "PolicyPoolComponent": [
        9172
      ],
      "WadRayMath": [
        11252
      ]
    },
    "id": 1991,
    "license": "Apache-2.0",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 1112,
        "literals": [
          "solidity",
          "^",
          "0.8",
          ".0"
        ],
        "nodeType": "PragmaDirective",
        "src": "39:23:1"
      },
      {
        "absolutePath": "contracts/WadRayMath.sol",
        "file": "./WadRayMath.sol",
        "id": 1114,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 1991,
        "sourceUnit": 11253,
        "src": "64:44:1",
        "symbolAliases": [
          {
            "foreign": {
              "id": 1113,
              "name": "WadRayMath",
              "nodeType": "Identifier",
              "overloadedDeclarations": [],
              "src": "72:10:1",
              "typeDescriptions": {}
            },
            "nameLocation": "-1:-1:-1"
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol",
        "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
        "id": 1116,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 1991,
        "sourceUnit": 16707,
        "src": "109:70:1",
        "symbolAliases": [
          {
            "foreign": {
              "id": 1115,
              "name": "IERC20",
              "nodeType": "Identifier",
              "overloadedDeclarations": [],
              "src": "117:6:1",
              "typeDescriptions": {}
            },
            "nameLocation": "-1:-1:-1"
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "interfaces/IPolicyPool.sol",
        "file": "../interfaces/IPolicyPool.sol",
        "id": 1118,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 1991,
        "sourceUnit": 14672,
        "src": "180:58:1",
        "symbolAliases": [
          {
            "foreign": {
              "id": 1117,
              "name": "IPolicyPool",
              "nodeType": "Identifier",
              "overloadedDeclarations": [],
              "src": "188:11:1",
              "typeDescriptions": {}
            },
            "nameLocation": "-1:-1:-1"
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "contracts/PolicyPoolComponent.sol",
        "file": "./PolicyPoolComponent.sol",
        "id": 1120,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 1991,
        "sourceUnit": 9173,
        "src": "239:62:1",
        "symbolAliases": [
          {
            "foreign": {
              "id": 1119,
              "name": "PolicyPoolComponent",
              "nodeType": "Identifier",
              "overloadedDeclarations": [],
              "src": "247:19:1",
              "typeDescriptions": {}
            },
            "nameLocation": "-1:-1:-1"
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "interfaces/IAssetManager.sol",
        "file": "../interfaces/IAssetManager.sol",
        "id": 1122,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 1991,
        "sourceUnit": 16510,
        "src": "302:62:1",
        "symbolAliases": [
          {
            "foreign": {
              "id": 1121,
              "name": "IAssetManager",
              "nodeType": "Identifier",
              "overloadedDeclarations": [],
              "src": "310:13:1",
              "typeDescriptions": {}
            },
            "nameLocation": "-1:-1:-1"
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "interfaces/IEToken.sol",
        "file": "../interfaces/IEToken.sol",
        "id": 1124,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 1991,
        "sourceUnit": 16629,
        "src": "365:50:1",
        "symbolAliases": [
          {
            "foreign": {
              "id": 1123,
              "name": "IEToken",
              "nodeType": "Identifier",
              "overloadedDeclarations": [],
              "src": "373:7:1",
              "typeDescriptions": {}
            },
            "nameLocation": "-1:-1:-1"
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "interfaces/IPolicyPoolConfig.sol",
        "file": "../interfaces/IPolicyPoolConfig.sol",
        "id": 1126,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 1991,
        "sourceUnit": 14793,
        "src": "416:70:1",
        "symbolAliases": [
          {
            "foreign": {
              "id": 1125,
              "name": "IPolicyPoolConfig",
              "nodeType": "Identifier",
              "overloadedDeclarations": [],
              "src": "424:17:1",
              "typeDescriptions": {}
            },
            "nameLocation": "-1:-1:-1"
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "contracts/Policy.sol",
        "file": "./Policy.sol",
        "id": 1128,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 1991,
        "sourceUnit": 5953,
        "src": "487:36:1",
        "symbolAliases": [
          {
            "foreign": {
              "id": 1127,
              "name": "Policy",
              "nodeType": "Identifier",
              "overloadedDeclarations": [],
              "src": "495:6:1",
              "typeDescriptions": {}
            },
            "nameLocation": "-1:-1:-1"
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "node_modules/@openzeppelin/contracts/utils/math/Math.sol",
        "file": "@openzeppelin/contracts/utils/math/Math.sol",
        "id": 1130,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 1991,
        "sourceUnit": 16795,
        "src": "524:65:1",
        "symbolAliases": [
          {
            "foreign": {
              "id": 1129,
              "name": "Math",
              "nodeType": "Identifier",
              "overloadedDeclarations": [],
              "src": "532:4:1",
              "typeDescriptions": {}
            },
            "nameLocation": "-1:-1:-1"
          }
        ],
        "unitAlias": ""
      },
      {
        "abstract": true,
        "baseContracts": [
          {
            "baseName": {
              "id": 1132,
              "name": "IAssetManager",
              "nodeType": "IdentifierPath",
              "referencedDeclaration": 16509,
              "src": "1211:13:1"
            },
            "id": 1133,
            "nodeType": "InheritanceSpecifier",
            "src": "1211:13:1"
          },
          {
            "baseName": {
              "id": 1134,
              "name": "PolicyPoolComponent",
              "nodeType": "IdentifierPath",
              "referencedDeclaration": 9172,
              "src": "1226:19:1"
            },
            "id": 1135,
            "nodeType": "InheritanceSpecifier",
            "src": "1226:19:1"
          }
        ],
        "contractDependencies": [],
        "contractKind": "contract",
        "documentation": {
          "id": 1131,
          "nodeType": "StructuredDocumentation",
          "src": "591:581:1",
          "text": " @title Ensuro Asset Manager base contract\n @dev Base class for asset managers that reinvest the assets of the protocol to get additional returns.\n      The specific asset management strategy needs to be implemented by child contracts.\n      Settings liquidityMin, liquidityMiddle, liquidityMax are the thresholds used to define how much liquidity\n      to keep in the PolicyPool and when to invest/deinvest. Every invest/deinvest operation tries to leave the\n      PolicyPool at liquidityMiddle.\n @custom:security-contact security@ensuro.co\n @author Ensuro"
        },
        "fullyImplemented": false,
        "id": 1990,
        "linearizedBaseContracts": [
          1990,
          9172,
          19141,
          18122,
          26020,
          18011,
          25978,
          25609,
          19544,
          16509
        ],
        "name": "BaseAssetManager",
        "nameLocation": "1191:16:1",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "id": 1138,
            "libraryName": {
              "id": 1136,
              "name": "WadRayMath",
              "nodeType": "IdentifierPath",
              "referencedDeclaration": 11252,
              "src": "1256:10:1"
            },
            "nodeType": "UsingForDirective",
            "src": "1250:29:1",
            "typeName": {
              "id": 1137,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "1271:7:1",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            }
          },
          {
            "constant": false,
            "id": 1140,
            "mutability": "mutable",
            "name": "_liquidityMin",
            "nameLocation": "1300:13:1",
            "nodeType": "VariableDeclaration",
            "scope": 1990,
            "src": "1283:30:1",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 1139,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "1283:7:1",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "visibility": "internal"
          },
          {
            "constant": false,
            "id": 1142,
            "mutability": "mutable",
            "name": "_liquidityMiddle",
            "nameLocation": "1334:16:1",
            "nodeType": "VariableDeclaration",
            "scope": 1990,
            "src": "1317:33:1",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 1141,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "1317:7:1",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "visibility": "internal"
          },
          {
            "constant": false,
            "id": 1144,
            "mutability": "mutable",
            "name": "_liquidityMax",
            "nameLocation": "1371:13:1",
            "nodeType": "VariableDeclaration",
            "scope": 1990,
            "src": "1354:30:1",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 1143,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "1354:7:1",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "visibility": "internal"
          },
          {
            "constant": false,
            "id": 1146,
            "mutability": "mutable",
            "name": "_lastInvestmentValue",
            "nameLocation": "1406:20:1",
            "nodeType": "VariableDeclaration",
            "scope": 1990,
            "src": "1389:37:1",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 1145,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "1389:7:1",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "visibility": "internal"
          },
          {
            "anonymous": false,
            "id": 1150,
            "name": "MoneyInvested",
            "nameLocation": "1437:13:1",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 1149,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1148,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "amount",
                  "nameLocation": "1459:6:1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1150,
                  "src": "1451:14:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1147,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1451:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1450:16:1"
            },
            "src": "1431:36:1"
          },
          {
            "anonymous": false,
            "id": 1154,
            "name": "MoneyDeinvested",
            "nameLocation": "1476:15:1",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 1153,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1152,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "amount",
                  "nameLocation": "1500:6:1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1154,
                  "src": "1492:14:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1151,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1492:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1491:16:1"
            },
            "src": "1470:38:1"
          },
          {
            "anonymous": false,
            "id": 1160,
            "name": "EarningsDistributed",
            "nameLocation": "1517:19:1",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 1159,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1156,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "positive",
                  "nameLocation": "1542:8:1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1160,
                  "src": "1537:13:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 1155,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "1537:4:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1158,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "amount",
                  "nameLocation": "1560:6:1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1160,
                  "src": "1552:14:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1157,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1552:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1536:31:1"
            },
            "src": "1511:57:1"
          },
          {
            "body": {
              "id": 1170,
              "nodeType": "Block",
              "src": "1740:2:1",
              "statements": []
            },
            "documentation": {
              "id": 1161,
              "nodeType": "StructuredDocumentation",
              "src": "1572:48:1",
              "text": "@custom:oz-upgrades-unsafe-allow constructor"
            },
            "id": 1171,
            "implemented": true,
            "kind": "constructor",
            "modifiers": [
              {
                "arguments": [
                  {
                    "id": 1167,
                    "name": "policyPool_",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 1164,
                    "src": "1727:11:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                      "typeString": "contract IPolicyPool"
                    }
                  }
                ],
                "id": 1168,
                "kind": "baseConstructorSpecifier",
                "modifierName": {
                  "id": 1166,
                  "name": "PolicyPoolComponent",
                  "nodeType": "IdentifierPath",
                  "referencedDeclaration": 9172,
                  "src": "1707:19:1"
                },
                "nodeType": "ModifierInvocation",
                "src": "1707:32:1"
              }
            ],
            "name": "",
            "nameLocation": "-1:-1:-1",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1165,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1164,
                  "mutability": "mutable",
                  "name": "policyPool_",
                  "nameLocation": "1694:11:1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1171,
                  "src": "1682:23:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                    "typeString": "contract IPolicyPool"
                  },
                  "typeName": {
                    "id": 1163,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 1162,
                      "name": "IPolicyPool",
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 14671,
                      "src": "1682:11:1"
                    },
                    "referencedDeclaration": 14671,
                    "src": "1682:11:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                      "typeString": "contract IPolicyPool"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1681:25:1"
            },
            "returnParameters": {
              "id": 1169,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1740:0:1"
            },
            "scope": 1990,
            "src": "1670:72:1",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1192,
              "nodeType": "Block",
              "src": "2196:126:1",
              "statements": [
                {
                  "expression": {
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 1183,
                      "name": "__PolicyPoolComponent_init",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8866,
                      "src": "2202:26:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
                        "typeString": "function ()"
                      }
                    },
                    "id": 1184,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2202:28:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1185,
                  "nodeType": "ExpressionStatement",
                  "src": "2202:28:1"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 1187,
                        "name": "liquidityMin_",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1174,
                        "src": "2270:13:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 1188,
                        "name": "liquidityMiddle_",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1176,
                        "src": "2285:16:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 1189,
                        "name": "liquidityMax_",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1178,
                        "src": "2303:13:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 1186,
                      "name": "__BaseAssetManager_init_unchained",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1220,
                      "src": "2236:33:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$",
                        "typeString": "function (uint256,uint256,uint256)"
                      }
                    },
                    "id": 1190,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2236:81:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1191,
                  "nodeType": "ExpressionStatement",
                  "src": "2236:81:1"
                }
              ]
            },
            "documentation": {
              "id": 1172,
              "nodeType": "StructuredDocumentation",
              "src": "1746:254:1",
              "text": " @dev Initializes the asset manager\n @param liquidityMin_ Minimal liquidity to keep in pool's wallet\n @param liquidityMiddle_ Target liquidity when doing rebalance\n @param liquidityMax_ Maximum liquidity to keep in pool's wallet"
            },
            "id": 1193,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "id": 1181,
                "kind": "modifierInvocation",
                "modifierName": {
                  "id": 1180,
                  "name": "initializer",
                  "nodeType": "IdentifierPath",
                  "referencedDeclaration": 19518,
                  "src": "2184:11:1"
                },
                "nodeType": "ModifierInvocation",
                "src": "2184:11:1"
              }
            ],
            "name": "__BaseAssetManager_init",
            "nameLocation": "2063:23:1",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1179,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1174,
                  "mutability": "mutable",
                  "name": "liquidityMin_",
                  "nameLocation": "2100:13:1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1193,
                  "src": "2092:21:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1173,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2092:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1176,
                  "mutability": "mutable",
                  "name": "liquidityMiddle_",
                  "nameLocation": "2127:16:1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1193,
                  "src": "2119:24:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1175,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2119:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1178,
                  "mutability": "mutable",
                  "name": "liquidityMax_",
                  "nameLocation": "2157:13:1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1193,
                  "src": "2149:21:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1177,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2149:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2086:88:1"
            },
            "returnParameters": {
              "id": 1182,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2196:0:1"
            },
            "scope": 1990,
            "src": "2054:268:1",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1219,
              "nodeType": "Block",
              "src": "2529:187:1",
              "statements": [
                {
                  "expression": {
                    "id": 1206,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "id": 1204,
                      "name": "_liquidityMin",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1140,
                      "src": "2579:13:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "id": 1205,
                      "name": "liquidityMin_",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1195,
                      "src": "2595:13:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2579:29:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 1207,
                  "nodeType": "ExpressionStatement",
                  "src": "2579:29:1"
                },
                {
                  "expression": {
                    "id": 1210,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "id": 1208,
                      "name": "_liquidityMiddle",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1142,
                      "src": "2614:16:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "id": 1209,
                      "name": "liquidityMiddle_",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1197,
                      "src": "2633:16:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2614:35:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 1211,
                  "nodeType": "ExpressionStatement",
                  "src": "2614:35:1"
                },
                {
                  "expression": {
                    "id": 1214,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "id": 1212,
                      "name": "_liquidityMax",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1144,
                      "src": "2655:13:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "id": 1213,
                      "name": "liquidityMax_",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1199,
                      "src": "2671:13:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2655:29:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 1215,
                  "nodeType": "ExpressionStatement",
                  "src": "2655:29:1"
                },
                {
                  "expression": {
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 1216,
                      "name": "_validateParameters",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        1236
                      ],
                      "referencedDeclaration": 1236,
                      "src": "2690:19:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$__$returns$__$",
                        "typeString": "function () view"
                      }
                    },
                    "id": 1217,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2690:21:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1218,
                  "nodeType": "ExpressionStatement",
                  "src": "2690:21:1"
                }
              ]
            },
            "id": 1220,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "id": 1202,
                "kind": "modifierInvocation",
                "modifierName": {
                  "id": 1201,
                  "name": "initializer",
                  "nodeType": "IdentifierPath",
                  "referencedDeclaration": 19518,
                  "src": "2517:11:1"
                },
                "nodeType": "ModifierInvocation",
                "src": "2517:11:1"
              }
            ],
            "name": "__BaseAssetManager_init_unchained",
            "nameLocation": "2386:33:1",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1200,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1195,
                  "mutability": "mutable",
                  "name": "liquidityMin_",
                  "nameLocation": "2433:13:1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1220,
                  "src": "2425:21:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1194,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2425:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1197,
                  "mutability": "mutable",
                  "name": "liquidityMiddle_",
                  "nameLocation": "2460:16:1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1220,
                  "src": "2452:24:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1196,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2452:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1199,
                  "mutability": "mutable",
                  "name": "liquidityMax_",
                  "nameLocation": "2490:13:1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1220,
                  "src": "2482:21:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1198,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2482:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2419:88:1"
            },
            "returnParameters": {
              "id": 1203,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2529:0:1"
            },
            "scope": 1990,
            "src": "2377:339:1",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "baseFunctions": [
              9062
            ],
            "body": {
              "id": 1235,
              "nodeType": "Block",
              "src": "2774:152:1",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 1231,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 1227,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 1225,
                            "name": "_liquidityMin",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1140,
                            "src": "2795:13:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<=",
                          "rightExpression": {
                            "id": 1226,
                            "name": "_liquidityMiddle",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1142,
                            "src": "2812:16:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2795:33:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 1230,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 1228,
                            "name": "_liquidityMiddle",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1142,
                            "src": "2832:16:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<=",
                          "rightExpression": {
                            "id": 1229,
                            "name": "_liquidityMax",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1144,
                            "src": "2852:13:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2832:33:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "2795:70:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "56616c69646174696f6e3a204c6971756964697479206c696d6974732061726520696e76616c6964",
                        "id": 1232,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2873:42:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_44052a022a12641e3b1c5dcc3220a6bc17feb83af6d57d0c5d488fbf03110e76",
                          "typeString": "literal_string \"Validation: Liquidity limits are invalid\""
                        },
                        "value": "Validation: Liquidity limits are invalid"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_44052a022a12641e3b1c5dcc3220a6bc17feb83af6d57d0c5d488fbf03110e76",
                          "typeString": "literal_string \"Validation: Liquidity limits are invalid\""
                        }
                      ],
                      "id": 1224,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "2780:7:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 1233,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2780:141:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1234,
                  "nodeType": "ExpressionStatement",
                  "src": "2780:141:1"
                }
              ]
            },
            "id": 1236,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_validateParameters",
            "nameLocation": "2729:19:1",
            "nodeType": "FunctionDefinition",
            "overrides": {
              "id": 1222,
              "nodeType": "OverrideSpecifier",
              "overrides": [],
              "src": "2765:8:1"
            },
            "parameters": {
              "id": 1221,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2748:2:1"
            },
            "returnParameters": {
              "id": 1223,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2774:0:1"
            },
            "scope": 1990,
            "src": "2720:206:1",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1284,
              "nodeType": "Block",
              "src": "3083:303:1",
              "statements": [
                {
                  "assignments": [
                    1243
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1243,
                      "mutability": "mutable",
                      "name": "poolInvestable",
                      "nameLocation": "3097:14:1",
                      "nodeType": "VariableDeclaration",
                      "scope": 1284,
                      "src": "3089:22:1",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 1242,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "3089:7:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1247,
                  "initialValue": {
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "id": 1244,
                        "name": "_policyPool",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8754,
                        "src": "3114:11:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                          "typeString": "contract IPolicyPool"
                        }
                      },
                      "id": 1245,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "getInvestable",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 14627,
                      "src": "3114:25:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
                        "typeString": "function () view external returns (uint256)"
                      }
                    },
                    "id": 1246,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3114:27:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3089:52:1"
                },
                {
                  "assignments": [
                    1249
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1249,
                      "mutability": "mutable",
                      "name": "etksInvestable",
                      "nameLocation": "3155:14:1",
                      "nodeType": "VariableDeclaration",
                      "scope": 1284,
                      "src": "3147:22:1",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 1248,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "3147:7:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1251,
                  "initialValue": {
                    "hexValue": "30",
                    "id": 1250,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "3172:1:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_0_by_1",
                      "typeString": "int_const 0"
                    },
                    "value": "0"
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3147:26:1"
                },
                {
                  "body": {
                    "id": 1278,
                    "nodeType": "Block",
                    "src": "3238:100:1",
                    "statements": [
                      {
                        "assignments": [
                          1266
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 1266,
                            "mutability": "mutable",
                            "name": "etk",
                            "nameLocation": "3254:3:1",
                            "nodeType": "VariableDeclaration",
                            "scope": 1278,
                            "src": "3246:11:1",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IEToken_$16628",
                              "typeString": "contract IEToken"
                            },
                            "typeName": {
                              "id": 1265,
                              "nodeType": "UserDefinedTypeName",
                              "pathNode": {
                                "id": 1264,
                                "name": "IEToken",
                                "nodeType": "IdentifierPath",
                                "referencedDeclaration": 16628,
                                "src": "3246:7:1"
                              },
                              "referencedDeclaration": 16628,
                              "src": "3246:7:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IEToken_$16628",
                                "typeString": "contract IEToken"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 1271,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 1269,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1253,
                              "src": "3284:1:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 1267,
                              "name": "_policyPool",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8754,
                              "src": "3260:11:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                                "typeString": "contract IPolicyPool"
                              }
                            },
                            "id": 1268,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "getETokenAt",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 14640,
                            "src": "3260:23:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IEToken_$16628_$",
                              "typeString": "function (uint256) view external returns (contract IEToken)"
                            }
                          },
                          "id": 1270,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3260:26:1",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IEToken_$16628",
                            "typeString": "contract IEToken"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "3246:40:1"
                      },
                      {
                        "expression": {
                          "id": 1276,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 1272,
                            "name": "etksInvestable",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1249,
                            "src": "3294:14:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "id": 1273,
                                "name": "etk",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1266,
                                "src": "3312:3:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_IEToken_$16628",
                                  "typeString": "contract IEToken"
                                }
                              },
                              "id": 1274,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "getInvestable",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 16627,
                              "src": "3312:17:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
                                "typeString": "function () view external returns (uint256)"
                              }
                            },
                            "id": 1275,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3312:19:1",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3294:37:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 1277,
                        "nodeType": "ExpressionStatement",
                        "src": "3294:37:1"
                      }
                    ]
                  },
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1260,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 1256,
                      "name": "i",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1253,
                      "src": "3199:1:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "arguments": [],
                      "expression": {
                        "argumentTypes": [],
                        "expression": {
                          "id": 1257,
                          "name": "_policyPool",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 8754,
                          "src": "3203:11:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                            "typeString": "contract IPolicyPool"
                          }
                        },
                        "id": 1258,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "getETokenCount",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 14632,
                        "src": "3203:26:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
                          "typeString": "function () view external returns (uint256)"
                        }
                      },
                      "id": 1259,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "3203:28:1",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "3199:32:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 1279,
                  "initializationExpression": {
                    "assignments": [
                      1253
                    ],
                    "declarations": [
                      {
                        "constant": false,
                        "id": 1253,
                        "mutability": "mutable",
                        "name": "i",
                        "nameLocation": "3192:1:1",
                        "nodeType": "VariableDeclaration",
                        "scope": 1279,
                        "src": "3184:9:1",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1252,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "3184:7:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "id": 1255,
                    "initialValue": {
                      "hexValue": "30",
                      "id": 1254,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "3196:1:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "nodeType": "VariableDeclarationStatement",
                    "src": "3184:13:1"
                  },
                  "loopExpression": {
                    "expression": {
                      "id": 1262,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "++",
                      "prefix": false,
                      "src": "3233:3:1",
                      "subExpression": {
                        "id": 1261,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1253,
                        "src": "3233:1:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 1263,
                    "nodeType": "ExpressionStatement",
                    "src": "3233:3:1"
                  },
                  "nodeType": "ForStatement",
                  "src": "3179:159:1"
                },
                {
                  "expression": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1282,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 1280,
                      "name": "poolInvestable",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1243,
                      "src": "3350:14:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "+",
                    "rightExpression": {
                      "id": 1281,
                      "name": "etksInvestable",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1249,
                      "src": "3367:14:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "3350:31:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 1241,
                  "id": 1283,
                  "nodeType": "Return",
                  "src": "3343:38:1"
                }
              ]
            },
            "documentation": {
              "id": 1237,
              "nodeType": "StructuredDocumentation",
              "src": "2930:93:1",
              "text": " @dev Returns the total amount that is available to invest by the asset manager"
            },
            "functionSelector": "05400115",
            "id": 1285,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "totalInvestable",
            "nameLocation": "3035:15:1",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1238,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3050:2:1"
            },
            "returnParameters": {
              "id": 1241,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1240,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1285,
                  "src": "3074:7:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1239,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3074:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3073:9:1"
            },
            "scope": 1990,
            "src": "3026:360:1",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "public"
          },
          {
            "body": {
              "id": 1296,
              "nodeType": "Block",
              "src": "3564:157:1",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "id": 1292,
                          "name": "getInvestmentValue",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1428,
                          "src": "3695:18:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                            "typeString": "function () view returns (uint256)"
                          }
                        },
                        "id": 1293,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "3695:20:1",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 1291,
                      "name": "_distributeEarnings",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1422,
                      "src": "3675:19:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256)"
                      }
                    },
                    "id": 1294,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3675:41:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1295,
                  "nodeType": "ExpressionStatement",
                  "src": "3675:41:1"
                }
              ]
            },
            "documentation": {
              "id": 1286,
              "nodeType": "StructuredDocumentation",
              "src": "3390:112:1",
              "text": " @dev Calculates asset earnings and distributes them updating accounting in PolicyPool and eTokens"
            },
            "functionSelector": "76577eae",
            "id": 1297,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "id": 1289,
                "kind": "modifierInvocation",
                "modifierName": {
                  "id": 1288,
                  "name": "whenNotPaused",
                  "nodeType": "IdentifierPath",
                  "referencedDeclaration": 18073,
                  "src": "3550:13:1"
                },
                "nodeType": "ModifierInvocation",
                "src": "3550:13:1"
              }
            ],
            "name": "distributeEarnings",
            "nameLocation": "3514:18:1",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1287,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3532:2:1"
            },
            "returnParameters": {
              "id": 1290,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3564:0:1"
            },
            "scope": 1990,
            "src": "3505:216:1",
            "stateMutability": "nonpayable",
            "virtual": true,
            "visibility": "public"
          },
          {
            "body": {
              "id": 1421,
              "nodeType": "Block",
              "src": "3810:898:1",
              "statements": [
                {
                  "assignments": [
                    1305
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1305,
                      "mutability": "mutable",
                      "name": "positive",
                      "nameLocation": "3821:8:1",
                      "nodeType": "VariableDeclaration",
                      "scope": 1421,
                      "src": "3816:13:1",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 1304,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "3816:4:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1306,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3816:13:1"
                },
                {
                  "assignments": [
                    1308
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1308,
                      "mutability": "mutable",
                      "name": "earnings",
                      "nameLocation": "3843:8:1",
                      "nodeType": "VariableDeclaration",
                      "scope": 1421,
                      "src": "3835:16:1",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 1307,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "3835:7:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1309,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3835:16:1"
                },
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1312,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 1310,
                      "name": "investmentValue",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1299,
                      "src": "3861:15:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "id": 1311,
                      "name": "_lastInvestmentValue",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1146,
                      "src": "3879:20:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "3861:38:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "condition": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 1326,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 1324,
                        "name": "investmentValue",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1299,
                        "src": "3998:15:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "<",
                      "rightExpression": {
                        "id": 1325,
                        "name": "_lastInvestmentValue",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1146,
                        "src": "4016:20:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "3998:38:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "falseBody": {
                      "id": 1339,
                      "nodeType": "Block",
                      "src": "4132:36:1",
                      "statements": [
                        {
                          "functionReturnParameters": 1303,
                          "id": 1338,
                          "nodeType": "Return",
                          "src": "4140:7:1"
                        }
                      ]
                    },
                    "id": 1340,
                    "nodeType": "IfStatement",
                    "src": "3994:174:1",
                    "trueBody": {
                      "id": 1337,
                      "nodeType": "Block",
                      "src": "4038:88:1",
                      "statements": [
                        {
                          "expression": {
                            "id": 1331,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftHandSide": {
                              "id": 1327,
                              "name": "earnings",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1308,
                              "src": "4046:8:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "nodeType": "Assignment",
                            "operator": "=",
                            "rightHandSide": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 1330,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 1328,
                                "name": "_lastInvestmentValue",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1146,
                                "src": "4057:20:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "-",
                              "rightExpression": {
                                "id": 1329,
                                "name": "investmentValue",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1299,
                                "src": "4080:15:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "4057:38:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "4046:49:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 1332,
                          "nodeType": "ExpressionStatement",
                          "src": "4046:49:1"
                        },
                        {
                          "expression": {
                            "id": 1335,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftHandSide": {
                              "id": 1333,
                              "name": "positive",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1305,
                              "src": "4103:8:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "nodeType": "Assignment",
                            "operator": "=",
                            "rightHandSide": {
                              "hexValue": "66616c7365",
                              "id": 1334,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "bool",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "4114:5:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "value": "false"
                            },
                            "src": "4103:16:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "id": 1336,
                          "nodeType": "ExpressionStatement",
                          "src": "4103:16:1"
                        }
                      ]
                    }
                  },
                  "id": 1341,
                  "nodeType": "IfStatement",
                  "src": "3857:311:1",
                  "trueBody": {
                    "id": 1323,
                    "nodeType": "Block",
                    "src": "3901:87:1",
                    "statements": [
                      {
                        "expression": {
                          "id": 1317,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 1313,
                            "name": "earnings",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1308,
                            "src": "3909:8:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 1316,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 1314,
                              "name": "investmentValue",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1299,
                              "src": "3920:15:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "-",
                            "rightExpression": {
                              "id": 1315,
                              "name": "_lastInvestmentValue",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1146,
                              "src": "3938:20:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "3920:38:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3909:49:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 1318,
                        "nodeType": "ExpressionStatement",
                        "src": "3909:49:1"
                      },
                      {
                        "expression": {
                          "id": 1321,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 1319,
                            "name": "positive",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1305,
                            "src": "3966:8:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "hexValue": "74727565",
                            "id": 1320,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "bool",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3977:4:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            },
                            "value": "true"
                          },
                          "src": "3966:15:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 1322,
                        "nodeType": "ExpressionStatement",
                        "src": "3966:15:1"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    1343
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1343,
                      "mutability": "mutable",
                      "name": "totalInv",
                      "nameLocation": "4182:8:1",
                      "nodeType": "VariableDeclaration",
                      "scope": 1421,
                      "src": "4174:16:1",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 1342,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "4174:7:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1346,
                  "initialValue": {
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 1344,
                      "name": "totalInvestable",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1285,
                      "src": "4193:15:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                        "typeString": "function () view returns (uint256)"
                      }
                    },
                    "id": 1345,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4193:17:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "4174:36:1"
                },
                {
                  "assignments": [
                    1348
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1348,
                      "mutability": "mutable",
                      "name": "remaining",
                      "nameLocation": "4225:9:1",
                      "nodeType": "VariableDeclaration",
                      "scope": 1421,
                      "src": "4217:17:1",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 1347,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "4217:7:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1350,
                  "initialValue": {
                    "id": 1349,
                    "name": "earnings",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 1308,
                    "src": "4237:8:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "4217:28:1"
                },
                {
                  "body": {
                    "id": 1399,
                    "nodeType": "Block",
                    "src": "4310:227:1",
                    "statements": [
                      {
                        "assignments": [
                          1365
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 1365,
                            "mutability": "mutable",
                            "name": "etk",
                            "nameLocation": "4326:3:1",
                            "nodeType": "VariableDeclaration",
                            "scope": 1399,
                            "src": "4318:11:1",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IEToken_$16628",
                              "typeString": "contract IEToken"
                            },
                            "typeName": {
                              "id": 1364,
                              "nodeType": "UserDefinedTypeName",
                              "pathNode": {
                                "id": 1363,
                                "name": "IEToken",
                                "nodeType": "IdentifierPath",
                                "referencedDeclaration": 16628,
                                "src": "4318:7:1"
                              },
                              "referencedDeclaration": 16628,
                              "src": "4318:7:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IEToken_$16628",
                                "typeString": "contract IEToken"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 1370,
                        "initialValue": {
                          "arguments": [
                            {
                              "id": 1368,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1352,
                              "src": "4356:1:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 1366,
                              "name": "_policyPool",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8754,
                              "src": "4332:11:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                                "typeString": "contract IPolicyPool"
                              }
                            },
                            "id": 1367,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "getETokenAt",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 14640,
                            "src": "4332:23:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_IEToken_$16628_$",
                              "typeString": "function (uint256) view external returns (contract IEToken)"
                            }
                          },
                          "id": 1369,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4332:26:1",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IEToken_$16628",
                            "typeString": "contract IEToken"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "4318:40:1"
                      },
                      {
                        "assignments": [
                          1372
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 1372,
                            "mutability": "mutable",
                            "name": "aux",
                            "nameLocation": "4374:3:1",
                            "nodeType": "VariableDeclaration",
                            "scope": 1399,
                            "src": "4366:11:1",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 1371,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "4366:7:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 1382,
                        "initialValue": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "id": 1379,
                                  "name": "totalInv",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1343,
                                  "src": "4423:8:1",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "expression": {
                                  "arguments": [],
                                  "expression": {
                                    "argumentTypes": [],
                                    "expression": {
                                      "id": 1375,
                                      "name": "etk",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 1365,
                                      "src": "4396:3:1",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_IEToken_$16628",
                                        "typeString": "contract IEToken"
                                      }
                                    },
                                    "id": 1376,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "getInvestable",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 16627,
                                    "src": "4396:17:1",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
                                      "typeString": "function () view external returns (uint256)"
                                    }
                                  },
                                  "id": 1377,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "4396:19:1",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "id": 1378,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "wadDiv",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 11097,
                                "src": "4396:26:1",
                                "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": 1380,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4396:36:1",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "id": 1373,
                              "name": "earnings",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1308,
                              "src": "4380:8:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 1374,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "wadMul",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 11048,
                            "src": "4380:15:1",
                            "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": 1381,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4380:53:1",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "4366:67:1"
                      },
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 1385,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 1383,
                            "name": "aux",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1372,
                            "src": "4445:3:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">",
                          "rightExpression": {
                            "hexValue": "30",
                            "id": 1384,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "4451:1:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "4445:7:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "id": 1398,
                        "nodeType": "IfStatement",
                        "src": "4441:90:1",
                        "trueBody": {
                          "id": 1397,
                          "nodeType": "Block",
                          "src": "4454:77:1",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 1389,
                                    "name": "aux",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1372,
                                    "src": "4482:3:1",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "id": 1390,
                                    "name": "positive",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1305,
                                    "src": "4487:8:1",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  ],
                                  "expression": {
                                    "id": 1386,
                                    "name": "etk",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1365,
                                    "src": "4464:3:1",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IEToken_$16628",
                                      "typeString": "contract IEToken"
                                    }
                                  },
                                  "id": 1388,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "assetEarnings",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 16571,
                                  "src": "4464:17:1",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_bool_$returns$__$",
                                    "typeString": "function (uint256,bool) external"
                                  }
                                },
                                "id": 1391,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "4464:32:1",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 1392,
                              "nodeType": "ExpressionStatement",
                              "src": "4464:32:1"
                            },
                            {
                              "expression": {
                                "id": 1395,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 1393,
                                  "name": "remaining",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1348,
                                  "src": "4506:9:1",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "-=",
                                "rightHandSide": {
                                  "id": 1394,
                                  "name": "aux",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1372,
                                  "src": "4519:3:1",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "4506:16:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 1396,
                              "nodeType": "ExpressionStatement",
                              "src": "4506:16:1"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1359,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 1355,
                      "name": "i",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1352,
                      "src": "4271:1:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "arguments": [],
                      "expression": {
                        "argumentTypes": [],
                        "expression": {
                          "id": 1356,
                          "name": "_policyPool",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 8754,
                          "src": "4275:11:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                            "typeString": "contract IPolicyPool"
                          }
                        },
                        "id": 1357,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "getETokenCount",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 14632,
                        "src": "4275:26:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
                          "typeString": "function () view external returns (uint256)"
                        }
                      },
                      "id": 1358,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "4275:28:1",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "4271:32:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 1400,
                  "initializationExpression": {
                    "assignments": [
                      1352
                    ],
                    "declarations": [
                      {
                        "constant": false,
                        "id": 1352,
                        "mutability": "mutable",
                        "name": "i",
                        "nameLocation": "4264:1:1",
                        "nodeType": "VariableDeclaration",
                        "scope": 1400,
                        "src": "4256:9:1",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 1351,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "4256:7:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "visibility": "internal"
                      }
                    ],
                    "id": 1354,
                    "initialValue": {
                      "hexValue": "30",
                      "id": 1353,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "4268:1:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "nodeType": "VariableDeclarationStatement",
                    "src": "4256:13:1"
                  },
                  "loopExpression": {
                    "expression": {
                      "id": 1361,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "++",
                      "prefix": false,
                      "src": "4305:3:1",
                      "subExpression": {
                        "id": 1360,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1352,
                        "src": "4305:1:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 1362,
                    "nodeType": "ExpressionStatement",
                    "src": "4305:3:1"
                  },
                  "nodeType": "ForStatement",
                  "src": "4251:286:1"
                },
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1403,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 1401,
                      "name": "remaining",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1348,
                      "src": "4547:9:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "hexValue": "30",
                      "id": 1402,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "4559:1:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "4547:13:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 1411,
                  "nodeType": "IfStatement",
                  "src": "4543:65:1",
                  "trueBody": {
                    "expression": {
                      "arguments": [
                        {
                          "id": 1407,
                          "name": "remaining",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1348,
                          "src": "4588:9:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        {
                          "id": 1408,
                          "name": "positive",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1305,
                          "src": "4599:8:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        ],
                        "expression": {
                          "id": 1404,
                          "name": "_policyPool",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 8754,
                          "src": "4562:11:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                            "typeString": "contract IPolicyPool"
                          }
                        },
                        "id": 1406,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "assetEarnings",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 14647,
                        "src": "4562:25:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_bool_$returns$__$",
                          "typeString": "function (uint256,bool) external"
                        }
                      },
                      "id": 1409,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "4562:46:1",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_tuple$__$",
                        "typeString": "tuple()"
                      }
                    },
                    "id": 1410,
                    "nodeType": "ExpressionStatement",
                    "src": "4562:46:1"
                  }
                },
                {
                  "expression": {
                    "id": 1414,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "id": 1412,
                      "name": "_lastInvestmentValue",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1146,
                      "src": "4615:20:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "id": 1413,
                      "name": "investmentValue",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1299,
                      "src": "4638:15:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "4615:38:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 1415,
                  "nodeType": "ExpressionStatement",
                  "src": "4615:38:1"
                },
                {
                  "eventCall": {
                    "arguments": [
                      {
                        "id": 1417,
                        "name": "positive",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1305,
                        "src": "4684:8:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "id": 1418,
                        "name": "earnings",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1308,
                        "src": "4694:8:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 1416,
                      "name": "EarningsDistributed",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1160,
                      "src": "4664:19:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_bool_$_t_uint256_$returns$__$",
                        "typeString": "function (bool,uint256)"
                      }
                    },
                    "id": 1419,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4664:39:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1420,
                  "nodeType": "EmitStatement",
                  "src": "4659:44:1"
                }
              ]
            },
            "id": 1422,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "id": 1302,
                "kind": "modifierInvocation",
                "modifierName": {
                  "id": 1301,
                  "name": "whenNotPaused",
                  "nodeType": "IdentifierPath",
                  "referencedDeclaration": 18073,
                  "src": "3796:13:1"
                },
                "nodeType": "ModifierInvocation",
                "src": "3796:13:1"
              }
            ],
            "name": "_distributeEarnings",
            "nameLocation": "3734:19:1",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1300,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1299,
                  "mutability": "mutable",
                  "name": "investmentValue",
                  "nameLocation": "3762:15:1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1422,
                  "src": "3754:23:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1298,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3754:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3753:25:1"
            },
            "returnParameters": {
              "id": 1303,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3810:0:1"
            },
            "scope": 1990,
            "src": "3725:983:1",
            "stateMutability": "nonpayable",
            "virtual": true,
            "visibility": "internal"
          },
          {
            "documentation": {
              "id": 1423,
              "nodeType": "StructuredDocumentation",
              "src": "4712:73:1",
              "text": " @dev Returns the current value of the investment portfolio"
            },
            "functionSelector": "4dd93bd3",
            "id": 1428,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getInvestmentValue",
            "nameLocation": "4797:18:1",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1424,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "4815:2:1"
            },
            "returnParameters": {
              "id": 1427,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1426,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1428,
                  "src": "4847:7:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1425,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4847:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4846:9:1"
            },
            "scope": 1990,
            "src": "4788:68:1",
            "stateMutability": "view",
            "virtual": true,
            "visibility": "public"
          },
          {
            "body": {
              "id": 1481,
              "nodeType": "Block",
              "src": "4978:473:1",
              "statements": [
                {
                  "assignments": [
                    1435
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1435,
                      "mutability": "mutable",
                      "name": "poolCash",
                      "nameLocation": "5097:8:1",
                      "nodeType": "VariableDeclaration",
                      "scope": 1481,
                      "src": "5089:16:1",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 1434,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "5089:7:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1444,
                  "initialValue": {
                    "arguments": [
                      {
                        "arguments": [
                          {
                            "id": 1441,
                            "name": "_policyPool",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8754,
                            "src": "5137:11:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                              "typeString": "contract IPolicyPool"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                              "typeString": "contract IPolicyPool"
                            }
                          ],
                          "id": 1440,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "5129:7:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_address_$",
                            "typeString": "type(address)"
                          },
                          "typeName": {
                            "id": 1439,
                            "name": "address",
                            "nodeType": "ElementaryTypeName",
                            "src": "5129:7:1",
                            "typeDescriptions": {}
                          }
                        },
                        "id": 1442,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "5129:20:1",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "expression": {
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "id": 1436,
                          "name": "currency",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 8919,
                          "src": "5108:8:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_IERC20Metadata_$16271_$",
                            "typeString": "function () view returns (contract IERC20Metadata)"
                          }
                        },
                        "id": 1437,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "5108:10:1",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20Metadata_$16271",
                          "typeString": "contract IERC20Metadata"
                        }
                      },
                      "id": 1438,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "balanceOf",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 16645,
                      "src": "5108:20:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                        "typeString": "function (address) view external returns (uint256)"
                      }
                    },
                    "id": 1443,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5108:42:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "5089:61:1"
                },
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1447,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 1445,
                      "name": "poolCash",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1435,
                      "src": "5160:8:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "id": 1446,
                      "name": "_liquidityMax",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1144,
                      "src": "5171:13:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "5160:24:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "condition": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 1457,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 1455,
                        "name": "poolCash",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1435,
                        "src": "5247:8:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "<",
                      "rightExpression": {
                        "id": 1456,
                        "name": "_liquidityMin",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1140,
                        "src": "5258:13:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "5247:24:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "id": 1479,
                    "nodeType": "IfStatement",
                    "src": "5243:204:1",
                    "trueBody": {
                      "id": 1478,
                      "nodeType": "Block",
                      "src": "5273:174:1",
                      "statements": [
                        {
                          "assignments": [
                            1459
                          ],
                          "declarations": [
                            {
                              "constant": false,
                              "id": 1459,
                              "mutability": "mutable",
                              "name": "deinvestAmount",
                              "nameLocation": "5289:14:1",
                              "nodeType": "VariableDeclaration",
                              "scope": 1478,
                              "src": "5281:22:1",
                              "stateVariable": false,
                              "storageLocation": "default",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "typeName": {
                                "id": 1458,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "5281:7:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "visibility": "internal"
                            }
                          ],
                          "id": 1468,
                          "initialValue": {
                            "arguments": [
                              {
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "id": 1462,
                                  "name": "getInvestmentValue",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1428,
                                  "src": "5315:18:1",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                    "typeString": "function () view returns (uint256)"
                                  }
                                },
                                "id": 1463,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "5315:20:1",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 1466,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 1464,
                                  "name": "_liquidityMiddle",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1142,
                                  "src": "5337:16:1",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "-",
                                "rightExpression": {
                                  "id": 1465,
                                  "name": "poolCash",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1435,
                                  "src": "5356:8:1",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "5337:27:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "id": 1460,
                                "name": "Math",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 16794,
                                "src": "5306:4:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Math_$16794_$",
                                  "typeString": "type(library Math)"
                                }
                              },
                              "id": 1461,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "min",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 16745,
                              "src": "5306:8:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 1467,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "5306:59:1",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "VariableDeclarationStatement",
                          "src": "5281:84:1"
                        },
                        {
                          "condition": {
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 1471,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 1469,
                              "name": "deinvestAmount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1459,
                              "src": "5377:14:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": ">",
                            "rightExpression": {
                              "hexValue": "30",
                              "id": 1470,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "5394:1:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            "src": "5377:18:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "id": 1477,
                          "nodeType": "IfStatement",
                          "src": "5373:68:1",
                          "trueBody": {
                            "id": 1476,
                            "nodeType": "Block",
                            "src": "5397:44:1",
                            "statements": [
                              {
                                "expression": {
                                  "arguments": [
                                    {
                                      "id": 1473,
                                      "name": "deinvestAmount",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 1459,
                                      "src": "5417:14:1",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "id": 1472,
                                    "name": "_deinvest",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1578,
                                    "src": "5407:9:1",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
                                      "typeString": "function (uint256)"
                                    }
                                  },
                                  "id": 1474,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "5407:25:1",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_tuple$__$",
                                    "typeString": "tuple()"
                                  }
                                },
                                "id": 1475,
                                "nodeType": "ExpressionStatement",
                                "src": "5407:25:1"
                              }
                            ]
                          }
                        }
                      ]
                    }
                  },
                  "id": 1480,
                  "nodeType": "IfStatement",
                  "src": "5156:291:1",
                  "trueBody": {
                    "id": 1454,
                    "nodeType": "Block",
                    "src": "5186:51:1",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 1451,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 1449,
                                "name": "poolCash",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1435,
                                "src": "5202:8:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "-",
                              "rightExpression": {
                                "id": 1450,
                                "name": "_liquidityMiddle",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1142,
                                "src": "5213:16:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "5202:27:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 1448,
                            "name": "_invest",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1560,
                            "src": "5194:7:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
                              "typeString": "function (uint256)"
                            }
                          },
                          "id": 1452,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5194:36:1",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1453,
                        "nodeType": "ExpressionStatement",
                        "src": "5194:36:1"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": {
              "id": 1429,
              "nodeType": "StructuredDocumentation",
              "src": "4860:65:1",
              "text": " @dev Rebalances cash between PolicyPool wallet and"
            },
            "functionSelector": "7d7c2a1c",
            "id": 1482,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "id": 1432,
                "kind": "modifierInvocation",
                "modifierName": {
                  "id": 1431,
                  "name": "whenNotPaused",
                  "nodeType": "IdentifierPath",
                  "referencedDeclaration": 18073,
                  "src": "4964:13:1"
                },
                "nodeType": "ModifierInvocation",
                "src": "4964:13:1"
              }
            ],
            "name": "rebalance",
            "nameLocation": "4937:9:1",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1430,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "4946:2:1"
            },
            "returnParameters": {
              "id": 1433,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "4978:0:1"
            },
            "scope": 1990,
            "src": "4928:523:1",
            "stateMutability": "nonpayable",
            "virtual": true,
            "visibility": "public"
          },
          {
            "body": {
              "id": 1492,
              "nodeType": "Block",
              "src": "5587:48:1",
              "statements": [
                {
                  "expression": {
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 1486,
                      "name": "distributeEarnings",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1297,
                      "src": "5593:18:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
                        "typeString": "function ()"
                      }
                    },
                    "id": 1487,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5593:20:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1488,
                  "nodeType": "ExpressionStatement",
                  "src": "5593:20:1"
                },
                {
                  "expression": {
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 1489,
                      "name": "rebalance",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1482,
                      "src": "5619:9:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
                        "typeString": "function ()"
                      }
                    },
                    "id": 1490,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5619:11:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1491,
                  "nodeType": "ExpressionStatement",
                  "src": "5619:11:1"
                }
              ]
            },
            "documentation": {
              "id": 1483,
              "nodeType": "StructuredDocumentation",
              "src": "5455:98:1",
              "text": " @dev Function to be called automatically by a crontask - Distributes and rebalances"
            },
            "functionSelector": "c2c4c5c1",
            "id": 1493,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "checkpoint",
            "nameLocation": "5565:10:1",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1484,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "5575:2:1"
            },
            "returnParameters": {
              "id": 1485,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "5587:0:1"
            },
            "scope": 1990,
            "src": "5556:79:1",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "baseFunctions": [
              16504
            ],
            "body": {
              "id": 1545,
              "nodeType": "Block",
              "src": "5992:444:1",
              "statements": [
                {
                  "assignments": [
                    1503
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1503,
                      "mutability": "mutable",
                      "name": "poolCash",
                      "nameLocation": "6006:8:1",
                      "nodeType": "VariableDeclaration",
                      "scope": 1545,
                      "src": "5998:16:1",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 1502,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "5998:7:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1512,
                  "initialValue": {
                    "arguments": [
                      {
                        "arguments": [
                          {
                            "id": 1509,
                            "name": "_policyPool",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8754,
                            "src": "6046:11:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                              "typeString": "contract IPolicyPool"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                              "typeString": "contract IPolicyPool"
                            }
                          ],
                          "id": 1508,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "6038:7:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_address_$",
                            "typeString": "type(address)"
                          },
                          "typeName": {
                            "id": 1507,
                            "name": "address",
                            "nodeType": "ElementaryTypeName",
                            "src": "6038:7:1",
                            "typeDescriptions": {}
                          }
                        },
                        "id": 1510,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "6038:20:1",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "expression": {
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "id": 1504,
                          "name": "currency",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 8919,
                          "src": "6017:8:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_IERC20Metadata_$16271_$",
                            "typeString": "function () view returns (contract IERC20Metadata)"
                          }
                        },
                        "id": 1505,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "6017:10:1",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20Metadata_$16271",
                          "typeString": "contract IERC20Metadata"
                        }
                      },
                      "id": 1506,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "balanceOf",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 16645,
                      "src": "6017:20:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                        "typeString": "function (address) view external returns (uint256)"
                      }
                    },
                    "id": 1511,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6017:42:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "5998:61:1"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 1516,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 1514,
                          "name": "poolCash",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1503,
                          "src": "6073:8:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<",
                        "rightExpression": {
                          "id": 1515,
                          "name": "paymentAmount",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1496,
                          "src": "6084:13:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "6073:24:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "4e6f206e65656420746f20726566696c6c207468652077616c6c657420666f722074686973207061796d656e74",
                        "id": 1517,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "6099:47:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_aa11343383c11477acab3f6e76d668131403d8d4b9f0329036e6a9ba85f4d062",
                          "typeString": "literal_string \"No need to refill the wallet for this payment\""
                        },
                        "value": "No need to refill the wallet for this payment"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_aa11343383c11477acab3f6e76d668131403d8d4b9f0329036e6a9ba85f4d062",
                          "typeString": "literal_string \"No need to refill the wallet for this payment\""
                        }
                      ],
                      "id": 1513,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "6065:7:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 1518,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6065:82:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1519,
                  "nodeType": "ExpressionStatement",
                  "src": "6065:82:1"
                },
                {
                  "assignments": [
                    1521
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1521,
                      "mutability": "mutable",
                      "name": "investmentValue",
                      "nameLocation": "6161:15:1",
                      "nodeType": "VariableDeclaration",
                      "scope": 1545,
                      "src": "6153:23:1",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 1520,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "6153:7:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1524,
                  "initialValue": {
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 1522,
                      "name": "getInvestmentValue",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1428,
                      "src": "6179:18:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                        "typeString": "function () view returns (uint256)"
                      }
                    },
                    "id": 1523,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6179:20:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "6153:46:1"
                },
                {
                  "assignments": [
                    1526
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1526,
                      "mutability": "mutable",
                      "name": "deinvest",
                      "nameLocation": "6288:8:1",
                      "nodeType": "VariableDeclaration",
                      "scope": 1545,
                      "src": "6280:16:1",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 1525,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "6280:7:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1532,
                  "initialValue": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1531,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 1529,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 1527,
                        "name": "paymentAmount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1496,
                        "src": "6299:13:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "id": 1528,
                        "name": "_liquidityMiddle",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1142,
                        "src": "6315:16:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "6299:32:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "id": 1530,
                      "name": "poolCash",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1503,
                      "src": "6334:8:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "6299:43:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "6280:62:1"
                },
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1535,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 1533,
                      "name": "deinvest",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1526,
                      "src": "6352:8:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "id": 1534,
                      "name": "investmentValue",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1521,
                      "src": "6363:15:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "6352:26:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 1540,
                  "nodeType": "IfStatement",
                  "src": "6348:58:1",
                  "trueBody": {
                    "expression": {
                      "id": 1538,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftHandSide": {
                        "id": 1536,
                        "name": "deinvest",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1526,
                        "src": "6380:8:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "Assignment",
                      "operator": "=",
                      "rightHandSide": {
                        "id": 1537,
                        "name": "investmentValue",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1521,
                        "src": "6391:15:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "6380:26:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 1539,
                    "nodeType": "ExpressionStatement",
                    "src": "6380:26:1"
                  }
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 1542,
                        "name": "deinvest",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1526,
                        "src": "6422:8:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 1541,
                      "name": "_deinvest",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1578,
                      "src": "6412:9:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256)"
                      }
                    },
                    "id": 1543,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6412:19:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1544,
                  "nodeType": "ExpressionStatement",
                  "src": "6412:19:1"
                }
              ]
            },
            "documentation": {
              "id": 1494,
              "nodeType": "StructuredDocumentation",
              "src": "5639:272:1",
              "text": " @dev This is called from PolicyPool when doesn't have enought money for payment.\n      After the call, there should be enought money in PolicyPool.currency().balanceOf(this) to\n      do the payment\n @param paymentAmount The amount of the payment"
            },
            "functionSelector": "1014a0c2",
            "id": 1546,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "id": 1500,
                "kind": "modifierInvocation",
                "modifierName": {
                  "id": 1499,
                  "name": "onlyPolicyPool",
                  "nodeType": "IdentifierPath",
                  "referencedDeclaration": 8780,
                  "src": "5977:14:1"
                },
                "nodeType": "ModifierInvocation",
                "src": "5977:14:1"
              }
            ],
            "name": "refillWallet",
            "nameLocation": "5923:12:1",
            "nodeType": "FunctionDefinition",
            "overrides": {
              "id": 1498,
              "nodeType": "OverrideSpecifier",
              "overrides": [],
              "src": "5968:8:1"
            },
            "parameters": {
              "id": 1497,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1496,
                  "mutability": "mutable",
                  "name": "paymentAmount",
                  "nameLocation": "5944:13:1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1546,
                  "src": "5936:21:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1495,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5936:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "5935:23:1"
            },
            "returnParameters": {
              "id": 1501,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "5992:0:1"
            },
            "scope": 1990,
            "src": "5914:522:1",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": {
              "id": 1559,
              "nodeType": "Block",
              "src": "6490:130:1",
              "statements": [
                {
                  "expression": {
                    "id": 1553,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "id": 1551,
                      "name": "_lastInvestmentValue",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1146,
                      "src": "6496:20:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "+=",
                    "rightHandSide": {
                      "id": 1552,
                      "name": "amount",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1548,
                      "src": "6520:6:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "6496:30:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 1554,
                  "nodeType": "ExpressionStatement",
                  "src": "6496:30:1"
                },
                {
                  "eventCall": {
                    "arguments": [
                      {
                        "id": 1556,
                        "name": "amount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1548,
                        "src": "6551:6:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 1555,
                      "name": "MoneyInvested",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1150,
                      "src": "6537:13:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256)"
                      }
                    },
                    "id": 1557,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6537:21:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1558,
                  "nodeType": "EmitStatement",
                  "src": "6532:26:1"
                }
              ]
            },
            "id": 1560,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_invest",
            "nameLocation": "6449:7:1",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1549,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1548,
                  "mutability": "mutable",
                  "name": "amount",
                  "nameLocation": "6465:6:1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1560,
                  "src": "6457:14:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1547,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6457:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "6456:16:1"
            },
            "returnParameters": {
              "id": 1550,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "6490:0:1"
            },
            "scope": 1990,
            "src": "6440:180:1",
            "stateMutability": "nonpayable",
            "virtual": true,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1577,
              "nodeType": "Block",
              "src": "6676:164:1",
              "statements": [
                {
                  "expression": {
                    "id": 1571,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "id": 1565,
                      "name": "_lastInvestmentValue",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1146,
                      "src": "6682:20:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "-=",
                    "rightHandSide": {
                      "arguments": [
                        {
                          "id": 1568,
                          "name": "_lastInvestmentValue",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1146,
                          "src": "6715:20:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        {
                          "id": 1569,
                          "name": "amount",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1562,
                          "src": "6737:6:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "id": 1566,
                          "name": "Math",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 16794,
                          "src": "6706:4:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_contract$_Math_$16794_$",
                            "typeString": "type(library Math)"
                          }
                        },
                        "id": 1567,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "min",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 16745,
                        "src": "6706:8:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                        }
                      },
                      "id": 1570,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "6706:38:1",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "6682:62:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 1572,
                  "nodeType": "ExpressionStatement",
                  "src": "6682:62:1"
                },
                {
                  "eventCall": {
                    "arguments": [
                      {
                        "id": 1574,
                        "name": "amount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1562,
                        "src": "6771:6:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 1573,
                      "name": "MoneyDeinvested",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1154,
                      "src": "6755:15:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256)"
                      }
                    },
                    "id": 1575,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6755:23:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1576,
                  "nodeType": "EmitStatement",
                  "src": "6750:28:1"
                }
              ]
            },
            "id": 1578,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_deinvest",
            "nameLocation": "6633:9:1",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1563,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1562,
                  "mutability": "mutable",
                  "name": "amount",
                  "nameLocation": "6651:6:1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1578,
                  "src": "6643:14:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1561,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6643:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "6642:16:1"
            },
            "returnParameters": {
              "id": 1564,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "6676:0:1"
            },
            "scope": 1990,
            "src": "6624:216:1",
            "stateMutability": "nonpayable",
            "virtual": true,
            "visibility": "internal"
          },
          {
            "baseFunctions": [
              16508
            ],
            "body": {
              "id": 1626,
              "nodeType": "Block",
              "src": "7066:334:1",
              "statements": [
                {
                  "assignments": [
                    1586
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1586,
                      "mutability": "mutable",
                      "name": "poolBalanceBefore",
                      "nameLocation": "7080:17:1",
                      "nodeType": "VariableDeclaration",
                      "scope": 1626,
                      "src": "7072:25:1",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 1585,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "7072:7:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1595,
                  "initialValue": {
                    "arguments": [
                      {
                        "arguments": [
                          {
                            "id": 1592,
                            "name": "_policyPool",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8754,
                            "src": "7129:11:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                              "typeString": "contract IPolicyPool"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                              "typeString": "contract IPolicyPool"
                            }
                          ],
                          "id": 1591,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "7121:7:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_address_$",
                            "typeString": "type(address)"
                          },
                          "typeName": {
                            "id": 1590,
                            "name": "address",
                            "nodeType": "ElementaryTypeName",
                            "src": "7121:7:1",
                            "typeDescriptions": {}
                          }
                        },
                        "id": 1593,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "7121:20:1",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "expression": {
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "id": 1587,
                          "name": "currency",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 8919,
                          "src": "7100:8:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_IERC20Metadata_$16271_$",
                            "typeString": "function () view returns (contract IERC20Metadata)"
                          }
                        },
                        "id": 1588,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "7100:10:1",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20Metadata_$16271",
                          "typeString": "contract IERC20Metadata"
                        }
                      },
                      "id": 1589,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "balanceOf",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 16645,
                      "src": "7100:20:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                        "typeString": "function (address) view external returns (uint256)"
                      }
                    },
                    "id": 1594,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7100:42:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7072:70:1"
                },
                {
                  "expression": {
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 1596,
                      "name": "_liquidateAll",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1630,
                      "src": "7148:13:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
                        "typeString": "function ()"
                      }
                    },
                    "id": 1597,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7148:15:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1598,
                  "nodeType": "ExpressionStatement",
                  "src": "7148:15:1"
                },
                {
                  "assignments": [
                    1600
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1600,
                      "mutability": "mutable",
                      "name": "poolBalanceAfter",
                      "nameLocation": "7177:16:1",
                      "nodeType": "VariableDeclaration",
                      "scope": 1626,
                      "src": "7169:24:1",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 1599,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "7169:7:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1609,
                  "initialValue": {
                    "arguments": [
                      {
                        "arguments": [
                          {
                            "id": 1606,
                            "name": "_policyPool",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8754,
                            "src": "7225:11:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                              "typeString": "contract IPolicyPool"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                              "typeString": "contract IPolicyPool"
                            }
                          ],
                          "id": 1605,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "7217:7:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_address_$",
                            "typeString": "type(address)"
                          },
                          "typeName": {
                            "id": 1604,
                            "name": "address",
                            "nodeType": "ElementaryTypeName",
                            "src": "7217:7:1",
                            "typeDescriptions": {}
                          }
                        },
                        "id": 1607,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "7217:20:1",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "expression": {
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "id": 1601,
                          "name": "currency",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 8919,
                          "src": "7196:8:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_IERC20Metadata_$16271_$",
                            "typeString": "function () view returns (contract IERC20Metadata)"
                          }
                        },
                        "id": 1602,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "7196:10:1",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IERC20Metadata_$16271",
                          "typeString": "contract IERC20Metadata"
                        }
                      },
                      "id": 1603,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "balanceOf",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 16645,
                      "src": "7196:20:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                        "typeString": "function (address) view external returns (uint256)"
                      }
                    },
                    "id": 1608,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7196:42:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7169:69:1"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 1613,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 1611,
                          "name": "poolBalanceAfter",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1600,
                          "src": "7264:16:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "-",
                        "rightExpression": {
                          "id": 1612,
                          "name": "poolBalanceBefore",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1586,
                          "src": "7283:17:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "7264:36:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 1610,
                      "name": "_distributeEarnings",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1422,
                      "src": "7244:19:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256)"
                      }
                    },
                    "id": 1614,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7244:57:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1615,
                  "nodeType": "ExpressionStatement",
                  "src": "7244:57:1"
                },
                {
                  "expression": {
                    "id": 1618,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "id": 1616,
                      "name": "_lastInvestmentValue",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1146,
                      "src": "7307:20:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "hexValue": "30",
                      "id": 1617,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "7330:1:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "7307:24:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 1619,
                  "nodeType": "ExpressionStatement",
                  "src": "7307:24:1"
                },
                {
                  "eventCall": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 1623,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 1621,
                          "name": "poolBalanceAfter",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1600,
                          "src": "7358:16:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "-",
                        "rightExpression": {
                          "id": 1622,
                          "name": "poolBalanceBefore",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1586,
                          "src": "7377:17:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "7358:36:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 1620,
                      "name": "MoneyDeinvested",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1154,
                      "src": "7342:15:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256)"
                      }
                    },
                    "id": 1624,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7342:53:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1625,
                  "nodeType": "EmitStatement",
                  "src": "7337:58:1"
                }
              ]
            },
            "documentation": {
              "id": 1579,
              "nodeType": "StructuredDocumentation",
              "src": "6844:155:1",
              "text": " @dev Deinvest all the assets and return the cash back to the PolicyPool.\n      Called from PolicyPool when new asset manager is assigned"
            },
            "functionSelector": "cec16f3f",
            "id": 1627,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "id": 1583,
                "kind": "modifierInvocation",
                "modifierName": {
                  "id": 1582,
                  "name": "onlyPolicyPool",
                  "nodeType": "IdentifierPath",
                  "referencedDeclaration": 8780,
                  "src": "7051:14:1"
                },
                "nodeType": "ModifierInvocation",
                "src": "7051:14:1"
              }
            ],
            "name": "deinvestAll",
            "nameLocation": "7011:11:1",
            "nodeType": "FunctionDefinition",
            "overrides": {
              "id": 1581,
              "nodeType": "OverrideSpecifier",
              "overrides": [],
              "src": "7042:8:1"
            },
            "parameters": {
              "id": 1580,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "7022:2:1"
            },
            "returnParameters": {
              "id": 1584,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "7066:0:1"
            },
            "scope": 1990,
            "src": "7002:398:1",
            "stateMutability": "nonpayable",
            "virtual": true,
            "visibility": "external"
          },
          {
            "id": 1630,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "_liquidateAll",
            "nameLocation": "7413:13:1",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1628,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "7426:2:1"
            },
            "returnParameters": {
              "id": 1629,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "7445:0:1"
            },
            "scope": 1990,
            "src": "7404:42:1",
            "stateMutability": "nonpayable",
            "virtual": true,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1637,
              "nodeType": "Block",
              "src": "7506:31:1",
              "statements": [
                {
                  "expression": {
                    "id": 1635,
                    "name": "_liquidityMin",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 1140,
                    "src": "7519:13:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 1634,
                  "id": 1636,
                  "nodeType": "Return",
                  "src": "7512:20:1"
                }
              ]
            },
            "functionSelector": "8d7ddd90",
            "id": 1638,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "liquidityMin",
            "nameLocation": "7459:12:1",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1631,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "7471:2:1"
            },
            "returnParameters": {
              "id": 1634,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1633,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1638,
                  "src": "7497:7:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1632,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7497:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "7496:9:1"
            },
            "scope": 1990,
            "src": "7450:87:1",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": {
              "id": 1645,
              "nodeType": "Block",
              "src": "7600:34:1",
              "statements": [
                {
                  "expression": {
                    "id": 1643,
                    "name": "_liquidityMiddle",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 1142,
                    "src": "7613:16:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 1642,
                  "id": 1644,
                  "nodeType": "Return",
                  "src": "7606:23:1"
                }
              ]
            },
            "functionSelector": "f9c4fd1b",
            "id": 1646,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "liquidityMiddle",
            "nameLocation": "7550:15:1",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1639,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "7565:2:1"
            },
            "returnParameters": {
              "id": 1642,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1641,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1646,
                  "src": "7591:7:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1640,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7591:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "7590:9:1"
            },
            "scope": 1990,
            "src": "7541:93:1",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": {
              "id": 1653,
              "nodeType": "Block",
              "src": "7694:31:1",
              "statements": [
                {
                  "expression": {
                    "id": 1651,
                    "name": "_liquidityMax",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 1144,
                    "src": "7707:13:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 1650,
                  "id": 1652,
                  "nodeType": "Return",
                  "src": "7700:20:1"
                }
              ]
            },
            "functionSelector": "3b6612c8",
            "id": 1654,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "liquidityMax",
            "nameLocation": "7647:12:1",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1647,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "7659:2:1"
            },
            "returnParameters": {
              "id": 1650,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1649,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1654,
                  "src": "7685:7:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1648,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7685:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "7684:9:1"
            },
            "scope": 1990,
            "src": "7638:87:1",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": {
              "id": 1694,
              "nodeType": "Block",
              "src": "7821:311:1",
              "statements": [
                {
                  "assignments": [
                    1664
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1664,
                      "mutability": "mutable",
                      "name": "tweak",
                      "nameLocation": "7832:5:1",
                      "nodeType": "VariableDeclaration",
                      "scope": 1694,
                      "src": "7827:10:1",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 1663,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "7827:4:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1669,
                  "initialValue": {
                    "id": 1668,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "UnaryOperation",
                    "operator": "!",
                    "prefix": true,
                    "src": "7840:25:1",
                    "subExpression": {
                      "arguments": [
                        {
                          "id": 1666,
                          "name": "LEVEL2_ROLE",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 8742,
                          "src": "7853:11:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        ],
                        "id": 1665,
                        "name": "hasPoolRole",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8936,
                        "src": "7841:11:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_bool_$",
                          "typeString": "function (bytes32) view returns (bool)"
                        }
                      },
                      "id": 1667,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "7841:24:1",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7827:38:1"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 1678,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 1672,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "UnaryOperation",
                          "operator": "!",
                          "prefix": true,
                          "src": "7886:6:1",
                          "subExpression": {
                            "id": 1671,
                            "name": "tweak",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1664,
                            "src": "7887:5:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "||",
                        "rightExpression": {
                          "arguments": [
                            {
                              "id": 1674,
                              "name": "_liquidityMin",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1140,
                              "src": "7908:13:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 1675,
                              "name": "newValue",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1656,
                              "src": "7923:8:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "hexValue": "33653236",
                              "id": 1676,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "7933:4:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_300000000000000000000000000_by_1",
                                "typeString": "int_const 300000000000000000000000000"
                              },
                              "value": "3e26"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_rational_300000000000000000000000000_by_1",
                                "typeString": "int_const 300000000000000000000000000"
                              }
                            ],
                            "id": 1673,
                            "name": "_isTweakRay",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8997,
                            "src": "7896:11:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (uint256,uint256,uint256) pure returns (bool)"
                            }
                          },
                          "id": 1677,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7896:42:1",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "7886:52:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "547765616b2065786365656465643a206c69717569646974794d696e20747765616b73206f6e6c7920757020746f20333025",
                        "id": 1679,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "7946:52:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_db4222ccb5171017759370372a8378b43eeb70248bd10b6ad8160422ff104d1d",
                          "typeString": "literal_string \"Tweak exceeded: liquidityMin tweaks only up to 30%\""
                        },
                        "value": "Tweak exceeded: liquidityMin tweaks only up to 30%"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_db4222ccb5171017759370372a8378b43eeb70248bd10b6ad8160422ff104d1d",
                          "typeString": "literal_string \"Tweak exceeded: liquidityMin tweaks only up to 30%\""
                        }
                      ],
                      "id": 1670,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "7871:7:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 1680,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7871:133:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1681,
                  "nodeType": "ExpressionStatement",
                  "src": "7871:133:1"
                },
                {
                  "expression": {
                    "id": 1684,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "id": 1682,
                      "name": "_liquidityMin",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1140,
                      "src": "8010:13:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "id": 1683,
                      "name": "newValue",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1656,
                      "src": "8026:8:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "8010:24:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 1685,
                  "nodeType": "ExpressionStatement",
                  "src": "8010:24:1"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "expression": {
                          "expression": {
                            "id": 1687,
                            "name": "IPolicyPoolConfig",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14792,
                            "src": "8058:17:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_contract$_IPolicyPoolConfig_$14792_$",
                              "typeString": "type(contract IPolicyPoolConfig)"
                            }
                          },
                          "id": 1688,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "GovernanceActions",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 14718,
                          "src": "8058:35:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_enum$_GovernanceActions_$14718_$",
                            "typeString": "type(enum IPolicyPoolConfig.GovernanceActions)"
                          }
                        },
                        "id": 1689,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "memberName": "setLiquidityMin",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 14708,
                        "src": "8058:51:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_GovernanceActions_$14718",
                          "typeString": "enum IPolicyPoolConfig.GovernanceActions"
                        }
                      },
                      {
                        "id": 1690,
                        "name": "newValue",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1656,
                        "src": "8111:8:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 1691,
                        "name": "tweak",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1664,
                        "src": "8121:5:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_enum$_GovernanceActions_$14718",
                          "typeString": "enum IPolicyPoolConfig.GovernanceActions"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 1686,
                      "name": "_parameterChanged",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9087,
                      "src": "8040:17:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_GovernanceActions_$14718_$_t_uint256_$_t_bool_$returns$__$",
                        "typeString": "function (enum IPolicyPoolConfig.GovernanceActions,uint256,bool)"
                      }
                    },
                    "id": 1692,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8040:87:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1693,
                  "nodeType": "ExpressionStatement",
                  "src": "8040:87:1"
                }
              ]
            },
            "functionSelector": "1a2afb1d",
            "id": 1695,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": [
                  {
                    "id": 1659,
                    "name": "LEVEL2_ROLE",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 8742,
                    "src": "7795:11:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  {
                    "id": 1660,
                    "name": "LEVEL3_ROLE",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 8747,
                    "src": "7808:11:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  }
                ],
                "id": 1661,
                "kind": "modifierInvocation",
                "modifierName": {
                  "id": 1658,
                  "name": "onlyPoolRole2",
                  "nodeType": "IdentifierPath",
                  "referencedDeclaration": 8826,
                  "src": "7781:13:1"
                },
                "nodeType": "ModifierInvocation",
                "src": "7781:39:1"
              }
            ],
            "name": "setLiquidityMin",
            "nameLocation": "7738:15:1",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1657,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1656,
                  "mutability": "mutable",
                  "name": "newValue",
                  "nameLocation": "7762:8:1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1695,
                  "src": "7754:16:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1655,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7754:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "7753:18:1"
            },
            "returnParameters": {
              "id": 1662,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "7821:0:1"
            },
            "scope": 1990,
            "src": "7729:403:1",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": {
              "id": 1735,
              "nodeType": "Block",
              "src": "8231:323:1",
              "statements": [
                {
                  "assignments": [
                    1705
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1705,
                      "mutability": "mutable",
                      "name": "tweak",
                      "nameLocation": "8242:5:1",
                      "nodeType": "VariableDeclaration",
                      "scope": 1735,
                      "src": "8237:10:1",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 1704,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "8237:4:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1710,
                  "initialValue": {
                    "id": 1709,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "UnaryOperation",
                    "operator": "!",
                    "prefix": true,
                    "src": "8250:25:1",
                    "subExpression": {
                      "arguments": [
                        {
                          "id": 1707,
                          "name": "LEVEL2_ROLE",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 8742,
                          "src": "8263:11:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        ],
                        "id": 1706,
                        "name": "hasPoolRole",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8936,
                        "src": "8251:11:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_bool_$",
                          "typeString": "function (bytes32) view returns (bool)"
                        }
                      },
                      "id": 1708,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "8251:24:1",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "8237:38:1"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 1719,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 1713,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "UnaryOperation",
                          "operator": "!",
                          "prefix": true,
                          "src": "8296:6:1",
                          "subExpression": {
                            "id": 1712,
                            "name": "tweak",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1705,
                            "src": "8297:5:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "||",
                        "rightExpression": {
                          "arguments": [
                            {
                              "id": 1715,
                              "name": "_liquidityMiddle",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1142,
                              "src": "8318:16:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 1716,
                              "name": "newValue",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1697,
                              "src": "8336:8:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "hexValue": "33653236",
                              "id": 1717,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "8346:4:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_300000000000000000000000000_by_1",
                                "typeString": "int_const 300000000000000000000000000"
                              },
                              "value": "3e26"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_rational_300000000000000000000000000_by_1",
                                "typeString": "int_const 300000000000000000000000000"
                              }
                            ],
                            "id": 1714,
                            "name": "_isTweakRay",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8997,
                            "src": "8306:11:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (uint256,uint256,uint256) pure returns (bool)"
                            }
                          },
                          "id": 1718,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8306:45:1",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "8296:55:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "547765616b2065786365656465643a206c69717569646974794d6964646c6520747765616b73206f6e6c7920757020746f20333025",
                        "id": 1720,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "8359:55:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_c49a395a2ad9057f3d03b3be0faef6ee08a9d994ba7d32078cc3a69827a6fbbf",
                          "typeString": "literal_string \"Tweak exceeded: liquidityMiddle tweaks only up to 30%\""
                        },
                        "value": "Tweak exceeded: liquidityMiddle tweaks only up to 30%"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_c49a395a2ad9057f3d03b3be0faef6ee08a9d994ba7d32078cc3a69827a6fbbf",
                          "typeString": "literal_string \"Tweak exceeded: liquidityMiddle tweaks only up to 30%\""
                        }
                      ],
                      "id": 1711,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "8281:7:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 1721,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8281:139:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1722,
                  "nodeType": "ExpressionStatement",
                  "src": "8281:139:1"
                },
                {
                  "expression": {
                    "id": 1725,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "id": 1723,
                      "name": "_liquidityMiddle",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1142,
                      "src": "8426:16:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "id": 1724,
                      "name": "newValue",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1697,
                      "src": "8445:8:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "8426:27:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 1726,
                  "nodeType": "ExpressionStatement",
                  "src": "8426:27:1"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "expression": {
                          "expression": {
                            "id": 1728,
                            "name": "IPolicyPoolConfig",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14792,
                            "src": "8477:17:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_contract$_IPolicyPoolConfig_$14792_$",
                              "typeString": "type(contract IPolicyPoolConfig)"
                            }
                          },
                          "id": 1729,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "GovernanceActions",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 14718,
                          "src": "8477:35:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_enum$_GovernanceActions_$14718_$",
                            "typeString": "type(enum IPolicyPoolConfig.GovernanceActions)"
                          }
                        },
                        "id": 1730,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "memberName": "setLiquidityMiddle",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 14709,
                        "src": "8477:54:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_GovernanceActions_$14718",
                          "typeString": "enum IPolicyPoolConfig.GovernanceActions"
                        }
                      },
                      {
                        "id": 1731,
                        "name": "newValue",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1697,
                        "src": "8533:8:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 1732,
                        "name": "tweak",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1705,
                        "src": "8543:5:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_enum$_GovernanceActions_$14718",
                          "typeString": "enum IPolicyPoolConfig.GovernanceActions"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 1727,
                      "name": "_parameterChanged",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9087,
                      "src": "8459:17:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_GovernanceActions_$14718_$_t_uint256_$_t_bool_$returns$__$",
                        "typeString": "function (enum IPolicyPoolConfig.GovernanceActions,uint256,bool)"
                      }
                    },
                    "id": 1733,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8459:90:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1734,
                  "nodeType": "ExpressionStatement",
                  "src": "8459:90:1"
                }
              ]
            },
            "functionSelector": "85a5a1ae",
            "id": 1736,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": [
                  {
                    "id": 1700,
                    "name": "LEVEL2_ROLE",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 8742,
                    "src": "8205:11:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  {
                    "id": 1701,
                    "name": "LEVEL3_ROLE",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 8747,
                    "src": "8218:11:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  }
                ],
                "id": 1702,
                "kind": "modifierInvocation",
                "modifierName": {
                  "id": 1699,
                  "name": "onlyPoolRole2",
                  "nodeType": "IdentifierPath",
                  "referencedDeclaration": 8826,
                  "src": "8191:13:1"
                },
                "nodeType": "ModifierInvocation",
                "src": "8191:39:1"
              }
            ],
            "name": "setLiquidityMiddle",
            "nameLocation": "8145:18:1",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1698,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1697,
                  "mutability": "mutable",
                  "name": "newValue",
                  "nameLocation": "8172:8:1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1736,
                  "src": "8164:16:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1696,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8164:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "8163:18:1"
            },
            "returnParameters": {
              "id": 1703,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "8231:0:1"
            },
            "scope": 1990,
            "src": "8136:418:1",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": {
              "id": 1776,
              "nodeType": "Block",
              "src": "8650:311:1",
              "statements": [
                {
                  "assignments": [
                    1746
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1746,
                      "mutability": "mutable",
                      "name": "tweak",
                      "nameLocation": "8661:5:1",
                      "nodeType": "VariableDeclaration",
                      "scope": 1776,
                      "src": "8656:10:1",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 1745,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "8656:4:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1751,
                  "initialValue": {
                    "id": 1750,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "UnaryOperation",
                    "operator": "!",
                    "prefix": true,
                    "src": "8669:25:1",
                    "subExpression": {
                      "arguments": [
                        {
                          "id": 1748,
                          "name": "LEVEL2_ROLE",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 8742,
                          "src": "8682:11:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        ],
                        "id": 1747,
                        "name": "hasPoolRole",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8936,
                        "src": "8670:11:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_bool_$",
                          "typeString": "function (bytes32) view returns (bool)"
                        }
                      },
                      "id": 1749,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "8670:24:1",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "8656:38:1"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 1760,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 1754,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "UnaryOperation",
                          "operator": "!",
                          "prefix": true,
                          "src": "8715:6:1",
                          "subExpression": {
                            "id": 1753,
                            "name": "tweak",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1746,
                            "src": "8716:5:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "||",
                        "rightExpression": {
                          "arguments": [
                            {
                              "id": 1756,
                              "name": "_liquidityMax",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1144,
                              "src": "8737:13:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 1757,
                              "name": "newValue",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1738,
                              "src": "8752:8:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "hexValue": "33653236",
                              "id": 1758,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "8762:4:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_300000000000000000000000000_by_1",
                                "typeString": "int_const 300000000000000000000000000"
                              },
                              "value": "3e26"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_rational_300000000000000000000000000_by_1",
                                "typeString": "int_const 300000000000000000000000000"
                              }
                            ],
                            "id": 1755,
                            "name": "_isTweakRay",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8997,
                            "src": "8725:11:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (uint256,uint256,uint256) pure returns (bool)"
                            }
                          },
                          "id": 1759,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "8725:42:1",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "8715:52:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "547765616b2065786365656465643a206c69717569646974794d617820747765616b73206f6e6c7920757020746f20333025",
                        "id": 1761,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "8775:52:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_f06709e8db64dc3b93e904893e29b04c06b4c199056c69704ab6e53512aa20e2",
                          "typeString": "literal_string \"Tweak exceeded: liquidityMax tweaks only up to 30%\""
                        },
                        "value": "Tweak exceeded: liquidityMax tweaks only up to 30%"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_f06709e8db64dc3b93e904893e29b04c06b4c199056c69704ab6e53512aa20e2",
                          "typeString": "literal_string \"Tweak exceeded: liquidityMax tweaks only up to 30%\""
                        }
                      ],
                      "id": 1752,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "8700:7:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 1762,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8700:133:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1763,
                  "nodeType": "ExpressionStatement",
                  "src": "8700:133:1"
                },
                {
                  "expression": {
                    "id": 1766,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "id": 1764,
                      "name": "_liquidityMax",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1144,
                      "src": "8839:13:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "id": 1765,
                      "name": "newValue",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1738,
                      "src": "8855:8:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "8839:24:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 1767,
                  "nodeType": "ExpressionStatement",
                  "src": "8839:24:1"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "expression": {
                          "expression": {
                            "id": 1769,
                            "name": "IPolicyPoolConfig",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14792,
                            "src": "8887:17:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_contract$_IPolicyPoolConfig_$14792_$",
                              "typeString": "type(contract IPolicyPoolConfig)"
                            }
                          },
                          "id": 1770,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "GovernanceActions",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 14718,
                          "src": "8887:35:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_enum$_GovernanceActions_$14718_$",
                            "typeString": "type(enum IPolicyPoolConfig.GovernanceActions)"
                          }
                        },
                        "id": 1771,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "memberName": "setLiquidityMax",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 14710,
                        "src": "8887:51:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_GovernanceActions_$14718",
                          "typeString": "enum IPolicyPoolConfig.GovernanceActions"
                        }
                      },
                      {
                        "id": 1772,
                        "name": "newValue",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1738,
                        "src": "8940:8:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 1773,
                        "name": "tweak",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1746,
                        "src": "8950:5:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_enum$_GovernanceActions_$14718",
                          "typeString": "enum IPolicyPoolConfig.GovernanceActions"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 1768,
                      "name": "_parameterChanged",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9087,
                      "src": "8869:17:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_GovernanceActions_$14718_$_t_uint256_$_t_bool_$returns$__$",
                        "typeString": "function (enum IPolicyPoolConfig.GovernanceActions,uint256,bool)"
                      }
                    },
                    "id": 1774,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8869:87:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1775,
                  "nodeType": "ExpressionStatement",
                  "src": "8869:87:1"
                }
              ]
            },
            "functionSelector": "5a89c5ac",
            "id": 1777,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": [
                  {
                    "id": 1741,
                    "name": "LEVEL2_ROLE",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 8742,
                    "src": "8624:11:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  {
                    "id": 1742,
                    "name": "LEVEL3_ROLE",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 8747,
                    "src": "8637:11:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  }
                ],
                "id": 1743,
                "kind": "modifierInvocation",
                "modifierName": {
                  "id": 1740,
                  "name": "onlyPoolRole2",
                  "nodeType": "IdentifierPath",
                  "referencedDeclaration": 8826,
                  "src": "8610:13:1"
                },
                "nodeType": "ModifierInvocation",
                "src": "8610:39:1"
              }
            ],
            "name": "setLiquidityMax",
            "nameLocation": "8567:15:1",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1739,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1738,
                  "mutability": "mutable",
                  "name": "newValue",
                  "nameLocation": "8591:8:1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1777,
                  "src": "8583:16:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1737,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8583:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "8582:18:1"
            },
            "returnParameters": {
              "id": 1744,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "8650:0:1"
            },
            "scope": 1990,
            "src": "8558:403:1",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": {
              "id": 1914,
              "nodeType": "Block",
              "src": "9102:1150:1",
              "statements": [
                {
                  "assignments": [
                    1791
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1791,
                      "mutability": "mutable",
                      "name": "setMin",
                      "nameLocation": "9113:6:1",
                      "nodeType": "VariableDeclaration",
                      "scope": 1914,
                      "src": "9108:11:1",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 1790,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "9108:4:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1799,
                  "initialValue": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1798,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 1792,
                      "name": "min",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1779,
                      "src": "9122:3:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "expression": {
                        "arguments": [
                          {
                            "id": 1795,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "9134:7:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_uint256_$",
                              "typeString": "type(uint256)"
                            },
                            "typeName": {
                              "id": 1794,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "9134:7:1",
                              "typeDescriptions": {}
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_type$_t_uint256_$",
                              "typeString": "type(uint256)"
                            }
                          ],
                          "id": 1793,
                          "name": "type",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": -27,
                          "src": "9129:4:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                            "typeString": "function () pure"
                          }
                        },
                        "id": 1796,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "9129:13:1",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_magic_meta_type_t_uint256",
                          "typeString": "type(uint256)"
                        }
                      },
                      "id": 1797,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "max",
                      "nodeType": "MemberAccess",
                      "src": "9129:17:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "9122:24:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "9108:38:1"
                },
                {
                  "assignments": [
                    1801
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1801,
                      "mutability": "mutable",
                      "name": "setMiddle",
                      "nameLocation": "9157:9:1",
                      "nodeType": "VariableDeclaration",
                      "scope": 1914,
                      "src": "9152:14:1",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 1800,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "9152:4:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1809,
                  "initialValue": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1808,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 1802,
                      "name": "middle",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1781,
                      "src": "9169:6:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "expression": {
                        "arguments": [
                          {
                            "id": 1805,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "9184:7:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_uint256_$",
                              "typeString": "type(uint256)"
                            },
                            "typeName": {
                              "id": 1804,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "9184:7:1",
                              "typeDescriptions": {}
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_type$_t_uint256_$",
                              "typeString": "type(uint256)"
                            }
                          ],
                          "id": 1803,
                          "name": "type",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": -27,
                          "src": "9179:4:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                            "typeString": "function () pure"
                          }
                        },
                        "id": 1806,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "9179:13:1",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_magic_meta_type_t_uint256",
                          "typeString": "type(uint256)"
                        }
                      },
                      "id": 1807,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "max",
                      "nodeType": "MemberAccess",
                      "src": "9179:17:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "9169:27:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "9152:44:1"
                },
                {
                  "assignments": [
                    1811
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1811,
                      "mutability": "mutable",
                      "name": "setMax",
                      "nameLocation": "9207:6:1",
                      "nodeType": "VariableDeclaration",
                      "scope": 1914,
                      "src": "9202:11:1",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 1810,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "9202:4:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1819,
                  "initialValue": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1818,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 1812,
                      "name": "max",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1783,
                      "src": "9216:3:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "expression": {
                        "arguments": [
                          {
                            "id": 1815,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "9228:7:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_uint256_$",
                              "typeString": "type(uint256)"
                            },
                            "typeName": {
                              "id": 1814,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "9228:7:1",
                              "typeDescriptions": {}
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_type$_t_uint256_$",
                              "typeString": "type(uint256)"
                            }
                          ],
                          "id": 1813,
                          "name": "type",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": -27,
                          "src": "9223:4:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                            "typeString": "function () pure"
                          }
                        },
                        "id": 1816,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "9223:13:1",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_magic_meta_type_t_uint256",
                          "typeString": "type(uint256)"
                        }
                      },
                      "id": 1817,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "max",
                      "nodeType": "MemberAccess",
                      "src": "9223:17:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "9216:24:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "9202:38:1"
                },
                {
                  "assignments": [
                    1821
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1821,
                      "mutability": "mutable",
                      "name": "tweak",
                      "nameLocation": "9251:5:1",
                      "nodeType": "VariableDeclaration",
                      "scope": 1914,
                      "src": "9246:10:1",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 1820,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "9246:4:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1826,
                  "initialValue": {
                    "id": 1825,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "UnaryOperation",
                    "operator": "!",
                    "prefix": true,
                    "src": "9259:25:1",
                    "subExpression": {
                      "arguments": [
                        {
                          "id": 1823,
                          "name": "LEVEL2_ROLE",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 8742,
                          "src": "9272:11:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        ],
                        "id": 1822,
                        "name": "hasPoolRole",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8936,
                        "src": "9260:11:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_bool_$",
                          "typeString": "function (bytes32) view returns (bool)"
                        }
                      },
                      "id": 1824,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "9260:24:1",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "9246:38:1"
                },
                {
                  "condition": {
                    "id": 1827,
                    "name": "setMin",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 1791,
                    "src": "9345:6:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 1845,
                  "nodeType": "IfStatement",
                  "src": "9341:188:1",
                  "trueBody": {
                    "id": 1844,
                    "nodeType": "Block",
                    "src": "9353:176:1",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "id": 1836,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 1830,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "UnaryOperation",
                                "operator": "!",
                                "prefix": true,
                                "src": "9378:6:1",
                                "subExpression": {
                                  "id": 1829,
                                  "name": "tweak",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1821,
                                  "src": "9379:5:1",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                },
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "||",
                              "rightExpression": {
                                "arguments": [
                                  {
                                    "id": 1832,
                                    "name": "_liquidityMin",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1140,
                                    "src": "9400:13:1",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "id": 1833,
                                    "name": "min",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1779,
                                    "src": "9415:3:1",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "hexValue": "33653236",
                                    "id": 1834,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "9420:4:1",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_300000000000000000000000000_by_1",
                                      "typeString": "int_const 300000000000000000000000000"
                                    },
                                    "value": "3e26"
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_rational_300000000000000000000000000_by_1",
                                      "typeString": "int_const 300000000000000000000000000"
                                    }
                                  ],
                                  "id": 1831,
                                  "name": "_isTweakRay",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8997,
                                  "src": "9388:11:1",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_bool_$",
                                    "typeString": "function (uint256,uint256,uint256) pure returns (bool)"
                                  }
                                },
                                "id": 1835,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "9388:37:1",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "src": "9378:47:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "hexValue": "547765616b2065786365656465643a206c69717569646974794d696e20747765616b73206f6e6c7920757020746f20333025",
                              "id": 1837,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "string",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "9435:52:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_stringliteral_db4222ccb5171017759370372a8378b43eeb70248bd10b6ad8160422ff104d1d",
                                "typeString": "literal_string \"Tweak exceeded: liquidityMin tweaks only up to 30%\""
                              },
                              "value": "Tweak exceeded: liquidityMin tweaks only up to 30%"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_stringliteral_db4222ccb5171017759370372a8378b43eeb70248bd10b6ad8160422ff104d1d",
                                "typeString": "literal_string \"Tweak exceeded: liquidityMin tweaks only up to 30%\""
                              }
                            ],
                            "id": 1828,
                            "name": "require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              -18,
                              -18
                            ],
                            "referencedDeclaration": -18,
                            "src": "9361:7:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                              "typeString": "function (bool,string memory) pure"
                            }
                          },
                          "id": 1838,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9361:134:1",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1839,
                        "nodeType": "ExpressionStatement",
                        "src": "9361:134:1"
                      },
                      {
                        "expression": {
                          "id": 1842,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 1840,
                            "name": "_liquidityMin",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1140,
                            "src": "9503:13:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 1841,
                            "name": "min",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1779,
                            "src": "9519:3:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "9503:19:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 1843,
                        "nodeType": "ExpressionStatement",
                        "src": "9503:19:1"
                      }
                    ]
                  }
                },
                {
                  "condition": {
                    "id": 1846,
                    "name": "setMiddle",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 1801,
                    "src": "9538:9:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 1864,
                  "nodeType": "IfStatement",
                  "src": "9534:206:1",
                  "trueBody": {
                    "id": 1863,
                    "nodeType": "Block",
                    "src": "9549:191:1",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "id": 1855,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 1849,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "UnaryOperation",
                                "operator": "!",
                                "prefix": true,
                                "src": "9574:6:1",
                                "subExpression": {
                                  "id": 1848,
                                  "name": "tweak",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1821,
                                  "src": "9575:5:1",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                },
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "||",
                              "rightExpression": {
                                "arguments": [
                                  {
                                    "id": 1851,
                                    "name": "_liquidityMiddle",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1142,
                                    "src": "9596:16:1",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "id": 1852,
                                    "name": "middle",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1781,
                                    "src": "9614:6:1",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "hexValue": "33653236",
                                    "id": 1853,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "9622:4:1",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_300000000000000000000000000_by_1",
                                      "typeString": "int_const 300000000000000000000000000"
                                    },
                                    "value": "3e26"
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_rational_300000000000000000000000000_by_1",
                                      "typeString": "int_const 300000000000000000000000000"
                                    }
                                  ],
                                  "id": 1850,
                                  "name": "_isTweakRay",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8997,
                                  "src": "9584:11:1",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_bool_$",
                                    "typeString": "function (uint256,uint256,uint256) pure returns (bool)"
                                  }
                                },
                                "id": 1854,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "9584:43:1",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "src": "9574:53:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "hexValue": "547765616b2065786365656465643a206c69717569646974794d6964646c6520747765616b73206f6e6c7920757020746f20333025",
                              "id": 1856,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "string",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "9637:55:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_stringliteral_c49a395a2ad9057f3d03b3be0faef6ee08a9d994ba7d32078cc3a69827a6fbbf",
                                "typeString": "literal_string \"Tweak exceeded: liquidityMiddle tweaks only up to 30%\""
                              },
                              "value": "Tweak exceeded: liquidityMiddle tweaks only up to 30%"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_stringliteral_c49a395a2ad9057f3d03b3be0faef6ee08a9d994ba7d32078cc3a69827a6fbbf",
                                "typeString": "literal_string \"Tweak exceeded: liquidityMiddle tweaks only up to 30%\""
                              }
                            ],
                            "id": 1847,
                            "name": "require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              -18,
                              -18
                            ],
                            "referencedDeclaration": -18,
                            "src": "9557:7:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                              "typeString": "function (bool,string memory) pure"
                            }
                          },
                          "id": 1857,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9557:143:1",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1858,
                        "nodeType": "ExpressionStatement",
                        "src": "9557:143:1"
                      },
                      {
                        "expression": {
                          "id": 1861,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 1859,
                            "name": "_liquidityMiddle",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1142,
                            "src": "9708:16:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 1860,
                            "name": "middle",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1781,
                            "src": "9727:6:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "9708:25:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 1862,
                        "nodeType": "ExpressionStatement",
                        "src": "9708:25:1"
                      }
                    ]
                  }
                },
                {
                  "condition": {
                    "id": 1865,
                    "name": "setMax",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 1811,
                    "src": "9749:6:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 1883,
                  "nodeType": "IfStatement",
                  "src": "9745:188:1",
                  "trueBody": {
                    "id": 1882,
                    "nodeType": "Block",
                    "src": "9757:176:1",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "id": 1874,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "id": 1868,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "UnaryOperation",
                                "operator": "!",
                                "prefix": true,
                                "src": "9782:6:1",
                                "subExpression": {
                                  "id": 1867,
                                  "name": "tweak",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1821,
                                  "src": "9783:5:1",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                },
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "||",
                              "rightExpression": {
                                "arguments": [
                                  {
                                    "id": 1870,
                                    "name": "_liquidityMax",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1144,
                                    "src": "9804:13:1",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "id": 1871,
                                    "name": "max",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1783,
                                    "src": "9819:3:1",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "hexValue": "33653236",
                                    "id": 1872,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "9824:4:1",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_300000000000000000000000000_by_1",
                                      "typeString": "int_const 300000000000000000000000000"
                                    },
                                    "value": "3e26"
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_rational_300000000000000000000000000_by_1",
                                      "typeString": "int_const 300000000000000000000000000"
                                    }
                                  ],
                                  "id": 1869,
                                  "name": "_isTweakRay",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8997,
                                  "src": "9792:11:1",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_bool_$",
                                    "typeString": "function (uint256,uint256,uint256) pure returns (bool)"
                                  }
                                },
                                "id": 1873,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "9792:37:1",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "src": "9782:47:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "hexValue": "547765616b2065786365656465643a206c69717569646974794d617820747765616b73206f6e6c7920757020746f20333025",
                              "id": 1875,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "string",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "9839:52:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_stringliteral_f06709e8db64dc3b93e904893e29b04c06b4c199056c69704ab6e53512aa20e2",
                                "typeString": "literal_string \"Tweak exceeded: liquidityMax tweaks only up to 30%\""
                              },
                              "value": "Tweak exceeded: liquidityMax tweaks only up to 30%"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_stringliteral_f06709e8db64dc3b93e904893e29b04c06b4c199056c69704ab6e53512aa20e2",
                                "typeString": "literal_string \"Tweak exceeded: liquidityMax tweaks only up to 30%\""
                              }
                            ],
                            "id": 1866,
                            "name": "require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              -18,
                              -18
                            ],
                            "referencedDeclaration": -18,
                            "src": "9765:7:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                              "typeString": "function (bool,string memory) pure"
                            }
                          },
                          "id": 1876,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9765:134:1",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1877,
                        "nodeType": "ExpressionStatement",
                        "src": "9765:134:1"
                      },
                      {
                        "expression": {
                          "id": 1880,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 1878,
                            "name": "_liquidityMax",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1144,
                            "src": "9907:13:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 1879,
                            "name": "max",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1783,
                            "src": "9923:3:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "9907:19:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 1881,
                        "nodeType": "ExpressionStatement",
                        "src": "9907:19:1"
                      }
                    ]
                  }
                },
                {
                  "condition": {
                    "id": 1884,
                    "name": "setMin",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 1791,
                    "src": "9942:6:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 1893,
                  "nodeType": "IfStatement",
                  "src": "9938:94:1",
                  "trueBody": {
                    "expression": {
                      "arguments": [
                        {
                          "expression": {
                            "expression": {
                              "id": 1886,
                              "name": "IPolicyPoolConfig",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14792,
                              "src": "9968:17:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_IPolicyPoolConfig_$14792_$",
                                "typeString": "type(contract IPolicyPoolConfig)"
                              }
                            },
                            "id": 1887,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "GovernanceActions",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 14718,
                            "src": "9968:35:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_enum$_GovernanceActions_$14718_$",
                              "typeString": "type(enum IPolicyPoolConfig.GovernanceActions)"
                            }
                          },
                          "id": 1888,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "memberName": "setLiquidityMin",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 14708,
                          "src": "9968:51:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_GovernanceActions_$14718",
                            "typeString": "enum IPolicyPoolConfig.GovernanceActions"
                          }
                        },
                        {
                          "id": 1889,
                          "name": "min",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1779,
                          "src": "10021:3:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        {
                          "id": 1890,
                          "name": "tweak",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1821,
                          "src": "10026:5:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_enum$_GovernanceActions_$14718",
                            "typeString": "enum IPolicyPoolConfig.GovernanceActions"
                          },
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        ],
                        "id": 1885,
                        "name": "_parameterChanged",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9087,
                        "src": "9950:17:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_GovernanceActions_$14718_$_t_uint256_$_t_bool_$returns$__$",
                          "typeString": "function (enum IPolicyPoolConfig.GovernanceActions,uint256,bool)"
                        }
                      },
                      "id": 1891,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "9950:82:1",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_tuple$__$",
                        "typeString": "tuple()"
                      }
                    },
                    "id": 1892,
                    "nodeType": "ExpressionStatement",
                    "src": "9950:82:1"
                  }
                },
                {
                  "condition": {
                    "id": 1894,
                    "name": "setMiddle",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 1801,
                    "src": "10042:9:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 1903,
                  "nodeType": "IfStatement",
                  "src": "10038:109:1",
                  "trueBody": {
                    "expression": {
                      "arguments": [
                        {
                          "expression": {
                            "expression": {
                              "id": 1896,
                              "name": "IPolicyPoolConfig",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14792,
                              "src": "10077:17:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_IPolicyPoolConfig_$14792_$",
                                "typeString": "type(contract IPolicyPoolConfig)"
                              }
                            },
                            "id": 1897,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "GovernanceActions",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 14718,
                            "src": "10077:35:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_enum$_GovernanceActions_$14718_$",
                              "typeString": "type(enum IPolicyPoolConfig.GovernanceActions)"
                            }
                          },
                          "id": 1898,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "memberName": "setLiquidityMiddle",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 14709,
                          "src": "10077:54:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_GovernanceActions_$14718",
                            "typeString": "enum IPolicyPoolConfig.GovernanceActions"
                          }
                        },
                        {
                          "id": 1899,
                          "name": "middle",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1781,
                          "src": "10133:6:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        {
                          "id": 1900,
                          "name": "tweak",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1821,
                          "src": "10141:5:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_enum$_GovernanceActions_$14718",
                            "typeString": "enum IPolicyPoolConfig.GovernanceActions"
                          },
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        ],
                        "id": 1895,
                        "name": "_parameterChanged",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9087,
                        "src": "10059:17:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_GovernanceActions_$14718_$_t_uint256_$_t_bool_$returns$__$",
                          "typeString": "function (enum IPolicyPoolConfig.GovernanceActions,uint256,bool)"
                        }
                      },
                      "id": 1901,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "10059:88:1",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_tuple$__$",
                        "typeString": "tuple()"
                      }
                    },
                    "id": 1902,
                    "nodeType": "ExpressionStatement",
                    "src": "10059:88:1"
                  }
                },
                {
                  "condition": {
                    "id": 1904,
                    "name": "setMax",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 1811,
                    "src": "10157:6:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 1913,
                  "nodeType": "IfStatement",
                  "src": "10153:94:1",
                  "trueBody": {
                    "expression": {
                      "arguments": [
                        {
                          "expression": {
                            "expression": {
                              "id": 1906,
                              "name": "IPolicyPoolConfig",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 14792,
                              "src": "10183:17:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_IPolicyPoolConfig_$14792_$",
                                "typeString": "type(contract IPolicyPoolConfig)"
                              }
                            },
                            "id": 1907,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "GovernanceActions",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 14718,
                            "src": "10183:35:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_enum$_GovernanceActions_$14718_$",
                              "typeString": "type(enum IPolicyPoolConfig.GovernanceActions)"
                            }
                          },
                          "id": 1908,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "memberName": "setLiquidityMax",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 14710,
                          "src": "10183:51:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_GovernanceActions_$14718",
                            "typeString": "enum IPolicyPoolConfig.GovernanceActions"
                          }
                        },
                        {
                          "id": 1909,
                          "name": "max",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1783,
                          "src": "10236:3:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        {
                          "id": 1910,
                          "name": "tweak",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1821,
                          "src": "10241:5:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_enum$_GovernanceActions_$14718",
                            "typeString": "enum IPolicyPoolConfig.GovernanceActions"
                          },
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        ],
                        "id": 1905,
                        "name": "_parameterChanged",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9087,
                        "src": "10165:17:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_GovernanceActions_$14718_$_t_uint256_$_t_bool_$returns$__$",
                          "typeString": "function (enum IPolicyPoolConfig.GovernanceActions,uint256,bool)"
                        }
                      },
                      "id": 1911,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "10165:82:1",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_tuple$__$",
                        "typeString": "tuple()"
                      }
                    },
                    "id": 1912,
                    "nodeType": "ExpressionStatement",
                    "src": "10165:82:1"
                  }
                }
              ]
            },
            "functionSelector": "548d49ee",
            "id": 1915,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": [
                  {
                    "id": 1786,
                    "name": "LEVEL2_ROLE",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 8742,
                    "src": "9076:11:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  {
                    "id": 1787,
                    "name": "LEVEL3_ROLE",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 8747,
                    "src": "9089:11:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  }
                ],
                "id": 1788,
                "kind": "modifierInvocation",
                "modifierName": {
                  "id": 1785,
                  "name": "onlyPoolRole2",
                  "nodeType": "IdentifierPath",
                  "referencedDeclaration": 8826,
                  "src": "9062:13:1"
                },
                "nodeType": "ModifierInvocation",
                "src": "9062:39:1"
              }
            ],
            "name": "setLiquidityMultiple",
            "nameLocation": "8974:20:1",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1784,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1779,
                  "mutability": "mutable",
                  "name": "min",
                  "nameLocation": "9008:3:1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1915,
                  "src": "9000:11:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1778,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "9000:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1781,
                  "mutability": "mutable",
                  "name": "middle",
                  "nameLocation": "9025:6:1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1915,
                  "src": "9017:14:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1780,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "9017:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1783,
                  "mutability": "mutable",
                  "name": "max",
                  "nameLocation": "9045:3:1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1915,
                  "src": "9037:11:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1782,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "9037:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "8994:58:1"
            },
            "returnParameters": {
              "id": 1789,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "9102:0:1"
            },
            "scope": 1990,
            "src": "8965:1287:1",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": {
              "id": 1951,
              "nodeType": "Block",
              "src": "10312:323:1",
              "statements": [
                {
                  "assignments": [
                    1921
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1921,
                      "mutability": "mutable",
                      "name": "tweak",
                      "nameLocation": "10323:5:1",
                      "nodeType": "VariableDeclaration",
                      "scope": 1951,
                      "src": "10318:10:1",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 1920,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "10318:4:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1926,
                  "initialValue": {
                    "id": 1925,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "UnaryOperation",
                    "operator": "!",
                    "prefix": true,
                    "src": "10331:25:1",
                    "subExpression": {
                      "arguments": [
                        {
                          "id": 1923,
                          "name": "LEVEL2_ROLE",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 8742,
                          "src": "10344:11:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        ],
                        "id": 1922,
                        "name": "hasPoolRole",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8936,
                        "src": "10332:11:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_bool_$",
                          "typeString": "function (bytes32) view returns (bool)"
                        }
                      },
                      "id": 1924,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "10332:24:1",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "10318:38:1"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 1935,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 1929,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "UnaryOperation",
                          "operator": "!",
                          "prefix": true,
                          "src": "10377:6:1",
                          "subExpression": {
                            "id": 1928,
                            "name": "tweak",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1921,
                            "src": "10378:5:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "||",
                        "rightExpression": {
                          "arguments": [
                            {
                              "id": 1931,
                              "name": "_liquidityMiddle",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1142,
                              "src": "10399:16:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 1932,
                              "name": "newValue",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1917,
                              "src": "10417:8:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "hexValue": "33653236",
                              "id": 1933,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "10427:4:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_300000000000000000000000000_by_1",
                                "typeString": "int_const 300000000000000000000000000"
                              },
                              "value": "3e26"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_rational_300000000000000000000000000_by_1",
                                "typeString": "int_const 300000000000000000000000000"
                              }
                            ],
                            "id": 1930,
                            "name": "_isTweakRay",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8997,
                            "src": "10387:11:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (uint256,uint256,uint256) pure returns (bool)"
                            }
                          },
                          "id": 1934,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "10387:45:1",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "10377:55:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "547765616b2065786365656465643a206c69717569646974794d6964646c6520747765616b73206f6e6c7920757020746f20333025",
                        "id": 1936,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "10440:55:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_c49a395a2ad9057f3d03b3be0faef6ee08a9d994ba7d32078cc3a69827a6fbbf",
                          "typeString": "literal_string \"Tweak exceeded: liquidityMiddle tweaks only up to 30%\""
                        },
                        "value": "Tweak exceeded: liquidityMiddle tweaks only up to 30%"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_c49a395a2ad9057f3d03b3be0faef6ee08a9d994ba7d32078cc3a69827a6fbbf",
                          "typeString": "literal_string \"Tweak exceeded: liquidityMiddle tweaks only up to 30%\""
                        }
                      ],
                      "id": 1927,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "10362:7:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 1937,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "10362:139:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1938,
                  "nodeType": "ExpressionStatement",
                  "src": "10362:139:1"
                },
                {
                  "expression": {
                    "id": 1941,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "id": 1939,
                      "name": "_liquidityMiddle",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1142,
                      "src": "10507:16:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "id": 1940,
                      "name": "newValue",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1917,
                      "src": "10526:8:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "10507:27:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 1942,
                  "nodeType": "ExpressionStatement",
                  "src": "10507:27:1"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "expression": {
                          "expression": {
                            "id": 1944,
                            "name": "IPolicyPoolConfig",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14792,
                            "src": "10558:17:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_contract$_IPolicyPoolConfig_$14792_$",
                              "typeString": "type(contract IPolicyPoolConfig)"
                            }
                          },
                          "id": 1945,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "GovernanceActions",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 14718,
                          "src": "10558:35:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_enum$_GovernanceActions_$14718_$",
                            "typeString": "type(enum IPolicyPoolConfig.GovernanceActions)"
                          }
                        },
                        "id": 1946,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "memberName": "setLiquidityMiddle",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 14709,
                        "src": "10558:54:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_GovernanceActions_$14718",
                          "typeString": "enum IPolicyPoolConfig.GovernanceActions"
                        }
                      },
                      {
                        "id": 1947,
                        "name": "newValue",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1917,
                        "src": "10614:8:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 1948,
                        "name": "tweak",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1921,
                        "src": "10624:5:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_enum$_GovernanceActions_$14718",
                          "typeString": "enum IPolicyPoolConfig.GovernanceActions"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 1943,
                      "name": "_parameterChanged",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9087,
                      "src": "10540:17:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_GovernanceActions_$14718_$_t_uint256_$_t_bool_$returns$__$",
                        "typeString": "function (enum IPolicyPoolConfig.GovernanceActions,uint256,bool)"
                      }
                    },
                    "id": 1949,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "10540:90:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1950,
                  "nodeType": "ExpressionStatement",
                  "src": "10540:90:1"
                }
              ]
            },
            "id": 1952,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_setLiquidityMiddle",
            "nameLocation": "10265:19:1",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1918,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1917,
                  "mutability": "mutable",
                  "name": "newValue",
                  "nameLocation": "10293:8:1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1952,
                  "src": "10285:16:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1916,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "10285:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "10284:18:1"
            },
            "returnParameters": {
              "id": 1919,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "10312:0:1"
            },
            "scope": 1990,
            "src": "10256:379:1",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1988,
              "nodeType": "Block",
              "src": "10692:311:1",
              "statements": [
                {
                  "assignments": [
                    1958
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1958,
                      "mutability": "mutable",
                      "name": "tweak",
                      "nameLocation": "10703:5:1",
                      "nodeType": "VariableDeclaration",
                      "scope": 1988,
                      "src": "10698:10:1",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 1957,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "10698:4:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1963,
                  "initialValue": {
                    "id": 1962,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "UnaryOperation",
                    "operator": "!",
                    "prefix": true,
                    "src": "10711:25:1",
                    "subExpression": {
                      "arguments": [
                        {
                          "id": 1960,
                          "name": "LEVEL2_ROLE",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 8742,
                          "src": "10724:11:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        ],
                        "id": 1959,
                        "name": "hasPoolRole",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8936,
                        "src": "10712:11:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_bool_$",
                          "typeString": "function (bytes32) view returns (bool)"
                        }
                      },
                      "id": 1961,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "10712:24:1",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "10698:38:1"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 1972,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 1966,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "UnaryOperation",
                          "operator": "!",
                          "prefix": true,
                          "src": "10757:6:1",
                          "subExpression": {
                            "id": 1965,
                            "name": "tweak",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1958,
                            "src": "10758:5:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "||",
                        "rightExpression": {
                          "arguments": [
                            {
                              "id": 1968,
                              "name": "_liquidityMax",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1144,
                              "src": "10779:13:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "id": 1969,
                              "name": "newValue",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1954,
                              "src": "10794:8:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "hexValue": "33653236",
                              "id": 1970,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "10804:4:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_300000000000000000000000000_by_1",
                                "typeString": "int_const 300000000000000000000000000"
                              },
                              "value": "3e26"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_rational_300000000000000000000000000_by_1",
                                "typeString": "int_const 300000000000000000000000000"
                              }
                            ],
                            "id": 1967,
                            "name": "_isTweakRay",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8997,
                            "src": "10767:11:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (uint256,uint256,uint256) pure returns (bool)"
                            }
                          },
                          "id": 1971,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "10767:42:1",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "10757:52:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "547765616b2065786365656465643a206c69717569646974794d617820747765616b73206f6e6c7920757020746f20333025",
                        "id": 1973,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "10817:52:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_f06709e8db64dc3b93e904893e29b04c06b4c199056c69704ab6e53512aa20e2",
                          "typeString": "literal_string \"Tweak exceeded: liquidityMax tweaks only up to 30%\""
                        },
                        "value": "Tweak exceeded: liquidityMax tweaks only up to 30%"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_f06709e8db64dc3b93e904893e29b04c06b4c199056c69704ab6e53512aa20e2",
                          "typeString": "literal_string \"Tweak exceeded: liquidityMax tweaks only up to 30%\""
                        }
                      ],
                      "id": 1964,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "10742:7:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 1974,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "10742:133:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1975,
                  "nodeType": "ExpressionStatement",
                  "src": "10742:133:1"
                },
                {
                  "expression": {
                    "id": 1978,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "id": 1976,
                      "name": "_liquidityMax",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1144,
                      "src": "10881:13:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "id": 1977,
                      "name": "newValue",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1954,
                      "src": "10897:8:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "10881:24:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 1979,
                  "nodeType": "ExpressionStatement",
                  "src": "10881:24:1"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "expression": {
                          "expression": {
                            "id": 1981,
                            "name": "IPolicyPoolConfig",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 14792,
                            "src": "10929:17:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_contract$_IPolicyPoolConfig_$14792_$",
                              "typeString": "type(contract IPolicyPoolConfig)"
                            }
                          },
                          "id": 1982,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "GovernanceActions",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 14718,
                          "src": "10929:35:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_enum$_GovernanceActions_$14718_$",
                            "typeString": "type(enum IPolicyPoolConfig.GovernanceActions)"
                          }
                        },
                        "id": 1983,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "memberName": "setLiquidityMax",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 14710,
                        "src": "10929:51:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_GovernanceActions_$14718",
                          "typeString": "enum IPolicyPoolConfig.GovernanceActions"
                        }
                      },
                      {
                        "id": 1984,
                        "name": "newValue",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1954,
                        "src": "10982:8:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 1985,
                        "name": "tweak",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1958,
                        "src": "10992:5:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_enum$_GovernanceActions_$14718",
                          "typeString": "enum IPolicyPoolConfig.GovernanceActions"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 1980,
                      "name": "_parameterChanged",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9087,
                      "src": "10911:17:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_GovernanceActions_$14718_$_t_uint256_$_t_bool_$returns$__$",
                        "typeString": "function (enum IPolicyPoolConfig.GovernanceActions,uint256,bool)"
                      }
                    },
                    "id": 1986,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "10911:87:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1987,
                  "nodeType": "ExpressionStatement",
                  "src": "10911:87:1"
                }
              ]
            },
            "id": 1989,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_setLiquidityMax",
            "nameLocation": "10648:16:1",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1955,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1954,
                  "mutability": "mutable",
                  "name": "newValue",
                  "nameLocation": "10673:8:1",
                  "nodeType": "VariableDeclaration",
                  "scope": 1989,
                  "src": "10665:16:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1953,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "10665:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "10664:18:1"
            },
            "returnParameters": {
              "id": 1956,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "10692:0:1"
            },
            "scope": 1990,
            "src": "10639:364:1",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          }
        ],
        "scope": 1991,
        "src": "1173:9832:1",
        "usedErrors": []
      }
    ],
    "src": "39:10967:1"
  },
  "bytecode": "",
  "bytecodeSha1": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
  "compiler": {
    "evm_version": "istanbul",
    "optimizer": {
      "enabled": true,
      "runs": 200
    },
    "version": "0.8.6+commit.11564f7e"
  },
  "contractName": "BaseAssetManager",
  "coverageMap": {
    "branches": {},
    "statements": {}
  },
  "dependencies": [
    "ContextUpgradeable",
    "ERC1967UpgradeUpgradeable",
    "IAssetManager",
    "IERC1822ProxiableUpgradeable",
    "IERC20Metadata",
    "IEToken",
    "IExchange",
    "IInsolvencyHook",
    "ILPWhitelist",
    "IPolicyPool",
    "IPolicyPoolComponent",
    "IPolicyPoolConfig",
    "IPriceOracle",
    "IRiskModule",
    "Initializable",
    "Math",
    "PausableUpgradeable",
    "PolicyPoolComponent",
    "UUPSUpgradeable",
    "WadRayMath"
  ],
  "deployedBytecode": "",
  "deployedSourceMap": "",
  "language": "Solidity",
  "natspec": {
    "author": "Ensuro",
    "custom:security-contact": "security@ensuro.co",
    "details": "Base class for asset managers that reinvest the assets of the protocol to get additional returns.      The specific asset management strategy needs to be implemented by child contracts.      Settings liquidityMin, liquidityMiddle, liquidityMax are the thresholds used to define how much liquidity      to keep in the PolicyPool and when to invest/deinvest. Every invest/deinvest operation tries to leave the      PolicyPool at liquidityMiddle.",
    "kind": "dev",
    "methods": {
      "checkpoint()": {
        "details": "Function to be called automatically by a crontask - Distributes and rebalances"
      },
      "constructor": {
        "custom:oz-upgrades-unsafe-allow": "constructor"
      },
      "deinvestAll()": {
        "details": "Deinvest all the assets and return the cash back to the PolicyPool.      Called from PolicyPool when new asset manager is assigned"
      },
      "distributeEarnings()": {
        "details": "Calculates asset earnings and distributes them updating accounting in PolicyPool and eTokens"
      },
      "getInvestmentValue()": {
        "details": "Returns the current value of the investment portfolio"
      },
      "paused()": {
        "details": "Returns true if the contract is paused, and false otherwise."
      },
      "proxiableUUID()": {
        "details": "Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate that the this implementation remains valid after an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier."
      },
      "rebalance()": {
        "details": "Rebalances cash between PolicyPool wallet and"
      },
      "refillWallet(uint256)": {
        "details": "This is called from PolicyPool when doesn't have enought money for payment.      After the call, there should be enought money in PolicyPool.currency().balanceOf(this) to      do the payment",
        "params": {
          "paymentAmount": "The amount of the payment"
        }
      },
      "totalInvestable()": {
        "details": "Returns the total amount that is available to invest by the asset manager"
      },
      "upgradeTo(address)": {
        "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event."
      },
      "upgradeToAndCall(address,bytes)": {
        "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event."
      }
    },
    "title": "Ensuro Asset Manager base contract",
    "version": 1
  },
  "offset": [
    1173,
    11005
  ],
  "opcodes": "",
  "pcMap": {},
  "sha1": "7e02f9ed560502efd4897e7ee601b125b5e3e556",
  "source": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\n\nimport {WadRayMath} from \"./WadRayMath.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {IPolicyPool} from \"../interfaces/IPolicyPool.sol\";\nimport {PolicyPoolComponent} from \"./PolicyPoolComponent.sol\";\nimport {IAssetManager} from \"../interfaces/IAssetManager.sol\";\nimport {IEToken} from \"../interfaces/IEToken.sol\";\nimport {IPolicyPoolConfig} from \"../interfaces/IPolicyPoolConfig.sol\";\nimport {Policy} from \"./Policy.sol\";\nimport {Math} from \"@openzeppelin/contracts/utils/math/Math.sol\";\n\n/**\n * @title Ensuro Asset Manager base contract\n * @dev Base class for asset managers that reinvest the assets of the protocol to get additional returns.\n *      The specific asset management strategy needs to be implemented by child contracts.\n *      Settings liquidityMin, liquidityMiddle, liquidityMax are the thresholds used to define how much liquidity\n *      to keep in the PolicyPool and when to invest/deinvest. Every invest/deinvest operation tries to leave the\n *      PolicyPool at liquidityMiddle.\n * @custom:security-contact security@ensuro.co\n * @author Ensuro\n */\nabstract contract BaseAssetManager is IAssetManager, PolicyPoolComponent {\n  using WadRayMath for uint256;\n\n  uint256 internal _liquidityMin;\n  uint256 internal _liquidityMiddle;\n  uint256 internal _liquidityMax;\n\n  uint256 internal _lastInvestmentValue;\n\n  event MoneyInvested(uint256 amount);\n  event MoneyDeinvested(uint256 amount);\n  event EarningsDistributed(bool positive, uint256 amount);\n\n  /// @custom:oz-upgrades-unsafe-allow constructor\n  // solhint-disable-next-line no-empty-blocks\n  constructor(IPolicyPool policyPool_) PolicyPoolComponent(policyPool_) {}\n\n  /**\n   * @dev Initializes the asset manager\n   * @param liquidityMin_ Minimal liquidity to keep in pool's wallet\n   * @param liquidityMiddle_ Target liquidity when doing rebalance\n   * @param liquidityMax_ Maximum liquidity to keep in pool's wallet\n   */\n  // solhint-disable-next-line func-name-mixedcase\n  function __BaseAssetManager_init(\n    uint256 liquidityMin_,\n    uint256 liquidityMiddle_,\n    uint256 liquidityMax_\n  ) internal initializer {\n    __PolicyPoolComponent_init();\n    __BaseAssetManager_init_unchained(liquidityMin_, liquidityMiddle_, liquidityMax_);\n  }\n\n  // solhint-disable-next-line func-name-mixedcase\n  function __BaseAssetManager_init_unchained(\n    uint256 liquidityMin_,\n    uint256 liquidityMiddle_,\n    uint256 liquidityMax_\n  ) internal initializer {\n    /*\n    _lastInvestmentValue = 0;\n    */\n    _liquidityMin = liquidityMin_;\n    _liquidityMiddle = liquidityMiddle_;\n    _liquidityMax = liquidityMax_;\n    _validateParameters();\n  }\n\n  function _validateParameters() internal view override {\n    require(\n      _liquidityMin <= _liquidityMiddle && _liquidityMiddle <= _liquidityMax,\n      \"Validation: Liquidity limits are invalid\"\n    );\n  }\n\n  /**\n   * @dev Returns the total amount that is available to invest by the asset manager\n   */\n  function totalInvestable() public view returns (uint256) {\n    uint256 poolInvestable = _policyPool.getInvestable();\n    uint256 etksInvestable = 0;\n    for (uint256 i = 0; i < _policyPool.getETokenCount(); i++) {\n      IEToken etk = _policyPool.getETokenAt(i);\n      etksInvestable += etk.getInvestable();\n    }\n    return poolInvestable + etksInvestable;\n  }\n\n  /**\n   * @dev Calculates asset earnings and distributes them updating accounting in PolicyPool and eTokens\n   */\n  function distributeEarnings() public virtual whenNotPaused {\n    // TODO Check: Anyone can call this funcion. This could be a potencial surface of flash loan attack?\n    _distributeEarnings(getInvestmentValue());\n  }\n\n  function _distributeEarnings(uint256 investmentValue) internal virtual whenNotPaused {\n    bool positive;\n    uint256 earnings;\n    if (investmentValue > _lastInvestmentValue) {\n      earnings = investmentValue - _lastInvestmentValue;\n      positive = true;\n    } else if (investmentValue < _lastInvestmentValue) {\n      earnings = _lastInvestmentValue - investmentValue;\n      positive = false;\n    } else {\n      return; // No earnings\n    }\n\n    uint256 totalInv = totalInvestable();\n\n    uint256 remaining = earnings;\n    for (uint256 i = 0; i < _policyPool.getETokenCount(); i++) {\n      IEToken etk = _policyPool.getETokenAt(i);\n      uint256 aux = earnings.wadMul(etk.getInvestable().wadDiv(totalInv));\n      if (aux > 0) {\n        etk.assetEarnings(aux, positive);\n        remaining -= aux;\n      }\n    }\n\n    if (remaining > 0) _policyPool.assetEarnings(remaining, positive);\n\n    _lastInvestmentValue = investmentValue;\n    emit EarningsDistributed(positive, earnings);\n  }\n\n  /**\n   * @dev Returns the current value of the investment portfolio\n   */\n  function getInvestmentValue() public view virtual returns (uint256);\n\n  /**\n   * @dev Rebalances cash between PolicyPool wallet and\n   */\n  function rebalance() public virtual whenNotPaused {\n    // TODO Check: Anyone can call this funcion. This could be a potencial surface of flash loan attack?\n    uint256 poolCash = currency().balanceOf(address(_policyPool));\n    if (poolCash > _liquidityMax) {\n      _invest(poolCash - _liquidityMiddle);\n    } else if (poolCash < _liquidityMin) {\n      uint256 deinvestAmount = Math.min(getInvestmentValue(), _liquidityMiddle - poolCash);\n      if (deinvestAmount > 0) {\n        _deinvest(deinvestAmount);\n      }\n    }\n  }\n\n  /**\n   * @dev Function to be called automatically by a crontask - Distributes and rebalances\n   */\n  function checkpoint() external {\n    distributeEarnings();\n    rebalance();\n  }\n\n  /**\n   * @dev This is called from PolicyPool when doesn't have enought money for payment.\n   *      After the call, there should be enought money in PolicyPool.currency().balanceOf(this) to\n   *      do the payment\n   * @param paymentAmount The amount of the payment\n   */\n  function refillWallet(uint256 paymentAmount) external override onlyPolicyPool {\n    uint256 poolCash = currency().balanceOf(address(_policyPool));\n    require(poolCash < paymentAmount, \"No need to refill the wallet for this payment\");\n    uint256 investmentValue = getInvestmentValue();\n    // try to leave the pool balance at liquidity_middle after the payment\n    uint256 deinvest = paymentAmount + _liquidityMiddle - poolCash;\n    if (deinvest > investmentValue) deinvest = investmentValue;\n    _deinvest(deinvest);\n  }\n\n  function _invest(uint256 amount) internal virtual {\n    _lastInvestmentValue += amount;\n    emit MoneyInvested(amount);\n    // must be reimplemented do the actual cash movement\n  }\n\n  function _deinvest(uint256 amount) internal virtual {\n    _lastInvestmentValue -= Math.min(_lastInvestmentValue, amount);\n    emit MoneyDeinvested(amount);\n    // must be reimplemented do the actual cash movement\n  }\n\n  /**\n   * @dev Deinvest all the assets and return the cash back to the PolicyPool.\n   *      Called from PolicyPool when new asset manager is assigned\n   */\n  function deinvestAll() external virtual override onlyPolicyPool {\n    uint256 poolBalanceBefore = currency().balanceOf(address(_policyPool));\n    _liquidateAll();\n    uint256 poolBalanceAfter = currency().balanceOf(address(_policyPool));\n    _distributeEarnings(poolBalanceAfter - poolBalanceBefore);\n    _lastInvestmentValue = 0;\n    emit MoneyDeinvested(poolBalanceAfter - poolBalanceBefore);\n  }\n\n  function _liquidateAll() internal virtual;\n\n  function liquidityMin() external view returns (uint256) {\n    return _liquidityMin;\n  }\n\n  function liquidityMiddle() external view returns (uint256) {\n    return _liquidityMiddle;\n  }\n\n  function liquidityMax() external view returns (uint256) {\n    return _liquidityMax;\n  }\n\n  function setLiquidityMin(uint256 newValue) external onlyPoolRole2(LEVEL2_ROLE, LEVEL3_ROLE) {\n    bool tweak = !hasPoolRole(LEVEL2_ROLE);\n    require(\n      !tweak || _isTweakRay(_liquidityMin, newValue, 3e26),\n      \"Tweak exceeded: liquidityMin tweaks only up to 30%\"\n    );\n    _liquidityMin = newValue;\n    _parameterChanged(IPolicyPoolConfig.GovernanceActions.setLiquidityMin, newValue, tweak);\n  }\n\n  function setLiquidityMiddle(uint256 newValue) external onlyPoolRole2(LEVEL2_ROLE, LEVEL3_ROLE) {\n    bool tweak = !hasPoolRole(LEVEL2_ROLE);\n    require(\n      !tweak || _isTweakRay(_liquidityMiddle, newValue, 3e26),\n      \"Tweak exceeded: liquidityMiddle tweaks only up to 30%\"\n    );\n    _liquidityMiddle = newValue;\n    _parameterChanged(IPolicyPoolConfig.GovernanceActions.setLiquidityMiddle, newValue, tweak);\n  }\n\n  function setLiquidityMax(uint256 newValue) external onlyPoolRole2(LEVEL2_ROLE, LEVEL3_ROLE) {\n    bool tweak = !hasPoolRole(LEVEL2_ROLE);\n    require(\n      !tweak || _isTweakRay(_liquidityMax, newValue, 3e26),\n      \"Tweak exceeded: liquidityMax tweaks only up to 30%\"\n    );\n    _liquidityMax = newValue;\n    _parameterChanged(IPolicyPoolConfig.GovernanceActions.setLiquidityMax, newValue, tweak);\n  }\n\n  function setLiquidityMultiple(\n    uint256 min,\n    uint256 middle,\n    uint256 max\n  ) external onlyPoolRole2(LEVEL2_ROLE, LEVEL3_ROLE) {\n    bool setMin = min != type(uint256).max;\n    bool setMiddle = middle != type(uint256).max;\n    bool setMax = max != type(uint256).max;\n    bool tweak = !hasPoolRole(LEVEL2_ROLE);\n    // First set all - Then call _parameterChanged\n    if (setMin) {\n      require(\n        !tweak || _isTweakRay(_liquidityMin, min, 3e26),\n        \"Tweak exceeded: liquidityMin tweaks only up to 30%\"\n      );\n      _liquidityMin = min;\n    }\n    if (setMiddle) {\n      require(\n        !tweak || _isTweakRay(_liquidityMiddle, middle, 3e26),\n        \"Tweak exceeded: liquidityMiddle tweaks only up to 30%\"\n      );\n      _liquidityMiddle = middle;\n    }\n    if (setMax) {\n      require(\n        !tweak || _isTweakRay(_liquidityMax, max, 3e26),\n        \"Tweak exceeded: liquidityMax tweaks only up to 30%\"\n      );\n      _liquidityMax = max;\n    }\n    if (setMin) _parameterChanged(IPolicyPoolConfig.GovernanceActions.setLiquidityMin, min, tweak);\n    if (setMiddle)\n      _parameterChanged(IPolicyPoolConfig.GovernanceActions.setLiquidityMiddle, middle, tweak);\n    if (setMax) _parameterChanged(IPolicyPoolConfig.GovernanceActions.setLiquidityMax, max, tweak);\n  }\n\n  function _setLiquidityMiddle(uint256 newValue) internal {\n    bool tweak = !hasPoolRole(LEVEL2_ROLE);\n    require(\n      !tweak || _isTweakRay(_liquidityMiddle, newValue, 3e26),\n      \"Tweak exceeded: liquidityMiddle tweaks only up to 30%\"\n    );\n    _liquidityMiddle = newValue;\n    _parameterChanged(IPolicyPoolConfig.GovernanceActions.setLiquidityMiddle, newValue, tweak);\n  }\n\n  function _setLiquidityMax(uint256 newValue) internal {\n    bool tweak = !hasPoolRole(LEVEL2_ROLE);\n    require(\n      !tweak || _isTweakRay(_liquidityMax, newValue, 3e26),\n      \"Tweak exceeded: liquidityMax tweaks only up to 30%\"\n    );\n    _liquidityMax = newValue;\n    _parameterChanged(IPolicyPoolConfig.GovernanceActions.setLiquidityMax, newValue, tweak);\n  }\n}\n",
  "sourceMap": "",
  "sourcePath": "contracts/BaseAssetManager.sol",
  "type": "contract"
}