So-called “smart” contracts are key to making blockchain technology useful in the real world, but these tools face an array of legal, regulatory and technical hurdles, according to Moody’s Investors Service.

In a new report, the rating agency said that smart contracts — automated contracts that are self-executing when certain conditions are met — are intended to eliminate most of the costs associated with traditional contracts.

“They can decrease counterparty risk, boost productivity, cut expenses, embed compliance rules and controls, and add levels of transparency to multiparty digital agreements,” it said — which, in turn, promises to make blockchain technology more useful in the real world.

Moody’s noted that most blockchains in the decentralized finance sector are using smart contracts “to allow market participants to trade, lend and borrow assets without an intermediary.”

However, there remain basic obstacles to the use of smart contracts, it said.

“To gain acceptance, smart contracts will need improved cybersecurity and legal frameworks that ensure their enforceability,” the report said.

In terms of security, a lack of standards for smart contracts creates vulnerabilities for blockchains, Moody’s said, including exposure to cyberattacks.

Additionally, regulatory authorities are grappling with the legal implications of smart contracts.

“The elements of a traditional legal contract that make it enforceable, such as an offer, acceptance and consideration, have been particularly difficult to unbundle in smart contracts,” the report said. The automatic execution and immutability of smart contracts “makes it hard to resolve disputes,” it added.

It’s also difficult for a person who’s not a coder to determine whether a smart contract has been set up properly.

Ultimately, Moody’s said the legality of smart contracts is “one of the toughest problems” for authorities. Without legal certainty, it will be difficult for smart contracts to replace traditional legal agreements, it said.

“Some governments and regulatory bodies are adapting existing legal frameworks to financial transactions involving digital assets and smart contracts by incorporating new concepts unique to decentralized finance,” it said.

“If industry-wide technology standards that make smart contracts secure are developed, and if legal frameworks are in place ensuring smart contracts’ enforceability, the financial sector may also have to change to accommodate a much more automated way of doing business,” the report concluded.