Hopefully someone can give you a better answer because I am not a real estate professional, I am answering the question based on my past experience. From my understanding the earnest deposit normally is kept until closing and is automatically put towards the house. Assuming the seller is paying all closing cost, the deposit will automatically be put towards the price of the home. Basically when all of the funds are settled at closing, the balance on your loan should be 152,000 - 500. or 151,500. Your lender or title company should however be able to verify this for you, different states may have different laws regarding to how this money can be treated.