In-house lawyers with a budding blockchain interest just got an early holiday gift—a public primer guide to smart contracts from the U.S. Commodity Futures Trading Commission.

The CFTC's LabCFTC released “A CFTC Primer on Smart Contracts” Tuesday to help explain the new blockchain-based technology's risks, benefits and challenges. The guide comes at a time of regulatory uncertainty for the fast-growing blockchain industry and provides some clarity for in-house lawyers interested in implementing smart contracts.

In a 32-page document, the CFTC outlines the basics of smart contracts — starting with what they are. According to the CFTC, which regulates futures and option markets, smart contracts are “a set of coded computer functions.”

Smart contracts may include elements of a traditional binding contracts as well as self-executing code that pushes different actions based on changes to terms in the contract, such as fluxes in weather or reference rate. They can be legally binding.

Blockchain technology used in smart contracts can also allow real time updates authorized by involved parties and offer security through cryptography.

There are a number of examples of when this could be useful outlined in the guide, including self-executing insurance, tracking transportation rentals and payments and calculating and transferring premiums during credit default swaps.

The CFTC's guide outlines some of the other benefits of smart contracts. Automation can reduce the time and cost of creating contracts and can help standardize contracts across a business and provide clarity around execution.

But there are also some risks. According to the guide, smart contracts could illegally circumnavigate protections available in a traditional contract. There's also a risk of decreased transparency, an increased risk of cyber threats, and the potential for fraud through nefarious code, according to the CFTC.

The guide states that good governance of smart contracts could combat many of the risks. Standards should appear early in smart contract development and ”may assign responsibility for smart contract design and operation, and establish mechanisms for dispute resolution.”

“Good governance standards for smart contracts may help to address the challenges and risks that they present,” the guide said.