# Functional Props

# TLDR

1. Finish development, testing and deploy a generalized NFT random distributor which enables any proposer to propose distribution of current or future NFTs in our Treasury. The distributor makes use of new tech I call “functional props”; meaning the prop itself determines how many NFTs to distribute at execution time as a function of the prop’s vote counts.
2. Develop, test, audit and deploy a contract that enables proposers to ask for functional funding. Functional funding allows proposers to suggest a funding range within which they are willing to execute a prop. The actual funding amount received is determined by the prop’s vote counts.

# Why Functional Props?

*Cool tech, cool experiment. But how is it useful?*

For both NFT distribution and funding it’s a more efficient way of achieving “middle ground”; a form of consensus.

Think about it as a way of taking an on-chain average of all opinions.

The current alternative is an attention-deprived off-chain back and forth between proponent and community to arrive at a proposal price point or distribution number.

This [back and forth I had with Gami](https://twitter.com/0xDigitalOil/status/1622308820658651139) goes deeper. An extract:

### What stops people from just setting the lower threshold to their ideal amount and upper threshold as buffer?

If you set the lower threshold to ideal amount you increase the risk of the prop not passing vs a vanilla prop ceteris paribus.

### As for the thresholds, how would voters know that proposer set their levels in such a way?

Voters will know the range of funding. When voting, you know that if there is intense support, the prop will hit the upper part of the range. If it barely passes, it will hit the lower part.

You base your vote on that.

If you feel comfortable with the funding range, you vote FOR. The more people feel comfortable with the range, the higher the funding.

It gives quadratic funding vibes.

### When put like that it feels like it would alleviate some of the anxiety around voting too. Like sharing the load in a clever way. Nice.

Right. Well put. Like smoothing out the noise in a signal with a moving average filter.

# Phase 1: Generalized NFT Distributor

Before functional funding comes functional NFT distribution.

I am the dev and proposer behind [Prop 199](https://nouns.wtf/vote/199) which passed 226 : 9. Prop 199 was a successful experiment to distribute 50 Nouns Vision Glasses from our Treasury to Nouners at random.

I have developed (inspect code [here](https://github.com/0xDigitalOil/nouns-props/tree/master/GeneralizedNFTDistributor)) a generalized version of the Nouns Vision Glasses distributor that allows for any proposer to propose random distribution of any ERC-721 in our Treasury to Nouners. This included development of a generalized version of the BatchTransfer contract [9999.⌐◨-◨](https://twitter.com/lastpunk9999) deployed for [Prop 185](https://nouns.wtf/vote/185).

As this deployment is not a one-off and meant to be a primitive the DAO can leverage at any time, plus the code is more complex, it requires more extensive testing. In addition, it requires a more complex custom front-end for the distribution claims.

## Functional Distribution

The generalized NFT distributor has a new distribution mechanism baked in that allows the proposer to set the maximum number of NFTs to distribute. Then, if the prop passes, at execution time, the distribution contract calculates the number of NFTs to randomly distribute as a function of the vote (for, against, abstain) counts.

The proposer also selects the distribution amount calculation mechanism. This code extract shows the possible distribution rules the proposer can select from:

![Proposer can select among the following distribution rules: Total turnout per Noun, Total Turnout minus abstain per Noun, For Votes, For Votes per Noun, For minus Against Votes, For minus Against Votes per Noun.](https://i.ibb.co/Gthy2Nj/Untitled.png)

Proposer can select among the following distribution rules: Total turnout per Noun, Total Turnout minus abstain per Noun, For Votes, For Votes per Noun, For minus Against Votes, For minus Against Votes per Noun.

For example, the proposer might want to propose a distribution of some LilNouns in the treasury. The proposer is unsure of how many LilNouns the DAO is willing to distribute so he/she selects VotesFor as the distribution mechanism. Thus, the higher “For Vote” turnout (the more popular the prop was), the more LilNouns will be distributed. 

## Prop Execution

Here’s how proposing and execution works:

![Untitled](https://i.ibb.co/nn33yHB/Untitled-1.png)

# Phase 2: Functional Funding

I call “functional props” proposals that are self-referential at prop execution time. Initially I’m interested in exploring props that use vote counts (i.e., how many for/against/abstain) as inputs and take actions as a function of those inputs. We could imagine going beyond that to enable props that pull from a larger voter input-space such as vote reasons*.

Functional funding is a subset of functional props that enables an efficient way for the DAO to price proposals. The mechanism works as follows:

1. Proposer writes a prop where he/she proposes to do some work for Nouns DAO.
2. The proposer sets the prop transaction to call the FunctionalFunding contract and selects a funding range (e.g. 30-50 ETH) and distribution rule. This signals to the DAO that he/she is willing to do the work for a minimum of 30 ETH, but if the DAO as a whole signals that it values the work being done greatly (via strong FOR support), the proposer will get funded more than 30 ETH, up to 50 ETH.
3. If the prop passes, when it executes it references itself, reading its vote counts to determine the funding amount according to the distribution rule.
4. FunctionalFunding contract sends the calculated amount of ETH.

![Untitled](https://i.ibb.co/bgPmDV1/Untitled-2.png)

## What does this solve?

For Proposers:

- Allows the proposer to do an all-in-one price discovery by “polling” all voters on-chain
- Lower probability of good proposals being rejected due to mere price → avoids going back, adjusting price and resubmitting

For Voters:

- Decision is less stressful as it’s less binary. You can be OK with the prop content and range and “delegate” price decision to the rest of the voters

For Nouns DAO:

- All-in-one prop voting and efficient price discovery
- Proposals are more likely to be funded closer to “fair price” than the current binary funding mechanism

# Deliverables

1. Trustless, immutable primitive contract-set that allow Nouners to propose random distribution of NFTs, where the final number of NFTs distributed is a function of proposal popularity.
2. Front-end for claiming NFTs of said distribution rounds. Allows for multiple distribution rounds per NFT collection.
3. Trustless, immutable primitive contract that allow Nouners to create proposals that are funded within a range as a function of proposal popularity.

# Ask

35 ETH sent to me, [DigitalOil](https://twitter.com/0xDigitalOil). 

If only I could propose a functional funding range 🤷‍♂️.

### Funding breakdown

1. 15 ETH — finish testing of NFT Distributor contracts. Develop generalized claim front-end.
2. 20 ETH — Develop functional funding contract, including contract audit.

*Note that using vote reasons as inputs to functional props would require a change to the governance contract as vote reasons are currently not introspectable at execution time.

Outcome: DEFEATED