A farm is a stack of positions: supply tokens to a liquidity-pool, stake the lp-token for emissions, sometimes borrow against the position to do it again. Each layer adds contract risk, liquidation risk and complexity, and returns are quoted as though none of that exists.
Headline APY figures deserve dismantling. They typically assume the reward token's price holds, assume continuous compounding, ignore impermanent-loss, ignore gas, and are computed from an emission rate that changes weekly. A 400% APY on a token down 80% over the same period was a loss.
The unglamorous risks dominate the outcomes. Contract exploits, oracle-manipulation, admin-key-risk on upgradeable contracts, and depegs have each wiped out farms that were paying well the day before. Nothing here is a recommendation to farm anything; it is a description of where the money and the risk actually come from.
Related: liquidity-mining, real-yield, impermanent-loss, vault-strategy