
178 Cal.App.3d 646 (1986)
224 Cal. Rptr. 195
MERYL TRIMBLE, Plaintiff and Appellant,
v.
STEPHEN STEINFELDT et al., Defendants; BRUCE G. FAGEL, Claimant and Respondent.
Docket No. B009727.
Court of Appeals of California, Second District, Division One.
March 11, 1986.
*648 COUNSEL
Samuel Shore and David M. Luboff for Plaintiff and Appellant.
No appearance for Claimant and Respondent.
OPINION
SPENCER, P.J. 

INTRODUCTION
Plaintiff Meryl Trimble appeals from an order denying her motion to expunge a lien which respondent, Attorney Bruce G. Fagel, filed in plaintiff's suit against Stephen Steinfeldt, M.D., and others.

STATEMENT OF FACTS
Respondent is a former employee of Attorney Samuel Shore. He was hired in April 1981 as a salaried law clerk. Following respondent's admission to the California State Bar in June 1982, he worked as a salaried associate on Attorney Shore's cases.
On March 22, 1983, plaintiff retained the services of Attorney Shore in the underlying litigation, signing a retainer agreement to that effect. Plaintiff agreed to pay to Samuel Shore 50 percent "of any and all monies collected or received by or for the undersigned in said matter...." The agreement continues, "I authorize him to associate any other attorney ... at his discretion, but at no expense to me...."
*649 The underlying action was commenced on May 2, 1983. Respondent's name never appears as an attorney of record in that action, all documents continuing to bear the name of Samuel Shore only.
On October 1, 1983, respondent and Attorney Shore changed the nature of their relationship. They entered into a new agreement, whereby Attorney Shore provided respondent with office space, library and conference facilities and secretarial services; respondent no longer would receive a salary, but was to be compensated with 33 1/3 percent of funds received from cases he successfully brought to a conclusion through settlement or trial. On approximately February 23, 1984, while plaintiff's underlying action remained pending, respondent terminated his relationship with the law offices of Attorney Shore. Shortly thereafter, having learned of respondent's departure, plaintiff requested that Attorney Shore continue to represent her in this action without further interference from respondent.
On April 30, 1984, respondent filed a notice of lien in the underlying action, in which he stated his claim for "a lien on the cause of action of Plaintiff and on any recovery from award accruing to Plaintiff by reason of an attorney's agreement between [respondent] and the Law Offices of Samuel Shore, as attorney of record for the Plaintiff, based upon services performed by [respondent] in the above-entitled matter between May 2, 1983 and February 23, 1984."
On August 30, 1984, plaintiff moved to expunge this lien. Respondent opposed the motion on September 11, at the same time filing an amended notice of lien in which he limited the period for which he sought compensation to October 1, 1983 to February 23, 1984. Following a hearing on the matter, the motion was denied. This appeal followed.

CONTENTION
Plaintiff contends the lower court erred in denying her motion to expunge the lien, in that respondent presented no facts which established the existence of a valid lien against her future recovery in the underlying matter. For the reasons set forth below, we agree.

DISCUSSION
(1a) Preliminarily, we address the question whether an order denying a motion to expunge a lien is appealable. We conclude that it is.
With limited exceptions, an appeal may be taken only from a final judgment or order, but "[w]hat is a final judgment depends not upon its form *650 but what its legal effect is. (Howe v. Key System Transit Co. (1926) [] 198 Cal. 525, 531....)" (Hersch v. Boston Ins. Co. (1959) 175 Cal. App.2d 751, 753 [346 P.2d 796].) The final determination of some collateral matter which requires the payment of money or the performance of an act is the equivalent of a final judgment. (Ibid.) And the principle has been extended to apply to the final determination of a collateral matter which does not "technically" direct the performance of any act where a stranger to the main action is a party to the collateral matter. (Spencer v. Spencer (1967) 252 Cal. App.2d 683, 690 [60 Cal. Rptr. 747]; see also In re Marriage of Van Sickle (1977) 68 Cal. App.3d 728, 735 [137 Cal. Rptr. 568]; Kraus v. Davis (1970) 6 Cal. App.3d 484, 487 [85 Cal. Rptr. 846].)
In the instant matter, respondent is a stranger to the main action between plaintiff Trimble and defendant Steinfeldt. His only connection arises out of a collateral matter  his filing of a lien against plaintiff's future recovery in the action. Accordingly, the order denying plaintiff's motion to expunge the lien is a final determination of his rights and of plaintiff's rights vis-a-vis respondent. (2), (1b) Like an order granting a lien (Hersch v. Boston Ins. Co., supra, 175 Cal. App.2d at pp. 753, 754), an order denying a motion for a lien (McClearen v. Superior Court (1955) 45 Cal.2d 852, 856 [291 P.2d 449]) and an order denying a motion to release a bank account (Spencer v. Spencer, supra, 252 Cal. App.2d at pp. 690, 691), the instant order is appealable.
(3a) We next turn our attention to the propriety of the lower court's denial of plaintiff's motion to expunge the lien. As noted ante, we hold that denial was erroneous.
The uncontradicted facts establish that respondent worked as a salaried employee of Samuel Shore, plaintiff's attorney of record, from April 1981 to October 1, 1983. The underlying action was commenced on May 2, 1983. Hence, it is beyond dispute that any work Attorney Fagel performed in the preparation of plaintiff's action from that time until October 1, 1983 was compensated entirely by salary paid to Attorney Fagel. (Sabatini v. Hensley (1958) 161 Cal. App.2d 172, 175 [326 P.2d 622].) Respondent's amended notice of lien evinces an understanding that no lien validly could cover services performed during that period.
On October 1, 1983, respondent and Attorney Shore entered into a new agreement, whereby Attorney Shore provided respondent with office space, library and conference facilities and secretarial services; respondent was to be compensated with 33 1/3 percent of funds received from cases he successfully brought to a conclusion through settlement or trial. It is this agreement on which he now relies for his assertion of a lien.
*651 Two factors are noteworthy in this regard. First, whatever the change in the basis upon which respondent's compensation was calculated, it is clear he continued to function as Attorney Shore's agent; his name never appears as an attorney of record in plaintiff's case, for he continued to perform services thereon for and at the behest of Attorney Shore. (Pollack v. Lytle (1981) 120 Cal. App.3d 931, 937-938, 940 [175 Cal. Rptr. 81].) Second, plaintiff never retained respondent's services in connection with the underlying action. The retainer agreement she signed states she retains Samuel Shore as her attorney, agreeing to pay him fifty percent "of any and all monies collected or received by or for the undersigned in said matter...." The agreement continues, "I authorize him to associate any other attorney ... at his discretion, but at no expense to me...." (Italics added.) The agreement gives Attorney Shore a lien on plaintiff's cause of action or any recovery. That agreement was signed on March 22, 1983, and never was changed.
(4) Except for those few attorney's liens provided for by statute (Isrin v. Superior Court (1965) 63 Cal.2d 153, 157 [45 Cal. Rptr. 320, 403 P.2d 728]), an attorney secures a lien on his client's cause of action or recovery solely by virtue of the agreement between the attorney and the client, i.e., the creation of a lien is not automatic. (Del Conte Masonry Co. v. Lewis (1971) 16 Cal. App.3d 678, 680 [94 Cal. Rptr. 439]; see also Cetenko v. United California Bank (1982) 30 Cal.3d 528, 531 [179 Cal. Rptr. 902, 638 P.2d 1299, 34 A.L.R.4th 657].) The lien need not be created expressly, however; it may be implied where the contract between the parties indicates the attorney is to look to the judgment for the payment of his fees. (Ibid.) (3b) The vice here is that there is no agreement between plaintiff and respondent. Hence, there is neither an express nor an implied basis for impressing a lien against plaintiff in his favor.
(5) In any event, it is settled that, absent agreement to the contrary, a principal is liable to his agent for compensation. (See, e.g., Zalk v. General Exploration Co. (1980) 105 Cal. App.3d 786, 793-794 [164 Cal. Rptr. 647]; Chamberlain v. Abeles (1948) 88 Cal. App.2d 291, 296 [198 P.2d 927].) (3c) In the instant matter, there is no basis for finding a contrary agreement. In contrast to plaintiff's retainer agreement with Attorney Shore, which provides he shall be paid a specific share of any recovery she receives, respondent's agreement with Attorney Shore provides respondent shall be compensated with a share of any funds Attorney Shore receives from respondent's successful conclusion of a case. In other words, if respondent is entitled to any compensation at all, he is entitled to receive it only from Attorney Shore and not from plaintiff.
(6) There is no quarreling that a discharged attorney is entitled to a quantum meruit recovery for work performed on a contingency fee matter *652 after the matter is concluded successfully. (Fracasse v. Brent (1972) 6 Cal.3d 784 [100 Cal. Rptr. 385, 494 P.2d 9]; Spires v. American Bus Lines (1984) 158 Cal. App.3d 211 [204 Cal. Rptr. 531].) That principle extends to the performance of services for a third party where they were performed at the defendant's request. (Earhart v. William Low Co. (1979) 25 Cal.3d 503, 505-506 [158 Cal. Rptr. 887, 600 P.2d 1344].) (7) Moreover, where an agent is employed exclusively by a particular principal and consequently owes the principal a duty of loyalty which hinders the agent's ability to act on his own behalf or adversely to the principal's interests (see Pollack v. Lytle, supra, 120 Cal. App.3d at p. 940), the principal is bound to compensate a "commission-basis" agent for any benefit attained as a result of the agent's activities. (Zalk v. General Exploration Co., supra, 105 Cal. App.3d at pp. 793-794; Chamberlain v. Abeles, supra, 88 Cal. App.2d at p. 296.) (3d) Accordingly, notwithstanding the limitations of respondent's agreement with Attorney Shore, it is entirely possible he is entitled to some compensation for the work performed on the underlying matter. It remains clear, however, that he is entitled to receive that compensation not from any recovery plaintiff receives in the underlying action but only directly from Attorney Shore himself.
The order is reversed, and the trial court is directed to enter a new and different order granting plaintiff's motion to expunge the lien.
Hanson (Thaxton), J., and Devich, J., concurred.
