From the standpoint of a law department, you could say the ultimate value-based arrangement obligates payment only when and if the law firm accomplishes just what the department wants. With inventions suitable for patent protection, what could be better for a law department than to pay the law firm only if it obtains the patent? This was the arrangement described, in so many words, by Amar Bhidé, The Venturesome Economy: how innovation sustains prosperity in a more connected world (Princeton Univ. 2008) at 85.
To be sure, the payment was almost certainly more than hours worked times rates charge, because the patent prosecution firm took on the entire risk of the patent being rejected. I suppose also that the firm had the right to decline to prosecute a patent.