  We prove that every properly edge-colored $n$-vertex graph with average
degree at least $100(\log n)^2$ contains a rainbow cycle, improving upon $(\log
n)^{2+o(1)}$ bound due to Tomon. We also prove that every properly colored
$n$-vertex graph with at least $10^5 k^2 n^{1+1/k}$ edges contains a rainbow
$2k$-cycle, which improves the previous bound $2^{ck^2}n^{1+1/k}$ obtained by
Janzer.
  Our method using homomorphism inequalities and a lopsided regularization
lemma also provides a simple way to prove the Erd\H{o}s--Simonovits
supersaturation theorem for even cycles, which may be of independent interest.
