Admin can't burn rOUSG tokens if account is remove from KYC list or sanctioned. #206
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate-32
🤖_26_group
AI based duplicate group recommendation
satisfactory
satisfies C4 submission criteria; eligible for awards
Lines of code
https://github.com/code-423n4/2024-03-ondo-finance/blob/78779c30bebfd46e6f416b03066c55d587e8b30b/contracts/ousg/rOUSG.sol#L624
Vulnerability details
Description:
The nat spec of
burn
functions says that admin can burn rOUSG tokens from any account. But it is not true, cause the admin can't burn rOUSG token of user which is remove from KYC list or sanctioned.Proof of Concept:
burn
function: It is calling_burnShares
function to burn the shares of particular address._burnShares
function: Than it is calling_beforeTokenTransfer
function to get the KYC and sanctioned status of _account._beforeTokenTransfer
function: And if now the _account is sanctioned or not in KYC list than the admin can't burn the rOUSG token of _account.Impact:
Admin can't burn rOUSG tokens from any account as nat spec of
burn
function states.Recommended Mitigation:
The recommended mitigation is to burn the rOUSG token directly in
burn
function rather in_burnShares
function.Assessed type
Context
The text was updated successfully, but these errors were encountered: