Gifted deposits are not fraudulent when disclosed and the real purchase price used. However, increasing the value of the property to hide the gift and recording that as the purchase price is fraudulent.

If it's not legal then it won't get past solicitors unless they are in on it as well.