Closed code423n4 closed 1 year ago
raymondfam marked the issue as primary issue
asselstine marked the issue as sponsor confirmed
Allowing this to remain as medium because it "adversely affect pricing". Would be nice to see more concrete proof though:
where the address derivation depends only on the arguments passed.
true for create2
, not for create
, so I suppose one could pass in less favourable arguments.
HickupHH3 marked the issue as selected for report
Hey @HickupHH3 Can I ask how is the reorg-attack causing any harm to the protocol? The warden's statement " may adversely affect pricing in LiquidationPair.sol contracts." is very vague and there is not proof of how the pricing is impacted.
As for the previous report that the warden used as a reference for his finding, I think the reorg attack is valid in that protocol because the deployed contracts have a payable constructor that is expecting to receive ETH, and if the reorg attack happens then the ETH sent by the deployer is lost, but in this case, for this protocol, the deployed contracts are not payable, so what's the incentive to cause a "reorg-attack", and more important, what are the consequences?
IMHO, if there is no proof about how the pricing may be affected, this should be assessed as a Q/A
@stalinMacias It's not so much causing a re-org attack, but taking advantage of it.
Because create
is used, you could theoretically deploy with different params but have the same contract address in this scenario, then re-send (replay) the liquidator's tx to auction for more / less POOL tokens.
I shouldn't be doing the work to reason it out though, burden of proof lies with the wardens. None have sufficient justification to warrant the medium severity.
Downgrading to QA.
HickupHH3 changed the severity to QA (Quality Assurance)
HickupHH3 marked the issue as not selected for report
HickupHH3 marked the issue as grade-c
I agree with this issue being downgraded to QA, but still having an attack like you helped us understand more about how this issue can be exploited. The sponsor has also confirmed this issue and I think they will fix it. So I think this case can get grade A.
This previously downgraded issue has been upgraded by HickupHH3
HickupHH3 marked issue #31 as primary and marked this issue as a duplicate of 31
HickupHH3 marked the issue as satisfactory
HickupHH3 marked the issue as not a duplicate
HickupHH3 changed the severity to QA (Quality Assurance)
This previously downgraded issue has been upgraded by HickupHH3
This previously downgraded issue has been upgraded by HickupHH3
HickupHH3 marked the issue as duplicate of #31
Lines of code
https://github.com/GenerationSoftware/pt-v5-cgda-liquidator/blob/7f95bcacd4a566c2becb98d55c1886cadbaa8897/src/LiquidationPairFactory.sol#L65-L108
Vulnerability details
Impact
Allowing creation of new
LiquidationPairs
byRe-org attack
may adversely affect pricing inLiquidationPair.sol
contracts.Proof of Concept
The
LiquidationPairFactory.sol#createPair()
function deploys a newLiquidationPair
using thecreate
, where the address derivation depends only on the arguments passed. At the same time, some of the chains likeArbitrum
andPolygon
are suspicious of the reorg attack. LiquidationPairFactory.sol#createPair()Optimistic rollups (Optimism/Arbitrum) are also suspect to reorgs since if someone finds a fraud the blocks will be reverted, even though the user receives a confirmation. Can refer this an issue previously report here to have more understanding about it.
Tools Used
Manual review and previously report here
Recommended Mitigation Steps
Deploy createPair() via
create2
withsalt
.Assessed type
Other