For some reason all logic seems to go out the window when dealing with contractors. As a contractor myself I have seen people quickly offer deposits, not requests quotes in writing and makes payments when payments should not be made. Here is the way a professional contractor deals with sub contractors, when hiring someone to perform work on your home, you should do the same.
GET the bid in writing! Included with the bid, request a schedule of values and payments. This is you and the contractor stating what work will be completed before there is a payment made. If the project is simple, then normally payment is upon completion. If the project is more complex, I normally would suggest making the payments after inspections or when work that is obvious to you has been completed.
Typically construction is divided into four categories: Underground (includes everything under the slab and the slab itself), Rough (Includes the rough framing, electrical, plumbing in the framed walls), Weathered in (after the structure is sealed tight and water can't get in, a roof is on, windows are in) and trim (the building is complete, lights are installed, walls are painted, everything is done).
I am not one to give a deposit unless it is for a custom item that is expensive. If there is a large ticket, custom order item which requires a deposit, the deposit check should be made directly to the manufacture of that item. It is also standard in the construction industry to hold retention on the project. This normally is 10% of all payments and is paid typically 30 days after the project is completed and you all issues have been resolved.
This method works on smaller projects as well. If you are having a house painted that will take a week, you can pay for materials when they are delivered or write the check to the paint supplier and have them deliver the paint. You can pay when the house is prepped for paint (a specific amount that was agreed upon before they start), pay again when the home is mostly painted and then last when the trim work is all completed. This method protects you and any real contractor should agree to these terms without hesitation. If the do not, that is a good warning flag and a signal that you should move along to another contractor.