Beer lacing is caused by protein. The globular protein, LTP1, is hydrophobic (water-hating) and will cling to the CO2 present in foam. This causes the foam and protein to stick to the glass, creating lacing.