Contributing LOI for Tax-Free Fee Rolled into Deal

Has anyone successfully earned a deal fee on a tax-free basis, and rolled that fee into a deal in exchange for equity in the target?

There is discussion that this can be accomplished by contributing the LOI as property in exchange for a fee, that fee is then paid directly to the company, which then issues equity. The taxable event would be capital gains upon an exit.

Thanks in advance!