GATES, J.
Action on contract for the recovery of money only. Paragraph two of the complaint is as follows: “2. That on the said date, (No-v. 7, 1908), defendant submitted to plaintiff a proposition as follows, to-wit: If you will take 160 shares of the preferred treasury stock of the Blue Bell Medicine Company, a South Dakota corporation, with its office at Watertown South Dakota, upon my' representation as to their value, and I represent to you that 160 shares of the preferred treasury stock of said company is of the value, and worth $16,000, and transfer to the Medicine Company, your real estate in Deuel county, described as section 28, and the west half of section 33, in township 115, range 48, by good warranty deed, I will have the Blue Bell Medicine Company issue in your name 160 shares of the preferred treasury stock of said company, and I will see that the stock, certificates for the 160 shares of said stoclo is delivered to you by mail or otherwise, and will have the Medicine Company pay you in money $26.20, which is the difference between the value of the stock as represented by me and the value of the land, less the incumbrance thereon, and in consideration of your accepting this proposition, and in full performance by you under it, in making such transfer of your land and premises, I agree that if the Blue Bell Medicine Company fails to declare and pay annually a 7 per cent, dividend upon said shares of stock, you may at the expiration of two years of the date of the issuance of such shares of stock, surrender to me the stock certificate, issued for the 160 shares of the said preferred treasury stock, properly indorsed to me, and I will pay you the sum of $16,000.00 the value I place upon said shares of stock, and the value I have represented to you, with interest thereon at the rate of 7 per cent, per annum, since the date of the issuance of said shares of stock.” The remaining portion of the complaint alleged in substance that on November 7, 1908, plaintiff was the owner of said lands which were of the value of $28,800 • and incumbered in the sum of $12,773.80; that plaintiff accepted defendant’s proposition, delivered the deed to the Medicine Company on said date and on *503December 29, 1908, réecived 160 shares of said preferred treasury stock together with $26.20 in money; that the company has not declared any dividend; that on February 11, 1911, prior to beginning this action plaintiff offered to surrender said shares to the defendant and demanded from defendant $16,000 with interest from November 7, 1908; that defendant refused; that plaintiff is the owner of said shares and is able, ready and willing to transfer them to defendant. Judgment was demanded for $16,000 with interest from November 7, 1908. In addition to being in substance a general denial the answer alleged that the net value of the land over and above the incumbrance was not to- exceed $4,606.20; that the transaction, if had, was solely between plaintiff and the Medicine -Company, and that if the transaction was had it was within the sections or subdivisions of sections of the statute of frauds hereinafter discussed. The case was tried by jury. Plaintiff’s evidence tended to substantiate the -complaint. Upon the trial it appeared that the agreement sued upon was not in writing. Defendant made suitable objections to- the introduction of testimony to prove the same. At the close of plaintiff’s evidence defendant moved for the direction of the verdict upon grounds hereinafter mentioned. The motion was grapted. Subsequently on motion of plaintiff the directed verdict was set aside and the cause set down for trial. From this order defendant has appealed.
Aside from certain matters which we do- not deem of sufficient importance to discuss it is appellant’s contention that the oral agreement was void: (1) Under subdivision 1 of § 1238 C. C. (2) Under subdivision 2 of § 12-38 C. C. (3) Under -subdivision 4, § 1238 C. C. The provisions of said section applicable thereto are as follows: “Sec. 1238. The following contracts are invalid unless the same, or some note or memorandum thereof, be in writing and subscribed by the party to be charged, or by his agent:
1. An agreement that, by its terms, is not to be performed within a year from the making thereof.
2. A special promise to answer for the debt, default or miscarriage of another, except in the cases provided for in section 1973-
4. An agreement for the sale of- goo-ds, chattels, or things in: action, at a price not less than fifty dollars unless the buyer ac*504cept or receive part of such goods and chattels, or the evidences, or some of them of such things in action, or pay at the time some part of the purchase money; * * *”
[1] It is manifest from an inspection of the complaint that the facts in this case do not bring the oral contract sued upon within the provisions of subdivision 4 of said section and consequently the appellant’s third contention is unavailing.
[2] Waiving for the present the first contention, let us consider the second. We are of the opinion that the contract in -this case does not come within the exception provided for in section 1973, Civil Code. Was the agreement then one “to answer for the debt, default or miscarriage of another?” We think not. The only contract between plaintiff and the Blue Bell Medicine Company, if it'may be called a contract, was that which was evidenced by the certificate of stock issued to plaintiff as follows:
“Number Shares
3 ‘ 160
“The Blue Bell Medicine Company.
“Watertown, South Dakota.
“This Certifies that Jos. S. Clement is the owner of 160 shares of One Hundred Dollars each of the Preferred Treasury Stock of the Blue Bell Medicine Company of Watertown, S. D. Transferable only on the books of the corporation by the holder hereof in person or by attorney upon surrender of this certificate properly indorsed. Which is issued in accordance with resolution of stockholders of date; June x, 1908. In witness whereof the said corporation has caused this certificate to be signed by its duly authorized officers and to be sealed with the seal of the corporation, at Watertown, South Dakota, this 7Ü1 day of November, A. D. 1908. .(Corporate Seal) R. L,. Hardy, President. H. S'. Rowe, Secretar}'. This stock may be retired after one year, on call at $125 per share.” (The following appears on margin of certificate) : “This stock guaranteed to pay 7 per cent, per annum.” This stock certificate does not contain any promise on the part of the Blue Bell Medicine Company to repay to plaintiff the sum of $x6,ooo at the expiration of two years, nor at all. Even if the marginal indorsement “This stock guaranteed to pay 7 per cent, per annum” may be said to be a contract between the Medicine Company and plaintiff to pay him seven per cent annual *505dividends, which we do not decide, such agreement was only an incident to the main agreement made between plaintiff and defendant to which main agreement the Medicine Company was not a party. If the said Medicine Company had made the promise which it is alleged the defendant made, and which we must for the present purposes of this case assume that he did make, then a very different situation would have been presented.
[3] It is next urged by plaintiff that there was no consideration moving to the defendant for the promise alleged to have been made by him. It is a full and complete answer to that objection to assert the oft repeated phrase: “Damage to the promisee constitutes as good a consideration as benefit to the promisor.” Townsley v. Sumrall, 2 Pet. 170, 7 L. Ed. 386; § 1224, C. C.
In the view we take of this case from the pleadings and the evidence introduced on behalf of plaintiff, this was a contract solely between Clement and Rowe and therefore no question arises as to defendant’s answering for the debt, default or miscarriage of the Medicine Company. But if it be considered that Rowe as secretary of the Medicine Company was acting for the company in making the sale of the shares of stock, nevertheless the promise to repurchase was his own promise. In this view, which is the one most favorable to defendant, the promise to repurchase would partake of the nature of an oral contract of indemnity. Such a contract is almost universally held to be essentially an original contract. Smith on the Law of Fraud, § 326. We are of the opinion therefore, that this was a direct and not a collateral promise and that it was not a promise to answer for the debt, default or miscarriage of another. Hence that particular provision of the statute of frauds does not apply. 6 Ency. U. S. Sup. Ct. Rep. 433.
[4] A careful study of the pleadings and evidence convinces us that the agreement sued upon was such that it could not possibly be performed upon either side within a year. The contract on the part of the defendant was not to he performed, if at all, until after two years. The contract on the part of the plaintiff was partially performed by the execution and delivery of the deed of conveyance, but an integral part -of the contract on his part was that after the expiration of two years he was to exercise an option. But the right to exercise such option was dependent upon *506something that could not happen within a year. It depended upon whether the Medicine Company paid annual dividends at seven per cent, for two years. If by reason of the failure of the Medicine Company to pay such dividends, the plaintiff, at the expiration of two years, no longer cared to continue to hold the shares 'of stock he was to notify defendant and surrender the stock certificate properly indorsed to defendant and receive $16,000 with interest. The liability of defendant to pay to plaintiff $16,000 would not accrue if the Medicine Company paid the annual dividends. Nor would it accrue even if the company failed to pay the dividends unless and until plaintiff exercised his option. It is manifest then that the contract could not upon either side be performed within a year. It was therefore void under subdivision 1 of § 1238 of the Civil Code.
[5] It is well settled that where the defendant invokes the statute of frauds as a defense, the plaintiff may nevertheless recover on quantum meruit or quantum valebant in those cases that the defendant himself has received the benefit of the invalid promise. In Pierce v. Paine’s Estate, 28 Vt. 34, the learned Chief Justice Redfield said: “But in all cases of contracts within the statute, where the promisee has done something towards the performance of the contract on his part, and the other party declines to perform his part, a recovery of what is thus done may always be had, and this is all that the performance of such contract on one side will avail at law, and this only when such performance on one side inures to the benefit of the other side.” In McElroy v. Ludlum, 32 N. J. Eq. 828-836, the court said: “The pretext upon which evidence of the class referred to has sometimes been admitted is that its admission was necessary to prevent fraud. The argument is that the statute was designed to prevent fraud and should not be made the means of perpetrating a fraud; but in such cases it is not necessary, in order to prevent fraud to give the contract effect * * * the law accords the injured party full compensation for the value of the consideration he has given on the faith of the contract which his adversary repudiates.” Tn Swift v. Swift, 46 Cal. 266, the court said: “The contract as made was then void under the statute, but having the plaintiff’s monev which he could not justly retain, the law presumes a promise on the part of the defendant to repay it on demand.” *507In the present case the defendant, himself, did not receive the land which was the partial consideration for the invalid promise, it went to the Medicine Company. But it went to the Medicine Company at the direction of the defendant. So far as the relations between plaintiff and defendánt are concerned, the situation was the same as though- the land really became the property of the defendant, but by his direction the title was taken in the name of a third person. In such a case the law will presume that the benefit of the transaction inured to the defendant. Therefore the -defendant, under the evidence, was clearly liable to the plaintiff for the net value of the farm over,and above the incumbrance at ■the time of the conveyance. In Sweeney v. Underwriters Co., 29 S. D. 576, 137 N. W. 379; this court cited with approval the following-rule laid down in Morawatz on 'Corporations X721: “If an agreement is legally void and unenforceable by reason of some statutory or common law prohibition, either party to the agreement who -has received anything from the other party and has failed to perform the agreement on his part, must account to- the latter for what has been so received.”
If however, under the pleadings and the evidence offered, it should be thought that the contract whereby the farm was traded for the shares of stock was really made between plaintiff and the Medicine Company and that defendant’s oral promise to repurchase was the inducement which led the plaintiff to make the trade, the defendant should still be held responsible to plaintiff for the value of the property which plaintiff parted with because of that inducement. While defendant might assert the statute as a defense to the carrying out of the oral contract he could not assert such defense in an action, on quantum valebat if he had received the farm. Nor -should he be permitted, because he did not receive the farm, to assert the statute as against « claim for the recovery of the value of the property at the time of the trade. The plaintiff had irrevocably surrendered the farm relying upon defendant’s promise. Defendant must therefore put him back as nearly as possiible in stain quo. For a discussion of the application of the doctrine of equitable estoppel as applied to this subject we refer to the case of Seymour v. Oelrichs, 156 Cal. 782, 106 Pac. 88; and the excellent note by Mr. Freeman in 134 Am. St. Rep. 171.
*508[6] What then was the situation when the defendant moved the trial court to direct the ve-idict in his 'behalf? The evidence showed the making of the oral contract hereinbefore recited which was void because incapable of performance within a year after the making thereof; that the plaintiff had parted with his farm pursuant to the invalid promise of defendant; that the Medicine Company had paid no dividend; that the plaintiff had tendered to the defendant the certificate of stock and stood ready and .willing to return the same. So far as the evidence showed defendant was not in position to cause the farm to be reconveyed to plaintiff. The complaint alleged the net value of the farm to be $16,000. The answer of the defendant alleged the net value to be not to exceed $4,600.00, but no evidence as to its value had been offered at the trial.. As the case then stood the plaintiff was entitled to recover from the defendant but was only entitled to recover the net value- of the farm at the time of the conveyance plus interest. At that stage of the case the theory of defendant was that there was no liability on his part whatsoever. On the other hand it was plaintiff’s theory Jhat he had fully, performed the contract on his part and therefore that the contract was “taken out” of the statute of frauds. Under either of these theories the issue of the value of the farm raised by the pleadings was immaterial. But if the court had upon the consideration of said motion to direct the verdict made the ruling which we now indicate should have been made, then the issue as to the value of the land would have become material. While technically the ruling of the court in directing the verdict was right because of the fact that the contract was void and because of the fact that there was no evidence upon the question of land value, still the court did not -grant the motion on such grounds, but did so because it then considered defendant’s theory of the case to be the correct one. If the court had ruled as we say it should have done the plaintiff would no doubt have asked, and the court wortlcl certainly have granted, permission to introduce evidence as to the value of the farm. Therefore, in the furtherance of justice, the court should have denied the motion and the court did not err in setting aside the directed verdict and granting a new trial.
The order appealed from is therefore affirmed.