EXHIBIT 10.17


 


CODORUS VALLEY BANCORP, INC.


CHANGE IN CONTROL AND


SUPPLEMENTAL BENEFIT TRUST AGREEMENT


 


 


This Agreement made this 25th day
of January, 2006, by and among CODORUS VALLEY BANCORP, INC., a corporation organized and existing under the laws of the Commonwealth
of Pennsylvania (the "Corporation"), PEOPLESBANK, a Codorus Valley Company, a wholly owned bank subsidiary of the Corporation
organized under the laws of the Commonwealth of Pennsylvania (the "Bank") and HERSHEY TRUST COMPANY (the "Trustee");


 


WITNESSETH:


 


WHEREAS, the Corporation
and the Bank (hereinafter collectively referred to as the "Company") have heretofore entered into unfunded plans of deferred
compensation (hereinafter referred to as the "Plans, Plan(s), or Plan") as listed in Appendix A;


 


WHEREAS, the Company has
incurred and expects to incur liability under the terms of the Plans with respect to the individuals covered under each Plan ("Plan
Participants");


 


WHEREAS, the Company intends
to establish a trust effective as of the date hereof, known as the Codorus Valley Bancorp, Inc. Change in Control and Supplemental
Benefits Trust Agreement ("Trust" or "Trust Agreement") for the purpose, in certain events, of assisting it
in fulfilling its obligations under the Plans and it is the desire of the Company to establish the Trust in accordance with the
Model Trust format set forth in Revenue Procedure 92-64;


 


WHEREAS, the Company wishes
to establish this Trust and to contribute to the Trust, at such times and under such conditions as set forth herein, assets that
shall be held therein, subject to the claims of the Company's creditors in the event of the Company's Insolvency, as herein defined,
until paid to Plan Participants and their beneficiaries in such manner and at such times as specified in the respective Plans;


 


WHEREAS, it is the intention
of the parties that this Trust shall constitute an unfunded arrangement and shall not affect the status of the Plans as unfunded
plans maintained for the purpose of providing deferred compensation for a select group of management or highly compensated employees
for purposes of Title I. of the Employee Retirement Income Security Act of 1974;


 


WHEREAS, the Company desires
the Trustee to hold and administer all funds contributed by the Company and the Trustee is willing to hold and administer such
funds pursuant to the terms of this Trust Agreement.


 


NOW, THEREFORE, the parties
do hereby adopt this Trust and agree that the Trust shall be comprised, held and disposed of as follows:


 




    	-1- 



     

    



 


Section 1. - Establishment of Trust


 


(a)          The Company hereby
deposits with the Trustee in trust the sum of one hundred dollars ($100.00) which shall become the principal of the Trust to be
held, administered and disposed of by the Trustee as provided in this Trust Agreement.


 


(b)          The Trust hereby
established shall be irrevocable.


 


(c)          The Trust is
intended to be a grantor trust, of which the Company is the grantor, within the meaning of subpart E, part I, subchapter J, chapter
1, subtitle A of the Internal Revenue Code of 1986, as amended, and shall be construed accordingly.


 


(d)          The principal
of the Trust, and any earnings thereon shall be held separate and apart from other funds of the Company and shall be used exclusively
for the uses and purposes of Plan Participants and general creditors as herein set forth. Plan Participants and their beneficiaries
shall have no preferred claim on, or any beneficial ownership interest in, any assets of the Trust. Any rights created under the
Plan(s) and this Trust Agreement shall be mere unsecured contractual rights of Plan Participants and their beneficiaries against
the Company. Any assets held by the Trust will be subject to the claims of the Company's general creditors under federal and state
law in the event of Insolvency, as defined in Section 3(a) herein.


 


(e)          Except as otherwise
provided in Section 13(e) hereto, upon a Change of Control, the Company shall, as soon as possible, but in no event longer than
thirty (30) days following the Change of Control, as defined herein, make an irrevocable contribution to the Trust in an amount
that is sufficient to pay each Plan Participant or beneficiary the benefits to which Plan Participants or their beneficiaries would
be entitled pursuant to the terms of the Plans as of the date on which the Change of Control occurred. The contribution under this
Section 1(e) shall be determined in accordance with Section 13(f).


 


(f)          The Company,
in its sole discretion, may at any time, or from time to time, make additional deposits of cash or other property in trust with
the Trustee to augment the principal to be held, administered and disposed of by the Trustee as provided in this Trust Agreement.
Neither Trustee nor any Plan Participant or beneficiary shall have any right to compel such additional deposits.


 


Section 2. -
Payments to Plan Participants and Their Beneficiaries


 


(a)          The Company
shall deliver to the Trustee a schedule (the "Payment Schedule") that indicates the amounts payable in respect of each
Plan Participant (and his or her beneficiaries), that provides a formula or other instructions acceptable to the Trustee for determining
the amounts so payable, the form in which such amount is to be paid (as provided for or available under the Plan), and the time
of commencement for payment of such amounts. Except as otherwise provided herein, the Trustee shall make payments to the Plan Participants
and their beneficiaries in accordance with such Payment Schedule. The Trustee shall make provision for the reporting and withholding
of any federal, state or local taxes that may be required to be withheld with respect to the payment of benefits pursuant to the
terms of the Plan and shall pay amounts withheld to the appropriate taxing authorities or determine that such amounts have been
reported, withheld and paid by the Company.


 




    	-2- 



     

    


(b)          The entitlement
of a Plan Participant or his or her beneficiaries to benefits under the Plan shall be determined by the Company or such party as
it shall designate under the Plan, and any claim for such benefits shall be considered and reviewed under the procedures set out
in the Plan.


 


(c)          The Company
may make payment of benefits directly to Plan Participants or their beneficiaries as they become due under the terms of the Plan(s).
The Company shall notify the Trustee of its decision to make payment of benefits directly prior to the time amounts are payable
to Participants or their beneficiaries. In addition, if the principal of the Trust, and any earnings thereon, are not sufficient
to make payment of benefits in accordance with the terms of the Plan(s), the Company shall make the balance of each such payment
as it falls due. The Trustee shall notify the Company where principal and earnings are not sufficient.


 


Section 3. - Trustee Responsibility Regarding Payments to Trust Beneficiary
When the Company Is Insolvent


 


(a)          The Trustee
shall cease payment of benefits to Plan Participants and their beneficiaries if the Company is Insolvent. The Company shall be
considered "Insolvent" for purposes of this Trust Agreement if (i) the Company is unable to pay its debts as they become
due, or (ii) the Company is subject to a pending proceeding as a debtor under the United States Bankruptcy Code, or (iii) the Company
is determined to be insolvent by any federal or state regulatory agency with jurisdiction over the Company.


 


(b)          At all times
during the continuance of this Trust, as provided in Section 1(d) hereof, the principal and income of the Trust shall be subject
to claims of general creditors of the Company under federal and state law as set forth below.


 


(1)          The Board
of Directors and the Chief Executive Officer of the Company shall have the duty to inform the Trustee in writing of the Company's
Insolvency. If a person claiming to be a creditor of the Company alleges in writing to the Trustee that the Company has become
Insolvent, the Trustee shall determine whether the Company is Insolvent and, pending such determination, the Trustee shall discontinue
payment of benefits to Plan Participants or their beneficiaries.


 


(2)          Unless the
Trustee has actual knowledge of the Company's Insolvency, or has received notice from the Company or a person claiming to be a
creditor alleging that the Company is Insolvent, the Trustee shall have no duty to inquire whether the Company is Insolvent. The
Trustee may in all events rely on such evidence concerning the Company's solvency as may be furnished to the Trustee and that provides
the Trustee with a reasonable basis for making a determination concerning the Company's solvency.


 



    	-3- 



     

    


 


(3)          If at any
time the Trustee has determined that the Company is Insolvent, the Trustee shall discontinue payments to Plan Participants or their
beneficiaries and shall hold the assets of the Trust for the benefit of the Company's general creditors. Nothing in this Trust
Agreement shall in any way diminish any rights of Plan Participants or their beneficiaries to pursue their rights as general creditors
of the Company with respect to benefits due under the Plan(s) or otherwise.


 



(4)          The Trustee
shall resume the payment of benefits to Plan Participants or their beneficiaries in accordance with Section 2 of this Trust Agreement
only after the Trustee has determined that the Company is not Insolvent (or is no longer Insolvent).


 


(c)          Provided that
there are sufficient assets, if the Trustee discontinues the payment of benefits from the Trust pursuant to Section 3(b) hereof
and subsequently resumes such payments, the first payment following such discontinuance shall include the aggregate amount of all
payments due to Plan Participants or their beneficiaries under the terms of the Plan for the period of such discontinuance, less
the aggregate amount of any payments made to Plan Participants or their beneficiaries by the Company in lieu of the payments provided
for hereunder during any such period of discontinuance.


 


Section 4. - Payments to the Company


 


Except as provided
in Section 3 or Section 13(e) hereof, after the Trust has become irrevocable, the Company shall have no right or power to direct
the Trustee to return to the Company or to divert to others any of the Trust assets before all payment of benefits have been made
to Plan Participants and their beneficiaries pursuant to the terms of the Plans.


 


Section 5. - Investment Authority


 


(a)          The powers
of the Trustee shall include the following:


 


(1)          To retain,
whether originally a part of the trust estate or subsequently acquired, and to purchase or otherwise acquire and then retain, any
property, whether or not such property is authorized for investment under the Pennsylvania Prudent Investor Act or by other law.


 


(2)          To hold any
part of the trust estate in cash or uninvested for any period deemed advisable.


 


(3)          To register
any securities at any time in its name as Trustee, or in nominee registration, with or without indicating the trust character of
the securities so registered.


 


(4)          With respect
to any securities held hereunder, to vote upon any proposition or election at any meeting of the person or entity issuing such
securities, and to grant proxies, discretionary or otherwise, to vote at any such meeting, to exercise conversion, subscription
or other rights, and to receive or hold any new securities issued as a result of any reorganization, readjustment, merger, voting
trust, consolidation, exchange or exercise of conversion, subscription or other rights and generally to take all action with respect
to any such securities as could be taken by the absolute owner thereof.


 




    	-4- 



     

    


 


(5)          To invest
in common trust funds, collective funds, or mutual funds managed by the Trustees.


 


(b)          In no event
may the Trustee invest in securities (including stock or rights to acquire stock) or obligations issued by the Company, other than
a de minimis amount held in common investment vehicles in which the Trustee invests. All rights associated with assets of the Trust
shall be exercised by the Trustee or the person designated by the Trustee, and shall in no event be exercisable by or rest with
Plan Participants.


 


Section 6. - Disposition of Income


 


During the term of
this Trust, all income received by the Trust, net of expenses and taxes, shall be accumulated and reinvested.


 


Section 7. - Accounting by the Trustee


 


(a)          The Trustee
shall keep accurate and detailed records of all investments, receipts, disbursements, and all other transactions required to be
made, including such specific records as shall be agreed upon in writing between the Company and the Trustee. Within ninety (90)
days following the close of each calendar year and within one hundred twenty {120) days after the removal or resignation of the
Trustee, the Trustee shall deliver to the Company a written account of its administration of the Trust during such year or during
the period from the close of the last preceding year to the date of such removal or resignation, setting forth all investments,
receipts, disbursements and other transactions effected by it, including a description of all securities and investments purchased
and sold with the cost or net proceeds of such purchases or sales (accrued interest paid or receivable being shown separately),
and showing all cash, securities and other property held in the Trust at the end of such year or as of the date of such removal
or resignation, as the case may be. Each account so filed shall be open to inspection during business hours by any Plan Participant
and any person designated by such Plan Participant for a period of sixty (60) days immediately following the date on which the
account is filed with the Company.


 


Section 8.
- Responsibility of the Trustee


 


(a)          The Trustee
shall act with the care, skill, prudence and diligence under the circumstances then prevailing that a prudent person acting in
like capacity and familiar with such matters would use in the conduct of an enterprise of a like character and with like aims,
provided, however, that the Trustee shall incur no liability to any person for any action taken pursuant to a direction, request
or approval given by the Company which is contemplated by, and in conformity with, the terms of the Plan(s) or this Trust and is
given in writing by the Company. In the event of a dispute between the Company and a party, the Trustee may apply to a court of
competent jurisdiction to resolve the dispute.


 




    	-5- 



     

    


 


(b)          If the Trustee
undertakes or defends any litigation arising in connection with this Trust, the Company agrees to indemnify the Trustee against
the Trustee's costs, expenses and liabilities (including, without limitation, attorneys' fees and expenses) relating thereto and
to be primarily liable for such payments. If the Company does not pay such costs, expenses and liabilities in a reasonably timely
manner, the Trustee may obtain payment from the Trust.


 


(c)          The Trustee
may consult with legal counsel, including legal counsel of the Company should the Trustee so choose, with respect to any of its
duties or obligations hereunder.


 


(d)          The Trustee
may hire agents, accountants, actuaries, investment advisors, financial advisors or other professionals to assist it in performing
any of its duties or obligations hereunder.


 


(e)          The Trustee
shall have, without exclusion, all powers conferred on the Trustees by applicable law, unless expressly provided otherwise herein,
provided, however, that if an insurance policy is held as an asset of the Trust, the Trustee shall have no power to name a beneficiary
of the policy other than the Trust, to assign the policy (as distinct from conversion of the policy to a different form)
other than to a successor Trustee, or to loan to any person the proceeds of any borrowing against such policy.


 


(f)           Notwithstanding
any powers granted to the Trustee pursuant to this Trust Agreement or to applicable law, the Trustee shall not have any power that
could give this Trust the objective of carrying on a business and dividing the gains therefrom, within the meaning of section 301.7701-2
of the Procedure and Administrative Regulations promulgated pursuant to the Internal Revenue Code.


 


Section 9.
- Compensation and Expenses of the Trustee


 


(a)          The Trustee
shall be paid such reasonable compensation as shall from time to time be agreed upon by the Company and the Trustee. Such compensation,
including expenses incurred by the Trustee with regard to its responsibilities under the Trust shall be paid by the Company. Such
compensation and expenses shall be withdrawn by the Trustee out of the Trust Fund to the extent the Company does not pay such compensation
and expenses to the Trustee.


 


(b)          As this Trust
is a grantor trust, the Company shall from time to time pay taxes of any and all kinds whatsoever which at any time are lawfully
levied or assessed upon or become payable in respect to the Trust, the income or any property forming a part thereof, or any security
transaction pertaining thereto.


 


Section 10. - Resignation and Removal of the
Trustee


 


(a)          The Trustee
may resign at any time by providing written notice to the Company, which shall be effective sixty (60) days after receipt of such
notice unless the Company and the Trustee agree otherwise to an effective date which is shorter than the sixty (60) day period.


 


(b)          The Trustee
may be removed by the Company at any time by providing written notice to the Trustee, which shall be effective sixty (60) days
after receipt of such notice unless the Company and the Trustee agree otherwise to an effective date which is shorter than the
sixty (60) day period. In no event may the Company serve as the Trustee to this Trust.


 




    	-6- 



     

    


 


(c)          Upon resignation
or removal of the Trustee and appointment of a successor Trustee, all assets shall subsequently be transferred to the successor
Trustee. The transfer shall be completed immediately following the effective date of the resignation or removal of the Trustee.


 


(d)          If the Trustee
resigns or is removed, a successor shall be appointed, in accordance with Section 11 hereof, by the effective date of resignation
or removal under paragraph (a) or (b) of this section. If no such appointment has been made, the Trustee may apply to a court of
competent jurisdiction for appointment of a successor or for instructions. All expenses of the Trustee in connection with the proceeding
shall be allowed as administrative expenses of the Trust.


 


Section 11. - Appointment of Successor


 


(a)          If the Trustee
resigns or is removed in accordance with Section 10, the Company may only appoint a financial institution that possesses corporate
trustee powers under state law as the successor to replace the Trustee upon resignation or removal. The appointment shall be effective
when accepted in writing by the successor Trustee, who shall have all of the rights and powers of the former Trustee, including
ownership rights in the Trust assets. The former Trustee shall execute any instrument necessary or reasonably requested by the
Company or the successor Trustee to evidence the transfer.


 


Section 12_ - Amendment or Termination


 


(a)          This Trust
Agreement may be amended by a written instrument executed by the Trustee and the Company. Notwithstanding the foregoing, no such
amendment shall conflict with the terms of the Plan(s) nor shall any such amendment make the Trust revocable after it has become
irrevocable in accordance with Section 1(b) hereof.


 


(b)          The Trust shall
not terminate until the date on which respective Plan Participants and their beneficiaries are no longer entitled to benefits pursuant
to the terms of the Plan(s). Upon termination of the Trust any assets remaining in the Trust shall be returned to the Company.


 


(c)          Upon written
approval of all Plan Participants or beneficiaries entitled to payment of benefits pursuant to the terms of the Plan(s), the Company
may terminate this Trust prior to the time all benefit payments under the Plan(s) have been made. All assets in the Trust at termination
shall be returned to the Company.


 


Section 13. - Miscellaneous


 


(a)          Any provision
of this Trust Agreement prohibited by law shall be ineffective to the extent of any such prohibition, without invalidating the
remaining provisions hereof.


 




    	-7- 



     

    


 


(b)          Benefits payable
to Plan Participants and their beneficiaries under this Trust Agreement may not be anticipated, assigned (either at law or in equity),
alienated, pledged, encumbered or subjected to attachment, garnishment, levy, execution or other legal or equitable process.


 


(c)          This Trust
Agreement shall be governed by and construed in accordance with the laws of the Commonwealth of Pennsylvania and the United States.


 


(d)          For purposes
of this Agreement, the term “Change in Control” shall mean: A Change in the Ownership of the Corporation or the Bank,
(as defined below), a Change in the Effective Control of the Corporation or the Bank (as defined below), or a Change in the Ownership
of a Substantial Portion of the Assets of the Corporation or the Bank, (as defined below).


 


(1)          Change in
the Ownership of the Corporation or the Bank. A change in the Ownership of the Corporation or the Bank occurs on the date that
any one person, or more than one person acting as a group (as defined below), acquires ownership of stock of the Corporation or
the Bank that, together with stock held by such person or group, constitutes more than 50 percent of the total fair market value
or total voting power of the stock of the Corporation or the Bank. However, if any one person, or more than one person acting as
a group, is considered to own more than 50 percent of the total fair market value or total voting power of the stock of the Corporation
or the Bank, the acquisition of additional stock by the same person pr persons is not considered to cause a Change in the Ownership
of the Corporation or the Bank. An increase in the percentage of stock owned by any one person or persons acting as a group, as
a result of a transaction in which the Corporation or the Bank acquires its stock in exchange for property will be treated as an
acquisition of stock for these purposes. A change in ownership of the Corporation or the Bank only occurs when there is a transfer
or issuance of stock of the Corporation or the Bank and the stock remains outstanding after the transaction.


 


(2)          Change in
Effective Control of the Corporation or the Bank. A Change in Effective Control of the Corporation or the Bank occurs only
on the date that either:


 


(i)          Any one person,
or more than one person acting as a group (as defined below), acquires (or has acquired during the 12-month period ending on the
date of the most recent acquisition by such person or persons) ownership of stock of the Corporation or the Bank possessing 35
percent or more of the total voting power of the stock of the Corporation or the Bank; or


 


(ii)          A majority
of members of the Corporation’s Board of Directors is replaced during any 12-month period by the directors whose appointment
or election is not endorsed by a majority of members of the Corporation’s Board of Directors prior to the sate of the appointment
or election.


 




    	-8- 



     

    


 


If any person, or
more than one person acting as a group, is considered to effectively control the Corporation or the Bank, the acquisition of additional
control of the Corporation or the Bank by the same person or persons is not considered to cause a Change in the Effective Control
of the Corporation or the Bank.


 


(3)          Change in
Ownership of a Substantial Portion of the Corporation’s or the Bank’s Assets. A Change in Ownership of a Substantial
Portion of the Corporation’s or the Bank’s Assets occurs on the date that any one person, or more than one person acting
as a group (as defined below), acquires (or has acquired during the 12-month period ending on the date of the most recent acquisition
by such person or persons) assets from the Corporation or the Bank that have a total gross fair market value equal to or more than
40 percent of the total gross fair market value of all of the assets of the Corporation or the Bank immediately prior to such acquisition
or acquisitions. For this purpose, gross fair market value means the value of assets of the Corporation or the Bank, or the value
of the assets being disposed of, determined without regard to any liabilities associated with such assets.


 


There is no Change
in Control under this Section 13(d)(3) if there is a transfer of assets to any entity that is:


 


(i)          A shareholder
of the Corporation or the Bank (immediately before the asset transfer) in exchange for or with respect to its stock;


 


(ii)          An entity,
50 percent or more of the total value or voting power of which owned, directly or indirectly, by the Corporation or the Bank;


 


(iii)          A person,
or more than one person acting as a group, that owns, directly or indirectly, 50 percent or more of the total value or voting power
of all the outstanding stock of the Corporation or the Bank; or


 


(iv)          An entity,
at least 50 percent of the total value or voting power of which is owned, directly or indirectly, by a person described in (i),
(ii), or (iii) above.


 


For purposes of this
Section 13(d), persons will not be considered to be acting as a group solely because they purchase or won stock or purchase assets
of the Corporation or the Bank at the same time. However, persons will be considered to be acting as a group if they are owners
of a corporation that enters into a merger, consolidation, purchase or acquisition of assets, or similar transaction, such shareholder
is considered to be acting as a group with other shareholders in a corporation only to the extent of the ownership in that corporation
prior to the transaction giving rise to the change and not with respect to the ownership interest in the other corporation.


 




    	-9- 



     

    


 


(e)          If the Corporation
or the Bank enters into an agreement, the consummation of which would result in the occurrence of a Change of Control pursuant
to Section 13(d) above, or, any person publicly announces an intention to take action which if consummated would constitute a Change
of Control pursuant to Section 13 (d) above, the Company shall, as soon as possible, but in no event longer than thirty (30) days
following the event described in this Section 13(e), make a contingent contribution to the Trust in an amount that is sufficient
to pay each Plan Participant or beneficiary the benefit to which Plan Participants or beneficiaries would be entitled pursuant
to the terms of the Plans as of the date on which the event described in this Section 13(e) occurs. The contribution under this
Section 13(e) shall be determined in accordance with Section 13(f). If a Change of Control, as described in Section 13(d) above,
does not occur within one year of an event described in this Section 13(e), then the Trustee shall return to the Company an amount
equal to the contingent contribution plus any earnings thereon; further provided, if a Change of Control occurs within one year
of an event described in this Section 13(e), the contingent contribution shall become an irrevocable contribution to the Trust.


 


(f)          For purposes
of determining the contribution made pursuant to Section 1(e) or Section 13(e) hereto, the contribution to be made with respect
to each Plan shall be equal in amount to the lump sum equivalent of the most valuable benefit to be provided by each Plan. Determination
of lump sum equivalent amounts under this Agreement shall be made utilizing reasonable actuarial assumptions made by an actuary
selected by the disinterested members of the Board of Directors of the Company.


 


(g)          Actions of
the Trustee may be evidenced by a written instrument signed by the Trustee, and all third parties shall be entitled to rely on
said written instrument.


 


(h)          This Agreement
shall be executed in any number of counterparts, each one of which shall be deemed to be the original although the others shall
not be produced.


 


(i)          This Agreement
shall be binding upon the Company and the Trustee, their successors and assigns.


 


(j)          Notwithstanding
anything contained in this Trust Agreement to the contrary, if at any time the Trust finally is determined by the Internal Revenue
Service ("IRS") not to be a "grantor trust" with the result that the income of the Trust Fund is not treated
as income of the Employer pursuant to subpart E of subchapter J of the Code, or if a tax is finally determined by the IRS or is
determined by counsel to the Trustee to be payable by a Plan Participant in respect of any interest in the Trust Fund prior to
payment of such interest to such Plan Participant or beneficiary pursuant to the Plan Participant's respective Plan, the assets
will remain in the Trust pending distribution pursuant to the provisions of the Plan; provided, however, that amounts shall be
distributed annually by the Trustee, if requested by the Plan Participant or beneficiary, in an amount not in excess of the greater
of (i) the tax liability resulting to the Plan Participant or beneficiary from the treatment of the Trust assets as taxable to
the Plan Participant or beneficiary, (ii) the amount of the annual taxable earnings of the Trust allocable to the Plan Participant's
or beneficiary, or (iii) amounts properly distributable to the Plan Participant or beneficiary pursuant to the provisions of the
Plan Participant's Plan. Further provided, however, if the amount distributed to the Plan Participant pursuant to this Section
13(j) exceeds the amount he is otherwise entitled to under his respective Plan, the Plan Participant will recontribute to the Trust
the amount of the distribution net of taxes.


 




    	-10- 



     

    


 


(k)          For purposes
of this Agreement "Change of Control" and "Change in Control" shall have the same meaning when referring to
this Agreement and any Plan set forth in Appendix A.


 


IN WITNESS WHEREOF,
the Corporation and the Bank have caused this Trust Agreement to be executed and attested to on their behalf by their respective
duly authorized officers and the Trustee has caused this Trust Agreement to be executed and attested to on its behalf by its duly
authorized officers as of the day and year first above written.


 


	ATTEST:	 	CODORUS VALLEY BANCORP, INC.
	 	 	 	 
	 	 	 	 
	/s/  Harry R. Swift      	 	By:  	/s/  Larry J. Miller
	(Assistant) Secretary	 	 	Authorized Executive Officer
	 	 	 	 
	(SEAL)	 	 	 
	 	 	 	 
	 	 	 	 
	ATTEST:	 	PEOPLESBANK, a Codorus Valley Company
	 	 	 	 
	 	 	 	 
	/s/  Sherry Ann Martin	 	By:  	 /s/ Larry J. Miller
	(Assistant) Secretary	 	 	Authorized Executive Officer
	 	 	 	 
	(SEAL)	 	 	 
	 	 	 	 
	 	 	 	 
	ATTEST:	 	TRUSTEE:
	 	 	HERSHEY TRUST COMPANY
	 	 	 	 
	/s/  Andrew G. Keefer	 	By:  	 /s/
Lise M. Shehan
	(Assistant) Secretary	 	 	(Vice)-President and Trust Officer


 


(SEAL)


 


 




    	-11- 



     

    


APPENDIX A


 


Reference to Plans set forth below includes any amendments to the Plans:


 


 



 


 


	Larry
    J. Miller	 -
    Employment Agreement
	 	 -
    Salary Continuation Agreement
	 	 -
    Long Term Nursing Care Agreement
	 	 
	Kent A.
    Ketterman	 -
    Employment Agreement
	 	 -
    Salary Continuation Agreement
	 	 
	Harry
    R. Swift	 -
    Change of Control Agreement
	 	 -
    Salary Continuation Agreement
	 	 
	Mathew
    A. Clemens	 -
    Change of Control Agreement
	 	 -
    Salary Continuation Agreement
	 	 
	Jann A.
    Weaver	 -
    Change of Control Agreement
	 	 -
    Salary Continuation Agreement
	 	 
	Lynn D.
    Crenshaw	 -
    Change of Control Agreement


 


 


 


 


 




    	12 



     

    


RESIGNATION AND APPOINTMENT OF TRUSTEE


 


 


WHEREAS, Codorus Valley Bancorp, Inc. (the “Settlor”)
established the Codorus Valley Bancorp, Inc. Change in Control and Supplemental Benefit Trust (the “Trust”) pursuant
to the Change in Control and Supplemental Benefit Trust Agreement dated January 25, 2006 (the “Trust Agreement”).


WHEREAS, Hershey Trust Company is currently the sole
trustee of the Trust.


WHEREAS, Section 10(a) of the Trust Agreement provides
that the trustee of the Trust may resign at any time by providing written notice to the Settlor, which resignation shall be effective
sixty days after receipt of such notice unless the Settlor and the trustee agree otherwise to an effective date which is shorter
than the sixty day period.


WHEREAS, Section 10(d) of the Trust Agreement provides
that if the trustee of the Trust resigns, a successor shall be appointed in accordance with Section 11 of the Trust Agreement by
the effective date of the resignation.


WHEREAS, Section 11 of the Trust Agreement provides
that if the trustee of the Trust resigns, the Settlor may appoint a financial institution that possesses corporate trustee powers
under state law as the successor to replace the trustee upon resignation.


WHEREAS, Hershey Trust Company desires to resign as
trustee of the Trust and the Settlor desires to appoint Counsel Trust Company as trustee of the Trust.


WHEREAS, Hershey Trust Company and the Settlor desire
to waive the sixty day notice period.


NOW WHEREFORE, Hershey Trust Company hereby resigns
as the trustee of the Trust and the Settlor hereby appoints Counsel Trust Company as the trustee of the Trust.


FURTHER, Hershey Trust Company and the Settlor hereby
waive the sixty day notice period and hereby agree that the aforementioned resignation and appointment shall be effective as of
the first date when (i) both of Hershey Trust Company and the Settlor have executed this Resignation and Appointment and (ii) Counsel
Trust Company has accepted its appointment as the trustee of the Trust.


 


 


[signature page follows]


 


 


 




    	-13- 



     

    


NOW WHEREFORE, the Settlor
has executed this Resignation and Appointment on the date indicated below.


 


	Dated:  November 21, 2011	Codorus
    Valley Bancorp, Inc.
	 	 	 
	 	By:  	 
	 	 	Name:  Larry J. Miller
	 	 	Title:    President
    and CEO


 


 


Before the undersigned personally appeared
Larry J. Miller as President and CEO of Settlor and certified he/she executed this Resignation and Appointment for the purposes
stated within on this ______ day of November, 2011.


 


	 	 	 
	 	 
	 	Notary Public
	 	 	 
	 	My Commission Expires:


 


 


 


 


 


 


 


 


 


 


 


 


 


 




    	-14- 



     

    


NOW WHEREFORE, Hershey
Trust Company has executed this Resignation and Appointment on the date indicated below.


 


 


	Dated:  November 18, 2011	HERSHEY TRUST COMPANY
	 	 	 
	 	By:  	 
	 	 	Name:  David P. Lavery
	 	 	Title:    Interim
    Chief Executive Officer


 


 


Before the undersigned personally appeared
David P. Lavery as Interim Chief Executive Officer of Hershey Trust Company and certified he executed this Resignation and Appointment
for the purposes stated within on this ______ day of November, 2011.


 


 


	 	 	 
	 	 
	 	Notary Public
	 	 	 
	 	My Commission Expires:


 


 


 


 


 


 


 


 


 


 


 


 


 


 




    	-15- 



     

    


NOW WHEREFORE, Counsel
Trust Company hereby acknowledges receipt of this Resignation and Appointment and accepts its appointment as the trustee of the
Trust.


 


 


	Dated:  November 22, 2011	COUNSEL TRUST COMPANY
	 	 	 
	 	By:  	 
	 	 	Name:  David L. Dolan
	 	 	Title:    President


 


 


Before the undersigned personally appeared
David L. Dolan as President of Counsel Trust Company and certified he/she executed this Resignation and Appointment for the purposes
stated within on this ______ day of November, 2011.


 


 


	 	 	 
	 	 
	 	Notary Public
	 	 	 
	 	My Commission Expires:


 


 


 


 


 


 


 


 


 


 


 


 


 


 


 








    	-16-