Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Governance Token emissions to ubq.eth new strategy #831

Open
0x4007 opened this issue Nov 14, 2023 · 33 comments · May be fixed by #971
Open

Governance Token emissions to ubq.eth new strategy #831

0x4007 opened this issue Nov 14, 2023 · 33 comments · May be fixed by #971

Comments

@0x4007
Copy link
Member

0x4007 commented Nov 14, 2023

For every 1 governance token minted via our staking contract to our community members, we emit an additional 0.5 governance tokens to ubq.eth

I think it could be a very interesting proof of concept for future DAOs to fund development automatically by emitting governance tokens to a wallet that is controlled by the UbiquiBot for their repositories.

What would be the simplest way to add an additional split, but within the protocol level?

To clarify, this is a low priority task that would be used primarily for selling a future vision (this is why I think it should be implemented on the smart contract level.)

It would be great if we can set multiple emission destinations and set the amounts. That way, for example, maintenance on this repository can receive 5% of all governance token emissions, UbiquiBot repository 10% etc.

Context

Copy link

ubiquibot bot commented Nov 14, 2023

Available commands

- /start: Assign the origin sender to the issue automatically.
- /stop: Unassign the origin sender from the issue automatically.
- /help: List all available commands.
- /autopay: Toggle automatic payment for the completion of the current issue.
- /query: Comments the users multiplier and address
- /multiplier: Set the bounty payout multiplier for a specific contributor, and provide the reason for why. 
  example usage: "/wallet @user 0.5 'Multiplier reason'"
- /allow: Set access control. (Admin Only)
- /wallet: <WALLET_ADDRESS | ENS_NAME>: Register the hunter's wallet address. 
  ex1: /wallet 0x0000000000000000000000000000000000000000
  ex2: /wallet vitalik.eth

@call3hudson

@molecula451
Copy link
Member

/start

Copy link

ubiquibot bot commented Nov 15, 2023

Deadline Wed, 22 Nov 2023 02:05:19 UTC
Registered Wallet 0x4D0704f400D57Ba93eEa88765C3FcDBD826dCFc4
Tips:
  • Use /wallet 0x0000...0000 if you want to update your registered payment wallet address @user.
  • Be sure to open a draft pull request as soon as possible to communicate updates on your progress.
  • Be sure to provide timely updates to us when requested, or you will be automatically unassigned from the bounty.

    Copy link

    ubiquibot bot commented Nov 15, 2023

    Skipping /start since the issue is already assigned

    @molecula451
    Copy link
    Member

    the previa before the PR, still in beta, i'm trying to redefine the concept and the functions designing accordingly, but it pretty much similar

    @pavlovcik
    @rndquu

    mint

    @rndquu
    Copy link
    Member

    rndquu commented Nov 17, 2023

    To clear the terminology ubq.eth is basically a treasuryAddress.

    It would be great if we can set multiple emission destinations and set the amounts. That way, for example, maintenance on this repository can receive 5% of all governance token emissions, UbiquiBot repository 10% etc.

    Questions:

    1. Right now 100% of additional governance tokens are minted to the treasury address. We should split governance token minting to separate addresses where each address corresponds to a particular partner github repository, right?
    2. By "governance tokens" we mean that all our partners (who use the ubiquibot github app) will be able to mint UBQ governance tokens, right? Or partners should be able to use their own governance tokens?

    @molecula451
    Copy link
    Member

    Goods news! right now it's possible to dynamically add addresses to the array in charge to mint extra IERC20Ubiquity(governanceToken).mint

    add.mp4

    aswell as remove

    remove.mp4

    To clear the terminology ubq.eth is basically a treasuryAddress.

    It would be great if we can set multiple emission destinations and set the amounts. That way, for example, maintenance on this repository can receive 5% of all governance token emissions, UbiquiBot repository 10% etc.

    Questions:

    1. Right now 100% of additional governance tokens are minted to the treasury address. We should split governance token minting to separate addresses where each address corresponds to a particular partner github repository, right?
    2. By "governance tokens" we mean that all our partners (who use the ubiquibot github app) will be able to mint UBQ governance tokens, right? Or partners should be able to use their own governance tokens?

    All good feedback, we need this questions cleared

    @molecula451
    Copy link
    Member

    Questions:

    1. Right now 100% of additional governance tokens are minted to the treasury address. We should split governance token minting to separate addresses where each address corresponds to a particular partner github repository, right?

    It will be possible to set the partners address the array level

    1. By "governance tokens" we mean that all our partners (who use the ubiquibot github app) will be able to mint UBQ governance tokens, right? Or partners should be able to use their own governance tokens?

    All addresses set will be getting a % fee of the minted token, altho, this was is suggest to change and clarify

    @ubiquity ubiquity deleted a comment from call3hudson Nov 17, 2023
    @0x4007
    Copy link
    Member Author

    0x4007 commented Nov 20, 2023

    • Right now 100% of additional governance tokens are minted to the treasury address. We should split governance token minting to separate addresses where each address corresponds to a particular partner github repository, right?

    When promoting the DevPool/bot, I'll highlight how this approach is a stepping stone towards greater autonomy for DAOs. By aligning tokenomics with the direct funding of productive work, we can create a more efficient and self-sustaining DAO ecosystem. This method not only incentivizes meaningful contributions but also paves the way for DAOs to seamlessly integrate their tokenomics with actual work output, enhancing both governance and operational effectiveness

    • By "governance tokens" we mean that all our partners (who use the ubiquibot github app) will be able to mint UBQ governance tokens, right? Or partners should be able to use their own governance tokens?

    Partners should use their own governance tokens.

    However for a temporary growth strategy we can definitely consider emitting UBQ to whitelisted partner wallets. For example, Taiko, MakerDAO.

    This could allow for a really interesting future where DAOs can donate to specific work efforts of other DAOs using our system.

    @molecula451
    Copy link
    Member

    molecula451 commented Nov 20, 2023

    I think we could focus first on implementing the feature, then expand its functionality based on our needs and evolving requirements. By prioritizing the core functionality initially, we can ensure a robust foundation. Once the feature is successfully deployed and uses provide valuable insights, we'll use that feedback to guide future enhancements and expansions. This iterative approach allows us to deliver a well-refined feature while staying responsive to the changing needs or potential partners.

    @0x4007
    Copy link
    Member Author

    0x4007 commented Nov 21, 2023

    I think we're all using a little ChatGPT in our replies now

    @rndquu
    Copy link
    Member

    rndquu commented Nov 21, 2023

    However for a temporary growth strategy we can definitely consider emitting UBQ to whitelisted partner wallets. For example, Taiko, MakerDAO.

    Ok, so as a part of the current issue we should update the ChefFacet contract and add a whitelist of partner wallet addresses eligible for Governance token mints.

    User stories:

    • admin should be able to add/remove partner wallets eligible for Governance token mints
    • admin should be able to set the reward rate for each partner

    Notice that we shouldn't simply iterate across all partners here and mint tokens to all of them but rather create a separate method for each partner where the partner's reward would be calculated dynamically so that partners could claim rewards from time to time. This is to prevent unnecessary gas costs for staking contract users + to prevent contract DOS when amount of partners increases.

    @0x4007
    Copy link
    Member Author

    0x4007 commented Nov 22, 2023

    This is to prevent unnecessary gas costs for staking contract users + to prevent contract DOS when amount of partners increases.

    That is unfortunate and feels like its removing the magic out of this idea. It no longer feels like "automatic governance distribution to the contributors" unless if I am misunderstanding.

    At this point, wouldn't it be simpler to fork Compound's contract that "drips rewards" and then people can claim? I suppose this is the latest rewards contract that Compound has.

    Just throwing this new approach out there, but is it possible to do a more native integration with the bot and permits? For example, we have a new method with some tight access control/limits that allows the bot to issue permits and directly let contributors claim?

    Or perhaps we can associate limits based on the repository id and user id and make some type of oracle system to prevent abuse?

    function claimContributorRewards(uint256 gitHubRepositoryId, uint256 gitHubUserId) {
        ...
    }

    Clearly that seems to be a far larger project. I'm hoping we can make this seamless but simple to implement, ideally.

    @molecula451
    Copy link
    Member

    molecula451 commented Nov 22, 2023

    there are still many ways to keep this simple, we could even add a onlyPause() modifier to stop this extra emissions following the external method that rnqnuu mentions, increasing gas costs for claimers it's the only setback i'd look

    function claimContributorRewards(uint256 gitHubRepositoryId, uint256 gitHubUserId) {
        ...
    }

    Or perhaps we can associate limits based on the repository id and user id and make some type of oracle system to prevent abuse?

    getting a bit out of the original intention but we could do a poc

    @rndquu
    Copy link
    Member

    rndquu commented Nov 27, 2023

    At this point, wouldn't it be simpler to fork Compound's contract that "drips rewards" and then people can claim?

    This is basically what I meant. Partners should be able to claim rewards instead of minting directly to the partners.

    Just throwing this new approach out there, but is it possible to do a more native integration with the bot and permits? For example, we have a new method with some tight access control/limits that allows the bot to issue permits and directly let contributors claim?

    This looks like we're trying to reimplement uniswap's permit2 contract because the logic inside the claimContributorRewards(uint256 gitHubRepositoryId, uint256 gitHubUserId) method will look very similar to _permitTransferFrom()

    Copy link

    ubiquibot bot commented Nov 27, 2023

    Do you have any updates @molecula451? If you would like to release the bounty back to the DevPool, please comment /stop
    Last activity time: Wed Nov 22 2023 02:34:32 GMT+0000 (Coordinated Universal Time)

    @molecula451
    Copy link
    Member

    molecula451 commented Nov 28, 2023

    yeah i see, but original's pavlovciks vision is to generate rewards after an user claims, so this not what we're doing then, as this is gas costly for users, and certainly a bad experience of expensive networks like mainnet, but overall it would only be good for gnosis

    @zugdev
    Copy link
    Contributor

    zugdev commented Sep 21, 2024

    Is this issue clear and scoped? Can jump on it.

    @rndquu
    Copy link
    Member

    rndquu commented Sep 27, 2024

    This issue implies editing LibChef while we decided to keep using our old staking contract MasterChefV2.1.

    As far as I understand, as a part of this issue we should mint UBQ tokens to whiltelisted partners who use the ubiquity-os bot.

    What we could do:

    1. Create a new smart contract responsible for UBQ rewards distribution
    2. Set that smart contract to receive UBQ rewards instead of the treasury in the staking contract here

    The "treasury" smart contract's owner must have the ability to:

    1. Add/remove partner wallets eligible for UBQ token mints
    2. Set the reward rate for each partner wallet

    Ideally we should search for an already audited contract with the same functionality.

    @0x4007 ?

    @0x4007
    Copy link
    Member Author

    0x4007 commented Sep 27, 2024

    I think it makes sense to only reward contributors who are helping to build ubiquity infrastructure with UBQ tokens. So we should only drip rewards to wallets we control for our organizations on GitHub.

    However as a temporary marketing campaign we can certainly add a handful of top tier partners (like makerdao etc)

    @rndquu
    Copy link
    Member

    rndquu commented Sep 27, 2024

    @zugdev Pls check this comment.

    Ideally we should find an already audited contract (PaymentSplitter?) + cover it with unit tests.

    @zugdev
    Copy link
    Contributor

    zugdev commented Sep 27, 2024

    Yeah that's the approach I think works best.

    @zugdev
    Copy link
    Contributor

    zugdev commented Sep 30, 2024

    /start

    Copy link

    ubiquity-os bot commented Sep 30, 2024

    Warning! This task was created over 321 days ago. Please confirm that this issue specification is accurate before starting.
    Deadline Mon, Oct 7, 1:16 PM UTC
    Beneficiary 0xbB689fDAbBfc0ae9102863E011D3f897b079c80F

    Tip

    • Use /wallet 0x0000...0000 if you want to update your registered payment wallet address.
    • Be sure to open a draft pull request as soon as possible to communicate updates on your progress.
    • Be sure to provide timely updates to us when requested, or you will be automatically unassigned from the task.

    @zugdev
    Copy link
    Contributor

    zugdev commented Sep 30, 2024

    @rndquu Gaslite is better, we could use this contract. OpenZeppelin's payment splitter is no longer mantained and was deprecated a while ago. Btw it wasn't very clear if I should modify MasterChefV2 or LibChef, specially because MasterChefV2 is not within this repo. Anyways I'll begin working on the payment splitter. Let me know if you need a different contract.

    @rndquu
    Copy link
    Member

    rndquu commented Sep 30, 2024

    @zugdev

    Gaslite is better, we could use this contract.

    There are few drawbacks:

    1. Too much assembly (basically almost 100%)
    2. Audited by a single person 0xth0mas. I couldn't find his profile neither on sherlock nor on code4arena.

    OpenZeppelin's payment splitter is no longer mantained

    Although it is no more present in openzeppelin v5 it is still present in v4.9. Perhaps we could utilize the one from v4.9 (which https://github.com/ubiquity/ubiquity-dollar currently uses).

    Btw it wasn't very clear if I should modify MasterChefV2 or LibChef

    You should create a new contract (let's call it, for example, Treasury) for distributing UBQ rewards as stated in this comment. Later we will set the newly created Treasury contract as UBQ rewards receiver so that partners could receive UBQ rewards.

    How it's gonna work:
    1.Treasury contract owner sets MasterChefV2.1's treasury address to the newly created Treasury contract
    2. Owner adds payees' addresses (i.e. whilte listed partners who use the ubiquity-os bot) in the Treasury contract
    3. Treasury contract distributes rewards in a pull-based manner

    @zugdev
    Copy link
    Contributor

    zugdev commented Sep 30, 2024

    Understood 🫡

    @zugdev zugdev linked a pull request Oct 2, 2024 that will close this issue
    @Apetree100122

    This comment was marked as spam.

    Copy link

    ubiquity-os bot commented Oct 7, 2024

    ! This issue is already assigned. Please choose another unassigned task.

    @molecula451
    Copy link
    Member

    /start

    pick another issue, someone is already working on this one

    @zugdev
    Copy link
    Contributor

    zugdev commented Oct 15, 2024

    I should be reasigned here, waiting for review.

    Copy link

    ubiquity-os bot commented Oct 15, 2024

    @zugdev the deadline is at Tue, Oct 22, 5:57 AM UTC

    @gentlementlegen gentlementlegen assigned zugdev and unassigned zugdev Oct 22, 2024
    Copy link

    ubiquity-os bot commented Oct 22, 2024

    @zugdev the deadline is at Tue, Oct 29, 4:49 AM UTC

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging a pull request may close this issue.

    5 participants