Mr. Justice Goddard
delivered the opinion of the court.
This record presents but one question that we can properly *537consider, and. one that was fully and fairly presented in the court below by the demurrer, the answer and the objection to the admission of any.testimony under the complaint, and that is, whether the complaint states a cause of action: This is to be determined by the validity or invalidity of the agreement as therein stated, upon which appellee predicates his right to recover. In our judgment, this agreement comes clearly within that class of contracts that are inhibited by public policy, and consequently void. By its terms each agent was to share in the commissions paid by both principals. The compensation to be jointly shared was contingent upon the consummation of the trade or sale; and this would have a tendency to induce them to disregard, if not to sacrifice, the interests of their principals, if necessary to effect that result. The fact that a sale price was fixed by the principals upon their respective properties does not answer this objection. Each was entitled to the benefit of the unbiased judgment of his agent as to the value to be placed upon the other’s property, and to a reasonable effort on the part of such agent to obtain a reduction of the value to be allowed therefor in the exchange. Their pecuniary interest might have prevented such disinterested action on the part of these agents; and it appearing from, the allegations of the complaint that they “ did effect the trade or sale of the property as between their respective principals,” the transaction is as objectionable as those universally condemned, wherein one agent acts for both principals without their knowledge or consent. This objection is not answered by the claim that the evidence as introduced shows a transaction different from that pleaded, that their principals negotiated the trade between themselves, and that in fact plaintiff and defendant acted only as middlemen in bringing Nix and Jones together. Such evidence was not inadmissible merely because variant from the allegations of the complaint, but because of the fundamental vice in the complaint itself in not stating a cause of action susceptible of proof, or one that would justify the admission of any testimony, or uphold any judgment.
*538The contention of appellee’s counsel, that the transaction being completed and money paid the appellant cannot avail himself of the illegality of the contract to retain it, cannot be sustained. The cases relied on as upholding the doctrine that when profits are realized through an illegal transaction and received by one of the joint owners, they cannot be retained by him by reason of the illegality of the transactions through which they are derived, are clearly distinguishable from the case at bar. In this case appellee asserts a claim against appellant founded upon, and recoverable only, through and by virtue of an illegal agreement. It is therefore an •action to enforce an illegal executory contract. The well established rule in such case is as expressed in The Louisville, New Albany and Chicago Railway Co. v. Buck, 116 Ind. 566:
“ It is quite true that a plaintiff will iu no case be permitted to recover when it is necessary for him to prove his own illegal act or contract as a part of his cause of action, or when an essential element of his cause of action is his own violation of law.”
Our conclusion on this question renders a notice of the other errors assigned unnecessary. The judgment therefore will be reversed for the reasons above given.
Reversed.