The epidermis is the outer layer of cells designed to provide protection.,[1] excrete waste and thermoregulate by sweating, retain water, and synthesize vitamin D. It is also known as the top layer of skin.