Barrier: The olive oil forms a slick barrier on top of the mixture. If flies or mosquitoes enter the trap (especially through the holes in the plastic wrap, if used), they get trapped by the oil, which prevents them from escaping by clogging their wings and restricting their movement.
Notes:
