Is drug addiction motivated by the desire to achieve euphoria or to avoid the downer?

Both . Starts with experimentation and acting out ends up being hooked to avoid downers.
Both. Addiction is driven by Dopamine in the brain, the reward center , the desire to achieve a hedonic state in other words equal state .A basic premise initially might be euphoria but later this is substituted by maintenance of function and not feeling sick in other words a hedonic state.