20% cap on profit?

someone mentioned to me there is a legal requirement that the profit from flipping a property from trustee’s sale cannot exceed 20%.
have you heard of this? any references?

That is nonsense. However a friend bought a Freddie Mac/Homepath foreclosure recently, and they stipulated in the sale conditions that he could not sell it for more than 20% above his purchase price for 90 days. There are no such restrictions if you buy from a bank at a county foreclosure auction. Also, FHA financing is not available to buyers if the seller has owned the property for fewer than 90 days. Otherwise there are no restrictions I am aware of if you are flipping a foreclosure.

As Tom mentioned, that “90 day” thing only comes into play if your buyer is obtaining certain kinds of financing. The “rules” have changed quite often in the past year. For a while, most lenders would not close a loan within 90 days of a sale. Now, I think, only FHA --but other lenders may still follow that.
As for profit - THAT “rule” fluctuates wildly. Some lenders will let a profit of less than 20% slide thru w.o. much red tape. Some few lenders won’t get involved if there is a large profit. Many will ask you to provide proof of work and improvements done to justify a large “profit”. And a majority will ask for 2 appraisals. One friend had one where 3 appraisals were required.
There are many cases where a property is sold for more than the appraisal comes in for.