Retirement tax questions

Just to be clear, form 8606 is for the taxable gains made on contributions (if any) prior to their return? So if we made the contribution, did not invest the money in anything, and returned the same amount, there would be no gain?

 

Thanks.