{
  "abi": [],
  "allSourcePaths": {
    "14": "contracts/WadRayMath.sol"
  },
  "ast": {
    "absolutePath": "contracts/WadRayMath.sol",
    "exportedSymbols": {
      "WadRayMath": [
        11252
      ]
    },
    "id": 11253,
    "license": "Apache-2.0",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 10945,
        "literals": [
          "solidity",
          "^",
          "0.8",
          ".0"
        ],
        "nodeType": "PragmaDirective",
        "src": "39:23:14"
      },
      {
        "abstract": false,
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "library",
        "documentation": {
          "id": 10946,
          "nodeType": "StructuredDocumentation",
          "src": "64:242:14",
          "text": " @title WadRayMath library\n @author Aave / Ensuro\n @dev Provides mul and div function for wads (decimal numbers with 18 digits precision) and rays\n      (decimals with 27 digits)\n @custom:security-contact security@ensuro.co*"
        },
        "fullyImplemented": true,
        "id": 11252,
        "linearizedBaseContracts": [
          11252
        ],
        "name": "WadRayMath",
        "nameLocation": "316:10:14",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "constant": true,
            "id": 10949,
            "mutability": "constant",
            "name": "WAD",
            "nameLocation": "357:3:14",
            "nodeType": "VariableDeclaration",
            "scope": 11252,
            "src": "331:36:14",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 10947,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "331:7:14",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": {
              "hexValue": "31653138",
              "id": 10948,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "363:4:14",
              "typeDescriptions": {
                "typeIdentifier": "t_rational_1000000000000000000_by_1",
                "typeString": "int_const 1000000000000000000"
              },
              "value": "1e18"
            },
            "visibility": "internal"
          },
          {
            "constant": true,
            "id": 10954,
            "mutability": "constant",
            "name": "HALF_WAD",
            "nameLocation": "397:8:14",
            "nodeType": "VariableDeclaration",
            "scope": 11252,
            "src": "371:44:14",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 10950,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "371:7:14",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": {
              "commonType": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              },
              "id": 10953,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "lValueRequested": false,
              "leftExpression": {
                "id": 10951,
                "name": "WAD",
                "nodeType": "Identifier",
                "overloadedDeclarations": [],
                "referencedDeclaration": 10949,
                "src": "408:3:14",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                }
              },
              "nodeType": "BinaryOperation",
              "operator": "/",
              "rightExpression": {
                "hexValue": "32",
                "id": 10952,
                "isConstant": false,
                "isLValue": false,
                "isPure": true,
                "kind": "number",
                "lValueRequested": false,
                "nodeType": "Literal",
                "src": "414:1:14",
                "typeDescriptions": {
                  "typeIdentifier": "t_rational_2_by_1",
                  "typeString": "int_const 2"
                },
                "value": "2"
              },
              "src": "408:7:14",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "visibility": "internal"
          },
          {
            "constant": true,
            "id": 10957,
            "mutability": "constant",
            "name": "RAY",
            "nameLocation": "446:3:14",
            "nodeType": "VariableDeclaration",
            "scope": 11252,
            "src": "420:36:14",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 10955,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "420:7:14",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": {
              "hexValue": "31653237",
              "id": 10956,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "452:4:14",
              "typeDescriptions": {
                "typeIdentifier": "t_rational_1000000000000000000000000000_by_1",
                "typeString": "int_const 1000000000000000000000000000"
              },
              "value": "1e27"
            },
            "visibility": "internal"
          },
          {
            "constant": true,
            "id": 10962,
            "mutability": "constant",
            "name": "HALF_RAY",
            "nameLocation": "486:8:14",
            "nodeType": "VariableDeclaration",
            "scope": 11252,
            "src": "460:44:14",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 10958,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "460:7:14",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": {
              "commonType": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              },
              "id": 10961,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "lValueRequested": false,
              "leftExpression": {
                "id": 10959,
                "name": "RAY",
                "nodeType": "Identifier",
                "overloadedDeclarations": [],
                "referencedDeclaration": 10957,
                "src": "497:3:14",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                }
              },
              "nodeType": "BinaryOperation",
              "operator": "/",
              "rightExpression": {
                "hexValue": "32",
                "id": 10960,
                "isConstant": false,
                "isLValue": false,
                "isPure": true,
                "kind": "number",
                "lValueRequested": false,
                "nodeType": "Literal",
                "src": "503:1:14",
                "typeDescriptions": {
                  "typeIdentifier": "t_rational_2_by_1",
                  "typeString": "int_const 2"
                },
                "value": "2"
              },
              "src": "497:7:14",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "visibility": "internal"
          },
          {
            "constant": true,
            "id": 10965,
            "mutability": "constant",
            "name": "WAD_RAY_RATIO",
            "nameLocation": "535:13:14",
            "nodeType": "VariableDeclaration",
            "scope": 11252,
            "src": "509:45:14",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 10963,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "509:7:14",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": {
              "hexValue": "316539",
              "id": 10964,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "551:3:14",
              "typeDescriptions": {
                "typeIdentifier": "t_rational_1000000000_by_1",
                "typeString": "int_const 1000000000"
              },
              "value": "1e9"
            },
            "visibility": "internal"
          },
          {
            "body": {
              "id": 10973,
              "nodeType": "Block",
              "src": "646:21:14",
              "statements": [
                {
                  "expression": {
                    "id": 10971,
                    "name": "RAY",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 10957,
                    "src": "659:3:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 10970,
                  "id": 10972,
                  "nodeType": "Return",
                  "src": "652:10:14"
                }
              ]
            },
            "documentation": {
              "id": 10966,
              "nodeType": "StructuredDocumentation",
              "src": "559:37:14",
              "text": " @return One ray, 1e27*"
            },
            "id": 10974,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "ray",
            "nameLocation": "608:3:14",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 10967,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "611:2:14"
            },
            "returnParameters": {
              "id": 10970,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 10969,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 10974,
                  "src": "637:7:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 10968,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "637:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "636:9:14"
            },
            "scope": 11252,
            "src": "599:68:14",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 10982,
              "nodeType": "Block",
              "src": "759:21:14",
              "statements": [
                {
                  "expression": {
                    "id": 10980,
                    "name": "WAD",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 10949,
                    "src": "772:3:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 10979,
                  "id": 10981,
                  "nodeType": "Return",
                  "src": "765:10:14"
                }
              ]
            },
            "documentation": {
              "id": 10975,
              "nodeType": "StructuredDocumentation",
              "src": "671:37:14",
              "text": " @return One wad, 1e18*"
            },
            "id": 10983,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "wad",
            "nameLocation": "721:3:14",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 10976,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "724:2:14"
            },
            "returnParameters": {
              "id": 10979,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 10978,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 10983,
                  "src": "750:7:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 10977,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "750:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "749:9:14"
            },
            "scope": 11252,
            "src": "712:68:14",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 10991,
              "nodeType": "Block",
              "src": "878:26:14",
              "statements": [
                {
                  "expression": {
                    "id": 10989,
                    "name": "HALF_RAY",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 10962,
                    "src": "891:8:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 10988,
                  "id": 10990,
                  "nodeType": "Return",
                  "src": "884:15:14"
                }
              ]
            },
            "documentation": {
              "id": 10984,
              "nodeType": "StructuredDocumentation",
              "src": "784:40:14",
              "text": " @return Half ray, 1e27/2*"
            },
            "id": 10992,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "halfRay",
            "nameLocation": "836:7:14",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 10985,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "843:2:14"
            },
            "returnParameters": {
              "id": 10988,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 10987,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 10992,
                  "src": "869:7:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 10986,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "869:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "868:9:14"
            },
            "scope": 11252,
            "src": "827:77:14",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 11000,
              "nodeType": "Block",
              "src": "1002:26:14",
              "statements": [
                {
                  "expression": {
                    "id": 10998,
                    "name": "HALF_WAD",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 10954,
                    "src": "1015:8:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 10997,
                  "id": 10999,
                  "nodeType": "Return",
                  "src": "1008:15:14"
                }
              ]
            },
            "documentation": {
              "id": 10993,
              "nodeType": "StructuredDocumentation",
              "src": "908:40:14",
              "text": " @return Half ray, 1e18/2*"
            },
            "id": 11001,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "halfWad",
            "nameLocation": "960:7:14",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 10994,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "967:2:14"
            },
            "returnParameters": {
              "id": 10997,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 10996,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 11001,
                  "src": "993:7:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 10995,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "993:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "992:9:14"
            },
            "scope": 11252,
            "src": "951:77:14",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 11047,
              "nodeType": "Block",
              "src": "1256:188:14",
              "statements": [
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "id": 11017,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 11013,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 11011,
                        "name": "a",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 11004,
                        "src": "1266:1:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "==",
                      "rightExpression": {
                        "hexValue": "30",
                        "id": 11012,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1271:1:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_0_by_1",
                          "typeString": "int_const 0"
                        },
                        "value": "0"
                      },
                      "src": "1266:6:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "||",
                    "rightExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 11016,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 11014,
                        "name": "b",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 11006,
                        "src": "1276:1:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "==",
                      "rightExpression": {
                        "hexValue": "30",
                        "id": 11015,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1281:1:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_0_by_1",
                          "typeString": "int_const 0"
                        },
                        "value": "0"
                      },
                      "src": "1276:6:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "src": "1266:16:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 11021,
                  "nodeType": "IfStatement",
                  "src": "1262:45:14",
                  "trueBody": {
                    "id": 11020,
                    "nodeType": "Block",
                    "src": "1284:23:14",
                    "statements": [
                      {
                        "expression": {
                          "hexValue": "30",
                          "id": 11018,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "1299:1:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "functionReturnParameters": 11010,
                        "id": 11019,
                        "nodeType": "Return",
                        "src": "1292:8:14"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 11034,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 11023,
                          "name": "a",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 11004,
                          "src": "1321:1:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 11033,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "components": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 11030,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "expression": {
                                    "arguments": [
                                      {
                                        "id": 11026,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "lValueRequested": false,
                                        "nodeType": "ElementaryTypeNameExpression",
                                        "src": "1332:7:14",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_type$_t_uint256_$",
                                          "typeString": "type(uint256)"
                                        },
                                        "typeName": {
                                          "id": 11025,
                                          "name": "uint256",
                                          "nodeType": "ElementaryTypeName",
                                          "src": "1332:7:14",
                                          "typeDescriptions": {}
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_type$_t_uint256_$",
                                          "typeString": "type(uint256)"
                                        }
                                      ],
                                      "id": 11024,
                                      "name": "type",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": -27,
                                      "src": "1327:4:14",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                        "typeString": "function () pure"
                                      }
                                    },
                                    "id": 11027,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "1327:13:14",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_magic_meta_type_t_uint256",
                                      "typeString": "type(uint256)"
                                    }
                                  },
                                  "id": 11028,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "memberName": "max",
                                  "nodeType": "MemberAccess",
                                  "src": "1327:17:14",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "-",
                                "rightExpression": {
                                  "id": 11029,
                                  "name": "HALF_WAD",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 10954,
                                  "src": "1347:8:14",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "1327:28:14",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "id": 11031,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "1326:30:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "/",
                          "rightExpression": {
                            "id": 11032,
                            "name": "b",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 11006,
                            "src": "1359:1:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "1326:34:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "1321:39:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "7761644d756c3a204d617468204d756c7469706c69636174696f6e204f766572666c6f77",
                        "id": 11035,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1362:38:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_a93a247616238e87bb57dad19d42a36fea59be081d315fc1362abc23e7e23776",
                          "typeString": "literal_string \"wadMul: Math Multiplication Overflow\""
                        },
                        "value": "wadMul: Math Multiplication Overflow"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_a93a247616238e87bb57dad19d42a36fea59be081d315fc1362abc23e7e23776",
                          "typeString": "literal_string \"wadMul: Math Multiplication Overflow\""
                        }
                      ],
                      "id": 11022,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "1313:7:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 11036,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1313:88:14",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 11037,
                  "nodeType": "ExpressionStatement",
                  "src": "1313:88:14"
                },
                {
                  "expression": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 11045,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "components": [
                        {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 11042,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 11040,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 11038,
                              "name": "a",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11004,
                              "src": "1416:1:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "*",
                            "rightExpression": {
                              "id": 11039,
                              "name": "b",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11006,
                              "src": "1420:1:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "1416:5:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "+",
                          "rightExpression": {
                            "id": 11041,
                            "name": "HALF_WAD",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 10954,
                            "src": "1424:8:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "1416:16:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "id": 11043,
                      "isConstant": false,
                      "isInlineArray": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "TupleExpression",
                      "src": "1415:18:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "/",
                    "rightExpression": {
                      "id": 11044,
                      "name": "WAD",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 10949,
                      "src": "1436:3:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1415:24:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 11010,
                  "id": 11046,
                  "nodeType": "Return",
                  "src": "1408:31:14"
                }
              ]
            },
            "documentation": {
              "id": 11002,
              "nodeType": "StructuredDocumentation",
              "src": "1032:151:14",
              "text": " @dev Multiplies two wad, rounding half up to the nearest wad\n @param a Wad\n @param b Wad\n @return The result of a*b, in wad*"
            },
            "id": 11048,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "wadMul",
            "nameLocation": "1195:6:14",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 11007,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 11004,
                  "mutability": "mutable",
                  "name": "a",
                  "nameLocation": "1210:1:14",
                  "nodeType": "VariableDeclaration",
                  "scope": 11048,
                  "src": "1202:9:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 11003,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1202:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 11006,
                  "mutability": "mutable",
                  "name": "b",
                  "nameLocation": "1221:1:14",
                  "nodeType": "VariableDeclaration",
                  "scope": 11048,
                  "src": "1213:9:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 11005,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1213:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1201:22:14"
            },
            "returnParameters": {
              "id": 11010,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 11009,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 11048,
                  "src": "1247:7:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 11008,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1247:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1246:9:14"
            },
            "scope": 11252,
            "src": "1186:258:14",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 11096,
              "nodeType": "Block",
              "src": "1669:210:14",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 11061,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 11059,
                          "name": "b",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 11053,
                          "src": "1683:1:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "!=",
                        "rightExpression": {
                          "hexValue": "30",
                          "id": 11060,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "1688:1:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "src": "1683:6:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "7761644469763a204469766973696f6e206279207a65726f",
                        "id": 11062,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1691:26:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_167d1f3940223a3f04f96f1342ae9ca5d4397ed726e0cb420a8078436dd7a1e4",
                          "typeString": "literal_string \"wadDiv: Division by zero\""
                        },
                        "value": "wadDiv: Division by zero"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_167d1f3940223a3f04f96f1342ae9ca5d4397ed726e0cb420a8078436dd7a1e4",
                          "typeString": "literal_string \"wadDiv: Division by zero\""
                        }
                      ],
                      "id": 11058,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "1675:7:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 11063,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1675:43:14",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 11064,
                  "nodeType": "ExpressionStatement",
                  "src": "1675:43:14"
                },
                {
                  "assignments": [
                    11066
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 11066,
                      "mutability": "mutable",
                      "name": "halfB",
                      "nameLocation": "1732:5:14",
                      "nodeType": "VariableDeclaration",
                      "scope": 11096,
                      "src": "1724:13:14",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 11065,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "1724:7:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 11070,
                  "initialValue": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 11069,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 11067,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 11053,
                      "src": "1740:1:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "/",
                    "rightExpression": {
                      "hexValue": "32",
                      "id": 11068,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "1744:1:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_2_by_1",
                        "typeString": "int_const 2"
                      },
                      "value": "2"
                    },
                    "src": "1740:5:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1724:21:14"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 11083,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 11072,
                          "name": "a",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 11051,
                          "src": "1760:1:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 11082,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "components": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 11079,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "expression": {
                                    "arguments": [
                                      {
                                        "id": 11075,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "lValueRequested": false,
                                        "nodeType": "ElementaryTypeNameExpression",
                                        "src": "1771:7:14",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_type$_t_uint256_$",
                                          "typeString": "type(uint256)"
                                        },
                                        "typeName": {
                                          "id": 11074,
                                          "name": "uint256",
                                          "nodeType": "ElementaryTypeName",
                                          "src": "1771:7:14",
                                          "typeDescriptions": {}
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_type$_t_uint256_$",
                                          "typeString": "type(uint256)"
                                        }
                                      ],
                                      "id": 11073,
                                      "name": "type",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": -27,
                                      "src": "1766:4:14",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                        "typeString": "function () pure"
                                      }
                                    },
                                    "id": 11076,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "1766:13:14",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_magic_meta_type_t_uint256",
                                      "typeString": "type(uint256)"
                                    }
                                  },
                                  "id": 11077,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "memberName": "max",
                                  "nodeType": "MemberAccess",
                                  "src": "1766:17:14",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "-",
                                "rightExpression": {
                                  "id": 11078,
                                  "name": "halfB",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11066,
                                  "src": "1786:5:14",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "1766:25:14",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "id": 11080,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "1765:27:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "/",
                          "rightExpression": {
                            "id": 11081,
                            "name": "WAD",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 10949,
                            "src": "1795:3:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "1765:33:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "1760:38:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "7761644469763a204d617468204d756c7469706c69636174696f6e204f766572666c6f77",
                        "id": 11084,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1800:38:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_2f30c92b90761ec84ca4307c92fb64ea0d6cba19787feea081dc2d6160c16ce5",
                          "typeString": "literal_string \"wadDiv: Math Multiplication Overflow\""
                        },
                        "value": "wadDiv: Math Multiplication Overflow"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_2f30c92b90761ec84ca4307c92fb64ea0d6cba19787feea081dc2d6160c16ce5",
                          "typeString": "literal_string \"wadDiv: Math Multiplication Overflow\""
                        }
                      ],
                      "id": 11071,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "1752:7:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 11085,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1752:87:14",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 11086,
                  "nodeType": "ExpressionStatement",
                  "src": "1752:87:14"
                },
                {
                  "expression": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 11094,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "components": [
                        {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 11091,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 11089,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 11087,
                              "name": "a",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11051,
                              "src": "1854:1:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "*",
                            "rightExpression": {
                              "id": 11088,
                              "name": "WAD",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10949,
                              "src": "1858:3:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "1854:7:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "+",
                          "rightExpression": {
                            "id": 11090,
                            "name": "halfB",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 11066,
                            "src": "1864:5:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "1854:15:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "id": 11092,
                      "isConstant": false,
                      "isInlineArray": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "TupleExpression",
                      "src": "1853:17:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "/",
                    "rightExpression": {
                      "id": 11093,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 11053,
                      "src": "1873:1:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1853:21:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 11057,
                  "id": 11095,
                  "nodeType": "Return",
                  "src": "1846:28:14"
                }
              ]
            },
            "documentation": {
              "id": 11049,
              "nodeType": "StructuredDocumentation",
              "src": "1448:148:14",
              "text": " @dev Divides two wad, rounding half up to the nearest wad\n @param a Wad\n @param b Wad\n @return The result of a/b, in wad*"
            },
            "id": 11097,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "wadDiv",
            "nameLocation": "1608:6:14",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 11054,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 11051,
                  "mutability": "mutable",
                  "name": "a",
                  "nameLocation": "1623:1:14",
                  "nodeType": "VariableDeclaration",
                  "scope": 11097,
                  "src": "1615:9:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 11050,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1615:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 11053,
                  "mutability": "mutable",
                  "name": "b",
                  "nameLocation": "1634:1:14",
                  "nodeType": "VariableDeclaration",
                  "scope": 11097,
                  "src": "1626:9:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 11052,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1626:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1614:22:14"
            },
            "returnParameters": {
              "id": 11057,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 11056,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 11097,
                  "src": "1660:7:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 11055,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1660:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1659:9:14"
            },
            "scope": 11252,
            "src": "1599:280:14",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 11143,
              "nodeType": "Block",
              "src": "2107:188:14",
              "statements": [
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "id": 11113,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 11109,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 11107,
                        "name": "a",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 11100,
                        "src": "2117:1:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "==",
                      "rightExpression": {
                        "hexValue": "30",
                        "id": 11108,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2122:1:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_0_by_1",
                          "typeString": "int_const 0"
                        },
                        "value": "0"
                      },
                      "src": "2117:6:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "||",
                    "rightExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 11112,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 11110,
                        "name": "b",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 11102,
                        "src": "2127:1:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "==",
                      "rightExpression": {
                        "hexValue": "30",
                        "id": 11111,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2132:1:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_0_by_1",
                          "typeString": "int_const 0"
                        },
                        "value": "0"
                      },
                      "src": "2127:6:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "src": "2117:16:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 11117,
                  "nodeType": "IfStatement",
                  "src": "2113:45:14",
                  "trueBody": {
                    "id": 11116,
                    "nodeType": "Block",
                    "src": "2135:23:14",
                    "statements": [
                      {
                        "expression": {
                          "hexValue": "30",
                          "id": 11114,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "2150:1:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "functionReturnParameters": 11106,
                        "id": 11115,
                        "nodeType": "Return",
                        "src": "2143:8:14"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 11130,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 11119,
                          "name": "a",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 11100,
                          "src": "2172:1:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 11129,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "components": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 11126,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "expression": {
                                    "arguments": [
                                      {
                                        "id": 11122,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "lValueRequested": false,
                                        "nodeType": "ElementaryTypeNameExpression",
                                        "src": "2183:7:14",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_type$_t_uint256_$",
                                          "typeString": "type(uint256)"
                                        },
                                        "typeName": {
                                          "id": 11121,
                                          "name": "uint256",
                                          "nodeType": "ElementaryTypeName",
                                          "src": "2183:7:14",
                                          "typeDescriptions": {}
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_type$_t_uint256_$",
                                          "typeString": "type(uint256)"
                                        }
                                      ],
                                      "id": 11120,
                                      "name": "type",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": -27,
                                      "src": "2178:4:14",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                        "typeString": "function () pure"
                                      }
                                    },
                                    "id": 11123,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "2178:13:14",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_magic_meta_type_t_uint256",
                                      "typeString": "type(uint256)"
                                    }
                                  },
                                  "id": 11124,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "memberName": "max",
                                  "nodeType": "MemberAccess",
                                  "src": "2178:17:14",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "-",
                                "rightExpression": {
                                  "id": 11125,
                                  "name": "HALF_RAY",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 10962,
                                  "src": "2198:8:14",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "2178:28:14",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "id": 11127,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "2177:30:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "/",
                          "rightExpression": {
                            "id": 11128,
                            "name": "b",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 11102,
                            "src": "2210:1:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2177:34:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "2172:39:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "7261794d756c3a204d617468204d756c7469706c69636174696f6e204f766572666c6f77",
                        "id": 11131,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2213:38:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_ea25856e28a511fab3567e51dccf57a09531b151aa5c21dfaafedf0c3f235779",
                          "typeString": "literal_string \"rayMul: Math Multiplication Overflow\""
                        },
                        "value": "rayMul: Math Multiplication Overflow"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_ea25856e28a511fab3567e51dccf57a09531b151aa5c21dfaafedf0c3f235779",
                          "typeString": "literal_string \"rayMul: Math Multiplication Overflow\""
                        }
                      ],
                      "id": 11118,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "2164:7:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 11132,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2164:88:14",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 11133,
                  "nodeType": "ExpressionStatement",
                  "src": "2164:88:14"
                },
                {
                  "expression": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 11141,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "components": [
                        {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 11138,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 11136,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 11134,
                              "name": "a",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11100,
                              "src": "2267:1:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "*",
                            "rightExpression": {
                              "id": 11135,
                              "name": "b",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11102,
                              "src": "2271:1:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "2267:5:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "+",
                          "rightExpression": {
                            "id": 11137,
                            "name": "HALF_RAY",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 10962,
                            "src": "2275:8:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2267:16:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "id": 11139,
                      "isConstant": false,
                      "isInlineArray": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "TupleExpression",
                      "src": "2266:18:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "/",
                    "rightExpression": {
                      "id": 11140,
                      "name": "RAY",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 10957,
                      "src": "2287:3:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2266:24:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 11106,
                  "id": 11142,
                  "nodeType": "Return",
                  "src": "2259:31:14"
                }
              ]
            },
            "documentation": {
              "id": 11098,
              "nodeType": "StructuredDocumentation",
              "src": "1883:151:14",
              "text": " @dev Multiplies two ray, rounding half up to the nearest ray\n @param a Ray\n @param b Ray\n @return The result of a*b, in ray*"
            },
            "id": 11144,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "rayMul",
            "nameLocation": "2046:6:14",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 11103,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 11100,
                  "mutability": "mutable",
                  "name": "a",
                  "nameLocation": "2061:1:14",
                  "nodeType": "VariableDeclaration",
                  "scope": 11144,
                  "src": "2053:9:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 11099,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2053:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 11102,
                  "mutability": "mutable",
                  "name": "b",
                  "nameLocation": "2072:1:14",
                  "nodeType": "VariableDeclaration",
                  "scope": 11144,
                  "src": "2064:9:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 11101,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2064:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2052:22:14"
            },
            "returnParameters": {
              "id": 11106,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 11105,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 11144,
                  "src": "2098:7:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 11104,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2098:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2097:9:14"
            },
            "scope": 11252,
            "src": "2037:258:14",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 11192,
              "nodeType": "Block",
              "src": "2520:210:14",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 11157,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 11155,
                          "name": "b",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 11149,
                          "src": "2534:1:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "!=",
                        "rightExpression": {
                          "hexValue": "30",
                          "id": 11156,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "2539:1:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "src": "2534:6:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "7261794469763a204469766973696f6e206279207a65726f",
                        "id": 11158,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2542:26:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_56d3e06e9cdd6018fb9a12fbdd9df0828e2a3acdf922f7d468662466a1169d2a",
                          "typeString": "literal_string \"rayDiv: Division by zero\""
                        },
                        "value": "rayDiv: Division by zero"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_56d3e06e9cdd6018fb9a12fbdd9df0828e2a3acdf922f7d468662466a1169d2a",
                          "typeString": "literal_string \"rayDiv: Division by zero\""
                        }
                      ],
                      "id": 11154,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "2526:7:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 11159,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2526:43:14",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 11160,
                  "nodeType": "ExpressionStatement",
                  "src": "2526:43:14"
                },
                {
                  "assignments": [
                    11162
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 11162,
                      "mutability": "mutable",
                      "name": "halfB",
                      "nameLocation": "2583:5:14",
                      "nodeType": "VariableDeclaration",
                      "scope": 11192,
                      "src": "2575:13:14",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 11161,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "2575:7:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 11166,
                  "initialValue": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 11165,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 11163,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 11149,
                      "src": "2591:1:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "/",
                    "rightExpression": {
                      "hexValue": "32",
                      "id": 11164,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "2595:1:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_2_by_1",
                        "typeString": "int_const 2"
                      },
                      "value": "2"
                    },
                    "src": "2591:5:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2575:21:14"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 11179,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 11168,
                          "name": "a",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 11147,
                          "src": "2611:1:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 11178,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "components": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 11175,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "expression": {
                                    "arguments": [
                                      {
                                        "id": 11171,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "lValueRequested": false,
                                        "nodeType": "ElementaryTypeNameExpression",
                                        "src": "2622:7:14",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_type$_t_uint256_$",
                                          "typeString": "type(uint256)"
                                        },
                                        "typeName": {
                                          "id": 11170,
                                          "name": "uint256",
                                          "nodeType": "ElementaryTypeName",
                                          "src": "2622:7:14",
                                          "typeDescriptions": {}
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_type$_t_uint256_$",
                                          "typeString": "type(uint256)"
                                        }
                                      ],
                                      "id": 11169,
                                      "name": "type",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": -27,
                                      "src": "2617:4:14",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                        "typeString": "function () pure"
                                      }
                                    },
                                    "id": 11172,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "2617:13:14",
                                    "tryCall": false,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_magic_meta_type_t_uint256",
                                      "typeString": "type(uint256)"
                                    }
                                  },
                                  "id": 11173,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "memberName": "max",
                                  "nodeType": "MemberAccess",
                                  "src": "2617:17:14",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "-",
                                "rightExpression": {
                                  "id": 11174,
                                  "name": "halfB",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 11162,
                                  "src": "2637:5:14",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "2617:25:14",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "id": 11176,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "2616:27:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "/",
                          "rightExpression": {
                            "id": 11177,
                            "name": "RAY",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 10957,
                            "src": "2646:3:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2616:33:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "2611:38:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "7261794469763a204d617468204d756c7469706c69636174696f6e204f766572666c6f77",
                        "id": 11180,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2651:38:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_3298bd87fc3f23e077a6a4fc7b4d20f47af74fd42d183dd68158984b59d075af",
                          "typeString": "literal_string \"rayDiv: Math Multiplication Overflow\""
                        },
                        "value": "rayDiv: Math Multiplication Overflow"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_3298bd87fc3f23e077a6a4fc7b4d20f47af74fd42d183dd68158984b59d075af",
                          "typeString": "literal_string \"rayDiv: Math Multiplication Overflow\""
                        }
                      ],
                      "id": 11167,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "2603:7:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 11181,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2603:87:14",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 11182,
                  "nodeType": "ExpressionStatement",
                  "src": "2603:87:14"
                },
                {
                  "expression": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 11190,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "components": [
                        {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 11187,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 11185,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "id": 11183,
                              "name": "a",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 11147,
                              "src": "2705:1:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "*",
                            "rightExpression": {
                              "id": 11184,
                              "name": "RAY",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 10957,
                              "src": "2709:3:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "2705:7:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "+",
                          "rightExpression": {
                            "id": 11186,
                            "name": "halfB",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 11162,
                            "src": "2715:5:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2705:15:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "id": 11188,
                      "isConstant": false,
                      "isInlineArray": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "TupleExpression",
                      "src": "2704:17:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "/",
                    "rightExpression": {
                      "id": 11189,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 11149,
                      "src": "2724:1:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2704:21:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 11153,
                  "id": 11191,
                  "nodeType": "Return",
                  "src": "2697:28:14"
                }
              ]
            },
            "documentation": {
              "id": 11145,
              "nodeType": "StructuredDocumentation",
              "src": "2299:148:14",
              "text": " @dev Divides two ray, rounding half up to the nearest ray\n @param a Ray\n @param b Ray\n @return The result of a/b, in ray*"
            },
            "id": 11193,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "rayDiv",
            "nameLocation": "2459:6:14",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 11150,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 11147,
                  "mutability": "mutable",
                  "name": "a",
                  "nameLocation": "2474:1:14",
                  "nodeType": "VariableDeclaration",
                  "scope": 11193,
                  "src": "2466:9:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 11146,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2466:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 11149,
                  "mutability": "mutable",
                  "name": "b",
                  "nameLocation": "2485:1:14",
                  "nodeType": "VariableDeclaration",
                  "scope": 11193,
                  "src": "2477:9:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 11148,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2477:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2465:22:14"
            },
            "returnParameters": {
              "id": 11153,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 11152,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 11193,
                  "src": "2511:7:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 11151,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2511:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2510:9:14"
            },
            "scope": 11252,
            "src": "2450:280:14",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 11224,
              "nodeType": "Block",
              "src": "2923:190:14",
              "statements": [
                {
                  "assignments": [
                    11202
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 11202,
                      "mutability": "mutable",
                      "name": "halfRatio",
                      "nameLocation": "2937:9:14",
                      "nodeType": "VariableDeclaration",
                      "scope": 11224,
                      "src": "2929:17:14",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 11201,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "2929:7:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 11206,
                  "initialValue": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 11205,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 11203,
                      "name": "WAD_RAY_RATIO",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 10965,
                      "src": "2949:13:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "/",
                    "rightExpression": {
                      "hexValue": "32",
                      "id": 11204,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "2965:1:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_2_by_1",
                        "typeString": "int_const 2"
                      },
                      "value": "2"
                    },
                    "src": "2949:17:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2929:37:14"
                },
                {
                  "assignments": [
                    11208
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 11208,
                      "mutability": "mutable",
                      "name": "result",
                      "nameLocation": "2980:6:14",
                      "nodeType": "VariableDeclaration",
                      "scope": 11224,
                      "src": "2972:14:14",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 11207,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "2972:7:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 11212,
                  "initialValue": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 11211,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 11209,
                      "name": "halfRatio",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 11202,
                      "src": "2989:9:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "+",
                    "rightExpression": {
                      "id": 11210,
                      "name": "a",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 11196,
                      "src": "3001:1:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2989:13:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2972:30:14"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 11216,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 11214,
                          "name": "result",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 11208,
                          "src": "3016:6:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": ">=",
                        "rightExpression": {
                          "id": 11215,
                          "name": "halfRatio",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 11202,
                          "src": "3026:9:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "3016:19:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "726179546f5761643a204d617468204164646974696f6e204f766572666c6f77",
                        "id": 11217,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3037:34:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_ba1092d37606e12d5d14ce5297d79e90144faa8a25674558d46606274b601325",
                          "typeString": "literal_string \"rayToWad: Math Addition Overflow\""
                        },
                        "value": "rayToWad: Math Addition Overflow"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_ba1092d37606e12d5d14ce5297d79e90144faa8a25674558d46606274b601325",
                          "typeString": "literal_string \"rayToWad: Math Addition Overflow\""
                        }
                      ],
                      "id": 11213,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "3008:7:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 11218,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3008:64:14",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 11219,
                  "nodeType": "ExpressionStatement",
                  "src": "3008:64:14"
                },
                {
                  "expression": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 11222,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 11220,
                      "name": "result",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 11208,
                      "src": "3086:6:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "/",
                    "rightExpression": {
                      "id": 11221,
                      "name": "WAD_RAY_RATIO",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 10965,
                      "src": "3095:13:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "3086:22:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 11200,
                  "id": 11223,
                  "nodeType": "Return",
                  "src": "3079:29:14"
                }
              ]
            },
            "documentation": {
              "id": 11194,
              "nodeType": "StructuredDocumentation",
              "src": "2734:125:14",
              "text": " @dev Casts ray down to wad\n @param a Ray\n @return a casted to wad, rounded half up to the nearest wad*"
            },
            "id": 11225,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "rayToWad",
            "nameLocation": "2871:8:14",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 11197,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 11196,
                  "mutability": "mutable",
                  "name": "a",
                  "nameLocation": "2888:1:14",
                  "nodeType": "VariableDeclaration",
                  "scope": 11225,
                  "src": "2880:9:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 11195,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2880:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2879:11:14"
            },
            "returnParameters": {
              "id": 11200,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 11199,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 11225,
                  "src": "2914:7:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 11198,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2914:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2913:9:14"
            },
            "scope": 11252,
            "src": "2862:251:14",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 11250,
              "nodeType": "Block",
              "src": "3274:148:14",
              "statements": [
                {
                  "assignments": [
                    11234
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 11234,
                      "mutability": "mutable",
                      "name": "result",
                      "nameLocation": "3288:6:14",
                      "nodeType": "VariableDeclaration",
                      "scope": 11250,
                      "src": "3280:14:14",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 11233,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "3280:7:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 11238,
                  "initialValue": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 11237,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 11235,
                      "name": "a",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 11228,
                      "src": "3297:1:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "*",
                    "rightExpression": {
                      "id": 11236,
                      "name": "WAD_RAY_RATIO",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 10965,
                      "src": "3301:13:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "3297:17:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3280:34:14"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 11244,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 11242,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 11240,
                            "name": "result",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 11234,
                            "src": "3328:6:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "/",
                          "rightExpression": {
                            "id": 11241,
                            "name": "WAD_RAY_RATIO",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 10965,
                            "src": "3337:13:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3328:22:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "id": 11243,
                          "name": "a",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 11228,
                          "src": "3354:1:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "3328:27:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "776164546f5261643a204d617468204d756c7469706c69636174696f6e204f766572666c6f77",
                        "id": 11245,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3357:40:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_44d3238eb47dfe9827582d3bb26bd1f4d81bfbcf3e259d8a2a05d2db8f25a2ac",
                          "typeString": "literal_string \"wadToRad: Math Multiplication Overflow\""
                        },
                        "value": "wadToRad: Math Multiplication Overflow"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_44d3238eb47dfe9827582d3bb26bd1f4d81bfbcf3e259d8a2a05d2db8f25a2ac",
                          "typeString": "literal_string \"wadToRad: Math Multiplication Overflow\""
                        }
                      ],
                      "id": 11239,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "3320:7:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 11246,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3320:78:14",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 11247,
                  "nodeType": "ExpressionStatement",
                  "src": "3320:78:14"
                },
                {
                  "expression": {
                    "id": 11248,
                    "name": "result",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 11234,
                    "src": "3411:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 11232,
                  "id": 11249,
                  "nodeType": "Return",
                  "src": "3404:13:14"
                }
              ]
            },
            "documentation": {
              "id": 11226,
              "nodeType": "StructuredDocumentation",
              "src": "3117:93:14",
              "text": " @dev Converts wad up to ray\n @param a Wad\n @return a converted in ray*"
            },
            "id": 11251,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "wadToRay",
            "nameLocation": "3222:8:14",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 11229,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 11228,
                  "mutability": "mutable",
                  "name": "a",
                  "nameLocation": "3239:1:14",
                  "nodeType": "VariableDeclaration",
                  "scope": 11251,
                  "src": "3231:9:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 11227,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3231:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3230:11:14"
            },
            "returnParameters": {
              "id": 11232,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 11231,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 11251,
                  "src": "3265:7:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 11230,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3265:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3264:9:14"
            },
            "scope": 11252,
            "src": "3213:209:14",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          }
        ],
        "scope": 11253,
        "src": "308:3116:14",
        "usedErrors": []
      }
    ],
    "src": "39:3386:14"
  },
  "bytecode": "60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220abfa854644bf6f528507a32921fec6f52cde4129bd61f962eb958723d827fc5364736f6c63430008060033",
  "bytecodeSha1": "1ce946f6a4eaa185320328620ccf999b9e86db7c",
  "compiler": {
    "evm_version": "istanbul",
    "optimizer": {
      "enabled": true,
      "runs": 200
    },
    "version": "0.8.6+commit.11564f7e"
  },
  "contractName": "WadRayMath",
  "coverageMap": {
    "branches": {
      "14": {}
    },
    "statements": {
      "14": {}
    }
  },
  "dependencies": [],
  "deployedBytecode": "73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220abfa854644bf6f528507a32921fec6f52cde4129bd61f962eb958723d827fc5364736f6c63430008060033",
  "deployedSourceMap": "308:3116:14:-:0;;;;;;;;",
  "language": "Solidity",
  "natspec": {
    "author": "Aave / Ensuro",
    "custom:security-contact": "security@ensuro.co*",
    "details": "Provides mul and div function for wads (decimal numbers with 18 digits precision) and rays      (decimals with 27 digits)",
    "kind": "dev",
    "methods": {},
    "title": "WadRayMath library",
    "version": 1
  },
  "offset": [
    308,
    3424
  ],
  "opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xAB STATICCALL DUP6 CHAINID DIFFICULTY 0xBF PUSH16 0x528507A32921FEC6F52CDE4129BD61F9 PUSH3 0xEB9587 0x23 0xD8 0x27 0xFC MSTORE8 PUSH5 0x736F6C6343 STOP ADDMOD MOD STOP CALLER ",
  "pcMap": {
    "0": {
      "offset": [
        308,
        3424
      ],
      "op": "PUSH20",
      "path": "14",
      "value": "0x0"
    },
    "21": {
      "fn": null,
      "offset": [
        308,
        3424
      ],
      "op": "ADDRESS",
      "path": "14"
    },
    "22": {
      "fn": null,
      "offset": [
        308,
        3424
      ],
      "op": "EQ",
      "path": "14"
    },
    "23": {
      "fn": null,
      "offset": [
        308,
        3424
      ],
      "op": "PUSH1",
      "path": "14",
      "value": "0x80"
    },
    "25": {
      "fn": null,
      "offset": [
        308,
        3424
      ],
      "op": "PUSH1",
      "path": "14",
      "value": "0x40"
    },
    "27": {
      "fn": null,
      "offset": [
        308,
        3424
      ],
      "op": "MSTORE",
      "path": "14"
    },
    "28": {
      "fn": null,
      "offset": [
        308,
        3424
      ],
      "op": "PUSH1",
      "path": "14",
      "value": "0x0"
    },
    "30": {
      "fn": null,
      "offset": [
        308,
        3424
      ],
      "op": "DUP1",
      "path": "14"
    },
    "31": {
      "fn": null,
      "offset": [
        308,
        3424
      ],
      "op": "REVERT",
      "path": "14"
    }
  },
  "sha1": "8970c044c725221f73452be79dffda07641d0cf9",
  "source": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\n\n/**\n * @title WadRayMath library\n * @author Aave / Ensuro\n * @dev Provides mul and div function for wads (decimal numbers with 18 digits precision) and rays\n *      (decimals with 27 digits)\n * @custom:security-contact security@ensuro.co\n **/\n\nlibrary WadRayMath {\n  uint256 internal constant WAD = 1e18;\n  uint256 internal constant HALF_WAD = WAD / 2;\n\n  uint256 internal constant RAY = 1e27;\n  uint256 internal constant HALF_RAY = RAY / 2;\n\n  uint256 internal constant WAD_RAY_RATIO = 1e9;\n\n  /**\n   * @return One ray, 1e27\n   **/\n  function ray() internal pure returns (uint256) {\n    return RAY;\n  }\n\n  /**\n   * @return One wad, 1e18\n   **/\n\n  function wad() internal pure returns (uint256) {\n    return WAD;\n  }\n\n  /**\n   * @return Half ray, 1e27/2\n   **/\n  function halfRay() internal pure returns (uint256) {\n    return HALF_RAY;\n  }\n\n  /**\n   * @return Half ray, 1e18/2\n   **/\n  function halfWad() internal pure returns (uint256) {\n    return HALF_WAD;\n  }\n\n  /**\n   * @dev Multiplies two wad, rounding half up to the nearest wad\n   * @param a Wad\n   * @param b Wad\n   * @return The result of a*b, in wad\n   **/\n  function wadMul(uint256 a, uint256 b) internal pure returns (uint256) {\n    if (a == 0 || b == 0) {\n      return 0;\n    }\n\n    require(a <= (type(uint256).max - HALF_WAD) / b, \"wadMul: Math Multiplication Overflow\");\n\n    return (a * b + HALF_WAD) / WAD;\n  }\n\n  /**\n   * @dev Divides two wad, rounding half up to the nearest wad\n   * @param a Wad\n   * @param b Wad\n   * @return The result of a/b, in wad\n   **/\n  function wadDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n    require(b != 0, \"wadDiv: Division by zero\");\n    uint256 halfB = b / 2;\n\n    require(a <= (type(uint256).max - halfB) / WAD, \"wadDiv: Math Multiplication Overflow\");\n\n    return (a * WAD + halfB) / b;\n  }\n\n  /**\n   * @dev Multiplies two ray, rounding half up to the nearest ray\n   * @param a Ray\n   * @param b Ray\n   * @return The result of a*b, in ray\n   **/\n  function rayMul(uint256 a, uint256 b) internal pure returns (uint256) {\n    if (a == 0 || b == 0) {\n      return 0;\n    }\n\n    require(a <= (type(uint256).max - HALF_RAY) / b, \"rayMul: Math Multiplication Overflow\");\n\n    return (a * b + HALF_RAY) / RAY;\n  }\n\n  /**\n   * @dev Divides two ray, rounding half up to the nearest ray\n   * @param a Ray\n   * @param b Ray\n   * @return The result of a/b, in ray\n   **/\n  function rayDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n    require(b != 0, \"rayDiv: Division by zero\");\n    uint256 halfB = b / 2;\n\n    require(a <= (type(uint256).max - halfB) / RAY, \"rayDiv: Math Multiplication Overflow\");\n\n    return (a * RAY + halfB) / b;\n  }\n\n  /**\n   * @dev Casts ray down to wad\n   * @param a Ray\n   * @return a casted to wad, rounded half up to the nearest wad\n   **/\n  function rayToWad(uint256 a) internal pure returns (uint256) {\n    uint256 halfRatio = WAD_RAY_RATIO / 2;\n    uint256 result = halfRatio + a;\n    require(result >= halfRatio, \"rayToWad: Math Addition Overflow\");\n\n    return result / WAD_RAY_RATIO;\n  }\n\n  /**\n   * @dev Converts wad up to ray\n   * @param a Wad\n   * @return a converted in ray\n   **/\n  function wadToRay(uint256 a) internal pure returns (uint256) {\n    uint256 result = a * WAD_RAY_RATIO;\n    require(result / WAD_RAY_RATIO == a, \"wadToRad: Math Multiplication Overflow\");\n    return result;\n  }\n}\n",
  "sourceMap": "308:3116:14:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;308:3116:14;;;;;;;;;;;;;;;;;",
  "sourcePath": "contracts/WadRayMath.sol",
  "type": "library"
}