Any contract to prosecute an action for the recovery of any land in the adverse possession of another, for the whole or part of the land thus possessed, or for the whole or any part of the profits thereof, is void. The parties to the contract shall forfeit all right in and claim to the land, and all such rights and claims, and the right to maintain an action at law or in equity thereon, shall vest in the state, and inure to the benefit of the person in possession.
KRS 372.080