In very high ratio mortgage situations, realtors sometimes write in contracts that the deposit is to be returned to the buyer on closing. Don’t do that. It causes confusion and problems.
Instead buyers should be advised that when the mortgage company advances the mortgage money, the extra funds received by the buyers will be refunded to them by their lawyer on closing.
In the contract for New Financing you should show the difference between the deposit and the total purchase price as you normally would. That amount will be the figure that goes into the space for “New Financing” on the Purchase Contract. You can also add condition if it’s a condition of purchase to the buyer, that states “the buyer must obtain financing for $X_ which is more than the amount shown on the contract for New Financing”.