It seemed like a smart, cutting-edge idea: use several million in public money to finance a brand-new stock exchange for the state of Delaware.

The concept had big support from political allies of Delaware power Joe Biden and later, from the son of Vince and Linda McMahon, the pro wrestling moguls and top fund-raisers for President Donald Trump.

It flopped. Now, the county executive of New Castle County has closed its chapter in the saga, disclosing that Ideanomics, the money-losing, Chinese-American firm that tried to launch the exchange, had repaid the county the $3 million in seed money lent it five years ago..

The money was lent at 6% interest to a project originally promoted by onetime Philadelphia Stock Exchange chairman John Wallace and backed by longtime Biden aide Denis Toner and Biden donor John Hynansky, among others.

The online Delaware Board of Trade, as it was called, was pushed through by then-county executive Tom Gordon. In 2015, Gordon funded the loan with money that had been donated for park maintenance, doing so over the objections of the elected county council.

But the following year, Gordon was defeated in the Democratic primary by loan opponent Matt Meyer, who remains the top official in a county that includes Wilmington and is home to more than half the state’s residents.

DBOT attracted additional money from the United Arab Emirates and other diverse investors before it was purchased last year by Ideanomics, a Beijing- and New York-based company whose chairman is Chinese media mogul Bruno Wu (also known as Wu Zheng) and vice chairman is the younger McMahon.

In a controversial vote last year, the county council agreed to accept Ideanomics stock instead of cash to resolve the debt over the opposition of its council chair, Karen Hartley-Nagle.

Ideanomics, a firm with interest in media, electric-vehicle and financial products, has posted a loss in each of the last four years

Meyer refused to be bound by the council vote and wouldn’t sign off on the stock deal. Nor would he agree to a deal under which the firm would extend the loan into future years in exchange for a partial payment.

On Friday, Meyer said his hard line had worked. He said Ideanomics had paid the county back on schedule, capped off with a final $180,000 interest payment.

“There were a lot of people in government and business who urged me to take that partial payment or the stock,” Meyer said. “But I didn’t want it to happen to our money.”

An Ideanomics spokesman last year had called Meyer’s opposition “irrational,” but Meyer said Friday that he insisted the firm “honor the original deal” — “even though I wasn’t sure we really had much leverage.”

DBOT, based for a time in the former Hercules office tower above the Brandywine Creek in central Wilmington, had organized as a broker-dealer and applied to the U.S. Securities and Exchange Commission to operate a small securities exchange. It would be a place to buy and sell over-the-counter securities not listed on major exchanges.

Two years ago it opened as an online market that handled a low volume of trades in marijuana stocks and a few other securities, most with valuations of a few dollars or pennies per share.

DBOT was among the smallest in a competitive market of minor trading systems. Then, according to a financial statement filed with the SEC on Nov. 12, DBOT “ceased the trading of OTC securities” last spring, closed its offices, and was “in the process of developing a strategic plan for DBOT which may include trading commodities, digital securities and other Alternative Asset classes.”

DBOT had previously proposed booking trades using blockchain, a much-hyped system involving the use of spreadsheets that simultaneously update to reflect changes in ownership and valuations of investments.

Meyer and other elected critical officials were frustrated that despite its many proposals, DBOT never delivered the well-paid stock-trading and support jobs that its promoters had promised in exchange for public cash.

He was skeptical of any scheme that made government the lender of last resort, after banks and private investors refused to put their own “skin in the game,” Meyer said.

“I am thrilled,” he said, “that this chapter of county government is now behind us.”