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

costly-loop #17

Open
code423n4 opened this issue Jun 14, 2021 · 1 comment
Open

costly-loop #17

code423n4 opened this issue Jun 14, 2021 · 1 comment

Comments

@code423n4
Copy link
Contributor

Handle

heiho1

Vulnerability details

Impact

RCMarket#initialize(uint256,uint32[],uint256,uint256,address,address,address[],address,string) has a potentially expensive loop that modifies state continually over an indeterminate number of cards.

Proof of Concept

https://github.com/code-423n4/2021-06-realitycards/blob/86a816abb058cc0ed9b6f5c4a8ad146f22b8034c/contracts/RCMarket.sol#L252

Tools Used

Slither

Recommended Mitigation Steps

Potentially a gas-expensive loop because of arbitrary length of _cardAffiliateAddresses possibly assigning to state variable cardAffiliateCut multiple times.

@Splidge
Copy link
Collaborator

Splidge commented Jun 21, 2021

implemented here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants