-
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
QA Report #63
Labels
bug
Something isn't working
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Comments
code423n4
added
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
labels
Feb 5, 2022
Dup of #165 |
JeeberC4
added
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
and removed
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
labels
Apr 21, 2022
Adding to QA Report #81 |
Finding is valid |
1 |
Generating as QA Report as warden's actual QA Report was invalidated by judge. Preserving original title: Unhandled return value of transfer in ConvexStakingWrapper |
JeeberC4
changed the title
Unhandled return value of transfer in ConvexStakingWrapper
QA Report
Apr 28, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Lines of code
https://github.com/code-423n4/2022-02-concur/blob/main/contracts/ConvexStakingWrapper.sol#L179
https://github.com/code-423n4/2022-02-concur/blob/main/contracts/ConvexStakingWrapper.sol#L182
Vulnerability details
Impact
ERC20 implementations are not always consistent. Some implementations of
transfer
andtransferFrom
could return ‘false’ on failure instead of reverting. It is safer to wrap such calls into require() statements or use safe wrapper functions implementing return value/data checks to handle these failures.It is observed safeTransfer() is being used in the
withdraw
function, this should be replicated in the_calcRewardIntegral
functionProof of Concept
Unsafe
transfer
calls were found in the following locations:https://github.com/code-423n4/2022-02-concur/blob/main/contracts/ConvexStakingWrapper.sol#L179
https://github.com/code-423n4/2022-02-concur/blob/main/contracts/ConvexStakingWrapper.sol#L182
Tools Used
Recommended Mitigation Steps
Check the return value and revert on 0/false or use safeTransfer OpenZeppelin’s SafeERC20 wrapper functions.
The text was updated successfully, but these errors were encountered: