The removeLiquidity function in Pools.sol uses tx.origin to determine the person who wants to remove liquidity. However, such a design is dangerous since the pool assumes that this function is called from the router, which may not be true if the user is under a phishing attack, and he could unintentionally remove liquidity.
Referenced code: Pool.sol#L77-L79
Recommend consider making the function _removeLiquidity external, which can be utilized by the router, providing information of which person removes his liquidity.
strictly-scarce (vader) acknowledged:
Mervyn853 commented:
dmvt (judge) commented:
