Difference between revisions of "Kredits"

From Kosmos Wiki
Jump to navigation Jump to search
(Created page with "Kredits are an experimental bonus system for contributors. They're cryptographic tokens, stored on the Bitcoin blockchain (using the [http://counterparty.io/ Counterparty] pro...")
 
 
(80 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Kredits are an experimental bonus system for contributors. They're cryptographic tokens, stored on the Bitcoin blockchain (using the [http://counterparty.io/ Counterparty] protocol).
+
Kredits are a system for tracking contributions to Kosmos projects, enabling the fair and transparent use of project funds, as well as improving project management and governance.
  
Core team members have access to a common Counterparty wallet, with which they can send kredits to any contributor. This setup will of course need increased security measures in the future, such as multisig transactions.
+
== Current status ==
  
Anyone can create a Counterparty wallet via e.g. [https://counterwallet.io/ counterwallet.io] and start receiving kredits for contributions of any kind. People can also send their own kredits to each other if and when they like.
+
We are currently experimenting with the system in pre-production and running trials for opensource grant payouts. We have a functioning, usable Web UI up and running, which interacts directly with Rootstock and IPFS nodes, and which you can also use to create your contributor account: https://kredits.kosmos.org
  
For now kredits are just a fun experiment and gaming element, but the long-term idea is that they can be rewarded with BTC dividends, in case the Kosmos project/org will be in a financial position that allows it to reward everybody who contributed to its success. There's also a variety of other possible use cases, like e.g. a public offering via kredit sales.
+
We still use Rootstock testnet as of now, mostly for anchoring data about contributions and expense reimbursements, but all project funds are stored in a bitcoin multi-signature wallet. We are working on deploying the system to mainnet in the not-too-distant future, so that the budget can be managed dynamically by all members of the co-operative in RBTC eventually.
 +
 
 +
== Concept & Architecture ==
 +
 
 +
=== Smart contracts ===
 +
 
 +
Kredits are cryptographic tokens, (currently) stored on the [https://rootstock.io/ Rootstock] sidechain, issued and managed via programs called [https://en.wikipedia.org/wiki/Smart_contract smart contracts].
 +
 
 +
We use two types of tokens:
 +
 
 +
# A non-fungible [https://eips.ethereum.org/EIPS/eip-721 ERC721] token, which represents the actual contributions. These are unique, and they cannot be sent or traded with other people. They are earned by contributing to Kosmos projects, and either one of our bots or one of our contributors propose to create them for a contribution.
 +
# A fungible [https://eips.ethereum.org/EIPS/eip-20 ERC20] token, which represents the rough amount and size of contributions. These are not unique, meaning every token represents the same value. They are similar to owning shares of a company. And they can be sent to other addresses using any ERC20-compatible wallet on the Rootstock network.
 +
 
 +
Every unique contribution token/record contains the amount of ERC20 kredits that can be withdrawn to their own wallet by the contributor. Withdrawal is optional, but the contributor can choose to do it whenever they want.
 +
 
 +
=== Data storage ===
 +
 
 +
All non-essential data (basically everything except for pure IDs and numbers/amounts) is stored on [https://ipfs.io/ IPFS]. In order to ensure that no data is lost, and all data is available to Kredits users at all times, we run a few Kosmos IPFS nodes, as well as a public IPFS gateway. See [[Kredits:IPFS]] for more information.
 +
 
 +
=== High-level overview ===
 +
 
 +
[[File:High-level-architecture.svg|1024px|link=https://wiki.kosmos.org/images/c/c1/High-level-architecture.svg|frameless|caption]]
 +
 
 +
== Software ==
 +
 
 +
=== Kredits Contracts ===
 +
 
 +
[https://gitea.kosmos.org/kredits/contracts kredits-contracts] contains the smart contracts, written in Solidity, as well as the generated contract ABI for use with the Web3 JavaScript library (e.g. in kredits-web). It can be linked from other programs via npm.
 +
 
 +
=== Kosmos Schemas ===
 +
 
 +
[https://github.com/67P/kosmos-schemas/ kosmos-schemas] contains the JSON Schema definitions and examples for all data stored in IPFS. They can be used in the kredits-contracts JS wrapper as well as in client apps.
 +
 
 +
=== Kredits Web ===
 +
 
 +
[https://github.com/67P/kredits-web/ kredits-web] is the Web UI for the public Kredits dashboard and management UI. The app is hosted on 5apps Deploy at [https://kredits.kosmos.org/ kredits.kosmos.org].
 +
 
 +
=== Hubot Kredits ===
 +
 
 +
[https://github.com/67P/hubot-kredits hubot-kredits] is a Hubot chatbot extension, which can automatically create (unconfirmed) contribution tokens, e.g. based on GitHub contributions, Mediawiki edits, etc.. We also use it to prototype back-end behavior that is potentially needed in `kredits-web`.
 +
 
 +
=== Kredits GitHub ===
 +
 
 +
[https://github.com/67P/kredits-github kredits-github] is a very simple GitHub app, which adds a check to pull requests in org repos, ensuring that they are assigned a kredits label, which is used by hubot-kredits to determine the size of the contribution.
 +
 
 +
=== Kredits IPFS Pinner ===
 +
 
 +
[https://gitea.kosmos.org/kosmos/kredits-ipfs-pinner kredits-ipfs-pinner] pins IPFS data of a Kredits organization on an IPFS node. Running this program turns any IPFS node into a live mirror for all Kredits-related documents.
 +
 
 +
== Developing & Contributing ==
 +
 
 +
Most documentation currently lives in the README files of the various Git repositories.
 +
 
 +
We'll also gladly help you get started, and answer any questions, in our development chat rooms. IRC: [https://waves.kosmos.org/logs/freenode/kosmos-dev/today #kosmos-dev] on [https://libera.chat/ Libera.Chat]. XMPP: [xmpp:kosmos-dev@kosmos.chat?join kosmos-dev] and [xmpp:kredits@kosmos.chat?join kredits] on kosmos.chat
 +
 
 +
== Democratic governance via Kredits ==
 +
 
 +
Kredits have the potential to be used for distributed governance of the Kosmos project and organization. The basic idea is that people can vote on decisions with a vote that carries a weight according to their contributions. In short: the people who do should be the ones who decide. With a limited set of basic rules, this makes for an interesting new and decentralized approach to open-source governance.
 +
 
 +
== Roadmap ==
 +
 
 +
=== In progress ===
 +
 
 +
* Real-world testing of the existing functionality
 +
* Adding missing features for the mainnet launch
 +
 
 +
=== Planned ===
 +
 
 +
==== 2023 ====
 +
 
 +
* Migrate all existing data to RSK mainnet
 +
* ...
  
 
== Ideas ==
 
== Ideas ==
  
* Leaderboard for contributions/kredits, where people can choose to publish their name or not (based on actual blockchain data)
+
''Please note: this list is rather old and only kept here until moved (feel free to help). More up to date ideas and plans can be found in the issues and milestones of the various code repositories on GitHub and Gitea.''
* Some way for new contributors to claim kredits sent to them via email link or similar
+
 
* IRC bot for small transactions, so people can send each other kredits on Kosmos project channels
+
* <del>Leaderboard for contributions/kredits, where people can choose to publish their name or not (based on actual blockchain data)</del> WIP, almost done: https://kredits.kosmos.org/
* Custom wallet, removing all unncesseary features and integrating custom features we'd like to have (like e.g. easy multisig transactions, linked/initiated from a Kosmos chatroom)
+
* Some way for new contributors to claim kredits sent to them via email link or similar (Update: current idea is to issue them without the need for an address, then be able to confirm address change via GitHub OAuth and admin action/proposal)
* Running our own Counterparty server
+
* <del>IRC bot for small transactions, so people can send each other kredits on Kosmos project channels</del> Turned out to not make sense.
 +
* <del>Custom wallet, removing all unnecessary features and integrating custom features we'd like to have (like e.g. easy multisig transactions, linked/initiated from a Kosmos chatroom)</del> WIP, almost done: https://github.com/67P/kredits-web/ (tokens can be sent via normal ETH wallets)
 +
* Expense management, similar to https://opencollective.com/learn-more (MVP implemented in both contracts and Web UI, but not deployed yet)
 +
* Interoperability with other coops/projects/software
 +
** https://docs.opencoopecosystem.net/
 +
** https://www.valueflo.ws/
 +
 
 +
== Similar projects/ideas ==
 +
 
 +
* [https://wiki.p2pfoundation.net/Commons-Oriented_Decentralised_Programmed_Organisations cDPOs (commons-oriented decentralised programmed organisations)] as frameworks to bootstrap, develop & sustain commons projects
 +
* [https://blog.colony.io/colony-beta-product-summary-2121a357d61d?mc_cid=b1750a36c8&mc_eid=fb43075dba#.9egmfejax Colony] -- "The Colony Beta is for teams who want to create their own “Collaboration Network”—a place to work with, incentivize, and track the contributions of a network of collaborators. It combines task management with “payments” and tracking."
 +
* [http://aragon.one/ Aragon]
 +
* [https://github.com/ether-camp/virtual-accelerator/ ether-camp/virtual accelerator] -- "The Virtual Accelerator is a platform that allows for the promotion, testing and funding of ideas. " HackerGold is their token.
 +
* [http://boardroom.to/ boardroom.to] -- A blockchain based governance platform.
 +
* [https://lunyr.com/ Lunyr] -- "Lunyr is an Ethereum-based decentralized crowdsourced encyclopedia which rewards users with app tokens for peer-reviewing and contributing information."
 +
* [https://singulardtv.com/ Singulardtv] -- "A Blockchain Entertainment Studio, Smart Contract Rights Management Platform and Video On-Demand Portal"
 +
* [https://daostack.io/ DAOstack] -- "DAOstack is an open source project advancing the technology and adoption of decentralized governance."
 +
 
 +
see also:
 +
 
 +
* [https://tokenmarket.net/ TokenMarket] -- "Trade and research 152 digital assets. Organize crowdsales."
 +
* [https://medium.com/@ConsenSys/tokens-on-ethereum-e9e61dac9b4e#.hfxscd8yx Tokens on Ethereum] about Ethereum based tokens by ConsenSys
 +
* [https://medium.com/@balajis/thoughts-on-tokens-436109aabcbe Thoughts on Tokens] by Balaji S. Srinivasan and Naval Ravikant
 +
* [https://www.misthos.io/ Misthos] (multi-sig bitcoin wallet, "designed for project teams, investment partnerships and other ad hoc ventures to manage the divvying up of income (received as bitcoin) among their individual members", based on Blockstack, [https://www.coindesk.com/bitcoin-wallet-blockstack-decentralized/ Coindesk article])
 +
* https://sourcecred.io
 +
* [https://freecoin.dyne.org/ Freecoin]
 +
 
 +
== Similar code/inspirations/links ==
 +
 
 +
* [https://github.com/Lunyr/crowdsale-contracts/tree/master/contracts Lynyr contracts]
 +
* [https://github.com/Giveth/minime minime contracts]
 +
* [https://github.com/ConsenSys/gnosis-contracts/blob/master/contracts/solidity/Tokens/StandardToken.sol gnosis-contracts]
 +
* [https://github.com/melonproject/melon/ melonproject contracts]
 +
* Paper: [https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3243656 "Liberal Radicalism: Formal Rules for a Society Neutral Among Communities"]
 +
 
 +
== Notes ==
 +
 
 +
* [https://sideshift.ai/ Sideshift] is similar to Shapeshift, but without KYC and such. Could be used to donate to the Kredits contract using Bitcoin via LN, as well as via normal chain txs with a variety of currencies.

Latest revision as of 10:57, 19 November 2023

Kredits are a system for tracking contributions to Kosmos projects, enabling the fair and transparent use of project funds, as well as improving project management and governance.

Current status

We are currently experimenting with the system in pre-production and running trials for opensource grant payouts. We have a functioning, usable Web UI up and running, which interacts directly with Rootstock and IPFS nodes, and which you can also use to create your contributor account: https://kredits.kosmos.org

We still use Rootstock testnet as of now, mostly for anchoring data about contributions and expense reimbursements, but all project funds are stored in a bitcoin multi-signature wallet. We are working on deploying the system to mainnet in the not-too-distant future, so that the budget can be managed dynamically by all members of the co-operative in RBTC eventually.

Concept & Architecture

Smart contracts

Kredits are cryptographic tokens, (currently) stored on the Rootstock sidechain, issued and managed via programs called smart contracts.

We use two types of tokens:

  1. A non-fungible ERC721 token, which represents the actual contributions. These are unique, and they cannot be sent or traded with other people. They are earned by contributing to Kosmos projects, and either one of our bots or one of our contributors propose to create them for a contribution.
  2. A fungible ERC20 token, which represents the rough amount and size of contributions. These are not unique, meaning every token represents the same value. They are similar to owning shares of a company. And they can be sent to other addresses using any ERC20-compatible wallet on the Rootstock network.

Every unique contribution token/record contains the amount of ERC20 kredits that can be withdrawn to their own wallet by the contributor. Withdrawal is optional, but the contributor can choose to do it whenever they want.

Data storage

All non-essential data (basically everything except for pure IDs and numbers/amounts) is stored on IPFS. In order to ensure that no data is lost, and all data is available to Kredits users at all times, we run a few Kosmos IPFS nodes, as well as a public IPFS gateway. See Kredits:IPFS for more information.

High-level overview

caption

Software

Kredits Contracts

kredits-contracts contains the smart contracts, written in Solidity, as well as the generated contract ABI for use with the Web3 JavaScript library (e.g. in kredits-web). It can be linked from other programs via npm.

Kosmos Schemas

kosmos-schemas contains the JSON Schema definitions and examples for all data stored in IPFS. They can be used in the kredits-contracts JS wrapper as well as in client apps.

Kredits Web

kredits-web is the Web UI for the public Kredits dashboard and management UI. The app is hosted on 5apps Deploy at kredits.kosmos.org.

Hubot Kredits

hubot-kredits is a Hubot chatbot extension, which can automatically create (unconfirmed) contribution tokens, e.g. based on GitHub contributions, Mediawiki edits, etc.. We also use it to prototype back-end behavior that is potentially needed in `kredits-web`.

Kredits GitHub

kredits-github is a very simple GitHub app, which adds a check to pull requests in org repos, ensuring that they are assigned a kredits label, which is used by hubot-kredits to determine the size of the contribution.

Kredits IPFS Pinner

kredits-ipfs-pinner pins IPFS data of a Kredits organization on an IPFS node. Running this program turns any IPFS node into a live mirror for all Kredits-related documents.

Developing & Contributing

Most documentation currently lives in the README files of the various Git repositories.

We'll also gladly help you get started, and answer any questions, in our development chat rooms. IRC: #kosmos-dev on Libera.Chat. XMPP: kosmos-dev and kredits on kosmos.chat

Democratic governance via Kredits

Kredits have the potential to be used for distributed governance of the Kosmos project and organization. The basic idea is that people can vote on decisions with a vote that carries a weight according to their contributions. In short: the people who do should be the ones who decide. With a limited set of basic rules, this makes for an interesting new and decentralized approach to open-source governance.

Roadmap

In progress

  • Real-world testing of the existing functionality
  • Adding missing features for the mainnet launch

Planned

2023

  • Migrate all existing data to RSK mainnet
  • ...

Ideas

Please note: this list is rather old and only kept here until moved (feel free to help). More up to date ideas and plans can be found in the issues and milestones of the various code repositories on GitHub and Gitea.

  • Leaderboard for contributions/kredits, where people can choose to publish their name or not (based on actual blockchain data) WIP, almost done: https://kredits.kosmos.org/
  • Some way for new contributors to claim kredits sent to them via email link or similar (Update: current idea is to issue them without the need for an address, then be able to confirm address change via GitHub OAuth and admin action/proposal)
  • IRC bot for small transactions, so people can send each other kredits on Kosmos project channels Turned out to not make sense.
  • Custom wallet, removing all unnecessary features and integrating custom features we'd like to have (like e.g. easy multisig transactions, linked/initiated from a Kosmos chatroom) WIP, almost done: https://github.com/67P/kredits-web/ (tokens can be sent via normal ETH wallets)
  • Expense management, similar to https://opencollective.com/learn-more (MVP implemented in both contracts and Web UI, but not deployed yet)
  • Interoperability with other coops/projects/software

Similar projects/ideas

  • cDPOs (commons-oriented decentralised programmed organisations) as frameworks to bootstrap, develop & sustain commons projects
  • Colony -- "The Colony Beta is for teams who want to create their own “Collaboration Network”—a place to work with, incentivize, and track the contributions of a network of collaborators. It combines task management with “payments” and tracking."
  • Aragon
  • ether-camp/virtual accelerator -- "The Virtual Accelerator is a platform that allows for the promotion, testing and funding of ideas. " HackerGold is their token.
  • boardroom.to -- A blockchain based governance platform.
  • Lunyr -- "Lunyr is an Ethereum-based decentralized crowdsourced encyclopedia which rewards users with app tokens for peer-reviewing and contributing information."
  • Singulardtv -- "A Blockchain Entertainment Studio, Smart Contract Rights Management Platform and Video On-Demand Portal"
  • DAOstack -- "DAOstack is an open source project advancing the technology and adoption of decentralized governance."

see also:

Similar code/inspirations/links

Notes

  • Sideshift is similar to Shapeshift, but without KYC and such. Could be used to donate to the Kredits contract using Bitcoin via LN, as well as via normal chain txs with a variety of currencies.