Document:

<PAGE>

                                  Exhibit 10.22

                            RESTRICTED UNIT AGREEMENT

This Restricted Unit Agreement (the "Agreement"), dated OCTOBER 29, 2003, is by
and between VALERO ENERGY CORPORATION, a Delaware corporation ("Valero"), and
WILLIAM E. GREEHEY, Chief Executive Officer of Valero ("Greehey").

1.       GRANT OF RESTRICTED UNITS. Valero hereby grants to Greehey 275,000
         "Restricted Units" representing the right to receive certain cash
         payments from Valero on the Vesting Dates set forth below. The amount
         of cash payable to Greehey on each Vesting Date will be equal to the
         product of: (a) the number of Restricted Units vesting on that date,
         multiplied by (b) the fair market value on that date of one share of
         Valero common stock, $.01 par value ("Common Stock"). For purposes of
         this Agreement, "fair market value" means the average of the "high" and
         "low" reported sales price per share of Common Stock as reported on the
         New York Stock Exchange as of the relevant measuring date, or if there
         are no sales on the NYSE on that measuring date, then as of the next
         following day on which there were sales.

2.       DIVIDEND RIGHTS. In addition to the right to receive cash on each
         Vesting Date as described in Section 1 above, Greehey will be entitled
         to receive periodic cash payments in relation to dividends that are
         paid on Valero's common stock (the "Dividend Rights"). For purposes of
         the settlement of Greehey's Dividend Rights under this Agreement,
         Greehey will be deemed to be a holder of one share of Valero Common
         Stock for each unvested Restricted Unit held by Greehey. As and when
         dividends are declared on Valero's Common Stock, in settlement of the
         Dividend Rights granted hereunder Greehey will be entitled to receive a
         cash payment equal to the product of: (a) the declared dividend per
         share on Valero's Common Stock, multiplied by (b) the number of
         unvested Restricted Units held by Greehey on the dividend record date.

3.       VESTING. The Restricted Units will vest in the following increments on
         the following dates: 91,667 on OCTOBER 29, 2004; 91,667 on OCTOBER 29,
         2005; and 91,666 on OCTOBER 29, 2006 (each a "Vesting Date").

4.       TERMINATION OF EMPLOYMENT. If Greehey's employment with Valero is
         terminated by Greehey (whether through retirement, death, disability or
         otherwise), or is terminated by Valero without "cause" (as defined per
         the Employment Agreement then in effect between Valero and Greehey, or
         if none, then the Employment Agreement presently in effect on the date
         hereof, as amended) (as applicable, hereafter the "Employment
         Agreement"), then any Restricted Units that have not vested as of the
         date of termination of Greehey's employment shall not be forfeited and
         shall continue to vest in accordance with the vesting schedule set
         forth in Section 3 above. If, however, Greehey's employment is
         terminated by Valero for "cause" (as defined per the Employment
         Agreement), then those Restricted Units that have not yet vested on the
         date of termination of Greehey's employment shall be forfeited as of
         that date and Greehey shall not be entitled to Dividend Rights or any
         other payments with respect thereto.

5.       WITHHOLDING. Valero is hereby authorized to withhold from any
         settlement of the Restricted Units or Dividend Rights the amount of any
         applicable withholding taxes with respect to such settlement, and to
         take any other action necessary to satisfy all obligations for the
         payment of the taxes.

                                     Page 1
<PAGE>

6.       REORGANIZATION EVENT. In the event of any stock dividend, rights
         distribution, split-up, recapitalization, share exchange, merger,
         consolidation, stock acquisition, spin-off, separation, reorganization,
         liquidation or other similar event (any one of which being hereafter
         referred to as a "Reorganization Event"), as a result of which (i)
         shares or other securities of any class or rights shall be issued in
         respect of outstanding shares of Common Stock, or (ii) shares of Common
         Stock shall be changed into the same or a different number of shares of
         the same or another class or classes or other securities, then the
         Restricted Units granted under this Agreement shall be affected as
         follows. Upon the closing of the Reorganization Event, each unvested
         Restricted Unit shall be treated as one share of Common Stock for
         purposes of determining the number of unvested Restricted Units owned
         by Greehey immediately following the Reorganization Event.

7.       CHANGE OF CONTROL. Defined. A "Change of Control" shall be deemed to
         occur when:

         (a)      the stockholders of Valero approve any agreement or
                  transaction pursuant to which: (i) Valero will merge or
                  consolidate with any other entity (other than a wholly owned
                  subsidiary of Valero) and will not be the surviving entity (or
                  in which Valero survives only as the subsidiary of another
                  entity); (ii) Valero will sell all or substantially all of its
                  assets to any other person or entity (other than a wholly
                  owned subsidiary of Valero); or (iii) Valero will be
                  liquidated or dissolved;

         (b)      any "person" or "group" (as these terms are used in Section
                  13(d) and 14(d) of the Securities Exchange Act of 1934) other
                  than Valero, any subsidiary of Valero, any employee benefit
                  plan of Valero or its subsidiaries, or any entity holding
                  shares of Common Stock for or pursuant to the terms of such
                  employee benefit plans, is or becomes an "Acquiring Person" as
                  defined in the Rights Agreement dated June 18, 1997 between
                  Valero and Computershare Investor Services, L.L.C., as
                  successor Rights Agent to Harris Trust and Savings Bank, as
                  amended (or any successor Rights Agreement), or, if no Rights
                  Agreement is then in effect, such person or group acquires or
                  holds such number of shares as, under the terms and conditions
                  of the most recent such Rights Agreement to be in force and
                  effect, would have caused such person or group to be an
                  "Acquiring Person" thereunder;

         (c)      any "person" or "group" shall commence a tender offer or
                  exchange offer for 15% or more of the shares of Common Stock
                  then outstanding, or for any number or amount of shares of
                  Common Stock which, if the tender or exchange offer were to be
                  fully subscribed and all shares of Common Stock for which the
                  tender or exchange offer is made were to be purchased or
                  exchanged pursuant to the offer, would result in the acquiring
                  person or group directly or indirectly beneficially owning 50%
                  or more of the shares of Common Stock then outstanding;

         (d)      individuals who, as of any date, constitute Valero's Board of
                  Directors (the "Incumbent Board") thereafter cease for any
                  reason to constitute at least a majority of the Board of
                  Directors; provided, however, that any individual becoming a
                  director whose election, or nomination for election by
                  Valero's stockholders, was approved by a vote of at least a
                  majority of the directors then comprising the Incumbent Board
                  shall be considered as though such individual were a member of
                  the Incumbent Board, but excluding, for this purpose, any such
                  individual whose initial assumption of office occurs as a
                  result of an actual or threatened election contest with
                  respect to the election or removal of directors or other
                  actual or threatened solicitation of proxies or consents by or
                  on behalf of a person or group other than the Board of
                  Directors;

                                     Page 2
<PAGE>

         (e)      the occurrence of the Distribution Date (as defined in the
                  Rights Agreement dated June 18, 1997 between Valero and
                  Computershare Investor Services, L.L.C., as successor Rights
                  Agent to Harris Trust and Savings Bank, as amended); or

         (f)      any other event determined by Valero's Board of Directors or
                  the Compensation Committee thereof to constitute a "Change of
                  Control" hereunder.

8.       ACTIONS OF COMPENSATION COMMITTEE. The Compensation Committee, as
         constituted before a Change of Control, is hereby authorized, and has
         sole discretion to take any one or more of the following actions,
         whether in connection with a Change of Control or otherwise:

         (a)      provide for the acceleration of any vesting periods relating
                  to the Restricted Units to a date or dates determined by the
                  Compensation Committee;

         (b)      adjust any unvested Restricted Units as the Compensation
                  Committee deems appropriate to reflect a Change of Control; or

         (c)      cause any unvested Restricted Units to be assumed, or new
                  rights substituted therefor, by the acquiring or surviving
                  corporation after a Change of Control. The Compensation
                  Committee may in its discretion include other provisions and
                  limitations in any amended Restricted Unit Agreement as it may
                  deem equitable and in the best interests of Valero.

9.       RIGHTS AS STOCKHOLDER. Except for the Dividend Rights described above,
         neither Greehey nor any person claiming by, through or under Greehey
         with respect to the Restricted Units shall have any rights as a
         stockholder of Valero (including, without limitation, voting rights).

10.      ASSIGNMENT.

         (a)      This Agreement and Greehey's interest in the Restricted Units
                  and Dividend Rights granted by this Agreement are of a
                  personal nature, and, except as expressly provided below,
                  Greehey's rights with respect thereto may not be sold,
                  mortgaged, pledged, assigned, transferred, conveyed or
                  disposed of in any manner by Greehey. Any such attempted sale,
                  mortgage, pledge, assignment, transfer, conveyance or
                  disposition shall be void, and Valero shall not be bound
                  thereby.

         (b)      Cash payments upon settlement of the Restricted Units and
                  Dividend Rights may be made only to Greehey, during his
                  lifetime, or to his beneficiary(ies) after his death. After
                  Greehey's death, any cash settlements with respect to
                  Restricted Units or Dividend Rights will be made to Greehey's
                  beneficiary(ies) as designated under Greehey's Valero Energy
                  Corporation Beneficiary Designation Form, or if there is no
                  such designation, to the beneficiary(ies) designated in
                  Greehey's last will and testament.

11.      SUCCESSORS. This Agreement shall be binding upon any successors of
         Valero and upon the beneficiaries, legatees, heirs, administrators,
         executors and legal representatives of Greehey.

12.      NO TRUST FUND. This Agreement shall not create or be construed to
         create a trust or separate fund of any kind or any fiduciary
         relationship between Valero and Greehey or any other person with
         respect to the Restricted Units and Dividend Rights. To the extent that
         any person acquires a right to receive payments from Valero under this
         Agreement, such right shall be no greater than the right of any
         unsecured general creditor of Valero.

                                     Page 3
<PAGE>

13.      GOVERNING LAW. The validity, construction, and effect of this Agreement
         shall be determined in accordance with the laws of the State of Texas.

                                           VALERO ENERGY CORPORATION

                                           By:  /s/ Keith D. Booke
                                                --------------------------------
                                                Keith D. Booke
                                                Executive Vice President and
                                                Chief Administrative Officer

                                              /s/ William E. Greehey
                                           -------------------------------------
                                           WILLIAM E. GREEHEY

                                     Page 4<PAGE>

                                 EXHIBIT 10.23

                                OPTION AGREEMENT
          Valero Energy Corporation 2001 Executive Stock Incentive Plan

This Option Agreement ("Agreement") is entered into effective JULY 18, 2001
between Valero Energy Corporation, a Delaware corporation ("Valero"), and
Employee pursuant to the terms of the Valero Energy Corporation 2001 Executive
Stock Incentive Plan (as may be amended, the "Plan"). As used herein, Employee
means WILLIAM E. Greehey. Capitalized terms used in this Agreement but not
otherwise defined in this Agreement have the meanings set forth in the Plan.

1. GRANT OF OPTION. Valero grants to Employee the option ("Option") to purchase
up to 250,000 shares of Common Stock of Valero, $.01 par value per share
("Shares"), in accordance with the terms of this Agreement and the Plan. The
Shares, when issued to Employee upon the exercise of the Option, will be fully
paid and non-assessable.

2. PURCHASE PRICE. The purchase price of the Shares will be $33.745 per Share.

3. EXERCISE OF OPTION. The period during which the Option is in effect ("Option
Period") will commence July 18, 2001. The Option Period will terminate on July
18, 2011. No portion of the Option may be exercised prior to July 18, 2002.
Subject to the provisions of the Plan relating to suspension or termination from
the Plan, the Option will be available for exercise in the following increments:
83,334 shares on July 18, 2002; 83,333 shares on July 18, 2003; and 83,333
shares on July 18, 2004.

If the Employee desires to exercise the Option, Employee must deliver written
notice to Stock Plan Administration of Valero substantially in the form of the
attached Form A ("Exercise Notice"). The Option must be exercised in accordance
with one of the methods for exercise set forth in the attached form of Exercise
Notice. The date on which the Exercise Notice is received by Valero will be the
"Exercise Date." The completed Exercise Notice must include the number of Shares
with respect to which the Option is being exercised. Payment for the Shares will
be made at Valero's San Antonio offices.

If any law or regulation requires Valero to take any action with respect to the
Shares specified in the Exercise Notice, then the date of delivery of the Shares
against payment will be extended for the period necessary to take such action.
In the event of any failure by Employee to pay for the number of Shares
specified in the Exercise Notice on the Settlement Date, as the same may be
extended as provided above, the exercise of the Option with respect to such
number of Shares will be treated as if it had never been made.

4. PLAN INCORPORATED BY REFERENCE. The Plan is incorporated herein, and by this
reference, is made a part hereof for all purposes. The Plan contains detailed
provisions relating to, among other things, forfeiture of this Option under
certain circumstances including termination of employment, termination from the
Plan during certain leaves of absence, adjustment of Shares in the event of
certain changes in capitalization, and other matters of importance to Employee.
Employee warrants and agrees that he or she has received and read a copy of the
Plan or a Plan Summary relating thereto, and that all rights granted hereunder
are subject to the more detailed provisions of the Plan.

5. LIMITATION OF RIGHTS OF EMPLOYEE. Employee will have no rights with respect
to any Shares not expressly conferred by the Plan or this Agreement.

6. NO ASSIGNMENT. This Agreement and the Option granted hereunder are of a
personal nature and Employee's rights with respect hereto and thereto may not be
sold, mortgaged, pledged, assigned,

<PAGE>

transferred, conveyed or disposed of in any manner by Employee, and may not be
exercised by any person, other than Employee, except as expressly permitted
under the Plan. Any such attempted sale, mortgage, pledge, assignment, transfer,
conveyance, disposition or exercise will be void, and Valero will not be bound
thereby.

7. SUCCESSORS. This Agreement is binding upon any successors of Valero and the
heirs, successors and legal representatives of Employee.

<PAGE>

Notice of Grant of Stock Option
and Option Agreement Valero Energy Corporation
ID: 74-1828067
P. O. Box 500
San Antonio, TX 78292-0500

-------------------------------------------

Effective July 18, 2001, you have been granted a Non-Qualified Stock Option to
buy 250,000 shares of the common stock of Valero Energy Corporation (the
"Company") at $33.745 per share.

By your signature and the Company's signature below, you and the Company agree
that the Option referenced above is granted under and governed by the terms and
conditions of the Company's 2001 Executive Stock Incentive Plan (as may be
amended) and the Option Agreement attached hereto, all of which are made a part
of this agreement.

-------------------------------------------

VALERO ENERGY CORPORATION

By: /s/ Robert R. Taylor
    ----------------------
Robert R. Taylor
Director - Human Resources
July 24, 2001

By: /s/ William E. Greehey
    ----------------------
William E. Greehey
Employee
August 11, 2001

Source: [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00062-of-00352.parquet"}, [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00062-of-00352.parquet"}]]