-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AccountingManager
is not ERC4626 compliant
#1419
Labels
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-136
grade-a
partial-25
Incomplete articulation of vulnerability; eligible for partial credit only (25%)
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
🤖_16_group
AI based duplicate group recommendation
sufficient quality report
This report is of sufficient quality
Comments
DadeKuma marked the issue as duplicate of #136 |
DadeKuma marked the issue as sufficient quality report |
gzeon-c4 changed the severity to QA (Quality Assurance) |
This previously downgraded issue has been upgraded by gzeon-c4 |
gzeon-c4 marked the issue as partial-25 |
gzeon-c4 changed the severity to QA (Quality Assurance) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-136
grade-a
partial-25
Incomplete articulation of vulnerability; eligible for partial credit only (25%)
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
🤖_16_group
AI based duplicate group recommendation
sufficient quality report
This report is of sufficient quality
Lines of code
https://github.com/code-423n4/2024-04-noya/blob/9c79b332eff82011dcfa1e8fd51bad805159d758/contracts/accountingManager/AccountingManager.sol#L693-L707
https://github.com/code-423n4/2024-04-noya/blob/9c79b332eff82011dcfa1e8fd51bad805159d758/contracts/accountingManager/AccountingManager.sol#L304
https://github.com/code-423n4/2024-04-noya/blob/9c79b332eff82011dcfa1e8fd51bad805159d758/contracts/accountingManager/AccountingManager.sol#L200
Vulnerability details
As stated in the README, the
AccountingManager
should comply with the ERC4626 standard, but it currently does not.Impact
Vault
does not conform to ERC4626 which may break external integrations.Proof of Concept
Functions:
deposit(uint256 assets, address receiver)
mint(uint256 shares, address receiver)
AccountingManager
:AccountingManager
contract overrides these functions but reverts withNoyaAccounting_NOT_ALLOWED
.deposit
function, but it takes three parameters (address receiver, uint256 amount, address referrer
) instead of the ERC-4626 standard two parameters (uint256 assets, address receiver
).withdraw(uint256 assets, address receiver, address owner)
redeem(uint256 shares, address receiver, address owner)
AccountingManager
:AccountingManager
overrides these functions but reverts withNoyaAccounting_NOT_ALLOWED
.withdraw
function, but it only takes two parameters (uint256 share, address receiver
), whereas the ERC-4626 standard requires three parameters (uint256 assets, address receiver, address owner
).AccountingManager.withdraw
function is actually aERC4626.redeem
function. The reason for this is it receivesuint256 share
as a parameter when it should instead receiveuint256 assets
.Tools Used
Manual Review
Recommended Mitigation Steps
Modify the
AccountingManager
functions to comply with the ERC4626 standard.Assessed type
ERC4626
The text was updated successfully, but these errors were encountered: