The UK treasury is formally Her Majesty's Treasury, and the sovereign grant paid to her is actually a small portion of the money she puts in through the Crown Estate. So she is a net donor to the treasury, although she gets a major out in that the Crown Estate is not subject to inheritance tax.