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

Replace assert with require or custom error #24

Closed
Alexangelj opened this issue Feb 23, 2024 · 2 comments
Closed

Replace assert with require or custom error #24

Alexangelj opened this issue Feb 23, 2024 · 2 comments
Assignees
Labels
📃 contracts Anything related to the DFMM contracts (or strategies) 🧹 improvement Code improvements or cleanup

Comments

@Alexangelj
Copy link
Contributor

assert(liquidityDelta >= int256(minLiquidityDelta));

Assertions don't provide the best feedback for errors since they use generic messages that can be triggered in other scenarios - we should use a require statement or custom error with a unique message/error for this case.

@0xJepsen 0xJepsen added the 🧹 improvement Code improvements or cleanup label Feb 24, 2024
@0xJepsen 0xJepsen added this to the 🔍 Contracts Audit milestone Feb 24, 2024
@clemlak
Copy link
Contributor

clemlak commented Feb 26, 2024

I think this contract is mostly used by @Autoparallel for testing purposes, we're not sure if we'll actually release it.

@clemlak clemlak self-assigned this Feb 28, 2024
@clemlak clemlak added the 📃 contracts Anything related to the DFMM contracts (or strategies) label Feb 28, 2024
@clemlak
Copy link
Contributor

clemlak commented Mar 13, 2024

Closed by #53.

@clemlak clemlak closed this as completed Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📃 contracts Anything related to the DFMM contracts (or strategies) 🧹 improvement Code improvements or cleanup
Projects
None yet
Development

No branches or pull requests

3 participants