MEDIUM severity: The vulnerability arises from the incorrect distribution of adiabatic fees exposure between makers i. The vulnerability arises from the incorrect distribution of adiabatic fees exposure between makers in the new update of the protocol (v2.3). Adiabatic fees were introduced to solve the problem of adiabatic fees netting out to 0 in market tokens rather than in USD terms. However, this solution only a...

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    let sum: BigNumber = BigNumber.from('0');\n    let info = await market.locals(user.address);\n    console.log("user collateral = " + info.collateral);\n    sum = sum.add(info.collateral);\n    let info = await market.locals(userB.address);\n    sum = sum.add(info.collateral);\n    console.log("userB collateral = " + info.collateral);\n    let info = await market.locals(userC.address);\n    sum = sum.add(info.collateral);\n  }\n\n  async function showVer(ver: number) {\n    let 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 = await market.riskParameter();\n  const riskParameterMakerFee = riskParameter.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 = riskParameter.takerFee;\n  riskParameterTakerFee.linearFee = parse6decimal('0.00');\n  riskParameterTakerFee.proportionalFee = parse6decimal('0.00');\n  riskParameterTakerFee.adiabaticFee = parse6decimal('0.01');\n  riskParameterTakerFee.scale = parse6\n```\n```\nuser collateral = 10000000000\nuserB collateral = 0\nver1636401093: makerValue=0 longValue=0 makerPosFee=0 makerNegFee=0 takerPosFee=0 takerNegFee=0\n\nuser collateral = 10000090000\nuserB collateral = 10000000000\nver1636401193: makerValue=0 longValue=0 makerPosFee=9000 makerNegFee=0 takerPosFee=0 takerNegFee=0\n\nuser collateral = 10000090000\nuserB collateral = 10000070000\nver1636401293: makerValue=0 longValue=0 makerPosFee=7000 makerNegFee=0 takerPosFee=0 takerNegFee=0\n\nuser collateral = 10000170000\nuserB collateral = 10000150000\nver1636401393: makerValue=8000 longValue=0 makerPosFee=0 makerNegFee=0 takerPosFee=0 takerNegFee=0\n\nuser collateral = 10000170000\nuserB collateral = 10000010000\nver1636401493: makerValue=8000 longValue=0 makerPosFee=0 makerNegFee=-14000 takerPosFee=0 takerNegFee=0\n\nuser collateral = 9999990000\nuserB collateral = 10000010000\nver1636401593: makerValue=-5500 longValue=0 makerPosFee=0 makerNegFee=-4500 takerPosFee=0 takerNegFee=0\n```