Vorticity balance of boundary currents