BreadchainCoop / breadchain

MIT License
2 stars 1 forks source link

Voting Multiplier Spec #71

Open RonTuretzky opened 2 months ago

RonTuretzky commented 2 months ago

Definition

We define a voting multiplier as the multiplication of existing voting power by increasing factor ( a number bigger than 1). For example, some user holds 10 $BREAD , and has completed some tasks on guild.xyz , awarding him some NFTs. These could award him a voting multiplier of 10% (1.1), such that his voting power is now effectively equal to holding 11 $BREAD.

Motivation

Reward users for contributing or participating in Breadchain. Create incentives for further activity. Improve the governance process by weighing active and invested user's votes as more meaningful.

Multiplier Sources

Gnosis Chain

Requirements

High Level Overview

This overview suggests an implementation approach that relies on NFTs, allowing the usage of existing NFTs sanctioned by the Breadchain community. This approach also asserts that multipliers which require a custom implementation or some offchain integration can conform to an NFT design, providing a homogenous interface to all multipliers. This approach also provides forward compatibility to existing services which already implement NFT which breadchain may choose to adopt or increase usage of (such as CharacterSheets, [Guild])https://guild.xyz/breadchain) , Hats etc )

classDiagram 

class IMultiplier{
    getMultiplyingFactor(address) external view returns (uint256)
    validUntil(address) external view returns (uint256)
}

class INFTMultiplier{
    IERC721 NFTAddress 
    hasNFT(address) returns (bool)
}

class PermanentNFTMultiplier{
    uint256 multiplyingFactor 
    uint256 validity = type(uint256).max
}

class DynamicNFTMultiplier{
    address => uint256 userToFactor
    address => uint256 userToValidity
}

INFTMultiplier --|> IMultiplier 
PermanentNFTMultiplier --|> INFTMultiplier
DynamicNFTMultiplier --|> INFTMultiplier

class ERC721{

name() public view virtual returns (string memory)
symbol() public view virtual returns (string memory)
tokenURI(uint256 tokenId) public view virtual returns (string memory)
} 
class IERC721{
balanceOf(address owner) external view returns (uint256 balance)
ownerOf(uint256 tokenId) external view returns (address owner);

}
class IProveableMultiplier{
    submitActivities(bytes data) external 
    mint(address to, uint256 tokenId) internal
}

IProveableMultiplier --|> ERC721
IProveableMultiplier --|> DynamicNFTMultiplier 
ERC721 --|> IERC721
INFTMultiplier --o IERC721

class IOffChainProveableMultiplier{
    address pullOracle 

}
class IOnChainProveableMultiplier{
    address activityContract

}
class ICrossChainProveableMultiplier{
    address bridge 
}
IOffChainProveableMultiplier --|> IProveableMultiplier
IOnChainProveableMultiplier --|> IProveableMultiplier
ICrossChainProveableMultiplier --|> IProveableMultiplier

In order to integrate these multipliers into the existing voting infrastructure , the following contract will be deployed and referenced in the YieldDistributor

classDiagram
class VotingMultipliers{
    Bread BREAD 
    IMultplier[] whitelistedMultipliers 
    getTotalMultipliers(address) external view returns (uint256)
    queueMultiplierAddition(IMultiplier) external 
    queueMultiplierRemoval(IMultiplier) external
}
sequenceDiagram 
autonumber
BreadHolder ->> YieldDistributor : Cast vote 
YieldDistributor ->> YieldDistributor : Get voting power derived from holder's $BREAD and delegated $BREAD
YieldDistributor ->> VotingMultipliers : Loop and apply all existing multipliers of the holder
YieldDistributor ->> YieldDistributor : Apply Voting power 

Overview of Currently Desired Multipliers

Description Multiplier Source Suggested Implementation Interface Brief Implemtation Overview
Providing liquidity Providing liquidity to some pool sanctioned by the Breadchain team containing $BREAD as an underlying asset Gnosis chain DynamicNFTMultiplier Create a $BB NFT, derive the factor from the $BB balance
Voting streaks / activity Participation in voting of yield distribution cycles over time Gnosis chain IOnChainProveableMultiplier Add a counter on the yield distributor contract that counts cycles voted in, use that for factor
On chain activity Participation in partner blockchains Gnosis chain / cross chain IOnChainProveableMultiplier / ICrossChainProveableMultiplier For Gnosis activities, if the activity is proveable on chain only the logic to prove so will need to be implemented in order to mint the multiplier NFT. For other chains, it will need to be bridged in one step, then the multiplier NFT can be minted in another.
Recieving salary in $BREAD on a Gnosis Pay card Receiving salary into a Gnosis Pay card and converting it into $BREAD Gnosis chain IOnChainProveableMultiplier User will submit the address of their Gnosis pay card multisig, upon successful verification of ownership the factor will be set based on the bread balance
Development Contributions Contributing code / design / architecture / reviews / audits to develop Breadchain features Off chain DynamicNFTMultiplier (if integrating existing platforms) IOffChainProveableMultiplier (If bootstrapping an interface ) Recommend to check existing solutions that mint NFTs for github contributions and to integrate that
Research Contributions Contributing research to some Breadchain sanctioned research target Off chain DynamicNFTMultiplier (if integrating existing platforms) IOffChainProveableMultiplier (If bootstrapping an interface ) CharacterSheets
Community Organizing Organizing online events, async events, community projects , irl events Off chain DynamicNFTMultiplier (if integrating existing platforms) IOffChainProveableMultiplier (If bootstrapping an interface ) CharacterSheets
Community Participation Participating in weekly meetings, events or conferences Off chain DynamicNFTMultiplier (if integrating existing platforms) IOffChainProveableMultiplier (If bootstrapping an interface ) Create an NFT series for the weekly temp checks, factor will be how many they have. Create for other events as needed.
Social Media Activity Participating in the Crypto Leftists discord, guilt, following on social media, liking posts over time Off chain DynamicNFTMultiplier (if integrating existing platforms) IOffChainProveableMultiplier (If bootstrapping an interface ) Recommend to find an existing solution that mints NFTs

Delegation

If a user has delegated their voting power on the $BREAD contract to another user, that should also delegate multipliers.

bagelface commented 2 months ago

Can you provide links to the "existing services" referenced: CharacterSheets, Questline, Guild, Hats

RonTuretzky commented 2 months ago

Can you provide links to the "existing services" referenced: CharacterSheets, Questline, Guild, Hats

added 👍

RonTuretzky commented 1 month ago
daopunk commented 17 hours ago

Re-opening since PR has not been merged.