PoolKeeper _gasPrice description says in ETH, but is calculated in wei #9
Labels
0 (Non-critical)
Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation
bug
Warden finding
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
loop
Vulnerability details
The parameter description of
_gasPrice
is_gasPrice Price of a single gas unit (in ETH)
._gasPrice
is used to calculate the amount of Wei spent by a keeper, which in turn is used to calculate the compensation a keeper receives for gas expenditure. While Wei is a smaller denomination of ETH and thus technically correct, I think 'in Wei' would be a clearer description. Mainly due to_gasPrice
being a uint equal to the price of a single gas unit, which would likely result in 0 if full eth were used.Proof of Concept
_gasPrice
descriptions:_gasPrice
used to calculate_weiSpent
:https://github.com/tracer-protocol/perpetual-pools-contracts/blob/646360b0549962352fe0c3f5b214ff8b5f73ba51/contracts/implementation/PoolKeeper.sol#L209
The text was updated successfully, but these errors were encountered: