Exhibit 3.1
 Execution Version
 
 SECOND AMENDED AND RESTATED
 AGREEMENT OF LIMITED PARTNERSHIP
OF
 CVR PARTNERS, LP




---



##### 



TABLE OF CONTENTS
 PageARTICLE I DEFINITIONSSection 1.1 Definitions
    
    
    1Section 1.2 Construction
    
    
    13ARTICLE II ORGANIZATIONSection 2.1 Formation
    
    
    13Section 2.2 Name
    
    
    13Section 2.3 Registered Office; Registered Agent; Principal Office; Other Offices
    
    
    14Section 2.4 Purpose and Business
    
    
    14Section 2.5 Powers
    
    
    14Section 2.6 Term
    
    
    14Section 2.7 Title to Partnership Assets
    
    
    14ARTICLE III RIGHTS OF LIMITED PARTNERSSection 3.1 Limitation of Liability
    
    
    15Section 3.2 Management of Business
    
    
    15Section 3.3 Outside Activities of the Limited Partners
    
    
    15Section 3.4 Rights of Limited Partners
    
    
    15ARTICLE IV CERTIFICATES; RECORD HOLDERS; TRANSFER OF PARTNERSHIP INTERESTS; REDEMPTION OF PARTNERSHIP INTERESTSSection 4.1 Certificates
    
    
    16Section 4.2 Mutilated, Destroyed, Lost or Stolen Certificates
    
    
    17Section 4.3 Record Holders
    
    
    17Section 4.4 Transfer Generally
    
    
    18Section 4.5 Registration and Transfer of Limited Partner Interests
    
    
    18Section 4.6 Transfer of the General Partner Interest
    
    
    19Section 4.7 Restrictions on Transfers
    
    
    20Section 4.8 Eligibility Certificates; Ineligible Holders
    
    
    20Section 4.9 Redemption of Partnership Interests of Ineligible Holders
    
    
    22ARTICLE V CAPITAL CONTRIBUTIONS AND ISSUANCE OF PARTNERSHIP INTERESTSSection 5.1 Contributions by the General Partner and its Affiliates
    
    
    23
 i




---



##### 



PageSection 5.2 Interest and Withdrawal
    
    
    24Section 5.3 Capital Accounts
    
    
    24Section 5.4 Issuances of Additional Partnership Interests
    
    
    27Section 5.5 Preemptive Right
    
    
    28Section 5.6 Splits and Combinations
    
    
    28Section 5.7 Fully Paid and Non-Assessable Nature of Limited Partner Interests
    
    
    28Section 5.8 Extinguishment of the IDRs
    
    
    29ARTICLE VI ALLOCATIONS AND DISTRIBUTIONSSection 6.1 Allocations for Capital Account Purposes
    
    
    29Section 6.2 Allocations for Tax Purposes
    
    
    32Section 6.3 Distributions to Record Holders
    
    
    34ARTICLE VII MANAGEMENT AND OPERATION OF BUSINESSSection 7.1 Management
    
    
    34Section 7.2 Certificate of Limited Partnership
    
    
    36Section 7.3 Restrictions on the General Partners Authority
    
    
    37Section 7.4 Reimbursement of the General Partner
    
    
    37Section 7.5 Outside Activities
    
    
    38Section 7.6 Loans from the General Partner; Loans or Contributions from the Partnership or Group Members
    
    
    39Section 7.7 Indemnification
    
    
    40Section 7.8 Liability of Indemnitees
    
    
    42Section 7.9 Resolution of Conflicts of Interest; Standards of Conduct and Modification of Duties
    
    
    42Section 7.10 Other Matters Concerning the General Partner
    
    
    44Section 7.11 Purchase or Sale of Partnership Interests
    
    
    44Section 7.12 Registration Rights of the General Partner and its Affiliates
    
    
    45Section 7.13 Reliance by Third Parties
    
    
    47ARTICLE VIII BOOKS, RECORDS, ACCOUNTING AND REPORTSSection 8.1 Records and Accounting
    
    
    47Section 8.2 Fiscal Year
    
    
    48Section 8.3 Reports
    
    
    48ARTICLE IX TAX MATTERSSection 9.1 Tax Returns and Information
    
    
    48Section 9.2 Tax Elections
    
    
    49Section 9.3 Tax Controversies
    
    
    49Section 9.4 Withholding
    
    
    49
 ii




---



##### 



PageARTICLE X ADMISSION OF PARTNERSSection 10.1 Admission of Limited Partners
    
    
    49Section 10.2 Admission of Successor General Partner
    
    
    50Section 10.3 Amendment of Agreement and Certificate of Limited Partnership
    
    
    50ARTICLE XI WITHDRAWAL OR REMOVAL OF PARTNERSSection 11.1 Withdrawal of the General Partner
    
    
    51Section 11.2 Removal of the General Partner
    
    
    52Section 11.3 Interest of Departing General Partner and Successor General Partner
    
    
    53Section 11.4 Withdrawal of Limited Partners
    
    
    54ARTICLE XII DISSOLUTION AND LIQUIDATIONSection 12.1 Dissolution
    
    
    54Section 12.2 Continuation of the Business of the Partnership After Dissolution
    
    
    55Section 12.3 Liquidator
    
    
    55Section 12.4 Liquidation
    
    
    56Section 12.5 Cancellation of Certificate of Limited Partnership
    
    
    56Section 12.6 Return of Contributions
    
    
    56Section 12.7 Waiver of Partition
    
    
    57Section 12.8 Capital Account Restoration
    
    
    57ARTICLE XIII AMENDMENT OF PARTNERSHIP AGREEMENT; MEETINGS; RECORD DATESection 13.1 Amendments to be Adopted Solely by the General Partner
    
    
    57Section 13.2 Amendment Procedures
    
    
    58Section 13.3 Amendment Requirements
    
    
    59Section 13.4 Special Meetings
    
    
    60Section 13.5 Notice of a Meeting
    
    
    60Section 13.6 Record Date
    
    
    60Section 13.7 Adjournment
    
    
    60Section 13.8 Waiver of Notice; Approval of Meeting; Approval of Minutes
    
    
    61Section 13.9 Quorum and Voting
    
    
    61Section 13.10 Conduct of a Meeting
    
    
    61Section 13.11 Action Without a Meeting
    
    
    62Section 13.12 Right to Vote and Related Matters
    
    
    62ARTICLE XIV MERGERSection 14.1 Authority
    
    
    63Section 14.2 Procedure for Merger or Consolidation
    
    
    63
 iii




---



##### 



PageSection 14.3 Approval by Partners of Merger or Consolidation
    
    
    64Section 14.4 Certificate of Merger
    
    
    65Section 14.5 Amendment of Partnership Agreement
    
    
    65Section 14.6 Effect of Merger
    
    
    65ARTICLE XV RIGHT TO ACQUIRE LIMITED PARTNER INTERESTSSection 15.1 Right to Acquire Limited Partner Interests
    
    
    66ARTICLE XVI GENERAL PROVISIONSSection 16.1 Addresses and Notices
    
    
    67Section 16.2 Further Action
    
    
    68Section 16.3 Binding Effect
    
    
    68Section 16.4 Integration
    
    
    68Section 16.5 Creditors
    
    
    68Section 16.6 Waiver
    
    
    68Section 16.7 Counterparts
    
    
    68Section 16.8 Applicable Law; Forum, Venue and Jurisdiction
    
    
    69Section 16.9 Invalidity of Provisions
    
    
    69Section 16.10 Consent of Partners
    
    
    70Section 16.11 Facsimile Signatures
    
    
    70Section 16.12 Third Party Beneficiaries
    
    
    70
 iv




---



##### 



SECOND AMENDED AND RESTATED AGREEMENT OF LIMITED
PARTNERSHIP OF CVR PARTNERS, LP
  ARTICLE I
DEFINITIONS
 Definitions
 Adjusted Capital Account
 Adjusted Property
 Affiliate
 1




---



##### 



Agreed Allocation
 Agreed Value
 Agreement
 Amended Contribution Agreement
 Associate
 Board of Directors
 Book-Tax Disparity
 Business Day
 Capital Account
 2




---



##### 



Capital Contribution
 Carrying Value
 Cause
 Certificate
 Certificate of Limited Partnership
 claim
 Closing Date
 Closing Price
 3




---



##### 



Code
 Coffeyville Acquisition III
 Coffeyville Resources
 Combined Interest
 Commission
 Common Unit
 Conflicts Committee
 Contributed Property
 Contribution Agreement
 Credit Agreement
 4




---



##### 



Curative Allocation
 Current Market Price
 Delaware Act et seq
 Departing General Partner
 Economic Risk of Loss
 Effective Time
 Eligibility Certificate .
 Eligibility Certification
 Eligible Holder
 Event of Withdrawal
 Fertilizer Restricted Businesses
 General Partner
 General Partner Interest
 5




---



##### 



Gross Liability Value
 Group
 Group Member
 Group Member Agreement
 Holder
 Incentive Distribution Rights
 Indemnified Persons
 Indemnitee
 6




---



##### 



Ineligible Holder .
 Initial Offering
 Limited Partner
 Limited Partner Interest
 Liquidation Date
 Liquidator
 Long Term Incentive Plan
 Merger Agreement
 National Securities Exchange
 7




---



##### 



Net Agreed Value
 Net Income
 Net Loss
 Nonrecourse Built-in Gain
 Nonrecourse Deductions
 Nonrecourse Liability
 Notice of Election to Purchase
 Omnibus Agreement
 Opinion of Counsel
 Option Closing Date
 8




---



##### 



Organizational Limited Partner
 Outstanding
 Over-Allotment Option
 Partner Nonrecourse Debt
 Partner Nonrecourse Debt Minimum Gain
 Partner Nonrecourse Deductions
 Partners
 Partnership
 Partnership Group
 Partnership Interest
 9




---



##### 



Partnership Minimum Gain
 Percentage Interest
 Person
 Pro Rata
 Purchase Date
 Quarter
 Rate Eligibility Trigger
 Recapture Income
 Record Date
 10




---



##### 



Record Holder
 Redeemable Interests
 Registration Statement
 Required Allocations
 Securities Act
 Securities Exchange Act
 Special Approval
 Special General Partner
 Special General Partner Interest
 Special GP Units
 Special LP Units
 Special Units
 11




---



##### 



Subsidiary
 Surviving Business Entity
 Trading Day
 transfer
 Transfer Agent
 Underwriter
 Underwriting Agreement
 Unit
 Unit Majority
 Unitholders
 Unrealized Gain
 12




---



##### 



Unrealized Loss
 Unrestricted Person
 U.S. GAAP
 Withdrawal Opinion of Counsel
 Construction
 ARTICLE II
ORGANIZATION
 Formation
 Name
 13




---



##### 



Registered Office; Registered Agent; Principal Office; Other Offices
 Purpose and Business provided
 Powers
 Term
 Title to Partnership Assets
 14




---



##### 



ARTICLE III
RIGHTS OF LIMITED PARTNERS
 Limitation of Liability
 Management of Business
 Outside Activities of the Limited Partners
 Rights of Limited Partners
  15




---



##### 



ARTICLE IV
CERTIFICATES; RECORD HOLDERS; TRANSFER OF PARTNERSHIP INTERESTS;
REDEMPTION OF PARTNERSHIP INTERESTS
 Certificates
 16




---



##### 



Mutilated, Destroyed, Lost or Stolen Certificates
         Record Holders
 17




---



##### 



Transfer Generally
    Registration and Transfer of Limited Partner Interests
   18




---



##### 



Transfer of the General Partner Interest
    19




---



##### 



Restrictions on Transfers
    Eligibility Certificates; Ineligible Holders
   20




---



##### 



Rate Eligibility
Trigger
 Citizenship Eligibility Trigger
  Eligibility
Certificate
 Ineligible Holder
   21




---



##### 



Redemption of Partnership Interests of Ineligible Holders
     22




---



##### 



ARTICLE V
CAPITAL CONTRIBUTIONS AND ISSUANCE OF PARTNERSHIP INTERESTS
 Contributions by the General Partner and its Affiliates
    23




---



##### 



Interest and Withdrawal
 Capital Accounts
    24




---



##### 



25




---



##### 



provided
  26




---



##### 



Issuances of Additional Partnership Interests
     27




---



##### 



Preemptive Right
 Splits and Combinations
     Fully Paid and Non-Assessable Nature of Limited Partner Interests
 28




---



##### 



Extinguishment of the IDRs
  ARTICLE VI
ALLOCATIONS AND DISTRIBUTIONS
 Allocations for Capital Account Purposes
 Net Income and Net Loss
 Special Allocations
 Partnership Minimum Gain Chargeback
 Chargeback of Partner Nonrecourse Debt Minimum Gain
 29




---



##### 



Priority Allocations
  Qualified Income Offset ,
 Gross Income Allocations
 Nonrecourse Deductions
 30




---



##### 



Partner Nonrecourse Deductions
 Nonrecourse Liabilities
 Code Section 754 Adjustments
 Economic Uniformity; Changes in Law
 31




---



##### 



Curative Allocation
   Allocations for Tax Purposes
    32




---



##### 



33




---



##### 



Distributions to Record Holders
      ARTICLE VII
MANAGEMENT AND OPERATION OF BUSINESS
 Management
     34




---



##### 



35




---



##### 



Certificate of Limited Partnership
 36




---



##### 



Restrictions on the General Partners Authority
 Reimbursement of the General Partner
     37




---



##### 



Outside Activities
     38




---



##### 



Loans from the General Partner; Loans or Contributions from the Partnership or
Group Members
  39




---



##### 



Indemnification
   40




---



##### 



41




---



##### 



Liability of Indemnitees
     Resolution of Conflicts of Interest; Standards of Conduct and Modification of
Duties
  42




---



##### 



43




---



##### 



Other Matters Concerning the General Partner
    Purchase or Sale of Partnership Interests
 44




---



##### 



Registration Rights of the General Partner and its Affiliates
 Holder
  45




---



##### 



Indemnified Persons
  46




---



##### 



Reliance by Third Parties
 ARTICLE VIII
BOOKS, RECORDS, ACCOUNTING AND REPORTS
 Records and Accounting
 47




---



##### 



Fiscal Year
 Reports
    ARTICLE IX
TAX MATTERS
 Tax Returns and Information
 48




---



##### 



Tax Elections
   Tax Controversies
 Withholding
 ARTICLE X
ADMISSION OF PARTNERS
 Admission of Limited Partners
  49




---



##### 



Admission of Successor General Partner
 Amendment of Agreement and Certificate of Limited Partnership
 50




---



##### 



ARTICLE XI
WITHDRAWAL OR REMOVAL OF PARTNERS
 Withdrawal of the General Partner
 Event of Withdrawal
        51




---



##### 



Withdrawal Opinion of Counsel
 Removal of the General Partner
 52




---



##### 



Interest of Departing General Partner and Successor General Partner
 Combined Interest
  53




---



##### 



Withdrawal of Limited Partners
 ARTICLE XII
DISSOLUTION AND LIQUIDATION
 Dissolution
     54




---



##### 



Continuation of the Business of the Partnership After Dissolution
     Liquidator
 55




---



##### 



Liquidation
    Cancellation of Certificate of Limited Partnership
 Return of Contributions
 56




---



##### 



Waiver of Partition
 Capital Account Restoration
 ARTICLE XIII
AMENDMENT OF PARTNERSHIP AGREEMENT; MEETINGS; RECORD DATE
 Amendments to be Adopted Solely by the General Partner
      57




---



##### 



Amendment Procedures
 58




---



##### 



Amendment Requirements
      59




---



##### 



Special Meetings
 Notice of a Meeting
 Record Date
 Adjournment
 60




---



##### 



Waiver of Notice; Approval of Meeting; Approval of Minutes
 Quorum and Voting provided
 Conduct of a Meeting
 61




---



##### 



Action Without a Meeting
 Right to Vote and Related Matters
   62




---



##### 



ARTICLE XIV
MERGER
 Authority Merger Agreement
 Procedure for Merger or Consolidation
    Surviving Business
Entity
   63




---



##### 



Approval by Partners of Merger or Consolidation
     64




---



##### 



Certificate of Merger
 Amendment of Partnership Agreement
 Effect of Merger
   65




---



##### 



ARTICLE XV
RIGHT TO ACQUIRE LIMITED PARTNER INTERESTS
 Right to Acquire Limited Partner Interests
  Notice of Election to Purchase
 66




---



##### 



ARTICLE XVI
GENERAL PROVISIONS
 Addresses and Notices
   67




---



##### 



Further Action
 Binding Effect
 Integration
 Creditors
 Waiver
 Counterparts
 68




---



##### 



Applicable Law; Forum, Venue and Jurisdiction
      Invalidity of Provisions
 69




---



##### 



Consent of Partners
 Facsimile Signatures
 Third Party Beneficiaries
 [ ]
 70




---



##### 



GENERAL PARTNER:CVR GP, LLCBy:
    /s/ Edward A. MorganName:
    Edward A. MorganTitle:
    Chief Financial Officer and TreasurerLIMITED PARTNER:COFFEYVILLE RESOURCES, LLCBy:
    /s/ Edward A. MorganName:
    Edward A. MorganTitle:
    Chief Financial Officer and Treasurer Second Amended and Restated Partnership Agreement
of
CVR Partners, LP




---



##### 



EXHIBIT A
to the Second Amended and Restated
Agreement of Limited Partnership of
CVR Partners, LP
 Certificate Evidencing Common Units
Representing Limited Partner Interests in
CVR Partners, LP
 No.
    
    __________ Common Units
 Partnership
Agreement Partnership Holder Common Units
  A-1




---



##### 



Dated:__________________________
    CVR Partners, LPCountersigned and Registered by:
    By:
    CVR GP LLC[Transfer Agent],
    By:As Transfer Agent and Registrar
    
    Name:Title:By:Name:Title: A-2




---



##### 



[ ]
 ABBREVIATIONS
   TEN COM
    
    -
    
    as tenants in commonTEN ENT
    
    -
    
    as tenants by the entiretiesJT TEN
    
    -
    
    as joint tenants with right of survivorship and not as tenants in common
 UNIF GIFT/TRANSFERS MIN ACT__________ Custodian _________(Cust)                    (Minor)Under Uniform Gifts/Transfers to CD Minors Act (State)
    ASSIGNMENT OF COMMON UNITS OF
CVR PARTNERS, LP
  (Please print or typewrite name and
address of assignee)
    
    (Please insert Social Security
or other identifying number of
assignee)
  Date: ________________________
    
    NOTE: The signature to any
endorsement hereon must
correspond with the name as
written upon the face of this
Certificate in every
particular. without
alteration, enlargement or
change.THE SIGNATURE(S) MUST BE
GUARANTEED BY AN ELIGIBLE
GUARANTOR INSTITUTION (BANKS,
STOCKBROKERS, SAVINGS AND
LOAN ASSOCIATIONS AND CREDIT
UNIONS WITH MEMBERSHIP IN AN
APPROVED SIGNATURE GUARANTEE
MEDALLION PROGRAM), PURSUANT
TO S.E.C. RULE 17Ad-15
    
    (Signature)(Signature)
  A-3