# Dapp

#### Access the Decentralized Application with the Link below.

{% embed url="<https://ervded4meifzaaglk6j5sxqmioenu4ibajhx4o3m7x2stsbi.arweave.net/JGoyD4wiC5AAy1eT-2V4MQ4jacQECT347bP-31Kcgo8>" %}
Mainnet link. The app is deployed on Arweave.
{% endembed %}

### A Framework for creating Legal P2P Services with Smart Contracts&#x20;

#### Getting Started

Ricardian Fabric is a Legal and Smart Contract Deployment Tool and DAO. It's a decentralized application hosted on the Arweave blockweave, Ipfs and Harmony, the code once hosted on Arweave will never change, hence  it's dependable and allows developers to build robust systems on top of it.

Ricardian Fabric is a Ricardian contract editing tool that allows publishing Ricardian contracts to Ipfs and attaching them to solidity based smart contracts. \
It allows the deployment of smart contracts from a catalog and developers can contribute to the DAO, to earn token rewards.

Asset-Referenced tokens can be created using the Trails feature, that allows uploading linked documents, that helps with the transparency of the audit process.

{% embed url="<https://discord.gg/Z7eeksAzdh>" %}

{% embed url="<https://twitter.com/RicardianFabric?ref_src=twsrc%5Etfw>" %}

### Guides: Try it out!

Follow these simple step by step guides to start using Ricardian Fabric

{% content-ref url="/pages/s6QkQPUqjKpOUjyCdBUQ" %}
[Creating your first agreement](/guides/ricardian-contracts/creating-your-first-agreement)
{% endcontent-ref %}

{% content-ref url="/pages/0XR4auTBHsKUGJCGauzd" %}
[Agreements on Ipfs](/guides/ricardian-contracts/agreements-on-ipfs)
{% endcontent-ref %}

{% content-ref url="/pages/zT9iretFBq4ajiiLaYtM" %}
[Attaching a Ricardian to a Smart contract](/guides/ricardian-contracts/attaching-a-ricardian-to-a-smart-contract)
{% endcontent-ref %}

{% content-ref url="/pages/29iZTcKe4Jy19lAItCGb" %}
[Configuration](/guides/ricardian-contracts/configuration)
{% endcontent-ref %}

{% content-ref url="/pages/iCOX9zBVyjBZGyVT3Sro" %}
[Geo-blocking](/guides/ricardian-contracts/geo-blocking)
{% endcontent-ref %}

{% hint style="info" %}
**Good to know:** Get familiar with the tech stack and the features here and you can adopt Ricardian Fabric to your specific use case.
{% endhint %}

### Fundamentals: Dive a little deeper

{% content-ref url="/pages/vFRflUZHSBbJnR21avux" %}
[Permaweb](/guides/permaweb)
{% endcontent-ref %}

{% content-ref url="/pages/kdeCkID3fEf8aQ5Z6viM" %}
[Simple terms](/guides/simple-terms)
{% endcontent-ref %}

{% content-ref url="/pages/kOgaQZcFUzURDNoX3X9C" %}
[Catalog of Smart Contracts](/guides/dao/catalog-of-smart-contracts)
{% endcontent-ref %}

{% content-ref url="/pages/CY3YheVd2Cb2dnKEMXjT" %}
[Verification](/guides/ricardian-contracts/verification)
{% endcontent-ref %}


# Ricardian Contracts

This section of the guides will cover Ricardian Contracts and their use.


# An agreement protocol

{% hint style="info" %}
**Good to know:** "The **Ricardian contract**, as invented by Ian Grigg in 1996, is a method of recording a document as [contract](https://en.wikipedia.org/wiki/Contract) at law, and linking it securely to other systems, such as accounting, for the contract as an issuance of value."

Sometimes explained as : "an agreement whose execution is both automatable and enforceable."
{% endhint %}

The agreement protocol is a Ricardian Contract implementation based on Semantic Contracts that are rendered as websites and uploaded to Ipfs by Issuers. These interactive contracts can be shared with Parties who may sign them with their Ethereum Wallet. \
These contracts can be just simple agreements or legally binding service contracts, depending on the semantics.  &#x20;

### On-Chain Agreements

Semantic Contracts can be tightly coupled to smart contracts using Ricardian Fabric, blurring the lines between traditional legal agreements and modern smart contracts. The acceptance of the semantic contract is connected to the signer wallet address which allows self fulfilling smart contracts to take action and execute the part of the agreement that is written in code and depends on accepting the semantics.


# Creating your first agreement

This page explains the basics of how to create a Ricardian Contract and deploy it on Ipfs.

{% hint style="info" %}
**Good to know:** Smart contracts without semantics are notoriously hard to interpret and require a professional developer. One of the goals of Ricardian Fabric is to make this more easy. You should pay attention to describe how the smart contract works, if you are attaching one!
{% endhint %}

## The basics

After logging into the application, there is a  sidebar. Find the button to open the contract editor.

![Click this button](https://705057112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIB76FWu0QFd5N508RQo%2Fuploads%2Fbv3UcY8iiFJr2uI1sr23%2FAgreementButton.png?alt=media\&token=a0a44f13-dfba-42e3-9295-57d62405a6ea)

Your ricardian contract's terms are entered in the text field, where the placeholder shows "Type your legal contract".

### Formatting

The text field comes with a built in formatter. After you have typed something, highlight it to format it:

![](https://705057112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIB76FWu0QFd5N508RQo%2Fuploads%2FY7vWOTGnXf7UoWQXZ3U1%2FEditBar.png?alt=media\&token=10e50d97-8e8d-4c41-a0a4-6321252db482)

You are able to format the text to bold, italic, underline, add a link, quote, add preformatted text, create lists, indent, outdent, align to left, right, center and create headings.

{% hint style="info" %}
Always use full URL paths for the links.
{% endhint %}

### Import a template

There is support for adding an external template. You can import it by clicking on the "Import template" button.

Clicking on the button will trigger the following popup:

![](https://705057112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIB76FWu0QFd5N508RQo%2Fuploads%2FFyv1i4TlgxyuIb9oYQSm%2Fdocx%20dropper.png?alt=media\&token=08268704-9c70-42b9-95ab-2bdf948e2bbf)

You simply drag an drop a .docx file here and it will populate the text area. As the popup explains, it will override it. Ricardian Fabric converts docx formatted files to html.

{% hint style="success" %}
Cooperate with others on the terms of the agreement using Google Docs and simply import it when you are done.
{% endhint %}

{% hint style="warning" %}
The conversion is not perfect. The app uses mammoth.js behind the scenes to convert the docx files.
{% endhint %}

### Configuration

You need to add a smart contract. Click on the button **Configure** to move to the configuration page.

{% content-ref url="/pages/29iZTcKe4Jy19lAItCGb" %}
[Configuration](/guides/ricardian-contracts/configuration)
{% endcontent-ref %}

### Deploy the agreement on Ipfs

After accepting the terms you can click on the Create button. The current version requires metamask to sign agreements.&#x20;

![Sign the hash to continue](https://705057112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIB76FWu0QFd5N508RQo%2Fuploads%2FWObYFlSxtRlyrdBdT4m1%2FmetamaskSignature.png?alt=media\&token=1ca3f732-6ff9-4acd-a548-0ed0674734e8)

The signed value is the hash of the Ricardian contract. It's the value that is always recalculated when the terms are accepted.&#x20;

### Congratulations

If you have signed the contract and deployed it! You have successfully deployed a Ricardian Contract to Ipfs. The link has been copied to your clipboard and you are ready to share it with the world.&#x20;

Learn how to permapin your contract on Ipfs so it persisits, in the permaweb guide.

{% content-ref url="/pages/vFRflUZHSBbJnR21avux" %}
[Permaweb](/guides/permaweb)
{% endcontent-ref %}


# Agreements on Ipfs

This page explains how Ricardian contracts are used and accepted.

### Giving rights to your users

In the previous guide I  explained how to create and deploy a Ricardian Contract.&#x20;

In the following guide, I I will explain the simple process of accepting this agreement and explain how they work on Ipfs.&#x20;

### What is Ipfs?

The Interplanetary file system or Ipfs is a distributed storage network that allows storing and accessing data in a decentralized way.

The content on Ipfs is accessable from anywhere as long as a single computer is hosting it. The identifiers attached to the link are called a CID, content identifier and they are unique for each data uploaded.

So each Ricardian contract is identified and accessed using the Ipfs content identifier.

After you have deployed a Ricardian Contract, you will have a link with a CID on your clipboard and this is what you should share with your users who need to accept it. This way you can give rights and authorization to your users to perform certain actions or access features.

{% hint style="warning" %}
Ipfs is not persistent. You need to pin the files. You can permapin the contracts to the Arweave blockweave to store the content forever.
{% endhint %}

### Accepting an agreement

In order to accept the agreement, the users simply need to navigate to the page. If the contract is not available in all countries they will be prompted to add their location which uses the browser geolocation. Permission must be granted in the browser to proceed.

{% hint style="info" %}
You will learn more about which countries are blocked from access in the "Geo-blocking and configuration" guide.
{% endhint %}

### Contract details

There are a couple of extra details displayed about the contract on the page.

1. Created date is simply the date the contract was created.
2. Expiry date is the date after which the contract cannot be accepted anymore.
3. The network row displays the number of the network id, some networks have a button instead which when pressed will configure metamask to the selected network.&#x20;
4. The Issue field  is the address of the contract creator.&#x20;

### Clicking accept

When clicking accept, the user is prompted to sign the agreement with metamask, just the same as when deploying the same hash is calculated.

After the terms are accepted the user receives a proof, which is a similar contract, deployed on Ipfs.

The proof has the following details, other then the complete content of the agreement:

1. Signed on, which is the date the contract was signed on.
2. Network, show which network was used
3. Issuer, which is the address that created the ricardian contract
4. Participant is the address of the signer
5. Parent, which is a link to the agreement that was just accepted.

### Collecting the proofs

The signatures of the issuer and the signer are both saved inside the deployed pages and can be verified and processed. This brings interesting opportunities for server side processing signatures and performing actions  in place of the signer.&#x20;

The signatures are domain specific so they cannot be used on-chain without the correct domain, they use the EIP712 standard.

You can use the redirect feature to collect the Ipfs CIDs on your website.

Check out the Verify Signed Contract dependency to implement Ricardian Contract verification and parsing easily.

{% content-ref url="/pages/8wTND2lenQMiDnHp2hxE" %}
[Broken mention](broken://pages/8wTND2lenQMiDnHp2hxE)
{% endcontent-ref %}


# Attaching a Ricardian to a Smart contract

This page explains the process of using smart contracts and some best practices.

### Protect yourself from liabilities

A lot of things can go wrong with a DeFi project. Stable coins can go off the peg, their backing changes, smart contracts get hacked, users send coins to the wrong address, there is impermanent loss. You as a smart contract issuer are responsible for letting your users know of these risks and you need to protect yourself from the consequences of these events.

With the correct terms you are able to do just that. You can explain that you don't have warranties and make sure you only allow users on your platform who accepted these terms.

### Explain how the smart contract works

It's important to assume the users of your contracts and the holders of your tokens are not able to interpret smart contract code. The majority of the users don't understand solidity. Therefore it is a great practice to add how the smart contract works to the semantics, so your users understand what the function they are calling actually does.

{% hint style="info" %}
You can use any network, it depends on how you configure your wallet.&#x20;

You can find more information about the recommended networks in the Fundamentals.
{% endhint %}

{% content-ref url="/pages/e2jXpEDCGX2d30zRxw91" %}
[Networks](/guides/ricardian-contracts/networks)
{% endcontent-ref %}

### Adding a smart contract

![Add the address of your smart contract here](https://705057112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIB76FWu0QFd5N508RQo%2Fuploads%2FrYSIGUhc5dE6x8oJBYHq%2Fsmart%20contract%20field.png?alt=media\&token=807974b7-b27a-4a85-bbf0-2eb7b46046cb)

You have to add the address of the smart contract to the input field. The app will check if it's compatible when you deploy the agreement.

{% hint style="info" %}
For creating custom smart contract, see the npm dependency "Simple terms" and it's explanation.
{% endhint %}

{% content-ref url="/pages/kdeCkID3fEf8aQ5Z6viM" %}
[Simple terms](/guides/simple-terms)
{% endcontent-ref %}

### Deploy the agreement

After the smart contract has been deployed, you should do as you have already learned when creating your first agreement and click on create. You will be prompted by metamask to sign the agreement, just like before.&#x20;

When prompted to deploy, click yes again and you will be prompted to call a function on the smart contract.

![Metamask  is calling setTerms and attaching the Ricardian to the Smart contract ](https://705057112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIB76FWu0QFd5N508RQo%2Fuploads%2FedLdoYgKUAsYWQIoRiV1%2FcalLToSetTerms.png?alt=media\&token=f136765f-8645-46e3-a4f1-058d988701d2)

{% hint style="info" %}
You can learn more about setTerms in the Simple terms fundamentals.
{% endhint %}

### Congratulations

You have successfully deployed a Smart contract and a Ricardian contract and attached them together! In the next guide you will find out how to accept this and how the tokens are added to the wallet!

##


# Accepting Smart contract terms

This page describes how to accept a contract that has a smart contract attached to it.

### Onboarding&#x20;

If you have selected a network in the app when creating the contract, and you are not using a custom metamask config, you get the benefit of one-click onboarding to your network.

The app will autoconfigure metamask when the user clicks on the network button.

{% content-ref url="/pages/e2jXpEDCGX2d30zRxw91" %}
[Networks](/guides/ricardian-contracts/networks)
{% endcontent-ref %}

Accepting terms for a smart contract is the same as explained in the Agreements on Ipfs guide.

{% content-ref url="/pages/0XR4auTBHsKUGJCGauzd" %}
[Agreements on Ipfs](/guides/ricardian-contracts/agreements-on-ipfs)
{% endcontent-ref %}

### The accept function

After the user signed the agreement and decided to deploy the proof they will be prompted to call the accept function. This is a funcion inherited from Simple Terms and the only thing required for the user to call to be able to officially register their address as a participant inside the smart contract and start using it.

![](https://705057112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIB76FWu0QFd5N508RQo%2Fuploads%2FBRQbM4dbPFo86ncY9EJK%2Faccept%20function.png?alt=media\&token=54d4d8fd-2460-4516-8dbe-14665ed40177)

### ERC-20 added to wallet

As visible below, if the token deployed is the ERC-20 selected from the catalog, the app will prompt metamask to add the tokens to it, so users can start using them.&#x20;

The balance will be sent to the issuer of course, who also needs to accept the agreement to be able to use them. After this, anyone who has accepted the agreement is free to transfer these tokens.

![](https://705057112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIB76FWu0QFd5N508RQo%2Fuploads%2Foi9I1XTyU9d12t1Buoq4%2Ferc20addToWallet.png?alt=media\&token=f1d4d6af-9081-4f8f-a0d4-30da97dcd48b)


# Configuration

You can learn more about the contract configuration here

<figure><img src="https://705057112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIB76FWu0QFd5N508RQo%2Fuploads%2FxYA39w9YXzu47wcgTMcd%2Fconfiguration.png?alt=media&amp;token=7859b88f-c48d-41bd-b71b-17c29e5da041" alt=""><figcaption></figcaption></figure>

### Smart Contracts

You need to add a smart contract address here. This is required. If you didn't deploy a compatible smart contract yet, you can do it here.&#x20;

### Sanctions and Expiry

{% content-ref url="/pages/iCOX9zBVyjBZGyVT3Sro" %}
[Geo-blocking](/guides/ricardian-contracts/geo-blocking)
{% endcontent-ref %}

### Blocking addresses

Add a coma separated list of addresses to the input field and they will be blocked. A list without spaces works best. Prepare it in an external text editor and just paste it into the field.

![Block known scammers or sanctioned addresses](https://705057112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIB76FWu0QFd5N508RQo%2Fuploads%2FIJpjbIljYT7gASAnVU5Z%2Fblockedaddresses.png?alt=media\&token=1c3bf3d3-7e5a-41cc-a415-d452b0f63837)

### Setting an expiry date

The default expiry date is always tomorrow. The contract always expires at midnight.

It's important to set this, if you want to have control over how long the contract can be accepted.

You have to click on the button **Never** if you want it to never expire.

### Redirect

When the terms are accepted, the user has the choice to redirect. This is not automatic.

You should add the URL to the input field where you would like him to be redirected.

{% hint style="info" %}
You can omit "https" from the URL string, it will be automatically appended.&#x20;
{% endhint %}

The CID of the Ipfs content will be appended to the URL like URL/${CID} so you can choose to collect the proofs of acceptance like this with your application.

Redirect to a page that implements Verify Signed Contract to parse the accepted contract and perform actions like connecting to a smart contract

{% content-ref url="/pages/8wTND2lenQMiDnHp2hxE" %}
[Broken mention](broken://pages/8wTND2lenQMiDnHp2hxE)
{% endcontent-ref %}

### Trails

You can attach a trail to a contract. Users who are prompted to sign the Ricardian fill find a link to to navigate to the trail

{% content-ref url="/pages/uR5BVwylf1APQHUBLQpI" %}
[Broken mention](broken://pages/uR5BVwylf1APQHUBLQpI)
{% endcontent-ref %}

### Wallet configuration

The Ricardian Contract can be configured to automatically add an ERC-20 to the Wallet.

![The wallet configuration UI](https://705057112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIB76FWu0QFd5N508RQo%2Fuploads%2F871eNSWBuJrPhooiWN5J%2FwalletConfig.png?alt=media\&token=cb8b1e7d-20c2-4c7d-93cb-0bea8470446d)

### Uploading

To upload a contract you need to enter the password of the currently imported burner wallet here.


# Geo-blocking

Here you can find out what countries are blocked.

### Blocked countries

{% hint style="info" %}
Ricardian Fabric aims to comply with global regulations and will block all countries placed on the selected sanctions list, no matter what sanctions are imposed.
{% endhint %}

The default configuration comes with Geo-blocking enabled for the following sanctions

![](https://705057112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIB76FWu0QFd5N508RQo%2Fuploads%2FJYRZvwHR3Aj3IakNdHl0%2Fgeoblocking.png?alt=media\&token=0ba86160-d1cc-4940-b88a-664d0a61ed27)

### How it works?

Geo-blocking works with the built in browser Geolocation API, the user must explicitly grant permission to access his location. The API works even in devices without GPS and the browser possibly queries Google servers to get the location estimate. This will work even if a VPN is used since it doesn't matter what the IP address of the user is.&#x20;

### OFEC sanction block

All countries from below are blocked from signing the contract.

1. Afghanistan
2. Belarus
3. Bosnia and Herzegovina
4. Burundi
5. Central African Republic
6. China(PR)
7. Coromos
8. Ukraine
9. Cuba
10. Cyprus
11. Democratic Republic of the Congo
12. Guinea
13. Guinea Bissau
14. Haiti
15. Iran
16. Iraq
17. Kyrgyzstan
18. Laos
19. Lebanon
20. Libya
21. Mali
22. Mauritania
23. Moldova
24. Montenegro
25. Myanmar
26. Nicaragua
27. North Korea - DPRK
28. Palestinian Territories
29. Russia
30. Rwanda
31. Serbia
32. Somalia
33. South Sudan
34. Sudan
35. Syria
36. Tunisia
37. Venezuela
38. Yemen
39. Zimbabwe

### EU sanction block

All countries from below area blocked from signing the contract

1. Belarus
2. Bosnia and Herzegovina
3. Burundi
4. Central African Republic
5. China (PR)
6. Democratic Republic of the Congo
7. Guinea
8. Guinea Bissau
9. Haiti
10. Iran
11. Lebanon
12. Libya
13. Moldova
14. Montenegro
15. Myanmar(Burma)
16. Nicaragua
17. North Korea
18. Russia
19. Serbia
20. South Sudan
21. Syria
22. Tunisia
23. Ukraine
24. Venezuela
25. Zimbabwe

### UN sanctions block

All countries from the below list are blocked

1. Afghanistan
2. Central African Republic
3. Democratic Republic of the Congo
4. Guinea Bissau
5. Iran
6. Iraq
7. Lebanon
8. Libya
9. Mali
10. Montenegro
11. North Korea
12. Serbia
13. Somalia
14. South Sudan
15. Sudan
16. Syria
17. Yemen

### Adding more countries

You can select any other country from the dropdown, check the checkbox and it will be added to the blocked countries list!


# Networks

Here you can learn about compatible networks

### Supported wallets

Currently the only supported wallet is **Metamask**. If you have not installed it, you will be prompted to do so. We plan to add support for multiple wallets in the future.

### Supported networks

You can configure your Metamask to any network and it will work just fine.

However, using non-supported networks will result in worse user experience for anyone who accepts your terms since they will need to manually configure their Metamask too.

{% hint style="warning" %}
You can't sign a contract if you are on a different network.&#x20;
{% endhint %}

<figure><img src="https://705057112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIB76FWu0QFd5N508RQo%2Fuploads%2FRiPa65jOW4LcM2B7RwDx%2FSupoortedNetworks.png?alt=media&amp;token=198e0fab-eef6-43b7-b275-c3cb7abe236d" alt=""><figcaption></figcaption></figure>

The benefits of using a supported network is that you can be sure the smart contract works on it and you get the benefits of onboarding users fast. The Ricardian contract will have a button to switch to the network.

![Network config button on the bottom of the contract will auto configure Metamask](https://705057112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIB76FWu0QFd5N508RQo%2Fuploads%2FbuwRHI6Bwax7FQp6aw4Y%2Fonboading%20button.png?alt=media\&token=47100101-4247-40de-9c65-6eedcf9a4000)

####


# Verification

![There is a link to the verification, on the Ricardian Contracts](https://705057112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIB76FWu0QFd5N508RQo%2Fuploads%2F9TyRZwJCrJyeqqU9JVk2%2FverifyLogoOnContract.png?alt=media\&token=bd1e291c-4c5d-4925-99c4-6fd60d33c4cc)

You can verify a deployed ricardian contract by clicking on the checkbox. It is your job to verify that the URL of the verification page is correct. You can find the latest deployment URLs on the github page of the project.


# React Component

You can include the Ricardian Contract in your DApp and use any UI framework!

{% embed url="<https://github.com/Ricardian-Fabric/Ricardian-Contract-React-Component>" %}


# Dao

This section explains how the Ricardian Fabric DAO works.

### Crowdfunding

The DAO is an automated Hackathon built for developers to sponsor the development of smart contracts and apps that can be deployed alongside ricardian contracts from the main application.

Purchase tokens on Polygon to Support the DAO and help us onboard the next generation of Arweave developers from Polygon.

{% embed url="<https://app.ricardianfabric.com/tokensale>" %}
CROWFUNDING PAGE
{% endembed %}


# Join to the DAO

In order to have catalog content, a developer has to code it first.

Ricardian Fabric pays token rewards for successful contribution.

To Participate, you must sign the DAO terms.

### Staking

After this, you need to approve spend and stake. You need to stake 3000 RIC to join the DAO. This will unlock some functionalities in the DAO.

{% hint style="info" %}
Staking is for sybill resistance
{% endhint %}

### RANK

If you want to contribute, you need RANK. To earn RANK , create a RANK proposal

![Click this button to create proposals](https://705057112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIB76FWu0QFd5N508RQo%2Fuploads%2FrAMmKyqxOVmd3SNwu5Pc%2Fpropose.png?alt=media\&token=5055f18c-7ea4-423d-b210-8efa647fdff0)

![Your rank proposals show up under new Rank](https://705057112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIB76FWu0QFd5N508RQo%2Fuploads%2FuxzHtmkk7ookhHrB9Dv4%2Fa%20New%20Rank%20proposal.png?alt=media\&token=992a6dd6-a605-4cfc-a50e-c318546a73ee)

### Discussion links

For creating the discussion links, you can use the github discussion on the project's page:

{% embed url="<https://github.com/Ricardian-Fabric/Ricardian-Fabric/discussions>" %}

### Closing proposals

![you can find all your proposals here](https://705057112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIB76FWu0QFd5N508RQo%2Fuploads%2FwhpBnRMucIdfWmakj9Og%2Fmyproposals.png?alt=media\&token=8a242365-bc15-4a3b-ada9-cbbef470d717)

All the proposals submitted by you are available under the My Proposals tab.

After the voting period has concluded, you can close your proposals here


# Uploading Smart Contract  proposals

To add a proposal, you must upload it to the permaweb first. The DAO will vote on the Transaction Ids.

Use the **Permaweb** dropdown on the create proposal page

Learn more about the Permaweb functionalities here:

{% content-ref url="/pages/vFRflUZHSBbJnR21avux" %}
[Permaweb](/guides/permaweb)
{% endcontent-ref %}

To upload a proposal, first you need some Ar, so make sure to top up your Arweave Burner wallet.

#### Category

You must select the Contract Category, it can be :

* Registries
* Tokens
* Token Sale
* Payments
* Governance
* Other

#### Name

You must add a name, make sure it's unique.

#### Network

You have only two options, if you select ALL, the contract must be generic that can be deployed on all chains.

If you are using external tokens for example, they must be on Harmony network, so you must select Harmony from this list.

#### Artifact

The Artifact is the result of the Smart Contract compilation, this is used to deploy the token. Copy it from your project

#### Git repo

You must copy the git repo at a specific commit where the artifact was built.

The reviewer, when voting on the proposal will need to build the project and get the same artifact to vote approve.

#### Front end

If the smart contract has a front end, link it. It must be uploaded to IPFS or Arweave

#### Inherits from simple terms

If the contract uses simple terms, check this checkbox.

Find out more about simple terms here:

{% content-ref url="/pages/kdeCkID3fEf8aQ5Z6viM" %}
[Simple terms](/guides/simple-terms)
{% endcontent-ref %}

#### Terms

You need to add a generic description that can be later downloaded so it can be included in the Ricardian too.

#### Uploading

After you filled out the form, you can post the proposal to the permaweb.&#x20;

Use the transaction Id in your smart contract proposals, and that's it. The DAO can vote on it.


# Smart Contract proposals

After you uploaded the content of the proposal to the Permaweb, and you have RANK, you can create a proposal for it.

When creating the Proposal make sure you fill out the fields correctly.

#### Has front end:

Only check this if the contrat has a working front end

#### Has Fees:

Only check this if the Contract collects withdrawable fees

#### Update, update of:

If you deleted a smart contract, you can update it. You must fill this out correctly.

If the reviewer finds you didn't fill out the form correctly, the proposal will be rejected

### Rewards

After a proposal has passed, it will appear in the catalog.

The creator can withdraw rewards for it on the **My Proposals** page.

Reward to the balance and to the Stake.

### Removal proposals

A contributor can choose to remove his own proposals. For this, he can click **Remove** on the My Proposals page. Removals will happen via voting, create a discussion link for it the same way you did for the rank proposals.

### Suspicious proposals

If a proposal is malicious, it can be marked **suspicious** while voting reject.&#x20;

If the proposals fails, the contributor can loose his stake.

If a contract has passed but later it turns out to be malicious and the creator will not remove it, it can be reported on the catalog page.

### Front ends

If the proposal contains a front end, you can implement Ricardian Contract Parsing via Verify Signed Contract

{% content-ref url="/pages/8wTND2lenQMiDnHp2hxE" %}
[Broken mention](broken://pages/8wTND2lenQMiDnHp2hxE)
{% endcontent-ref %}


# Token Proposals

The tokens that can be implemented in smart contracts are decided by the DAO.

This is so the DAO can offer reward withdrawals for RIC holders in the said tokens.

If a Contributor implements fees, he must choose the address from the DAO.

![Access the fee proposals here](https://705057112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIB76FWu0QFd5N508RQo%2Fuploads%2FyskGrj2PG1zAnxuNOAYx%2Ffeeprops.png?alt=media\&token=8d7037d1-3d70-484b-b049-8209973ee78e)

### Fee Dao Address

The address where the token fees must be submitted are visible on the top of the page.

### Propose a fee token

To propose a new token, fill out a form. The creator of the Proposal must be holding RIC and must have a RANK of 1 at least.

#### Discussion link

The proposal must have a discussion link to comment on. You can create it in the  github discussions.

#### Token address

The token address msut be valid and deployed on Harmony mainnet.

### Voting

The voting is available on the same page. Proposals that pass are available for fees. The creator must close them manually.


# Catalog of Smart Contracts

After succesful proposals have been made, it will appear in the catalog.&#x20;

The smart contracts are deployable per use-case and can be attached to Ricardian Contracts easily.

A Smart Contract in the Catalog can be Deployed to an EVM compatible chain and you can upload a front end for it, if available.


# Economics

The tokens are backed by contributions, the developers who submit proposals get RIC rewards and their contribution in return backs the token.


# Ar sharing

Arweave fees are collected each time the network is used and they are transferred to a random token holder. The rewards are distributed to token holders on the Arweave network.

The token is called Stapledon, named after a Sci-Fi author.&#x20;

Tokens are available via Private Sale Only. If you would like to receive Arweave rewards, send us a message.

&#x20;

{% embed url="<https://community.xyz/#ligtZZ4M3Gy3BUi2qz4B6yXQiOcjJ_wU55QYhXFw7Ow>" %}


# Ric Token

The RIC Token is the native token of the DAO.

The token of Ricardian Fabric is called RIC however network specific DAOs will be created in the future and each one will have it's own allocated tokens.&#x20;

{% hint style="danger" %}
After he Harmony Network Bridge Hack, we moved and issued tokens instead on Polygon called PolyRIC.
{% endhint %}

You can find the code and the token allocation table here:

{% embed url="<https://github.com/Ricardian-Fabric/ricardian-fabric-dao-contracts>" %}
The  Ricardian Fabric Dao Contracts
{% endembed %}


# Rewards

App deployed from the App collect fees.&#x20;

You can withdraw Rewards by locking up RIC tokens.

![](https://705057112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIB76FWu0QFd5N508RQo%2Fuploads%2Fh1YEHkioz2Hg0lBuVrPJ%2Frewards.png?alt=media\&token=48cd5a8c-911e-4788-a355-b5e805fc6443)

#### How to use ?

To withdraw fees to your wallet, you need to enter the amount to lock first select Harmony One to display the reward.

Hit approve if you want to withdraw ONE so you approve the smart contract to lock up OneRic on your behalf in the vault before payout.

Then click on the withdraw button and sign the transaction with metamask.


# Vault

The Vault is used for storing OneRIC. The OneRIC is freed after a certain block time has passed.

The vault is mainly used to store OneRIC after a reward was claimed.

![](https://705057112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIB76FWu0QFd5N508RQo%2Fuploads%2FD89dHFte0eYPQFiu96Nu%2Fvault.png?alt=media\&token=b0e9772e-03d3-4f26-b2fc-c71a673ef085)

To manually lock OneRIC for long term hodling, type the amount and how much blocks it should be locked for. Click **approve** , then **lock**.&#x20;

After the blocks have passed, the tokens can be released via the Release button.


# Trails

{% hint style="warning" %}
The Trails feature has been updated after version 0.0.10 to use Arweave only.&#x20;

Previous versions use Harmony network to store Trails names. This is deprecated.
{% endhint %}

Ricadian Fabric provides an easy way to upload documents and link them to Trails, which are similar to threads.

Trails hold comments, which are Arweave Transactions.

Trails can be linked to Ricardian Contracts and with it, to smart contracts.

Trails are useful for Audit Trails, for creating Asset-Referenced Tokens.

### Creating a  Trail

![Navigate to Trails by clicking on this icon](https://705057112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIB76FWu0QFd5N508RQo%2Fuploads%2FSAVc55129RwrRGTinG7r%2FtrailsIcon.png?alt=media\&token=fcb0dd69-4514-49e0-8585-3b7328a0a0d2)

To upload something to a trail, Click Permaweb and Add the Comment.

![](https://705057112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIB76FWu0QFd5N508RQo%2Fuploads%2F3OoqBLaUjYnlAUZx9PWo%2Faddcomment.png?alt=media\&token=53409886-dec2-44b3-8537-9e301a25f1e9)

### Uploading A Comment Transaction

![](https://705057112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIB76FWu0QFd5N508RQo%2Fuploads%2F8Xi0rgdu2eRevnBOsdVZ%2Fcommentui.png?alt=media\&token=9ad5d7a0-9afa-4f03-8b62-c3eb202d9ce4)

* First you must add the name of the trail you want to comment on
* You can link a transaction, if you add a comment here, it will appear as a reply, otherwise you can add uploaded files!
* Comment is the message that will appear on the trail
* Type your Arweave password
* Click add comment to upload it.

#### Linked transactions

You can link any transaction uploaded via Ricardian Fabric. For leaving an audit trail for a treasury, PDF format would be the best.

{% hint style="info" %}
You will find legal contract templates that you can use as Ricardian contracts in Trails.
{% endhint %}

### Search

![](https://705057112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIB76FWu0QFd5N508RQo%2Fuploads%2FrR9ak2MK2cMx1S19gDXO%2FtrailSearch.png?alt=media\&token=b2ef58c1-3cc2-411b-9b62-ce0f3506544d)

#### Actions

![Refresh, copy link or add comment](https://705057112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIB76FWu0QFd5N508RQo%2Fuploads%2F2fLq6a0vAuR5Opb1ytr1%2FtrailActions.png?alt=media\&token=eb9b1a6d-150b-47fa-8f01-62bd22ad8aff)

#### Trails can be attached to a Ricardian Contract:

![When the trail is attached to a Ricardian, a link will appear on the contract ](https://705057112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIB76FWu0QFd5N508RQo%2Fuploads%2Fo5F1i309M2WYhjCYf4TM%2FattachedTrail.png?alt=media\&token=eab15aca-dada-4a5a-bd28-41dc69bfb886)


# Permaweb

Get familiar with Arweave and the Permaweb

### What is the Permaweb?

The Arweave blockweave is a novel blockchain solution that offer permanent storage of data and hosting. You pay once in the native currency Ar for the uploads and it will be forever hosted by the nodes of the network.

You can access the permaweb features of Ricardian Fabric by clicking on the Permaweb dropdown.

### Accounts

The first thing you must do in order to use the permaweb is to get an account. You can import an existing Arweave key or get a new one. Click on the **New** button next to **Address.**

![You need to password encrypt the Arweave key to use it with Ricardian Fabric ](https://705057112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIB76FWu0QFd5N508RQo%2Fuploads%2F0TQgvrco5dObcjgyzhOs%2FnewPermawebAccount.png?alt=media\&token=70f0866d-101a-4490-8099-316c4905861e)

#### Importing accounts

If you already created an encrypted key and you want to use it, you need to click on the **Import** button and add your key there.

### Decrypting keys

You will not be able to use the encrypted keys with other platforms. If you want to extract the original key file, the encryption is openssl compatible.

You can use this to decrypt it:

```
openssl aes-256-cbc -d -salt -pbkdf2 -iter 10000 -in encryptedfilename -out plaintextfilename
```

### Transactions

{% hint style="info" %}
To see  the transactions you posted to the network visit [https://viewblock.io/arweave/](https://viewblock.io/arweave/tx/)
{% endhint %}

{% hint style="warning" %}
Transactions are not instant. You will not see it instantly in the chain explorer, wait 10 minutes. Sometimes transactions are lost due to network congestion. If this is the case, you will not be charged Ar.
{% endhint %}

![The transfer form](https://705057112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIB76FWu0QFd5N508RQo%2Fuploads%2Fnwe5mGvlvTWaBnsKE1Ui%2Ftransfer.png?alt=media\&token=60764276-c674-426a-8683-fa8e9de8f938)

To transfer Ar, just fill out the form and after clicking send, you will see the transaction fee and you can post the transaction to the network.

{% hint style="success" %}
Some extra fees other than the network fees may be charged for sending a transaction, those fees are sent to a random token holder.
{% endhint %}

### File Uploads&#x20;

![](https://705057112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIB76FWu0QFd5N508RQo%2Fuploads%2FwIq3ZsMDGDLrfocdoPDP%2FuploadAFile.png?alt=media\&token=68a0e273-5d0a-4341-9963-bdbc8886e387)

You can upload any file to the permaweb. Select it from the Dropdown.

Simply drag and drop a file. The Content-Type will be automatically filled out!


# Simple terms

You can find here the official solidity dependency to use with Ricardian Fabric

### Dependency

Smart contracts called by Ricardian Fabric implement the simple terms contract.

You can find the documentation on npm.

{% embed url="<https://www.npmjs.com/package/@ricardianfabric/simpleterms>" %}
A solidity dependency for adding terms to a smart contract.
{% endembed %}


# DAOs

### How to create DAO consensus with a Ricardian Contract?

Daos are numerous and they are colorful, however there is something in common with all of them, their members agree on something. They could be all possessing the same kind of tokens or they could be writing on the same forum, there is a general consensus between members.

Ricardian Contracts are a new way to achieve DAO consensus.&#x20;

The Ricardian Contract is semantics hence it can represent many things. A Contract for a DAO could outline it's laws and outline how the DAO works.

An example of this is the Ricardian Fabric DAO, which has a written contract all DAO members must accept which outlines how the builder guild functions and what is required for proposals to pass.

![Click on this button to find the DAO terms](https://705057112-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeIB76FWu0QFd5N508RQo%2Fuploads%2FadEFXPExWnMz1XdxYDTO%2FDaoTerms.png?alt=media\&token=6a92d90e-0fe6-4c59-a71d-a216e260c3e0)

By making certain functions in the smart contracts depend on signing this agreement, the DAO is able to restrict functionalities so they are only available for members with rights to access it.

A ricardian contract gives rights to holders, or participants in this case and we can be sure that users with the required rights have accepted the terms , hence we have achieved a kind of consensus between members via semantics.


# Contracting

Ricardian Contracts can contain information about the terms of a DAO but also the Terms of a Job.

You can use the Contracts as a generic container of information, describing the conditions of Decentralized contractor work even connect it to escrow contracts that also handle payments.

Using immutable hand written contracts for contracting has the benefits that it gives protection to both parties in a legal sense, and also allows bridgeing the world of contracting closer to the world of crypto currencies.


# Asset-Referenced Tokens

### Putting the pieces together

You can bridge Trad-Fi to De-Fi using Ricardian Fabric. By creating Ricardian Contracts, Trails and using Smart Contracts, you are able to create tokens that can be proven to be backed by assets or instruments.

An asset-referenced token is a token that refers to an asset. The asset could be anything, from a car to a house to gold bullion.

If you want to create an asset-referenced token, your first step is to create the Trail

{% content-ref url="/pages/d688RGNBb5AVg94lbQhN" %}
[Trails](/guides/trails)
{% endcontent-ref %}

Then you can deploy a contract from the catalog. If you want to create a single asset, you can choose a generic NFT or ERC20 base contract.

After this all you need to do is add your terms. Your terms will outline the rights of the holders of the tokens, how they are backed and other conditions of the agreement.

The trail is attached to the ricardian and the ricardian is deployed.

After this, your users are provided with an easy way to stay updated and you can post periodic treasury updates to the Trails, to make sure all the asset-referenced tokens are referring to the specific asset.


# Mutual Agreements

You can choose to conduct generally any agreements via Ricardian Contracts, from DAO terms to House Rentals. The semantics of the contract are what define it. The Ricardian Contract is nothing but a container of information, how you use it ,depends on you.


