Open mattstam opened 2 years ago
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.
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:
transfer()
her R tokens to Bob directly instead of having to go through GitConsensus and with correlated commit(s).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.
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:
checkUpkeep
function to see if a certain number of blocks have been mined.(2) would probably be more gas-efficient.
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.