Contingent fees are allowed in certain circumstances. Here is an excerpt from the NC Board of CPA Examiners (21 NCAC 08N .0303 (d).
(d) Acceptance of a Contingent Fee.
(1) The offering or rendering of professional services for, or the receipt of, a contingent fee by a CPA shall not be prohibited except for engaging to render or rendering by a CPA:
(A) of professional services for any person for whom the CPA also performs attest services, during the period of the attest services engagement, and the period covered by any historical financial statements involved in such attest services; and
(B) for the preparation of original or amended tax returns or claims for tax refunds.
(2) Fees shall not be regarded as being contingent if fixed by courts or other public authorities or, in tax matters, if determined based on the results of judicial proceedings or the findings of governmental agencies.