When retrieving the pcv stats from the oracle only newProtocolEquity is used. The other return values of oracle.pcvStats() are also stored in a local variable, but not used within requery(). The call to oracle.pcvStats() can be made without creating unused local variables to save a small amount of gas:
Handle
loop
Vulnerability details
When retrieving the pcv stats from the oracle only
newProtocolEquity
is used. The other return values oforacle.pcvStats()
are also stored in a local variable, but not used withinrequery()
. The call tooracle.pcvStats()
can be made without creating unused local variables to save a small amount of gas:Proof of Concept
https://github.com/code-423n4/2021-11-fei/blob/main/contracts/TRIBERagequit.sol#L111-L116
Tools Used
Remix