Please read
this post!
In basic solutions (e.g. lye) DMT is deprotonated [a state known as the free base] and thus more soluble in NPS (e.g. naphtha) as it carries no charge.
In acidic solutions DMT is protonated and thus more soluble in polar solvents such as water.
Because naphtha does not mix with water, we can easily separate the two, and by changing the pH of the water we can make DMT migrate from one phase to the other accordingly as required.