OIL CRACKED LIKE AN EGG
Beeswax repels external water
The outside of the container has a thin layer of beeswax, which protects, as it cannot be dissolved by a liquid.
Caramelized sugar shapes container
The container is made of caramelised sugar. When sugar is heated to a temperature of about 170 degrees, the molecules are scattered, and the constituents combine into new, smaller molecules, which produce the hard mass. The material cannot react with oil and wax.
Oil is protected
The container could contain oil-based foods such as olive oil. The oil cannot react with the sugar, as they consist of two different types of molecules. A light stroke shatters the container, so the oil can escape.