I have an amplifier in a closed loop, the diagram looks as follows:

[![Inverting amplifier](https://i.stack.imgur.com/07Hky.png)](https://i.stack.imgur.com/07Hky.png)

The DC gain is simple which \$ -Rf/R1 \$. If I make \$ -Rf=2\cdot R1 \$ the the DC gain is two. This is verified using AC analysis in Cadence.
[![Closed loop gain phase](https://i.stack.imgur.com/k4xLi.png)](https://i.stack.imgur.com/k4xLi.png)

However there seems to be a complex conjugate pole also, which leads to unstable behavior.
[![Location of complex conjugate poles](https://i.stack.imgur.com/GMfpV.png)](https://i.stack.imgur.com/GMfpV.png)

Hence I modify the gain equation as:
\$Av= \frac{-Rf}{R1} \cdot \frac{1}{(s+\sigma + j\omega)(s+\sigma - j\omega)} \$. The notation \$ + \sigma \$ is because the phase goes negative. I observed that if I put a capacitor across Rf as shown in this figure then I can get rid of the complex conjugate poles. The value of capacitor is 1pF.
[![Compensated gain and phase](https://i.stack.imgur.com/4NpAe.png)](https://i.stack.imgur.com/4NpAe.png)
[![inverting amplifier with a compensation cap](https://i.stack.imgur.com/93HRb.png)](https://i.stack.imgur.com/93HRb.png)

So now the gain equation becomes:
\$ Av= \frac{-Rf}{R1 \cdot C} \cdot \frac{1}{(s+\sigma + j\omega)(s+\sigma - j\omega)(s+p1)} \$ where \$ p1= 1/Rf\cdot C \$ This equation checks out because at DC, the gain is \$ -Rf/R1 \$.

My question is, from this equation how is the pole being compensated? Is my analysis even correct?

To add more information the open loop gain of the amplifier is a single pole system as shown here:

[![Open loop gain phase](https://i.stack.imgur.com/8CUa2.png)](https://i.stack.imgur.com/8CUa2.png)