dOrgTech / OpenRaise

Bonding Curves For DAOs
MIT License
76 stars 26 forks source link

Dividend tracking - Methods & Tradeoffs #5

Open tspoff opened 5 years ago

tspoff commented 5 years ago

Issue

Tracking who is entitled to what dividends at what time requires storage and computational overhead.

Solutions

MiniMe Style ERC-20

➕Can handle ERC-20 payment tokens if sent though a function, like repay()

➖O(logn) loops on transfer and withdraw ➖Large storage overhead

Conclusion: Not preferred due to gas costs, but would work.

ERC-721

➕Can handle ERC-20 payment tokens if sent though a function, like pay() ➕No loops, withdraws simple to calculate

➖Can't split or combine stake without extra logic ➖Can't withdraw multiple stakes at once without a batch function (which we could totally do)

ERC-1843: Claims Token Standard

Conclusion: Won't work, requires a fixed totalSupply()

ERC-1726: Dividend-Paying Token Standard

Only allows ether payments atm. Still evaluating.

Alternative: cOrg style

Rather than distribute dividends directly, we could factor in their value by adding them to the reserve and increasing the values along the sell curve proportionally. This doesn't have the issues associated with the above.

Note: What cOrg actually does in the contract is mint tokens and send them to the beneficiary. This pays the beneficiary, and increases the total supply and therefore the price for other holders.

sethfork commented 5 years ago

Idea: A round-based, proof-powered dividend allocation approach

tspoff commented 5 years ago

I like the idea, It's creative and I feel like it may allow us to stick to our dividend model and keep ERC20 bondedTokens while reducing the on-chain costs (perhaps at the expense of operational complexity).

Questions

To see if I'm understanding correctly:

An article I looked at to understand the solution better is here.

I'm kind of envisioning the rounds being a monthly thing "monthly dividend check".

The permissioned and incentivized claimAgents is interesting, I'll have to think about it some more.

tspoff commented 5 years ago

Some notes from offline discussions:

tspoff commented 5 years ago

What can go wrong?

Potential Solutions

Incorrect root

No root published

Tree not available

sethfork commented 5 years ago

Good summary of our discussions @tspoff. Will be creating a PR with v1 of the implementation shortly.