Yen is the currency required to operate vending machines, and has no other function in the game.
Yen is acquired by killing NPCs with the Knife Effect. Most killable NPCs give a 1 in 8 chance of yielding 100 yen when killed with the knife, except for the Organoid in the Sky Garden that always produces yen every time it is killed, and the Goblin in the courtyard room of the Basement of the FC House that has a 50% chance of yielding 200 Yen.
The amount of Yen in your possession can be checked in the pause menu in the bottom-left corner of the screen. The fact that yen is acquired while dreaming, but stays in your menu after "waking up" may indicate that Madotsuki is always dreaming.
Vending machines sell pink drinks that increase your hit points, represented as hearts in the pause menu. However, there is no practical benefit from this as there are no damage hazards that can physically hurt Madotsuki in her dreams. Therefore, there is no need at any point in the game to increase Madotsuki's HP other than for personal satisfaction of the player, or as a mark on the save data window. The reason for its inclusion is that Yume Nikki was made in RPG Maker, and there is no way to remove the health system from a game.
Upon operating a vending machine, the game does not inform you of the HP increase, instead displaying the message 'Window scheme changed'. In actual fact, this is not true and the menu color scheme can only be changed by interacting with the Lunatic Toriningen behind the counter in a room in the Mall. This error is likely a translation error or an unremoved artefact of the vending machine's function in a previous version of Yume Nikki.
Variations between Vending MachinesEdit
The vending machine here dispenses the 350ml can of 'Health drink'. It costs 100 Yen and increases HP and Max HP by 1 point.
The vending machine here dispenses the 500ml bottle of 'Health drink'. It costs 130 Yen and increases HP and Max HP by 1 point, and has a 33% chance of increasing them by an additional 1 point.
The vending machine here dispenses the 1.5 liter bottle of 'Health drink'. It costs 150 Yen and increases HP and Max HP by 1 point, and has a 50% chance of increasing them by an additional 1 point.