Sea hares are gastropods without hard shells, using their specialized ink as their main defensive mechanism instead.
For one, the ink serves to cloud the predator's vision as well as halt their senses temporarily.
[1][3] They have adapted over time to feed mainly on seaweed and algae as without their specific diet they will be left without ink[1] and fall prey to predators.
[5] Phagomimicry is the defensive behaviour in which expelled chemicals mimic food, deceiving some organisms to eat it instead.
The ink and opaline contains high levels of amino acids and ammonium, present in their predators' food.