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

Create reentrancy unit tests for EMP #1311

Closed
nicholaspai opened this issue Apr 27, 2020 · 1 comment · Fixed by #1334
Closed

Create reentrancy unit tests for EMP #1311

nicholaspai opened this issue Apr 27, 2020 · 1 comment · Fixed by #1334
Labels
tech debt Technical Debt

Comments

@nicholaspai
Copy link
Member

In addition to enforcing Check-Effects-Interaction patterns on the EMP, we should also create explicit tests to simulate reentrancy exploits that would succeed if not for this pattern.

Example:

  • withdrawPassedRequest: calls external method collateralCurrency.safeTransfer(...) which we patched in this PR
@nicholaspai nicholaspai added the tech debt Technical Debt label Apr 27, 2020
@nicholaspai nicholaspai added this to the Expiring Multiparty milestone Apr 27, 2020
@nicholaspai
Copy link
Member Author

Ideally use an ERC777 implementation to test this https://github.com/0xjac/ERC777/blob/master/contracts/examples/ReferenceToken.sol

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

Successfully merging a pull request may close this issue.

1 participant