A sensor (e.g., an optical sensor) that may be implanted within a living animal (e.g., a human) and may be used to measure an analyte (e.g., glucose or oxygen) in a medium (e.g., interstitial fluid, blood, or intraperitoneal fluid) within the animal. The sensor may include a sensor housing, an analyte indicator covering at least a portion of the sensor housing, and one or more compounds containing boronate or boronic acid moieties that reduce degradation of the analyte indicator.