All Spanish contracts have to have a release clause in them and I assume the figure is agreed by the club, the player and his people when he signs that contract. Transfers can happen at any fee the clubs agree on but if a player decides to buy out his own contract then it's at the fee set in the contract, nothing dodgy about it. Legally the player has to pay it with his own money and if that's given to him by another club that's their business but It was , not sure if it still is, seen as income and taxed.