Good question! The down payment is based on the agreed upon sales price or the appraised value whichever is LESS.
So if you agree to buy a property for $450,000 and the appraisal comes in at $425,000 (and all the efforts to prove value fail) then as the buyer you will be required to pay the minimum downpayment required by the loan product you are using PLUS the $25,000 difference. (Unless some other arrangment is made or there is a provision in your purchase agreement to lower the agreed price to the appraised value -see a licensed realtor for details).
The opposite is also true. So let’s say your agreed price is $450,000 and the appraisal comes in at $475,000. you still make the downpayment (if required*) based on the $450,000- you do not get credit for the extra value at closing, and usually not until 12 months have passed.
*VA loans within VA loan limits and guidelines do not require a downpayment.