How to write a letter of guarantee to take legal effect?

I think the following conditions must be met before the letter of guarantee has legal effect:

1. The letter of guarantee must reflect the true wishes of the parties and shall not be forced or threatened.

2. The contents of the letter of guarantee must comply with laws and regulations and social ethics, and shall not infringe upon the legitimate rights and interests of others.

3. The letter of guarantee shall be in written form and signed or sealed by the guarantor.

4. The commitments in the letter of guarantee must be clear, specific and feasible, and do not violate laws, regulations and social ethics.