It really depends on. Did you waive your appraisal contingency? If you did not, then you can negotiate, if the seller does not agree, you can walk and lose your earnest money. If you waive it and you can’t come up with the difference, you walk then seller can sue you. But I was told the chance of suing is low. In this case it is not about the seller walking or breaking the contract because they are making ****load of money more than what the house is worth. It is more about you whether you can legally back out of the contract or make up the difference. 40K is a lot so I assume you don’t want to. You can also request and pay for a second appraisal if you don’t think this is not correct and negotiate with seller. But they may not agree, and it is important for you to talk to an real estate attorney if you can legally back out.