My client informed me in advance that his budget is 10k while I can comfortably sell him the product for 5k. Should I sell based on their budget or something in between my pricing and their budget? Is there an ethical stance on this matter?
Inform your client that you can save them 4-5K if they go with your recommendations and hand them a breakdown of how you view your side of the budget against their needs.
Bear in mind that the client might have a different idea about how they view the product (and any costs involved), so be clear with them about what you're supplying and what service they require.
There's no real ethics at play here - just be realistic about your pricing in terms of giving value to the customer and also giving yourself a reasonable profit.
There are those who believe that it is ethical to sell at what ever the client is willing to pay. Others see no such need and will look to give the client a good deal.
You can give a good deal to the client only if you really know all the aspects of delivering what the client wants. If there is anything that you don't know, that will drive your costs up. I only bid fixed price on projects where I have done it several times already, have the proper libraries built, know more about it than the client does, and do a better job of managing the project than the client can.
One aspect may be that the client sees difficulties that you are not aware of and that will double your costs. Or the client knows how much more is in the project description and you don't. It is very rare that a client has a higher budget than you think you can do it for. In most cases, the client thinks it can be done for half or a quarter of what it really costs.
I had a tree service bid one price and I told him that my budget was double that. I wanted a lot more work done on the tree than he expected.
It is important that you can justify any prices you give; if the client gets the impression that you are making up numbers on-the-fly (e.g. simply increasing your price to be nearer their budget) then trust will be eroded, and they will be suspicious that you might overcharge for any future work.
As the other answers indicate, there are several aspects to setting a price.
If it is a one-time-sale, one should probably attempt to maximize the payment. This could either be done by setting a price just below their budget - or quoting your preferred price of 5k and adding a retainer of some amount, as there will virtually always be some level of bug-fixing, support, enhancements and so on.
If more work could potentially be forthcoming, being more defensive in pricing could be considered. A drawback of quoting a (for them) surprisingly low price, is that you effectively cast yourself as cheap - which is difficult to break out of.
The retainer model described above could also be used in an attempt to retain a client - and is the closest to a one-size-fits-all approach.