Two problems in arithmetic geometry inspired by homotopy theory: enriched curve counting for the Yau-Zaslow formula, and a homotopic approach to the valuative section conjecture