In your lawyer’s contingency agreement, they may choose to include a “sliding scale” fee. This means that they charge a different percentage depending on which stage your case is resolved.
This could mean that if you have a strong case that is resolved relatively quickly and without having to file a lawsuit, your attorney may take a lower percentage of the settlement. Alternatively, if your attorney has to file a lawsuit, your lawyer may charge a higher fee, closer to 40% of your settlement. If your case has to go to trial, their fee may be even higher than that. Individual attorneys will write their own contingency agreements, so it is important that you discuss this with your attorney before making decisions in your case.