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

UniswapV2Pair: initialize function should be protected #30

Open
Maksandre opened this issue Oct 27, 2024 · 0 comments
Open

UniswapV2Pair: initialize function should be protected #30

Maksandre opened this issue Oct 27, 2024 · 0 comments

Comments

@Maksandre
Copy link

Maksandre commented Oct 27, 2024

🐞 Bug Report

💻 Describe the bug

initialize function has a public modifier and does not contain any checks inside its body. This means anyone can call this function externally leading to token addresses override.

function initialize(address _token0, address _token1, CurrencyId _tokenId0, CurrencyId _tokenId1) public {
token0 = _token0;
token1 = _token1;
tokenId0 = _tokenId0;
tokenId1 = _tokenId1;
}

Additionally, the Factory should call this function, which is not happening now.

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