
198 Cal.App.2d 208 (1961)
ARCTURUS MANUFACTURING CORPORATION, Plaintiff and Respondent,
v.
ELWOOD C. RORK et al., Defendants and Appellants.
Civ. No. 25469. 
California Court of Appeals. Second Dist., Div. Four.  
Dec. 19, 1961.
 Eugene M. Elson for Defendants and Appellants.
 Guy Richards Crump for Plaintiff and Respondent.
 BALTHIS, J.
 This is an appeal from an order denying the motion of defendants Rork to dissolve an attachment.
 The attachment was made under the provisions of section 537, subdivision 1, of the Code of Civil Procedure and the question is whether the action here is "upon a contract, express or implied, for the direct payment of money ..."
 The allegations of the complaint particularly as against defendants Elwood C. Rork and his wife may be summarized as follows: The first cause of action is to recover secret profits or kickbacks received by defendant Rork while an employee, director, officer and general manager of plaintiff. At the time defendant Rork was employed by plaintiff it was agreed that defendant "would devote his entire working time and loyalty solely to the business of plaintiff." Plaintiff operated a forging plant and machine shop. Working with other named defendants (who are not involved in this appeal) and as part of a plan and scheme to cheat and defraud plaintiff, defendant Rork designated certain persons to do metal inspection work for plaintiff. From the payments made by plaintiff to such persons for metal inspection defendant Rork received secret profits and kickbacks and in the year 1957 the sums so received by defendant Rork were in excess of $63,000, and in 1958 the sums received by said defendant were in excess of $60,000. It is specifically alleged that "Said sums so paid to defendant[s] Elwood C. Rork ... were and are kick-backs and secret profits and were and are the property of plaintiff."
 The second cause of action after incorporating certain paragraphs contained in the first cause of action, alleges defendant Rork received to and for the use and benefit of plaintiff "sums in excess of $100,000.00." The prayer asks for judgment against defendants "in the sum of $123,000.00 so paid to defendant Elwood C. Rork, together with any additional sum which an accounting may show to have been so paid ..."
 The defendants Rork contend (1) that the second cause of action for money had and received, being based upon the facts specifically pleaded in the first cause of action, will not support the attachment if the first cause of action is in tort and (2) that the gravamen of the first cause of action is in tort.
 Plaintiff, in support of the attachment, takes the position *210 (1) that the gravamen of the first cause of action is not in tort and (2) that the action here gives plaintiff the choice of remedies and plaintiff chose to sue on an implied contract.
 The gist of this action as pleaded is in quasi contract to recover property belonging to plaintiff. While fraud may be involved, and undoubtedly there is a breach of fiduciary obligation alleged, the gravamen of the complaint is to recover against the defendant agent on the promise implied by law to pay to the plaintiff principal the specific secret profits and kickbacks received.
 [1] The duty of the agent to account to his principal for secret profits and kickbacks is fundamental. Section 388 of the Restatement, Second of Agency, states: "Unless otherwise agreed, an agent who makes a profit in connection with transactions conducted by him on behalf of the principal is under a duty to give such profit to the principal." Section 403 of the same Restatement reads: "If an agent receives anything as a result of his violation of a duty of loyalty to the principal, he is subject to a liability to deliver it, its value, or its proceeds, to the principal." In the comment to section 403 it is said, "The principal has a cause of action either for a breach of contract or for a tort, as a remedy for damage caused by the violation of any duty of loyalty on the part of the agent. The principal may also charge the agent with anything which the agent receives as a result of the violation of duty, its value or its proceeds."
 The historical development of the remedy to recover money in quasi contract is reviewed in Philpott v. Superior Court, 1 Cal.2d 512 [36 P.2d 635, 95 A.L.R. 990]. That case holds that an action to recover money paid on a contract procured by fraud, after rescission, is an action at law, not in equity.
 In McCall v. Superior Court, 1 Cal.2d 527 [36 P.2d 642, 95 A.L.R. 1019], the question was raised as to whether, in an action to obtain return of the consideration paid upon a contract after rescission for fraud, an attachment would lie under section 537 of the Code of Civil Procedure. The court said, at pages 531- 533, "... there are at least three classes of promises to pay--an express promise to pay, a promise implied from the facts of the case, and a promise implied by law ... the implied promise supplied by law is ex contractu in its nature. (Philpott v. Superior Court, supra.) With this in mind, we are unable to see any distinction between the three classes of promises so far as said chapter of the code is concerned, or why all are not included in the section allowing *211 attachment. ... The action in assumpsit in such cases is not upon the failure of consideration or upon the fraud practiced but upon the promise or obligation set up by the law to afford the injured party additional relief. Failure of consideration, duress, fraud, or mistake, are elements only in the sense that they furnish a foundation upon which to rest the rescission from which flows the promise or obligation. We therefore conclude that in such cases when suing for the consideration paid, the injured party may, where he has received nothing of value, have the writ of attachment."
 In a number of cases it has been held squarely that an attachment will lie where the action has been brought upon the promise implied in law. Thus, in Los Angeles Drug Co. v. Superior Court, 8 Cal.2d 71 [63 P.2d 1124], petitioner sought a writ of prohibition to prohibit the dissolution of an attachment in a pending case in the superior court. The allegations of the complaint in that pending case were to the effect that defendants conspired and did convert goods, wares, drugs and merchandise belonging to the plaintiff to their own use and benefit; that the reasonable value of the goods so converted was the sum of $18,000 and that no part thereof had been paid. The second count in the complaint asked for an accounting. A writ of attachment was issued in the action and the defendants moved to dissolve the attachment. The Supreme Court held the attachment proper and said, at pages 74-75, "It is well settled that where personal property is converted the injured party may 'waive the tort and sue in assumpsit.' ... In Corey v. Struve, supra, [170 Cal. 170 (149 P. 48)], the allegations of the complaint were in all material respects identical with those now before us, and the court said: 'While the complaint does allege that the property was "converted" by defendants, we think that the action was in reality one in assumpsit for the value of the property sold, or perhaps it might be more aptly characterized as one in the nature of a suit for money had and received.' ... In other words, while the tort is the cause of injury, yet the action is one ex contractu. It follows that the issuance of the writ of attachment is proper, and its validity ... rests upon a promise implied by law universally recognized ..."
 In Hill v. Superior Court, 16 Cal.2d 527 [106 P.2d 876], the first cause of action was for conversion which the court held to be ex delicto. The second count charged that a specified amount was received by defendant for the use and benefit of plaintiff. The third cause of action was for money had and *212 received and the fourth and fifth causes of action were for common counts of indebtedness. The Supreme Court said, at page 530: "... where the facts show a misappropriation of funds one may waive the tort and sue upon an implied contract for money had and received. [Citations.] Such an action is based upon the tort of embezzlement, yet the action is one ex contractu, in which the plaintiff may have a writ of attachment." The court in that case also points out that the causes of action ex contractu were based upon a specific transaction and the amounts due were specifically stated, saying at page 532: "In the second, third, fourth and fifth counts of the complaint, the plaintiff is seeking to recover upon an implied contract to repay money allegedly converted by the former executor to his own use. The action is based upon specific transactions and the amount asserted to be due is definitely stated. So far as these causes of action are concerned the action was not brought prematurely and will support a writ of attachment."
 In Oil Well Core Drilling Co. v. Barnhart, 20 Cal.App.2d 677 [67 P.2d 696], the complaint contained three counts, the first was for an indebtedness for goods, wares and merchandise sold and delivered, the second was for money had and received, and the third count specifically alleged that defendant was an agent for plaintiff under a written contract and that the defendant agent had collected moneys and rentals due plaintiff and had failed to turn over such specific amounts. An order dissolving an attachment was reversed on appeal. The court said (p. 679): "The respondents argue that their collecting and retaining any money was a tort rather than a breach of contract. There can be no doubt that the relation between these parties was that of principal and agent and that this relationship was created by the contract. The respondents were placed in a position to collect these moneys by reason of the contract. While their doing so may have been a tort it was also, in a sense, a breach of the contract. In any event, the respondents took money belonging to their principal to which they were not entitled. It was their duty to pay over this money upon demand, a demand is alleged, and the law will imply a promise to pay the same. ... In our opinion the allegations of the complaint herein, as well as those of the affidavit, disclose an implied contract for the direct payment of money." The attachment made was held to be good.
 In Steiner v. Rowley, 35 Cal.2d 713 [221 P.2d 9], plaintiffs, the purchasers of real estate, sued the defendant to recover *213 an alleged secret profit received by defendant. Demurrers were sustained as to the four counts contained in plaintiffs' complaint. The first count alleged that the defendant was employed by plaintiffs as a real estate broker and that defendant had received the sum of $2,000 as a secret profit from other persons and that this payment was obtained in violation of defendant's duty owed to plaintiffs. The second count was for money had and received and the third count likewise alleged that defendant had received a secret profit of $2,000 in violation of a duty owed to plaintiff. The fourth count was for exemplary damages by reason of the fraud, oppression and malice practiced by defendant. The Supreme Court held that the first three counts stated facts sufficient to constitute good causes of action. As to the fourth cause of action, the court held that because plaintiffs had obtained an attachment an election had been made to proceed on the ex contractu causes of action (the first three) and plaintiffs could not thereafter proceed on the fourth cause of action which was based upon tort because exemplary damages were sought. The demurrer should have been sustained only as to the fourth cause of action, hence the first three causes of action (and the attachment made thereon) were upheld.
 In the cases discussed above, the attachment had to be based upon the promise implied by law. In all of them a tort allegedly had been committed, but it was held that the plaintiff had the right to plead a cause of action based upon defendant's implied promise in law to pay sums of money to the plaintiff. (See generally 1 Witkin, California Procedure, Provisional Remedies,  49; 1 Chadbourn, Grossman, Van Alstyne, California Pleading,  741, and see De Leonis v. Etchepare, 120 Cal. 407 [52 P. 718]; Bank of America N. T. & S. Assn. v. Hill, 9 Cal.2d 495 [71 P.2d 258].)
 [2] In the case presented here, the gravamen of the action is ex contractu and while there are allegations of conspiracy and fraud, these are deemed incidental to the principal recovery sought, the secret profits and kickbacks actually received by defendants, which are alleged to be the property of plaintiff. While the action is based on the violation of fiduciary duty by defendants, the gist of the action is in quasi contract and is to recover property belonging to the plaintiff on the promise implied by law that an agent holds such property or moneys for his principal.
 The cases relied upon by appellants are not helpful on the *214 question of whether or not an attachment will lie on the basis of the complaint filed in this case. Thus, in DeMirjian v. Ideal Heating Corp., 91 Cal.App.2d 905 [206 P.2d 20], the landlord sued to recover damages from his tenants for injuries to the leased premises allegedly caused by defendant's negligence. The complaint pleaded the cause as a breach of a provision in the lease obligating the lessee to employ due care in its use of the premises. The court held that the gist of the action was to recover damages caused by defendant's negligence and that the action was ex delicto, hence attachment was improper. In that case clearly there was no action ex contractu based upon a promise implied by law.
 In another case relied upon by defendants, Ward v. Taggart, 51 Cal.2d 736 [336 P.2d 534], the action was to recover against a real estate broker for certain secret profits made by him while purporting to represent plaintiff. The judgment recovered by plaintiff included an amount for exemplary damages. The Supreme Court held the judgment was proper in that plaintiff could recover not only the secret profits received by the defendant broker but also exemplary damages under section 3294 of the Civil Code. This result followed because the action was for the breach of an obligation not arising from contract and defendant had been guilty of oppression, fraud or malice. While the case cited does hold that exemplary damages may be recovered, it in no way casts doubt upon the promise implied in law to disgorge secret profits. Where, as in this case, plaintiff sues not to recover exemplary damages but bases his action strictly upon the promise implied in law to pay such secret profits to the principal, such action is ex contractu and supports the attachment.
 For the reasons above stated, the order made by the trial judge denying the motion to dissolve the attachment is affirmed.
 Burke, P. J., and Jefferson, J., concurred.
