This resignation can be used when a financial conflict of interest is discovered.
Dear Mr./Ms. Bossname,
It is with regret that I must immediately resign from (job/appointment).
My attorneys have made me aware that my financial holdings in (investment) constitute a conflict of interest. I'm not sure how this didn't come up during the vetting process, but regardless the fault lies with me in failing to disclose this matter.
I had looked forward to serving in this role, and am deeply disappointed that we can't move forward together. I apologize for wasting your time.