Pa. Const. art. I, § 17
No ex post facto law, nor any law impairing the obligation of contracts, or making irrevocable any grant of special privileges or immunities, shall be passed.