Yaffs relies on error reporting from mtd to signal operations that require a block to be retired (move data to a reliable/spare block.)
The actual error detection and correction is done by mtd and/or the NAND driver via ECC algorithms. Some are stronger than others, eg 1-bit vs 4-bit corrections.
It is important for blocks with too many correctable ECC errors to be retired before the data becomes unreadable or corrupt. Again, Yaffs does the retiring based on the lower level drivers reporting the corrected reads to Yaffs and puts blocks into the bbt (bad block table.)