Open c4-bot-10 opened 8 months ago
QA
0xRobocop marked the issue as insufficient quality report
Point 1: invalid (inconsequential, and common practice), Point 2: QA
3docSec changed the severity to QA (Quality Assurance)
3docSec marked the issue as grade-b
Lines of code
https://github.com/code-423n4/2024-03-ondo-finance/blob/78779c30bebfd46e6f416b03066c55d587e8b30b/contracts/ousg/rOUSG.sol#L276-L287 https://github.com/code-423n4/2024-03-ondo-finance/blob/78779c30bebfd46e6f416b03066c55d587e8b30b/contracts/ousg/rOUSG.sol#L638
Vulnerability details
Impact
Fails to comply to ERC20 spec in two ways as stated below.
Note that under EIP Compliance Checklist, it states: "We strive to keep rOUSG as ERC20 compliant as possible."
Proof of Concept
There are two ways in which the contract fails to adhere to the ERC20 spec:
1) It's possible for KYC'd users to transferFrom a 0 amount from any address even if they're not approved in any way
This is in defiance of the ERC20 spec where it states: "The function SHOULD
throw
unless the_from
account has deliberately authorized the sender of the message via some mechanism."2) rOUSG.burn incorrectly emits the Transfer event as a mint of rOUSG tokens when they're actually being burned
This incorrect usage of the Transfer event results in indexing logic failing to properly track balances and totalSupply.
Tools Used
Recommended Mitigation Steps
1) Revert if the msg.sender in transferFrom has an allowance of 0 2) Fix the Transfer event to be from _account to address(0)
Assessed type
ERC20