score:0
In Germany this formal obligation is called a VerpflichtungserklΓ€rung and it is a promise to reimburse the state for any cost if you should overstay. It must be filed with the municipal authorities, and they will check if your relative has the means to pay for you. They might also require a deposit if that ability to pay is in question, but the liability would not be limited to that deposit.
Such an obligation may be filed by a person or company. Citizenship is not the issue, it depends on the ability to pay. Generally the person giving the VerpflichtungserklΓ€rung has to be able to pay a minimum livelihood for himself, his other dependents, and the recipients of the obligation. The exact amount varies from place to place to account for costs of living.