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
Vault does not conform to ERC4626 #129
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
downgraded by judge
Judge downgraded the risk level of this issue
edited-by-warden
M-23
primary issue
Highest quality submission among a set of duplicates
satisfactory
satisfies C4 submission criteria; eligible for awards
selected for report
This submission will be included/highlighted in the audit report
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
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
Jul 12, 2023
Picodes marked the issue as primary issue |
c4-judge
added
the
primary issue
Highest quality submission among a set of duplicates
label
Jul 18, 2023
This was referenced Jul 18, 2023
asselstine marked the issue as sponsor confirmed |
c4-sponsor
added
the
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
label
Jul 18, 2023
Fixed in the following PR: GenerationSoftware/pt-v5-vault#11 |
Picodes changed the severity to 3 (High Risk) |
c4-judge
added
3 (High Risk)
Assets can be stolen/lost/compromised directly
upgraded by judge
Original issue severity upgraded from QA/Gas by judge
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
downgraded by judge
Judge downgraded the risk level of this issue
and removed
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
3 (High Risk)
Assets can be stolen/lost/compromised directly
upgraded by judge
Original issue severity upgraded from QA/Gas by judge
labels
Aug 8, 2023
Picodes changed the severity to 2 (Med Risk) |
Picodes marked the issue as selected for report |
c4-judge
added
selected for report
This submission will be included/highlighted in the audit report
satisfactory
satisfies C4 submission criteria; eligible for awards
labels
Aug 8, 2023
Picodes marked the issue as satisfactory |
Fixed in GenerationSoftware/pt-v5-vault#11 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
downgraded by judge
Judge downgraded the risk level of this issue
edited-by-warden
M-23
primary issue
Highest quality submission among a set of duplicates
satisfactory
satisfies C4 submission criteria; eligible for awards
selected for report
This submission will be included/highlighted in the audit report
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Lines of code
https://github.com/GenerationSoftware/pt-v5-vault/blob/b1deb5d494c25f885c34c83f014c8a855c5e2749/src/Vault.sol#L375-L377
https://github.com/GenerationSoftware/pt-v5-vault/blob/b1deb5d494c25f885c34c83f014c8a855c5e2749/src/Vault.sol#L383-L385
Vulnerability details
Impact
Vault
does not conform to ERC4626 which may break external integrationsProof of Concept
The ERC4626 specification states that
maxDeposit
MUST return the maximum amount of assetsdeposit
would allow to be deposited for receiver and not cause a revert, which MUST NOT be higher than the actual maximum that would be accepted.Similarly,
maxMint
MUST return the maximum amount of shares mint would allow to be deposited to receiver and not cause a revert, which MUST NOT be higher than the actual maximum that would be accepted.The PoolTogether V5
Vault
connects to an external ERC4626-compliant Vault (_yieldVault
) and deposits incoming assets in it. This means thatmaxDeposit
andmaxMint
of the PoolTogether Vault must be constrained by themaxDeposit
andmaxMint
of the external Vault.Tools Used
Manual review, ERC-4626: Tokenized Vaults
Recommended Mitigation Steps
Replace the implementation of
maxDeposit
with:
Analogously, change the implementation of
maxMint
fromto:
Assessed type
ERC4626
The text was updated successfully, but these errors were encountered: