Open code423n4 opened 1 year ago
Without a broader impact statement, this is probably QA (code different than the specification)
Added notTradingPausedOrFrozen
modifier
Agree is QA.
tbrent marked the issue as disagree with severity
tbrent marked the issue as sponsor confirmed
0xean changed the severity to QA (Quality Assurance)
Lines of code
https://github.com/reserve-protocol/protocol/blob/c4ec2473bbcb4831d62af55d275368e73e16b984/contracts/p1/Distributor.sol#L87-L133 https://github.com/reserve-protocol/protocol/blob/c4ec2473bbcb4831d62af55d275368e73e16b984/contracts/p1/RevenueTrader.sol#L57-L62
Vulnerability details
Impact
According to the system-design docs https://github.com/reserve-protocol/protocol/blob/c4ec2473bbcb4831d62af55d275368e73e16b984/docs/system-design.md, all interactions are disabled EXCEPT ERC20 functions + StRSR.stake if system is frozen.
But
RevenueTraderP1.distributeTokenToBuy
andDistributorP1.distribute
do not check the system status.Proof of Concept
When the system is exposed to unpredictable and serious vulnerabilities, it will be frozen by design. It means the core components are unsafe now. But the
RevenueTraderP1.distributeTokenToBuy
andDistributorP1.distribute
will approve and transfer erc20 to other core components.It goes against the security considerations of the system design.
Tools Used
Manual review
Recommended Mitigation Steps
Add requireNotFrozen check.
Assessed type
Access Control