ethereum-funding / blockrewardsfunding

Project Management is happening in this repo, see the Issues! This is a fork of ethereum/eips.
18 stars 3 forks source link

Conviction Staked Inflation Funding #39

Open simondlr opened 5 years ago

simondlr commented 5 years ago

This is a proposal for introducing continuous funding for open source, public blockchain projects.

It assumes a model of continuous funding, where in every new issuance, part of the issuance is automatically distributed to recipients delivering value to the ecosystem. It supposes a 20% additional reward for the explaining purposes.

The simplest version is distributing the inflation reward in a block towards staked addresses. Variations deal with managing control over inflation funding.

In the simplest version, the inflation is distributed to each address as a percentage of the total staked ETH towards it. For example, if 10% of the staked ETH is for address 0x42, and the inflation in the block is 0.4 ETH, that address will receive 0.04ETH per block. The ratio will differ over time as participants stake towards different addresses with different nominal amounts. For example, if having 10% at one point, it doesn’t guarantee 10% forever. Think of the ETH as allocating virtual miners.

The issue with distributing ETH in this manner is that it runs the risk of the largest holder of ETH just continuing to increase their stake and getting a perhaps unwarranted control over the platform. More ETH means more ETH to stake, perpetually increasing percentage of supply if the largest holder maintains control. I say “perhaps” here, because it can be argued that if the largest holder wants to forego the opportunity cost to stake their ETH, it is a residual net benefit to all other ETH holders since it reduces active supply on the market. Regardless, it is not an ideal scenario. There are additional ways to reduce this control alongside ways to support smaller ETH holders too.

Conviction Staking

Modified slightly from Michael Zargham’s work on conviction voting (https://github.com/BlockScience/conviction), the percentage of the ETH inflation in each block is instead distributed according to conviction. Conviction adds an extra dimension to staking: time (willingness to lock up ETH for longer periods). Your total conviction is a function of the total ETH stake * the time it is locked up (with the conviction increasing logarithmically).

Screenshot 2019-03-27 21 46 19

In other words, if a large ETH holder staked their ETH for one block, it could be less conviction than a small ETH holder that staked their ETH for 6 months. The conviction increasing logarithmically has another incentive built into it. Over time, although conviction increases, it basically plateaus. This is to ensure that new ETH stakers stand a chance to participate and reduces the influence that a large ETH holder can have on the system. Over time, the opportunity cost increases since the conviction doesn't grow as much anymore.

When removing the stake or moving it, the conviction goes back to zero.

At any point in time, a conviction staker needs to consider the opportunity of staking their ETH to participate in inflation funding. They could use their ETH elsewhere at any point and thus if they don’t get value anymore from staking vs the other opportunities available (such as using ETH to buy a CryptoKitty), they will defect their conviction.

Convergence?

One question that might come forth is: if I can do this, can’t I just stake to myself and get a portion of the inflation? Yes. As is the same in a previous explanation, this might be warranted, because a person is essentially being paid for the opportunity cost of locking up their ETH, reducing supply, increasing price and thus, increasing security of the network. However, rationally, a conviction staker needs to consider the value of getting the inflated ETH themselves, vs having the inflated ETH go towards a project that increases the value of their remaining ETH without their inflated ETH in return. For example, if I stake my ETH and send the inflation to Vitalik, he might put it to better use and thus increase the all-together value of my existing ETH vs if I had kept the inflated ETH myself.

I don’t see a way to mitigate this without introducing additional convergence factors that will favour already established conviction stakers. For example: if one restricts the percentage required to say 0.1 percent (thus 1000 addresses) at maximum, then one can just building conviction staking pools to avoid this issue. It might be necessary technically to limit amount of projects that can receive inflation which case conviction staking pools will come to exist anyway. This also opens the door for DAOs.

It might be possible to avoid the problem of people staking for themselves and their portion of the inflation, and this is through incentivizing convergence, not avoiding convergence. An example of this is to allow people's stakes to more rapidly acquire conviction when the collective stake is larger. In other words, stake attracts stake. However, this makes the oligarchy problem worse. All stake converges into one stake. I wonder if there's some variation of this, where you incentivize some convergence, but then incentivize profitable defecting after a stake gets too large? However, don't think this is possible without some form of identity system.

DAOs down the line.

One interesting factor to consider is that the recipients can be DAOs. This allows for more interesting & flexible competition of how funds are distributed. This could be sent to quadratic matching (Liberal Radical) DAOs, to MolochDAOs, to Aragon DAOs, a bonded curved DAO, etc. All that have different manner of competitive behaviour for then additionally and subsequently effectively using the funds.

One way to potentially incentivize some convergence, but not have it be related to layer 0 staking economics, is to have DAOs offer some form of patronage rewards for directing funds to them. eg, a contributor badge or something.

Increasing/Decreasing Inflation

One interesting way to incentivize staking is to have the inflation increase as percentage of ALL ETH that is staked, logarithmically. This means that the more ETH is staked in total, the more inflation will be minted. If total conviction is removed, the inflation goes down. This is expected as inflation funding will hopefully result in more applications that people would want to use and thus not put their ETH towards conviction staking.

Liquidity Crunches & Spirals

One of the goals of such this inflation funding system is to make it reasonable for many participants to adopt this system at the cost of inflation. One of the benefits on staked inflation funding is that the opportunity cost could reduce active supply and thus increase the price of ETH, benefiting the whole ecosystem. However, an unintended second-order side effect is a liquidity crunch leading to volatility of ETH. If a lot of ETH is either staked into PoS, conviction funding or DeFi apps, there’s less ETH on the market. I’m unsure if this is problematic or a wanted effect.

Vote (Buying) or Renting

Once voiced concern in any tokenized voting system is vote buying/bribing. Conviction staking increases this cost dramatically because an attacker/briber needs to pay consistently over time. This trend to infinity because they have to pay more than the reward (need to double check this).

Technical Implementation

I need to evaluate how to implement this technically. Continuous functions or per-block calcuations might be expensive. Another problem is how it might deal with re-orgs. Either way with re-orgs the system should ideally have lagging allocation, paying out inflation based on the allocation of a reasonable block depth. Simpler MVP systems might be more preferable, which can be implemented without inflation, as I’ll describe below.

Thoughts?

There's a lot of additional thoughts related to this system. I've thought about a version that doesn't require explicit inflation, but incentivizes the miner to reroute funds, in return for taking an option on the success of conviction staked funding [I need to think on this more to see if this actually possible]. It looks similar to WETH/PETH in in MakerDAO. The miner could inflate a wrapped ETH at the cost of those staking ETH to participate in the miner rerouting funds to inflation. But this gets quite tough considering that if only a subset gets inflated and not ALL ETH holders, then it becomes hard to rationally expect stakers to participate. Especially: early adopters will be the worst off. Additionally, the reward for the miner doesn't have to equal the funds it rerouted. It should just at least at some possible future make it back or an additional return to expect them to reroute funds voluntarily.

Another thought is the possibility of adding additional features from radical markets ideas to reduce inequality and the power of a few to control inflation. For example, what if the inflation funding is split in such a way the smaller percentage staked addresses receives proportionally than the highest staked projects. This will mean that it will boost smaller recipients. However, this will in turn incentivize people to just create as many stakes as possible (eg many 1 wei stakes), so it doesn't entirely work. However, the thinking/reasoning is interesting to consider: whether it's possible to have some effect like this in a sybil environment in staking?

This explicitly tries to avoid identity systems and punts them towards potential DAOs for recipients. However, some ID or reputation systems (MolochDAO-like) might be better at layer 0 of inflation funding.

Conviction voting has additional parameters such as accumulation & decay which is not implemented here. It's hard to determine how much decay should exist in a system like this. Should it scale perhaps according to conviction? eg, a large stake's conviction will decay faster if it is moved? a smaller stake's conviction will decay slower if it is moved? This results in liberal radical type support for smaller stakes. Many permutations are possible.

Maybe bonding curves can help? Unexplored domain atm.

Conclusion

This is a proposal for continuous inflation funding using staked convictions (stake*time). ETH is directed towards to recipients. The conviction grows logarithmically which increases the opportunity cost over time for large ETH holders, reducing somewhat the potential for oligarchical control over inflation.

Ultimately, the goal with proposal is to set forth ideas related around using staking ETH to direct funds from a portion of block rewards for funding. I hope it stimulates discussions.

So, poke holes and add some ideas.

I think, ultimately is: 1) is oligarchical control over inflation bad if the staker undergoes opportunity cost to stake [a benefit for everyone else]? and 2) if so, what measures are reasonable to reduce power of large conviction stakers? 3) is this possible to implement by incentivizing miners to reroute funds? If so, this will be much easier to experiment with. 4) can we only rely on stakes without any identity system? Are humans/reputation needed/necessary?

Hat-tip/Thanks

Token Capacitor from Niran: https://media.consensys.net/the-panvala-token-capacitor-b9efac0a6699

https://github.com/BlockScience/conviction

Conviction Voting by Jeff Emmet [32min]: https://www.youtube.com/watch?v=BdQaHuGTDW0

https://medium.com/gitcoin/experiments-with-liberal-radicalism-ad68e02efd4

owocki commented 5 years ago

Thanks for the thoughtful post Simon. I'm still grokking the ultimate model in my mind (I'm a visual learner; will need to re-read this a couple times before I think I really get it), but an intial thought in my mind is: How many stakers, once we move to POS, would take a portion of their staked funds and contribute it to a DAO that funds development? Also, if we're in POS already, hasn't the time passed where this is useful (e.g. the whole point of EIP 1789 was that we need more sustainable funding for ETH 1.x / ETH 2.0, and if POS is already here, then we've already accrued a ton of value towards ETH2.0)

mzargham commented 5 years ago

I am excited to see the idea of time based signaling propagating. I think there is a lot of fertile ground to explore as we leverage the durable state of blockchain networks to explore incentive systems that account for both "space and time" (in this case space is token holdings because can think of the tokens as be distributed across a network of agents, who own the accounts that hold those tokens).

I hope the (re-)introduction of time into economic models, and in particular the use of "integrators" (adding things up over time) should help us smooth out economic signals. As our systems exist today, we have a lot of activity incentivized by or correlated with discrete events in time. Conviction type models can help us learn how to spread these economic forces out over a time horizon. I have taken to calling this the 'snowshoe effect' ~ a concentrated force may be large enough to break through the snow, but be spreading it out over a wider footprint, you can walk on top.

More to the point of your proposal, I am particularly curious to see the effect of using log as the conviction function. It contrasts nicely with the function proposed in my original paper which was a truncated geometric series (defined as a linear iterate):

Log(s*T)

Truncated Geometric series: x(t) = s y(t) = a y(t-1) + x(t) assuming y(0) = 0 which for a in (0,1) Sum over t of sa^t for t=0:T which is a truncated geometric series: (1-a^T)/(1-a) (https://en.wikipedia.org/wiki/Geometric_series)

I don't think either is inherently better, they differ by this one design consideration regarding the finiteness of the impact of staking indefinitely. There also many possible choices besides these too. LogLog for example is much slower than log but still diverges. There are also other functions that converge to finite limits.

Awesome to see this proposal! Thanks, -Z

simondlr commented 5 years ago

Hey @owocki! Thanks.

I'm a visual learner; will need to re-read this a couple times before I think I really get it

Me too. I usually do some form of visual scribbling. Hard to reproduce in software, since I don't necessarily know the math to draw it out.

Perhaps another way to image it:

Funds come in and is divided up by the percentage of conviction towards a recipient. Here's my powerpoint skills, attempting a diagram.

Screenshot 2019-03-29 13 42 53

How many stakers, once we move to POS, would take a portion of their staked funds and contribute it to a DAO that funds development? Also, if we're in POS already, hasn't the time passed where this is useful?

If they want part of the funding from the block reward, they will decide whether the opportunity cost of locking up their ETH to get it, is worth it or not. If possible, if no one is staking ETH for block reward, it means that this part of the inflation could be zero ETH as described in the one paragraph. It means that ETH has become so valuable in other parts of the ecosystem that no-one wants to undergo the opportunity to receive any inflation funding reward. If more people stake, it produces more of the allocated block rewards towards funding (more people undergoing opportunity cost to produce a stimulus).

Regardless, I think a stimulus for funding from the block reward can always be useful, even in a mature scalable blockchain.

I am excited to see the idea of time based signaling propagating.

Thanks for chiming in @mzargham!

the main difference here is that the truncated geometric series converges in time to the geometric series which has the limit 1/(1-a). i considered this a desirable property because it represents "the power of one token forever" which i think is a powerful concept. There is no time lead so great as to be unsurpassable by a constant factor more tokens. Of course how big that factor should be is a design consideration when you choose 'a'.

Oh, yeah. I like this more. It means the "little guy" can eventually compete with any large ETH stake if they have access to time (correct?).


One thing I was hoping for in some sense was the ability to have some form of liberal radical outcome without explicit identities. By this I mean: many small stakes together could have their conviction grow faster (resembling, many small voices grouping together to form one big voice, gaining from scales of voice). But hard to do this in a sybil environment without also incentivizing the big players from just splitting their large stakes into many smaller stakes and acting like many small voices. But this goes into a related, longer discussion.

There are perhaps ways to combine this in a MolochDAO-ian manner to create a thin, commitment/identity system. Anyone who wants to build up conviction has to ask permission from all existing conviction stakers (simple yay/nay vote where being on the wrong side of the vote negatively affects your conviction and being on the right side tops up your conviction). Splitting up stakes requires going through that process again. Thus, part of the process to apply requires some semblance of "proof" of being a good actor. Either revealing intent or identity or commitment. You have to then stick to your stake, since that ties back to your application: which was a costly exercise. If you apply again with a smaller stake, you have to prove why people will let you in. It's still somewhat gameable (pretending to be many anon accounts that can commit to good development), but it will be costly to do so.

The stakers have to thus prove they are good actors that will use the block reward for common good. Unsure if this is half-baked.

sponnet commented 5 years ago

By this I mean: many small stakes together could have their conviction grow faster

This analysis by @dapplion of the functions as described by @mzargham shows that the total conviction of different users is the sum of all individual convictions. It seems to show that time is the only factor that can grow conviction - regardless if it's one big stake or the sum of many small stakes.

VzfYXEZ

So couldn't we achieve this without explicit identities ?

mzargham commented 5 years ago

@sponnet, this was by design.

without getting into too much math again, sybil resistance was one of my original motivations for porting this particular 'discounted integrator' model from the dynamic routing use case to voting.

The conviction function f(s,t)= s*(1-a^T)/(1-a) is linear is in tokens staked 's', even though it is non-linear in time.

consider T1> T2 each with stake s f(s, T1) = s(1-a^T1)/(1-a) f(s, T2) = s(1-a^T2)/(1-a) you can even count how much more conviction stake at T1 is worth f(s, T1)-f(s, T2) = s(a^T2 - a^T1)/(1-a) = s a^T2(1-a^(T1-T2))/(1-a) and it can be interpreted as a fraction of the stake (f(s, T1)-f(s, T2))/s = a^T2*(1-a^(T1-T2))/(1-a) and is totally determined by the rate parameter 'a' and how far apart T1 and T2 are on that time scale. Not this difference goes to zero when T1=T2, but also as T2 gets large.

As you demonstrated, even if you stake different quantities at different times, the times eventually wash out as the geometric sum converges resulting in an amount of conviction that does not depend (meaningfully) on how or our when the staking the activity is distributed:

for T1, T2, T3>>0 f(s1,T1)+f(s2,T2)+f(s3,T3) = s1/(1-a) + s2/(1-a)+ s3/(1-a) = (s1+s2+s3)/(1-a)

Okay so it was still a lot of math. -Z

simondlr commented 5 years ago

Great graph @sponnet!

Conviction is indeed sybil-resistant: as in, it is not valuable to split up stake over many stakes.

With regards to the decay, wouldn't it incentivize people at some point to unlock their stake and just re-stake to start building new conviction? I think I'm still uncertain how decay plays into this?

I think if I understand decay correctly, then it might actually mitigate against large shareholders growing their power/control over time (if the conviction is tied to inflation funding).

For example: if you have 51% of conviction and it doesn't decay, then any new funds you earn from the inflation can allow the staker to grow their conviction slowly but surely.

As I understand it: it being a geometric series + there being decay, it does indeed have those properties. Large ETH holders vying for new inflation through staking won't always have high conviction. It will cycle, allowing other conviction stakers possibility to have higher percentage convictions. Is that correct?

mzargham commented 5 years ago

Linearity in stakes protects the system from manipulation by unstaking and restaking to get more conviction.

here is a hand sim: handsim

glauseWilde commented 5 years ago

I have spent a few days doing my best to go through all of this. I am probably missing some big pieces, but here is one of my takeaways. Assuming it works as described and a technical implementation is reasonable, I don't see an accountability mechanism for use of the funds after disbursement. So funds are issued based on whatever is best to that individual which may or not be to developing the network?

And just for clarity disbursement is continuous based on staking in real time? So, I would need to lock up funds for the same time as funding is dispersed? A big reason for this initiative was the observation that charity hasn't cut it for funding network development. I wonder how close locking-up funds but not losing them is to charity in this case.

sponnet commented 5 years ago

OK so removing your stake - and immediately adding it again is not an issue as it cannot drive the total conviction over time up. That's perfect.

When applying this system to vote (DAO signalling) on governance topics ( proposals ) @glauseWilde then you can use other smart-contract based systems down the line to follow up on the spending of the funds. Here we made an implementation that uses : GitCoin Or you could use frameworks like GivEth to manage the spending of these funds based on reaching different milestones.

When using it there is the concept of a threshold function that passes a proposal when reached. Like the bonding curve it has a number of parameters, like the total fund pool size, the amount requested and some parameters that determine the height of the threshold. ( maybe @mzargham can elaborate on that ? ) Using this system to vote on proposals has some unanswered questions of its own IMO:

  1. Should these parameters be constant per item to vote on - or should it be constant for the whole system. I could assume that to have a fair distribution of voting power over several concurrent proposals these values need to be constant ?
  2. Given that proposals will overlap in time - is it even possible to change system-wide parameters ? Should they be applied to new proposals alone ? Changing them on running proposals will cause jumps in the threshold function - which will probably not be the desired effect...
  3. There is an obvious correlation between the parameters of the conviction function and the threshold function. Has there been any research done towards the optimal values of these ? ( you want to avoid lengthy votes on cheap proposals & flash-votes on expensive ones )
  4. Can this system evolve towards an equilibrium - can it learn from its own mistakes and determine better parameters as the system evolves ? (could a proposal be to vote on changing the parameters for example ? )

More questions than answers here maybe, but the more insights we have in how this system might work - the faster we could have a working prototype of it, and that's something I'd love to contribute to.

owocki commented 5 years ago

I don't see an accountability mechanism for use of the funds after disbursement

the decay functionality for the DAO is the accountability mechanism. if the working group wants the proposal to be renewed in the next hard fork, they need to be transparent/accountable and maek that case to the community

mzargham commented 5 years ago

maybe @mzargham can elaborate on that ?

There is a lot to unpack here. For moment, I think it suffices to say that the trigger functions are parameterized; the way its currently mapped out is primarily designed for passing proposals and the amount conviction require grows rapidly as the amount of funding requested approaches a maximum share of the communal funds.

The question of inflation requires a different structure. Sidebar discussion on this with @simondlr who has some good ideas about how the conviction model could work differently for inflation funding, from how it has been outlined for milestones.

@sponnet may have more to add after the Odyssey hackathon were Giveth team 2, implemented a prototype of conviction voting; or as was originally dubbed "Social Sensor Fusion". @geleeroyale may also have comments; he might just be the first person who truly appreciated the original terminology.

While not in the context of conviction voting algorithms, there is also ongoing work by @zixuanzh regarding inflation funding as part of his master's thesis at Upenn. This will be important work because it the impact of inflation models on wealth distribution.

If a conviction staked inflation funding proposal ends up being seriously considered, I would recommend a modified version of @zixuanzh simulations with the conviction concept introduced, be used to analyze the systemic implications.