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

getPseudoRand is easily manipulatable #28

Closed
code423n4 opened this issue May 10, 2021 · 1 comment
Closed

getPseudoRand is easily manipulatable #28

code423n4 opened this issue May 10, 2021 · 1 comment
Labels
1 (Low Risk) Acknowledged bug Something isn't working duplicate This issue or pull request already exists

Comments

@code423n4
Copy link
Contributor

Handle

paulius.eth

Vulnerability details

Impact

function getPseudoRand uses a very poor source of randomness so it is easily replicable on another smart contract. When enableDirectRedeem is turned off, you can't specify specificIds, however, it does not stop advanced users to write a custom smart contract that exploits this randomness or reverts if the final output is not what was intended. I know that you are aware that this random generation is not safe (thus named 'pseudo') but still I think this is worth pointing out as it gives an unfair advantage to those that know smart contracts and can build a service on top of it. Also, it helps to avoid directRedeemFee.

@code423n4 code423n4 added 1 (Low Risk) bug Something isn't working labels May 10, 2021
code423n4 added a commit that referenced this issue May 10, 2021
@0xKiwi 0xKiwi added duplicate This issue or pull request already exists Acknowledged labels May 21, 2021
@0xKiwi 0xKiwi closed this as completed May 21, 2021
@cemozerr
Copy link
Collaborator

Duplicate of #78

@cemozerr cemozerr marked this as a duplicate of #78 May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 (Low Risk) Acknowledged bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants