Ionic compensation for defect reduction and enhanced performance of tin-based perovskite solar cells