[DBGrow-Factom-001] FAT Smart Contracts

Was FAT Smart Contracts, Grant Round 2, 2019 Successful

Have not voted

Guides Brian Deery Niels Klomp

Authority Nodes BI Foundation BI Foundation Blockrock Mining Blockrock Mining Consensus Networks Consensus Networks De Facto De Facto Factom Inc. Factom Inc. Factomatic Factomatic HashQuark LUCIAP LUCIAP Multicoin Capital Multicoin Capital

  • Total voters
  • Poll closed .
June 15th

I've been pleased with the work thus far. Most of the discussion has taken place on the public FAT Discord.

The research report is starting to really flesh out.

In addition, they've created a PoC of a WASM smart contract on Factom with instructions for others: https://github.com/Factom-Asset-Tokens/wasm-contract-poc. Right now they're problem solving around trying to let people write these in almost any language, compile to WASM (and then upload to factom), and decompile to any language to run.

They have another two weeks to fully outline the classes of smart contracts that can be built on the Factom Protocol (milestone 1) and I strongly suspect they'll make it.
Last edited:
July 1st

A lot of discussion has taken place the last two weeks and most of this may be observed in the Smart Contract channels in the FAT Discord. WASM and DAML implementations have been getting most of the love and the research paper continues to be built out. I would say that the team has met milestone 1 via discussion and the pertinent information will make its way into the research paper over the coming week.

The next milestone will be in four weeks: Determination of the optimal FAT smart contract solution(s).
August 1st

Milestone 2 (Determination of optimal FAT smart contract solution(s) ) is due and has been met. The team has chosen WebAssembly (WASM) as the optimal smart contract solution for FAT. Please note that BIF/Sphereon will continue to work on DAML based integrations including allowing triggering sending FAT tokens from DAML contracts.

You can read about WASM starting on page 8 of the research document and you'll find a proposed solution starting on page 20.

Milestone 3 (Determination of how to achieve desired contract functionality within FAT) will be due in three weeks. As such, my next report will be in three weeks (August 21st) rather than the normal two week cadence.
The team has the general design for how to implement smart contact functionality in FAT and as such, I feel Milestone 3 has been met.

They're now working out details so they can meet Milestone 4 (POC's of FAT Smart Contacts) and they've recently onboarded a new developer who is helping reach this milestone. The current topics of discussion include:

-Allowing fat-0 transactions to send 0 input/output transactions
-Possibly allowing send to self transactions
-How contracts fit with the new pending-entries based based system
-How contracts can be exposed by our existing API while being backwards compatible for existing users
-Looking at specific WASM Golang libraries (perlin-network/life, go-interpreter/wagon, wasmerio/wasmer)

Milestone 4 is due September 4th and I'll update the community then.
I'm very pleased to report that Milestone 4 is complete. We have a Proof of Concept (PoC) of FAT Smart Contracts:


In the words of @Devon Katz:

This project demonstrates, contemplates, and proves the feasibility of several core concepts that were needed for us to decide on WASM:

-Publishing WASM code in extids can make sense and work, and WASM is compact enough to fit under the 10kb entry limit

-WASM is straightforward to interact with the host system (JS in this case), and can return & accept even complex values (strings, arrays, other datastructures) despite it's low level nature

-WASM is straightforward to program using C or Assemblyscript (both demonstrated with examples), it is simple enough to compile and use in a VM

-A preliminary design & brainstorm for an ABI (application binary interface), which is required to interact with contracts deterministically (some of this was internal discussion and in person)

-Proof & demonstrations that a WASM contract can safely call & get data from the host, which is required for complex contract systems

-Experimentation with a "gas limit" based on counting up and pricing low level VM operations in a contract call

-Discovery of several "gotchas" that can be addressed better by Goland which we will implement this in

-It can work! The POC successfully demonstrates a simple dynamic contract system built only on Factom data.
A final report will be presented soon at which point this grant will be complete and it paves the way for the new grant which will fully develop FAT Smart Contracts.
Last edited:
Per Document 106 - Grant Success Determination Process this grant may now be voted on to determine success or failure.

As Sponsor of this grant, I feel the team executed well. They hit all their milestones and delivered what they promised. I will be scoring the grant a 6 which is "Achieved".

The following scoring rubrik will be used for this grant per Doc 106:
Exceptional (9.0 - 10.0) - Successful
Overachieved (7.0 - 8.9) - Successful
Achieved (5.0 - 6.9) - Successful
Underachieved (2.0 - 4.9) - Failure
Total Failure (0.0 - 1.9) - Failure
This poll will be open for five days.