Pixels are the main currency in Starbound and are required for many functions, such as purchasing items from NPC vendors, scanning and printing items using the Pixel Printer, as well as being an ingredient in many crafting recipes.
There are multiple ways of which pixels may be acquired; these include "farming" monsters with melee based weapons, breaking pots, completing quests, finding them in chests and by refining ores at a Refinery.
When the player dies, they will lose 30% of the pixels they currently have. Pixels can't be stored in containers, but the player can use a Pixel Compressor to compress pixels into voxels, which can be safely stored. Voxels can then be extracted at a Refinery for usable pixels, though at a 40% loss in value in order to prevent fully circumventing the pixel loss on death.
The formula for maximum pixels retained after death is: (Average # of Pixels collected between deaths)*(7/3)
Player A Compresses all Pixels they find. 100,000 Pixels Collected. They compress these Pixels into Voxels which retain a value of 60,000 Pixels no matter how many times the player dies.
Player B Never Compresses Pixels. 100,000 Pixels Collected. They die, on average, every 10,000 pixels collected. They would reach a "cap" of 23,333 Pixels retained after death.