A developer can choose to enable or disable the acceptance of value in a contract. This is done by flagging the named/unnamed functions as payable. But, there are ways one can send Ether to the contract by force.
This can affect some of the logic inside a contract, which was written based on the previous assumption. In this recipe, you will learn how to find and avoid such problems in your smart contract.