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

Comment about verify caller in callback functions #23

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/UniswapV3Manager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ contract UniswapV3Manager is IUniswapV3Manager {
PoolAddress.computeAddress(factory, token0, token1, fee)
);
}

//You should understand that callback functions can invoke anybody and take all approved to manager SC assets.
//We do not verify caller here, but in production it must be. For example in UniswapV3Router we can see:
//CallbackValidation.verifyCallback(factory, tokenIn, tokenOut, fee);
function uniswapV3MintCallback(
uint256 amount0,
uint256 amount1,
Expand Down
3 changes: 3 additions & 0 deletions src/UniswapV3NFTManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,9 @@ contract UniswapV3NFTManager is ERC721 {
// CALLBACKS
//
////////////////////////////////////////////////////////////////////////////
//You should understand that callback functions can invoke anybody and take all approved to manager SC assets.
//We do not verify caller here, but in production it must be. For example in UniswapV3Router we can see:
//CallbackValidation.verifyCallback(factory, tokenIn, tokenOut, fee);
function uniswapV3MintCallback(
uint256 amount0,
uint256 amount1,
Expand Down