Plays an important role in preventing glycogen hyperphosphorylation and the formation of insoluble aggregates, via its activity as glycogen phosphatase, and by promoting the ubiquitination of proteins involved in glycogen metabolism via its interaction with the E3 ubiquitin ligase NHLRC1/malin (PubMed:18040046, PubMed:18852261, PubMed:19036738, PubMed:23663739, PubMed:24430976, PubMed:24068615). Dephosphorylates phosphotyrosine and synthetic substrates, such as para-nitrophenylphosphate (pNPP), and has low activity with phosphoserine and phosphothreonine substrates (in vitro) (PubMed:16971387, PubMed:24430976). Has also been shown to dephosphorylate MAPT (PubMed:19542233). Shows strong phosphatase activity towards complex carbohydrates in vitro, avoiding glycogen hyperphosphorylation which is associated with reduced branching and formation of insoluble aggregates (PubMed:18040046, PubMed:18852261, PubMed:23663739). Forms a complex with NHLRC1/malin and HSP70, which suppresses the cellular toxicity of misfolded proteins by promoting their degradation through the ubiquitin-proteasome system (UPS) (PubMed:19036738, PubMed:24068615). Acts as a scaffold protein to facilitate PPP1R3C/PTG ubiquitination by NHLRC1/malin. Also promotes proteasome-independent protein degradation through the macroautophagy pathway (PubMed:20453062). H2O + O-phospho-L-tyrosyl-[protein] = L-tyrosyl-[protein] + phosphate H2O + O-phospho-L-seryl-[protein] = L-seryl-[protein] + phosphate H2O + O-phospho-L-threonyl-[protein] = L-threonyl-[protein] + phosphate Homodimer (PubMed:16971387). Interacts with PPP1R3B, PPP1R3C, HIRIP5, and EPM2AIP1 (By similarity). Binds glycogen and Lafora bodies. Interacts with NHLRC1/malin (via the NHL repeats) (By similarity). Forms a complex with NHLRC1/malin and HSP70 (PubMed:19036738). Interacts with PPP1R3D; in the presence of NHLC1/malin the interaction leads to ubiquitination and autophagic degradation of PPP1R3D (PubMed:23624058). Interacts (via the phosphatase domain) with MAPT/Tau; the interaction dephosphorylates MAPT (PubMed:19542233). Interacts with PRDM8 (By similarity). Colocalizes with glycogen synthase in punctate structures in the cytoplasm. Primarily associated with polyribosomes at the rough endoplasmic reticulum, and also detected at the plasma membrane. Under glycogenolytic conditions localizes to the nucleus. Detected in skeletal muscle and in brain (at protein level) (PubMed:24430976). Widely expressed. Higher levels of expression are found in heart, brain, liver, skeletal muscle and kidney (PubMed:10092504). In the embryo, highly expressed at 17 dpc. Detected in all postnatal stages, but highest expression is found at day 160 after birth. The CBM20 domain mediates binding to cytoplasmic glycogen and to Lafora polyglucosan bodies. Polyubiquitinated by NHLRC1/malin. Phosphorylation on Ser-25 by AMPK affects the phosphatase activity of the enzyme and its ability to homodimerize and interact with NHLRC1, PPP1R3C or PRKAA2. Impaired behavioral responses, ataxia, spontaneous myoclonic seizures and progressive accumulation of poorly-branched, insoluble forms of glycogen (Lafora bodies) in liver, brain and skeletal muscle tissue (PubMed:12019206, PubMed:18040046, PubMed:24430976). Expression of both wild-type Epm2a and mutated Epm2a without phosphatase activity can abolish the appearance of Lafora bodies in brain and heart from 7 to over 12 month old mutant mice (PubMed:24430976). At 3 months of age, overall glycogen levels are normal; by 9 months of age, a 3-fold increase in overall glycogen levels and a 6-fold increase in glycogen phosphate levels is observed (PubMed:18040046, PubMed:18852261, PubMed:22669944, PubMed:23663739). Muscle glycogen has an altered structure, with a reduced size, an abnormally high proportion of very short side chains, fewer medium-length chains and an increased number of long chains (PubMed:23663739). Glycogen synthase (Gys1) and 1,4-alpha-glucan-branching enzyme (Gbe1) activities in brain and muscle tissue are normal (PubMed:18040046). 10 month old mice have neurofibrillary tangles (NFTs, aggregates of hyperphosphorylated Mapt/Tau) in brain and muscle tissue, however NFTs are not observed in 4 and 6 month old mice (PubMed:19542233). 3- and 12- month old mice show reduced numbers of autophagosomes in liver extracts, and 3-month old starved mice have increased levels of the autophagy dysfunction marker Map1lc3b/LC3-II and increased levels of ubiquitinated proteins, suggesting impaired macroautophagy (PubMed:20453062). Belongs to the protein-tyrosine phosphatase family.