This sort of arrangement may exist in rare cases, but it is frankly unheard of in the venture-backed startup world. It makes no sense for two reasons: First, if the valuation of the company is stable or increases, a future financing round causes percentage dilution but not economic dilution -- that is, you're cutting the pie into more slices, but it's a bigger pie than you started with, so your economic interest is not being diluted at all. A "fixed percentage" arrangement totally disregards that and makes all of the other stockholders pay a penalty by diluting them more. Perhaps more importantly, it's contrary to the traditional way entrepreneurship works in a market economy. Entrepreneurs invest in the company through "sweat equity" and see the value of their shares rise over time along with value creation in the business. If new investors come along and put more money into the company at a higher valuation, they get fewer shares per dollar and the company gets that cash on its balance sheet, which is accretive rather than dilutive on an economic basis.
But what about a "down round," you may ask? I would turn the question around and ask, who is running the company? If management is destroying value (or allowing it to deteriorate) rather than creating it, it generally doesn't make sense to reward that with more shares. (In exceptional cases, such as certain turnaround scenarios, the Board can always make additional stock option grants to the management team as merited by performance.) This is the fundamental reason why founders, employees and service providers almost always get common stock in a startup, whereas investors get preferred stock (with anti-dilution protection, as well as other goodies like liquidation preferences). In fact, the very mechanism of anti-dilution in VC financings relies on that structure by adjusting the conversion ratio of Preferred to Common based on a formula, so if you already hold Common, that wouldn't help.
To directly answer the question, "What kind of legal agreement can create a situation like this?" the answer would be any contract -- oral or written, express or implied -- that promises someone a fixed percentage of equity along with some kind of guarantee or assurances that their
position won't get diluted. Making this sort of promise has created many a mess for litigators to clean up over the years. If it's a binding contract, the company has no choice but to issue more shares or be liable for breach.
As background, there are two basic types of anti-dilution provision, structural and price-based. Structural anti-dilution protection is designed to automatically compensate for things like stock splits, reverse splits, and stock dividends. It's a no-brainer and either exists in the documents or is implied as a matter of fairness and common sense under most circumstances. Price-based anti-dilution protection, as most VCs and angels get in financing deals, is meant to compensate for the company doing a "down round" (a future round of financing at a price per share lower than the last round). Going back to the pie analogy, imagine the pie is either the same size or shrinking and is getting sliced into more pieces to include the new investors. Price-based anti-dilution gives some extra slices to the investors from the last round to help compensate. Of course that means the common shareholders are diluted even more.
I usually encourage founders to move away from thinking in terms of percentages and start thinking in share numbers as soon as possible. Other than for certain governance matters that are subject to a shareholder vote (e.g. selling the company), or "magic numbers" for purposes of accounting (19.9% vs. 20%) or SEC reporting (5% or 10%), percentages really don't matter all that much. You're better off with 1% of a billion-dollar company than 10% of an $80MM company. If you do want to talk percentages, the right way to approach it is to frame everything in terms of the company's current fully diluted capitalization . So in the hypothetical CEO case, offer him or her a number of shares that will be equal to 25% of the total outstanding on a fully diluted basis (i.e. assuming the exercise of options or warrants) as of the hire date. Whatever number of shares that turns out to be, it's the CEO's job to make them worth more, not to be handed more shares.
This answer is for general informational purposes only and is. More