It depends on a lot of factors. Usually in a rear ender the driver who does the rear ending is at fault because you are always supposed to leave enough distance for someone stopping short in front of you. There are exceptions though. If you're worried about who pays for property damage, call your insurance company and explain why you don't think you were at fault. Vid you were injured and you think it is another driver's fault, you should see a lawyer to discuss the specific facts.
Why did driver 1 slam on her brakes? That must be answered to determine if she has fault. If there was no condition that caused her to do this and/or she was following too close to another vehicle and thus had to make a sudden stop, then she may have liability.
It's difficult to make liability determinations from a short post. If you were injured, retain a personal injury lawyer to investigate. If a claim is made against you, tender to the claim to your insurance company.
Typically, each (or any) car behind the first that failed to leave enough space or were going to fast to stop before hitting the car in front is negligent. This is called the assured clear distance ahead rule. Each driver is supposed to leave enough space and at such a speed that they can stop before hitting the car in front if that car were to stop --even if they slammed on the brakes.
If you feel this is the "best" answer or is "helpful," please indicate. Since I am limited to the information you provide, I cannot guarantee the accuracy of the answer. You should seek the advise of an attorney who can explore all aspects of your question. This communication does not form an attorney client relationship.
I wish I had been present for this collision to give you an honest assessment. In any case, let your carrier know so that the insurance company can investigate. Make sure you cooperate with your carrier.
In no way am I offering you legal advice, and in no way has my comment created an attorney-client relationship. You are not to rely upon my note above in any way, but insted need to sit down with counsel and share all relevant facts before receiving fully-informed legal advice. If you want to be completely sure of your rights, you must sit down with an experienced criminal defense attorney to be fully aware of your rights.
Sign up to receive a 3-part series of useful information and advice about personal injury law.