MEDIUM severity: Vulnerable function: ```\nit('adiabatic fee', async () => {\n  function setupOracle(price: string, timestamp : number, ne. ```\nit('adiabatic fee', async () => {\n  function setupOracle(price: string, timestamp : number, nextTimestamp : number) {\n    const oracleVersion = {\n      price: parse6decimal(price),\n      timestamp: timestamp,\n      valid: true,\n    }\n    oracle.at.whenCalledWith(oracleVersion.timestamp).

Vulnerable code:
```\nit('adiabatic fee', async () => {\n  function setupOracle(price: string, timestamp : number, nextTimestamp : number) {\n    const oracleVersion = {\n      price: parse6decimal(price),\n      timestamp: timestamp,\n      valid: true,\n    }\n    oracle.at.whenCalledWith(oracleVersion.timestamp).returns(oracleVersion)\n    oracle.status.returns([oracleVersion, nextTimestamp])\n    oracle.request.returns()\n  }\n\n  async function showInfo() {\n    await market.settle(user.address);\n    await market.settle(userB.address);\n    await market.settle(userC.address);\n    var sum : BigNumber = BigNumber.from('0');\n    var info = await market.locals(user.address);\n    console.log("user collateral = " + info.collateral);\n    sum = sum.add(info.collateral);\n    var info = await market.locals(userB.address);\n    sum = sum.add(info.collateral);\n    console.log("userB collateral = " + info.collateral);\n    var info = await market.locals(userC.address);\n    sum = sum.add(info.collateral);\n  }\n\n  async function showVer(ver : number) {\n    var v = await market.versions(ver);\n    console.log("ver" + ver + ": makerValue=" + v.makerValue + " longValue=" + v.longValue + \n    " makerPosFee=" + v.makerPosFee + " makerNegFee=" + v.makerNegFee +\n    " takerPosFee=" + v.takerPosFee + " takerNegFee=" + v.takerNegFee\n    );\n  }\n\n  const riskParameter = { // rest of code(await market.riskParameter()) }\n  const riskParameterMakerFee = { // rest of coderiskParameter.makerFee }\n  riskParameterMakerFee.linearFee = parse6decimal('0.00')\n  riskParameterMakerFee.proportionalFee = parse6decimal('0.00')\n  riskParameterMakerFee.adiabaticFee = parse6decimal('0.01')\n  riskParameterMakerFee.scale = parse6decimal('50.0')\n  riskParameter.makerFee = riskParameterMakerFee\n  const riskParameterTakerFee = { // rest of coderiskParameter.takerFee }\n  riskParameterTakerFee.linearFee = parse6decimal('0.00')\n  riskParameterTakerFee.proportionalFee = parse6decimal('0.00')\n  riskParameterTakerFee.adiabaticFee = parse6decimal('0.01')\n  riskParameterTakerFee.scale = parse6decimal('50.0')\n  riskParameter.takerFee = riskParameterTakerFee\n  await market.connect(owner).updateRiskParameter(riskParameter)\n\n  marketParameter = {\n    fundingFee: parse6decimal('0.0'),\n    interestFee: parse6decimal('0.0'),\n    oracleFee: parse6decimal('0.0'),\n    riskFee: parse6decimal('0.0'),\n    positionFee: parse6decimal('0.0'),\n    maxPendingGlobal: 5,\n    maxPendingLocal: 3,\n    settlementFee: 0,\n    makerCloseAlways: false,\n    takerCloseAlways: false,\n    closed: false,\n    settle: false,\n  }\n  await market.connect(owner).updateParameter(beneficiary.address, coordinator.address, marketParameter)\n\n  var time = TIMESTAMP;\n\n  setupOracle('1', time, time + 100);\n  await market.connect(user)\n      ['update(address,uint256,uint256,uint256,int256,bool)'](user.address, POSITION, 0, 0, COLLATERAL, false);\n  await showInfo()\n  await showVer(time)\n\n  time += 100;\n  setupOracle('1', time, time + 100);\n  await market.connect(userB)\n      ['update(address,uint256,uint256,uint256,int256,bool)'](userB.address, POSITION, 0, 0, COLLATERAL, false);\n  await showInfo()\n  await showVer(time)\n\n  time += 100;\n  setupOracle('1', time, time + 100);\n  await showInfo()\n  await showVer(time)\n\n  time += 100;\n  setupOracle('2', time, time + 100);\n  await market.connect(userB)\n      ['update(address,uint256,uint256,uint256,int256,bool)'](userB.address, 0, 0, 0, 0, false);\n  await showInfo()\n  await showVer(time)\n\n  time += 100;\n  setupOracle('2', time, time + 100);\n  await market.connect(user)\n      ['update(address,uint256,uint256,uint256,int256,bool)'](user.address, 0, 0, 0, 0, false);\n  await showInfo()\n  await showVer(time)\n\n  time += 100;\n  setupOracle('0.5', time, time + 100);\n  await showInfo()\n  await showVer(time)\n})\n```\n