Exotic compact objects, horizonless spacetimes with reflective properties, have intriguingly been suggested by some quantum-gravity models as alternatives to classical black-hole spacetimes. A remarkable feature of spinning horizonless compact objects with reflective boundary conditions is the existence of a discrete set of critical surface radii, {rc(ā; n)}n = 1n = ∞, which can support spatially regular static (marginally-stable) scalar field configurations (here ā≡J/M2 is the dimensionless angular momentum of the exotic compact object). Interestingly, the outermost critical radius rcmax≡ maxn{rc(ā; n)} marks the boundary between stable and unstable exotic compact objects: spinning objects whose reflecting surfaces are situated in the region rc > rcmax(ā) are stable, whereas spinning objects whose reflecting surfaces are situated in the region rc < rcmax(ā) are superradiantly unstable to scalar perturbation modes. In the present paper we use analytical techniques in order to explore the physical properties of the critical (marginally-stable) spinning exotic compact objects. In particular, we derive a remarkably compact analytical formula for the discrete spectrum {rcmax(ā)} of critical radii which characterize the marginally-stable exotic compact objects. We explicitly demonstrate that the analytically derived resonance spectrum agrees remarkably well with numerical results that recently appeared in the physics literature.