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

💸 GitConsensus addRelease(): use transfer() instead of mint() for distributions #29

Open
mattstam opened this issue Sep 23, 2022 · 3 comments

Comments

@mattstam
Copy link
Contributor

Instead of token.mint(), we could use the standard ERC20 token.transfer() if the GitConsensus contract is an approved to transfer that amount before-hand.

This would create alternative tokenomics models, such as having as designating a repository treasury. This type of model would could allow for a stable tokenSupply(), which is particularly desirable for those projects looking to maintain a stable trading price overtime.

@mattstam mattstam changed the title 💸 GitConsensus addRelease(): use Transfer() instead of Mint() for distributions 💸 GitConsensus addRelease(): use transfer() instead of mint() for distributions Sep 23, 2022
@DmitriyShepelev
Copy link
Contributor

Having the ability to mint and transfer would be a good idea. For example, if Alice thinks Bob made a particularly impactful commit to a repo R but doesn't want to increase the supply of the token for R (and thereby diluting the value of her tokens), she can transfer a subset of her tokens.

Having a dedicated repository treasury is an interesting idea. Project owners can have their repository treasury mint X tokens every Y blocks to ensure supply stability.

@mattstam
Copy link
Contributor Author

For example, if Alice thinks Bob made a particularly impactful commit to a repo R but doesn't want to increase the supply of the token for R (and thereby diluting the value of her tokens), she can transfer a subset of her tokens.

Yep! Trying to play devil's advocate here, and this goes through my mind:

  1. If Alice wants to reward Bob, she can just transfer() her R tokens to Bob directly instead of having to go through GitConsensus and with correlated commit(s).
  2. @Bryce-Soghigian mentioned that status tracking as a particularly useful (e.g. if you made a contribution to a major project and got minted tokens, it is worth showing in a career-oriented page / resume). With minting this is simple to track because it's just tracking transfer(0x0, bobAddr). With transfer rewards, the first from address can be arbitrary so harder to filter.

Project owners can have their repository treasury mint X tokens every Y blocks to ensure supply stability.

What mechanisms currently exist for periodic calls like this? In my experience there needs to be something external (usually an EOA) to trigger any computation / state changes. I've seen periodic contract pollers a while ago, but am really behind on what the current patterns for this would be.

@DmitriyShepelev
Copy link
Contributor

DmitriyShepelev commented Oct 1, 2022

With transfer rewards, the first from address can be arbitrary so harder to filter.

Could we emit an event utilizing a minimal amount of gas to identify transfer rewards?

Project owners can have their repository treasury mint X tokens every Y blocks to ensure supply stability.

What mechanisms currently exist for periodic calls like this? In my experience there needs to be something external (usually an EOA) to trigger any computation / state changes. I've seen periodic contract pollers a while ago, but am really behind on what the current patterns for this would be.

Two ways come to mind:

  1. Use Chainlink Keepers (docs) to create a checkUpkeep function to see if a certain number of blocks have been mined.
  2. Use a modifier that runs after each function checking if a certain number of blocks have been mined, the block number is divisible by some sort of number, etc.

(2) would probably be more gas-efficient.

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

No branches or pull requests

2 participants