3. Find all integer pairs $(a, b)$ such that the system of equations
$$\left\{\begin{array}{l}
x^{2}+2 a x-3 a-1=0 \\
y^{2}-2 b y+x=0
\end{array}\right.$$

has exactly three distinct real solutions $(x, y)$.
3. Let $(a, b)$ be a pair of integers that satisfy the conditions, then the system of equations
$$\left\{\begin{array}{l}
x^{2}+2 a x-3 a-1=0, \\
y^{2}-2 b y+x=0
\end{array}\right.$$

has exactly 3 different real solutions, so equation (1) should have two different real roots, with the discriminant $\Delta=4 a^{2}+12 a+4=4\left(a^{2}+3 a+1\right)>0$.

Let the two roots be $x_{1}<0$ and $x_{2}>0$. For the equation $y^{2}-2 b y+x_{1}=0$ to have no real roots, the discriminant must be less than 0, i.e., $4 b^{2}-4 x_{1}<0$, which implies $b^{2}<x_{1}$. For the equation $y^{2}-2 b y+x_{2}=0$ to have two different real roots, the discriminant must be greater than 0, i.e., $4 b^{2}-4 x_{2}>0$, which implies $b^{2}>x_{2}$. Therefore, we have $b^{2}<x_{1}<0$ and $b^{2}>x_{2}>0$, leading to $b^{2}=-a-\sqrt{a^{2}+3 a+1}$ and $b^{2}=-a+\sqrt{a^{2}+3 a+1}$.

This requires $a^{2}+3 a+1$ to be a perfect square. Let $a^{2}+3 a+1=c^{2}(c \geqslant 0, c \in \mathbf{Z})$. Multiplying both sides by 4 and completing the square, we get: $(2 a+3)^{2}-(2 c)^{2}=5$, i.e., $(2 a-2 c+3)(2 a+2 c+3)=5$, which gives $(2 a-2 c+3,2 a+2 c+3)=(-5,-1)$ or $(1,5)$. Solving these, we get $a=0$ or -3. Further, we have $(a, b)=(0,1)$, $(0,-1)$, $(-3,2)$, or $(-3,-2)$.