project screenshot 1
project screenshot 2
project screenshot 3

potato.bond

Teikei🇯🇵Community Supported Agriculture🇺🇸AMAP🇫🇷ASAT🇷🇴 leverages local coincidences of needs and wants for change. potato.bond aims to be infrastructure in service of such locally aware and globally conscious modes of production, distribution and ownership.

potato.bond

Created At

HackFS 2022

Project Description

leverages local coincidences of needs and wants for change. potato.bond aims to be permissionless infrastructure in service of locally aware and globally conscious modes of production, distribution and ownership.

Farmer First there was the farmer. No potato without farmer. No institutions without farming. Praised be.

A farmer is a number that self-advertises to the rest of the world as such through the use of an ERC721 farmer token. A farmer token is a representation of "the farm". A new farmer can be freely minted. Multiple farmers can collaborate within the same Area. A farmer can join an area only if invited by a farmer that is already a member of an Area.

(Area genesis) <-> Farmer(0) -> Farmer(1) -> Farmer(x) (1-to-1=inviter-to-invited relationship)

Area The farmer inhabited the lands. And the multitude of lands constituted an Area. Be them geographical or economical, physical or imaginary, areas are to be bounded only by the imaginary of the farmer. A farmer and A consumer can belong to many areas. (Circles of compassion, identity or marketable verticals.)

An area is intended to be a governable collaborative surface defined along external needs and identities. An area is where the rules are set and acted upon. An area "is a DAO".The global registry of Areas extends along the lines of ERC1155.

The following global rules apply:

1 (**18) area specific fungible token is minted for both farmer and consummer on a finalized Farmer-Basket-Consumer exchage. Farmer access to an area is (1-1) peer permissioned An Area has an owner. (EOA/Multisig/0) The owner governs over the terms of value transfer. This makes an area self-determination capable. (Potantial Features: resale tax, threasury, infrastructure, social recovery, incentives etc.)

Basket Potato is good. A basket of potatoes is better and as such is the core unit of exchange and the fixed point around which the farmer-area-consumer complex revolves. Observes ERC721A conduct.

Afterall, the consumer role is just an abstract role and not a personality crafting activity nor a way to fight the bad guys... right? Being a role, in the same way Farmer is, it follows ERC721 rules. A consumer is defined by the act of consuming from an area. Gaining and maintaining the role of consumer in an area is subject to area rules. A customer can consume from many areas. How one becomes a consumer in an area, and what being and doing so entitles is at the discretion of that particular area. Area Governing Contract An area can have rules. These rules are to be determined by the area owner(s) be them farmers, consumers, creditors etc. These rules are event-based, and executed on structural actions. This is an option, not a requirement, intended to make this need based extensible. Example of possible rules:

basket resale tax a farmer or a consumer joining an area inquires a payment reputation threshold ruled credit facilities

Rules contract is called through the IRulerContract interface. Think of the above as the internet and its global rules and protocols (http, DHCP etc) and of the Rules contract as an application specific (area specific) web server... maybe.

This is by no means aimed to be prescriptive but rather to amount to provide some primitive, primordial structure for experimentation. Farmer created and operated institutions need smart contracts to scale up. Smart contract platforms and communities need potatoes for value and food. Both are equally decentralized and wanting of a more fair world. Will they make it? Find out in the next episode.

How it's Made

There's 3 directories in the repository. In 'potato' there's a ruby on rails application that pulls data [from the @polygon mumbai testnet where the Area(ERC1155),Basket(ERC721A),Farmer(ERC721),Consumer(ERC721) contracts are deployed] and saves it in the local database so that the application ca be forked and configured as to reflect the needs of a particular Area. At least that's the idea.

Each record, on creation is stored on @IPFS observing ERC1155 metadata rules. This means that all the records created via the interface and that have an IPFS CID as an tokenURI can be fully redeemed from the database as all records that are part of the system are identified consequently by that globalID value in the Area contract. To summarize, running a look for I in range 0..lastGlobalID tokenURI(I) -> returns CID -> fetch ipfs://CID - you can reconstruct locally the entire state of all four contracts.

It's pretty dense and nove always pretty, but the IArea interface is well documented. Start there, also read the readme anon.

There's the 'bond' directory where all the contracts were forged in the foundry. And there's the brownie directory, used to deploy the ERC721 contracts and push some mock data for... frontend reasons.

So in summary, ruby on rails, foundry, brownie, IPFS, covalent and polygon.

background image mobile

Join the mailing list

Get the latest news and updates