Borax is technically sodium tetraborate and the “sodium” part penetrates the roaches' exoskeletons and dehydrates them. Cockroaches already dehydrate easily, which is why borax is so effective at killing them.