Implement logic for buy/sell undercutting