Skip to content
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

FonDevs - Incorrect Struct encoding will cause valid signatures to fail #284

Open
sherlock-admin2 opened this issue Nov 17, 2024 · 0 comments

Comments

@sherlock-admin2
Copy link
Contributor

sherlock-admin2 commented Nov 17, 2024

FonDevs

High

Incorrect Struct encoding will cause valid signatures to fail

https://github.com/sherlock-audit/2024-11-vvv-exchange-update/blob/main/vvv-platform-smart-contracts/contracts/vc/VVVVCTokenDistributor.sol#L157C5-L174C11

Summary

The contract VVVVCTokenDistributor fails to implement the struct encoding correctly according to EIP712.
The EIP states that The array values are encoded as the keccak256 hash of the concatenated encodeData of their contents.
instead the contract just encodes the whole array instead of also encoding each of the individual elements in the array.

check this link for a reference https://ethereum.stackexchange.com/questions/151513/eip712-typeddata-encoding-with-nested-array-of-structs-returning-wrong-signer

Root Cause

Wrong data encoding

Internal pre-conditions

No response

External pre-conditions

No response

Attack Path

No response

Impact

it will not be possible to claim token with that contract

PoC

No response

Mitigation

No response

@sherlock-admin3 sherlock-admin3 changed the title Bright Quartz Finch - Incorrect Struct encoding will cause valid signatures to fail FonDevs - Incorrect Struct encoding will cause valid signatures to fail Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant