Document:

<PAGE>

                                                                   EXHIBIT 10.29

                                                        Contract No. FY05-LI-133

This contract is between the State of North Dakota acting by and through its
Industrial Commission, hereafter called Commission and Red Trail Energy, LLC.,
hereafter called Contractor.

1.    Independent Contractor

      The Contractor, its employees, agents and representatives are not
      employees of the Commission. Nothing in this Agreement shall be deemed to
      create an employer/employee relationship between the Commission and the
      Contractor.

2.    Statement of Work

      a.    Contractor agrees to perform the work described in Exhibit A,
            entitled "Demonstrating North Dakota Lignite's Profitability in
            Energy Production and Agricultural Processing," which is attached to
            this Agreement and is made a part of it.

      b.    Contractor agrees to provide reports for the work mentioned in
            Paragraph 2a as follows

                 Status Report:  Six months after construction of ICM fluidbed
                                 boiler
                 Final Report:   Six months after ethanol production has
                                 commenced.

            The reports shall comply with 43-03-05-08 of the North Dakota
            Administrative Code. Specifically, the Final Report must include a
            single page project summary describing the purpose of the project,
            the work accomplished, the project's results, and the potential
            applications of the project. Each Report must provide documentation
            verifying the receipt of the private matching funds. The Final
            Report and the Project Summary must be submitted in hard copy and
            either Word 6.0/95 electronic format or Adobe portable document
            format.

3.    Consideration

      a.    For performing the work the Commission agrees to grant to Contractor
            an amount not to exceed $350,000 according to the following
            schedule:

<TABLE>
<S>                                                                                  <C>
Upon execution of the contract and receipt of the information required in Exhibit B  $100,000

Upon receipt and consideration of status report                                      $175,000

Upon receipt and consideration of final report                                       $ 75,000
</TABLE>

      b.    If after reviewing a report the Commission believes that the report
            is inadequate or that the Contractor is not complying with the scope
            of work or satisfactorily carrying out the work, the Commission may
            withhold all or part of a scheduled payment until the Contractor, in
            the opinion of the Commission, has remedied the deficiency(ies).

4.    Authority to Contract and Subcontract

      The Contractor shall not have the authority to contract for or on behalf
      of or incur obligations on behalf of the Commission.

<PAGE>

FY05-LI-133
Page 2

      The Commission acknowledges that the Contractor will be entering into
      subcontracts for the work described herein and in Exhibit A. The
      Contractor agrees to be solely responsible for the performance of any
      Subcontractor.

5.    Funds Available and Authorized

      Commission certifies at the time of the execution of this Agreement
      sufficient funds are available and authorized for expenditure to finance
      costs of this Agreement within the Commission's current appropriation or
      limitation to July 1, 2007. It is agreed that if the appropriation or
      funding to the Commission is not obtained and continued at a level
      sufficient to allow for payments to the Contractor, for the services
      identified in Paragraph 2, the obligations of each party hereunder
      terminate upon delivery of written notice to the Contractor.

6.    Termination

      This Agreement may be terminated by mutual consent of both parties in
      writing and delivered by certified mail or in person.

      Upon delivery of written notice to the Contractor, the Commission may
      immediately terminate the whole or any part of this Agreement if:

      a.    The Contractor fails to provide services described herein and in
            Exhibit A within the time specified herein or any extension thereof;
            or

      b.    The Contractor fails to perform any of the other obligations under
            this Agreement, and after receipt of written notice from the
            Commission, fails to correct such failures within thirty days or
            such longer period as the Commission may authorize.

      The rights and remedies of the Commission provided in the above clause
      related to defaults (including breach of contract) by the Contractor shall
      not be exclusive and are in addition to any other rights and remedies
      provided by law or under this Agreement. Any termination of this
      Agreement, other than for breach of contract, shall be without prejudice
      to any obligations or liabilities of either party which accrued prior to
      termination.

      If the Commission terminates this Agreement for default by the Contractor,
      the Contractor shall immediately reimburse the Commission the amount of
      all money paid by the Commission to the Contractor hereunder.

7.    Contract Management

      Notwithstanding the Contractor's responsibility for management of the work
      described herein and in Exhibit A, the administration of this Agreement
      will require maximum coordination between the Lignite Research Council,
      the Commission and the Contractor.

      COMMISSION'S TECHNICAL REPRESENTATIVE

      The Commission's Technical Representative (TR) will be designated on
      authority of the Commission to monitor all technical aspects and assist in
      administration of the Agreement. The types of actions within the purview
      of the TR's authority are to assure that the Contractor performs the
      technical requirements of the Agreement; to perform or cause to be
      performed inspections necessary in connection with the performance of the
      Agreement; to maintain both written and oral communications with the
      Contractor concerning written interpretations of the technical
      requirements of the scope of work; to monitor the Contractor's performance
      under the Agreement and notify the Commission of any deficiencies
      observed.
<PAGE>
FY05-LI-133
Page 3

      COMMISSION'S AUTHORIZED OFFICER

      The Commission's Authorized Officer will carry out all contractual
      administration. Communications pertaining to Agreement administration
      matters will be addressed to:

      The Industrial Commission of North Dakota
      Attention: Karlene Fine
      State Capitol 14th Floor
      600 E Boulevard Ave Dept 405
      Bismarck, North Dakota  58505-0840

      The Commission's Authorized Officer is the only person authorized to
      approve changes in any of the requirements under the Agreement.

8.    Access to Records

      The Commission, the State Auditor of the state of North Dakota, and the
      Office of the Attorney General of the State of North Dakota, and their
      duly authorized representatives, shall have access to the books,
      documents, papers and records of the Contractor relating to the work
      performed by the Contractor hereunder for the purpose of making auditing,
      examining and copying the same.

9.    Repayment of Grant and North Dakota Lignite Usage Requirement

      After the first year of operation, a portion of the funding should be
      repaid to the Lignite Research Program in annual payments of $22,000 over
      ten years. After the first year of operation, North Dakota lignite use
      shall represent a minimum of 75% of the primary fuel (on a BTU basis). If
      North Dakota lignite as the primary fuel is less than 75% of total fuel
      usage (on a BTU basis), an additional $13,000 shall be repaid for each
      year of reduced North Dakota lignite use. The Contractor shall certify
      each year for ten years after the first year of operation the amount of
      North Dakota lignite used in the operation of the project and what the
      percentage it is of total fuel usage.

10.   Compliance with Law

      The Contractor shall comply with all federal, state, and local laws and
      ordinances applicable to the work to be done under this Agreement.

11.   Indemnity and Insurance

      The Contractor shall save and hold harmless the State of North Dakota and
      the Commission, its officers, agents, employees, and members, from all
      claims, suits, or actions of whatsoever nature resulting from or arising
      out of the activities of the Contractor or its subcontractors, agents, or
      employees under this Agreement. The Contractor shall maintain liability
      insurance coverage with limits of liability equal to or greater than those
      damage limits prescribed in N. D. C. C. Section 32-12.2-02.

12.   Ownership of Work Product

      All work product of the Contractor resulting from this Agreement shall be
      governed by North Dakota Administrative Code Chapter 43-03-06.

13.   Nondiscrimination

      Contractor agrees to comply with all applicable requirements of federal
      and state civil rights and rehabilitation statutes, rules, and
      regulations.

<PAGE>

FY05-LI-133
Page 4

14.   Applicable Law

      This Agreement shall be governed by and construed in accordance with the
      laws of the State of North Dakota.

15.   Captions

      The Captions or headings in this Agreement are for convenience only and in
      no way define, limit, or describe the scope or intent of any provisions of
      this Agreement.

16.   Execution and Counterparts

      This Agreement may be executed in several counterparts, each of which
      shall be an original, all of which shall constitute but one and the same
      instrument.

17.   Amendments

      The terms of this Agreement shall not be waived, altered, modified,
      supplemented, or amended, in any manner whatsoever, except by written
      instrument signed by the parties.

18.   Notices

      All notices, certificates, or other communication shall be sufficiently
      given when delivered or mailed, postage prepaid, to the parties at their
      respective places of business as set forth below or at a place designated
      hereafter in writing by the parties.

      Industrial Commission of North Dakota     Red Trail Energy, L.L.C.
      State Capitol, Tenth Floor                Attention: Mick Miller
      600 E Boulevard Ave Dept 405              3682 Highway 8 South
      Bismarck, ND 58505-0840                   Richardton, ND 58652

19.   Successors in Interest

      The provisions of this Agreement shall be binding upon and shall inure to
      the benefit of the parties hereto, and their respective successors and
      assigns.

20.   Severability

      The parties agree that if any term or provision of this Agreement is
      declared by a court of competent jurisdiction to be illegal or in conflict
      with any law, the validity of the remaining terms and provisions shall not
      be affected, and the rights and obligations of the parties shall be
      construed and enforced as if the Agreement did not contain the particular
      term or provision held to be invalid.

21.   Waiver

      The failure of the state to enforce any provisions of this Agreement shall
      not constitute a waiver by the state of that or any other provision.

22.   Merger Clause

      This Agreement constitutes the entire agreement between the parties. No
      waiver, consent, modification or change of terms of this Agreement shall
      bind either party unless in writing and signed by both parties. Such
      waiver, consent, modification, change if made, shall be effective only in
      the specific instance and for the specific purpose given. There are no
      understandings, agreements, or representations, oral or written, not
      specified herein regarding this Agreement. Contractor, by the signature
      below of its authorized representative, hereby
<PAGE>

FY05-LI-133
Page 5

     acknowledges that the Contractor has read this Agreement, understands it,
     and agrees to be bound by its terms and conditions.

23.  Legal Notice/Disclaimer

     The following notice shall be contained in all reports intended to be
     released to the public:

     This report was prepared by Red Trail Energy, LLC pursuant to an agreement
     with the Industrial Commission of North Dakota, which partially funded the
     report. None of Red Trail Energy, LLC or any of its subcontractors, the
     Industrial Commission of North Dakota, or any person acting on behalf of
     any of them:

          (A) Makes any warranty or representation, express or implied, with
          respect to the accuracy, completeness, or usefulness of the
          information contained in this report, or that the use of any
          information, apparatus, method, or process disclosed in this report
          may not infringe privately-owned rights; or

          (B) Assumes any liabilities with respect to the use of, or for damages
          resulting from the use of, any information, apparatus, method or
          process disclosed in this report.

     Reference herein to any specific commercial product, process, or service by
     trade name, trademark, manufacturer, or otherwise, does not necessarily
     constitute or imply its endorsement, recommendation, or favoring by the
     Industrial Commission of North Dakota. The views and opinions of authors
     expressed herein do not necessarily state or reflect those of the
     Industrial Commission of North Dakota.

24   Term of Agreement. This Agreement shall be effective upon execution herein
     by the required parties indicated below and shall remain in effect for 11
     years following commencement of commercial operation of the Red Trail
     Energy, L.L.C. Project.

     IN WITNESS WHEREOF, the parties hereto have caused this Agreement to be
duly executed intending to be bound thereby.

RED TRAIL ENERGY, L.L.C.                      NORTH DAKOTA INDUSTRIAL COMMISSION

By: /s/ Ambrose Hoff                          By: /s/ Karlene Fine
    -------------------------------               ------------------------------
    Name                                          Karlene Fine
    President                                     Executive Director
    Title

Date: May 12,2006                              Date: April 26,2006<PAGE>

                                                                   EXHIBIT 10.30

                             SUBORDINATION AGREEMENT

The Undersigned, State of North Dakota acting by and through its Industrial
Commission (herein called "SUBORDINATED CREDITOR") for value received, the
receipt and sufficiency of which is hereby acknowledged, and to induce First
National Bank of Omaha, a national banking association (herein called "BANK"),
at its option at any time or from time to time to loan monies to or for the
account of Red Trail Energy, LLC, a North Dakota limited liability company,
(herein called "BORROWER"), and at the special insistence and request of BANK,
SUBORDINATED CREDITOR hereby agrees with BANK as follows:

1. To induce BANK to lend or advance monies, or otherwise extend credit to
BORROWER, in the form of the SUPERIOR INDEBTEDNESS, or in any manner, and to
better secure BANK in respect thereof, SUBORDINATED CREDITOR hereby subordinates
all liens, mortgages, deeds of trust, and debts of the SUBORDINATED DEBT to the
SUPERIOR INDEBTEDNESS. The liens of SUBORDINATED CREDITOR shall hereafter always
be junior and inferior to the SUPERIOR INDEBTEDNESS, and to any security
interests held by BANK to secure the same. Notwithstanding the foregoing, the
liens of SUBORDINATED CREDITOR shall hereinafter be junior and inferior to the
SUPERIOR INDEBTEDNESS, and by any security interests held by the BANK to secure
the same, until the SUPERIOR INDEBTEDNESS is paid in full.

2. The payment of any and all SUBORDINATED DEBT is expressly subordinated to the
extent and in the manner set forth in this agreement hereof to SUPERIOR
INDEBTEDNESS. The term "SUBORDINATED DEBT" as used in this Subordination
Agreement shall mean and include any and all indebtedness, liabilities and
obligations of the BORROWER to the SUBORDINATED CREDITOR, absolute or
contingent, direct or indirect, joint, several or independent, now outstanding
or owing or which may hereafter be existing or incurred, arising by operation of
law or otherwise, due or to become due, or held or to be held by the
SUBORDINATED CREDITOR, whether created directly or acquired by assignment, as a
participation, conditionally, as collateral security from another or otherwise,
including indebtednesses, obligations and liabilities of BORROWER to
SUBORDINATED CREDITOR as a member of any partnership, syndicate, association or
other group, and whether incurred by BORROWER as principal, surety, endorser,
guarantor, accommodation party or otherwise.

     The term "SUPERIOR INDEBTEDNESS" as used in this Subordination Agreement
shall mean and include any and all indebtednesses, liabilities and obligations
of the BORROWER to BANK, absolute or contingent, direct or indirect, joint,
several or independent, now outstanding or owing or which may hereafter be
existing or incurred, arising by operation of law or otherwise, due or to become
due, or held or to be held by BANK, whether created directly or acquired by
assignment, as a participation, conditionally, as collateral security from
another or otherwise, including indebtednesses, obligations and liabilities of
BORROWER to BANK as a member of any partnership, syndicate, association or other
group, and whether incurred by BORROWER as principal, surety, endorser,
guarantor, accommodation party or otherwise.

3. If for any reason any of the SUPERIOR INDEBTEDNESS is not paid when due or is
not paid on or before the maturity thereof, or if there shall occur and be
continuing any event which

<PAGE>

with the giving of notice or lapse of time or both would constitute a default or
event of default under any instrument or agreement now or hereafter executed
evidencing, in connection with, as security for or providing for the issuance of
any of the SUPERIOR INDEBTEDNESS, then, unless and until such event of default
or default shall have been cured, or unless and until the SUPERIOR INDEBTEDNESS
shall be paid in full, the SUBORDINATED CREDITOR will not ask for, sue for,
take, demand, receive or accept from the BORROWER, by setoff or in any other
manner, any payment or distribution on account of the SUBORDINATED DEBT for
payment (other than such presentment as may be necessary to prevent discharge of
other liable parties on such instrument). Provided, however. BORROWER may pay
and SUBORDINATED CREDITOR may receive regular, annual scheduled payments of
principal on the SUBORDINATED DEBT until there exists a default on the SUPERIOR
INDEBTEDNESS. BANK shall provide SUBORDINATED CREDITOR with notice upon
BORROWER'S default and the BANK's election to accelerate the SUPERIOR
INDEBTEDNESS and upon the payment in full of the SUPERIOR INDEBTEDNESS.

4. The SUBORDINATED CREDITOR will not ask for, demand, sue for, take, receive or
accept from the BORROWER, by setoff or in any other manner, any payment or
distribution on account of the SUBORDINATED DEBT, if the making of such payment
would constitute or would result in the occurrence of a violation of the
provisions of any instrument or agreement evidencing, in connection with, as
security for or providing for the issuance of any SUPERIOR INDEBTEDNESS or would
result in the occurrence of any event which with the giving of notice or lapse
of time or both would constitute an event of default or default under the
provisions of any such instrument or agreement.

5. In the event the SUBORDINATED CREDITOR shall receive any payment or
distribution on account of the SUBORDINATED DEBT which SUBORDINATED CREDITOR is
not entitled to receive under the provisions of this Agreement, SUBORDINATED
CREDITOR will hold any amount so received in trust for the BANK and will
forthwith turn over such payment to the BANK in the form received by
SUBORDINATED CREDITOR to be applied on the SUPERIOR INDEBTEDNESS.

6. The SUBORDINATED CREDITOR will not commence any action or proceeding against
the BORROWER to recover all or any part of the SUBORDINATED DEBT, foreclose or
commence a sale of real property under any mortgage or deed of trust, or join
with any other creditor, unless the BANK shall also join, in bringing any
proceedings against the BORROWER under any bankruptcy, reorganization,
readjustment of debt, arrangement of debt, receivership, liquidation or
insolvency law or statute of the Federal or any state government unless and
until all SUPERIOR INDEBTEDNESS shall have been paid in full.

7. The SUBORDINATED CREDITOR agrees that any insurance proceeds due or
condemnation awards paid for loss to the PROJECT, as defined in the Construction
Loan Agreement between BANK and BORROWER dated December 16, 2005, and all
amendments thereto, shall be applied to the SUPERIOR INDEBTEDNESS or used to
reconstruct or repair the PROJECT, as determined by BANK in its reasonable
discretion.

                                      -2-
<PAGE>

8. In the event of any receivership, insolvency, bankruptcy, assignment for the
benefit of creditors, reorganization or arrangement with creditors, adjustment
of debt, whether or not pursuant to bankruptcy law, the sale of all or
substantially all of the assets, dissolution, liquidation, or any other
marshaling of the assets and liabilities of the BORROWER, the SUBORDINATED
CREDITOR will at the BANK'S reasonable request file any claim, proof of claim or
other instrument of similar character necessary to enforce the obligations of
the BORROWER in respect of the SUBORDINATED DEBT and will hold in trust for the
BANK and pay over to the BANK, in the form received, to be applied on the
SUPERIOR INDEBTEDNESS any and all monies, dividends or other assets received in
any such proceedings on account of the SUBORDINATED DEBT unless and until the
SUPERIOR INDEBTEDNESS shall be paid in full. In the event that the SUBORDINATED
CREDITOR shall fail to take any such action requested by BANK, the BANK may, as
attorney-in-fact for SUBORDINATED CREDITOR take such action on behalf of
SUBORDINATED CREDITOR, and SUBORDINATED CREDITOR hereby appoints the BANK as
attorney-in-fact for such SUBORDINATED CREDITOR to demand, sue for, collect and
receive any and all such monies, dividends or other assets and give acquittance
therefor and to file any claim, proof of claim or instrument of similar
character and to take such other proceedings in the BANK'S own name or in the
name of SUBORDINATED CREDITOR as the BANK may deem necessary or advisable for
the enforcement of this Subordination Agreement.

9. The BANK may, at any time, and from time to time, without the consent of or
notice to the SUBORDINATED CREDITOR, without incurring responsibility to the
SUBORDINATED CREDITOR and without impairing or releasing any of the BANK'S
rights or any of the obligations of the SUBORDINATED CREDITOR under this
Subordination Agreement:

     a.   Change the manner, place or terms of payment, or change or extend for
          any period the time of payment of, or renew or otherwise alter, the
          SUPERIOR INDEBTEDNESS or any instrument or agreement now or hereafter
          executed evidencing, in connection with, as security for or providing
          for the issuance of any of the SUPERIOR INDEBTEDNESS in any manner or
          enter into or amend in any manner any other agreement relating to the
          SUPERIOR INDEBTEDNESS. Provided, however, BANK agrees that it will
          not, without consent of SUBORDINATED CREDITOR, amend or change any
          provisions restricting or further restricting payment of SUBORDINATED
          DEBT;

     b.   Sell, exchange, release or otherwise deal with all or any part of any
          property by whomsoever at any time pledged or mortgaged to secure,
          howsoever securing, the SUPERIOR INDEBTEDNESS;

     c.   Release anyone liable in any manner for payment or collection of the
          SUPERIOR INDEBTEDNESS;

     d.   Exercise or refrain from exercising any rights against the BORROWER or
          SUBORDINATED CREDITOR; and

                                      -3-
<PAGE>
      e.    Apply any sums received by the BANK, by whomsoever paid and however
            realized, to payment of the SUPERIOR INDEBTEDNESS in such a manner
            as the BANK, in its sole discretion, may deem appropriate.

10.The SUBORDINATED CREDITOR will (i) cause all SUBORDINATED DEBT to be
evidenced by a note, debenture or other instrument evidencing the SUBORDINATED
DEBT, (ii) at the BANK's request promptly surrender or cause to be surrendered
any such note, debenture, or instrument evidencing the SUBORDINATED DEBT so that
a statement or legend may be entered thereon to the effect that such note,
debenture, or other instrument is subordinated to SUPERIOR INDEBTEDNESS in favor
of the BANK in the manner and to the extent set forth in this Subordination
Agreement, (iii) mark the books of SUBORDINATED CREDITOR to show that the
SUBORDINATED DEBT is subordinated to the SUPERIOR INDEBTEDNESS in the manner and
to the extent set forth in this Subordination Agreement, and (iv) cause all
financial statements of the SUBORDINATED CREDITOR hereafter prepared for
delivery to any person to make specific reference to the provisions of this
Subordination Agreement.

11.The SUBORDINATED CREDITOR agrees to execute any and all other instruments
necessary as reasonably required by the BANK to subordinate the SUBORDINATED
DEBT to the SUPERIOR INDEBTEDNESS as herein provided.

12. SUBORDINATED CREDITOR will not assign or transfer to others any claim the
SUBORDINATED CREDITOR has or may have against the BORROWER as long as any of the
SUPERIOR INDEBTEDNESS remains outstanding, unless such assignment or transfer is
expressly made subject to this Subordination Agreement.

13. The SUBORDINATED CREDITOR represents and warrants that (i) neither the
execution nor delivery of this Subordination Agreement, nor fulfillment of or
compliance with the terms and provisions hereof will conflict with, or result in
a breach of the terms, conditions or provisions of, or constitute a default
under, any agreement or instrument to which SUBORDINATED CREDITOR is now
subject, and (ii) none of the SUBORDINATED DEBT is or will be subordinated to
any other indebtednesses of the BORROWER other than the SUPERIOR INDEBTEDNESS
unless otherwise agreed by the BANK.

14. This Subordination Agreement may be assigned by the BANK in connection with
any assignment or transfer of SUPERIOR INDEBTEDNESS. BANK shall provide
SUBORDINATED CREDITOR notice of any assignment or transfer.

15. This Subordination Agreement shall be construed under and governed by the
laws of the State of Nebraska.

16. SUBORDINATED CREDITOR warrants to BANK the total balance due from BORROWER
to SUBORDINATED CREDITOR is presently $350,000.00.

17. This Agreement may be executed in counterparts, each of which shall
constitute an original but all of which when taken together shall constitute but
one contract, and shall become

                                      -4-
<PAGE>

effective when copies hereof which, when taken together, bear the signatures of
each of the parties hereto shall be delivered to the BANK.

      IN WITNESS WHEREOF, the parties have executed this Agreement as of the
dates set forth below.

RED TRAIL ENERGY, LLC ("BORROWER")

By: /s/ William N. DuToit                           Date: 5-16-06
    ---------------------
Title: TREASURER

And

By: /s/ Ambrose R. Hoff                             Date: 5-16-06
    --------------------
Title: PRESIDENT

FIRST NATIONAL BANK OF OMAHA ("BANK")

By: /s/ Mark Baratta                                Date: 5-16-06
    --------------------
Title: VICE PRESIDENT

STATE OF NORTH DAKOTA acting by and through its INDUSTRIAL COMMISSION
("SUBORDINATED CREDITOR")

By: /s/ KARLENE FINE                                Date: May 11, 2006
    --------------------
Title: EXECUTIVE DIRECTOR & SECRETARY

                                      -5-

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