project screenshot
project screenshot
project screenshot
project screenshot
project screenshot

PolyDocs

NFTs and DAOs are more than just deeds and clubs. They reflect rights and terms that require protecting. Polydocs makes it easy to create immutable, known agreements to ensure everyone is protected.

PolyDocs

Created At

HackFS 2022

Winner of

trophy

🏆 HackFS Finalist

trophy

🔟 Spheron — Top 10 project

trophy

5️⃣ Polygon — Top 5

Project Description

We made a standard for immutable, dynamic documents using IPFS and Polygon smart contracts. A person will know and be able to reference exactly what they signed based on:

  1. The webapp used to render the signing page via IPFS CID
  2. The template document that contains the boilerplate language, missing only key terms like names, dates and amounts.
  3. The terms fetched from the contract as of a certain block so that they cannot be overridden by future changes.

By specifying the renderer, template, contract and block number, a person will always have the definition of a contract that resolves to the same hash as what they signed, regardless of who goes out of business or changes things in the meantime. This gives us immutable documents we can trust.

We made both mixins and reference implementations for ERC20, 721 and 1155 contracts to support DeFi, NFT and DAO use cases.

We generated a markdown-based template renderer to make it easy to sign those documents. We host that on IPFS using an IPFS URL to guarantee immutability - you'll always be able to see the contract you signed exactly as you signed. it.

And we created an editor to make it easy to adapt the contracts to smart contracts.

How it's Made

Polydocs is IPFS-first. The insight leverages the immutability of information on IPFS so that even web code can be treated as an immutable document. Any reference to a CID and relative paths from it will be handled properly by a web browser and always reference the same code so it will generate the same result every time. The template document in markdown is also up on IPFS.

To make sure the document is dynamic while on the immutable IPFS file store, we use a HashRouter so that all dynamic data is handled by the browser and not assumed by the server (since on IPFS, there's no server to help!) As a result, all URLs look like

ipfs://router-cid/#/template-cid::0xcontractaddress::chainId::blockNumber

That way all agreements are immutable without requiring a copy to go up on IPFS for every possible permutation. Documents are far more controllable and predictable.

For terms specific to the smartcontract, we have mixins that operate on Polygon smart contracts. We have tested these in both testnet and mainnet, including an OpenSea-shared collection that is part of the reference implementation shown in the video.

The https://polydocs.xyz user-facing site for editing and administering the contract within the contract is hosted on Spheron and IPFS over a Filecoin deal.

background image mobile

Join the mailinglist

Get the latest news and updates