There's no hard and fast rule. It is up to the employer, and how well you can negotiate.
I work for an American company while staying in India. I am in a senior position, and they are paying me a little on the lower spectrum of what a developer like me would make in the US. But it is a lot more than what the average developer like me would make in India.
Technically, your employer should value your work and pay you regardless of where you are staying, but during negotiations, they will bring up your local cost of living (and I don't blame them for that).