5 matches found
openPosition() use stale feeGrowthInside0LastX128/feeGrowthInside1LastX128
Lines of code Vulnerability details Vulnerability details When openPosition, we need to record the current feeGrowthInside0LastX128/feeGrowthInside1LastX128. And when closing the position, we use Base.getOwedFee to calculate the possible fees generated during the borrowing period, which are used ...
Using addPremium() to evade part of the fees from marginFrom
Lines of code Vulnerability details Vulnerability details When openPosition, we will charge a certain fee, the calculation formula is as follows: marginFrom + amountFromBorrowed FEEFACTOR / Base.BASISPOINT It will include marginFrom, which is mainly used to ensure enough collateralTo after swap,...
openPosition() Lack of minimum token0PremiumPortion/token1PremiumPortion limit
Lines of code Vulnerability details Vulnerability details In openPosition, it allows token0PremiumPortion and token1PremiumPortion to be 0 at the same time. In this case, if tokenId enters outofprice, for example, UpperOutOfRange, anyone might be able to input: marginFrom = 0 marginTo = 0...
can open a position without any collateral in MintingHub.sol
Lines of code Vulnerability details Impact openPosition... function in MintingHub.sol ignores return value by challenge.position.collateral.transferFrom Several tokens do not revert in case of failure and return false. The require still pass but then, if the token used as collateral return false,...
Anyone can open any position with no init period
Lines of code Vulnerability details Impact Anyone can immediately open a malicious position by calling openPosition... and passing 0 as initPeriodSeconds. Proof of Concept The function on line has public visibility, whereas I suspect it should be private. This effectively means anyone can mint an...