Git Product home page Git Product logo

cccoin's Introduction

CCCoin - Image creation, curation, and sharing incentivization network.

Rewards users for submitting images. Rewards voters for curating images.
Rewards servers for contributing website hosting. Rewards sponsors for sponsoring gas fees.
No downloads runs instantly in any web browser. Zero fees for regular users, not micro-tipping.
ERC20 standard token rewards. Rewards commitment with long-term staking interest.

Technologies

  • Mediachain - Metadata storage, metadata search, and metadata organization.
  • Ethereum - ERC20 for the token and blockchain for resolving concurrency conflicts into a single universal ordering.
  • CCCoin Core - Custom blockchain consensus and incentives mechanisms that build upon the above foundations.

Blockchain Rewards in Depth

CCCoin's blockchain, layered above the Ethereum blockchain, mints rewards for wide variety of contributions,

  1. Submit your images - Submit images that get sufficient votes, and you earn tokens. Submit images that don't get sufficient votes, you start to lose visibility for your newly submitted images.
  2. Vote on images - Vote on images that receive sufficient subsequent votes after your vote, and you earn tokens. Vote on images that don't receive sufficient subsequent votes, you start to lose voting power.
  3. Run a web node - Run a web node, optionally develop custom anti-spam controls, provide hosting to and front Gas fees to end users. If the end users your node chooses to host subsequently earn sufficient tokens through any of the actions above, you earn tokens too. Front these resources to users who are a net loss, and you can't recoup the upfront costs.
  4. Fund others' web nodes - Fund the resource fees for web nodes that are fronting resources to users in a net profitable way, and receive a share of the net rewards. Fund web nodes that are not, incur net a loss. Web nodes are currently responsible for implementing this.
  5. Run rewards node - Properly carry out the computations for distributing rewards, and you earn tokens. Distribute rewards poorly, you get forked and cut out.
  6. Buy the CCCoin token - Fund the advancement of the entire CCCoin ecosystem of resource providers by supporting the price of CCCoin. Feel the rewards of knowing you're contributing to creative good!
  7. Loan CCCoin your tokens - Commit to locking up your CCCoin tokens on the platform for a period of time, in the form of CCLock, and you'll receive interest bearing CCCoin payments back over time. Redeem too much of your CCLock too soon, and face an early withdrawal penalty.

Properties in Depth

CCCoin aims to achieve all of the properties expected from a dApp,

  • Trustless - meritocratic incentives system allowing bad actors to be automatically replaced by good actors.
  • Permissionless - anyone can contribute without permission, by submitting directly to the blockchain, though those who make negative contributions will likely face penalties.
  • Zero fee - unlike micro-tipping platforms, CCCoin aims to be completely free to use for content viewers, voters, and submitters who are expected to make net-positive contributions. Funds to front the necessary fees are funded by web node operators or those who invest in them.
  • Fault tolerant - resource providers that disappear or go rogue can be replaced in a meritocratic, permissionless, automated way.
  • Distributed Computation, Distributed Control, Decentralized Control - See trustlessness and fault tolerance.

Token Types

  • CCCoin (CCC) - The currency of the CCCoin network. It is a ERC20 standard token that can be freely used independently of the CCCoin network.
  • CCLock (CCL) - Virtual token of CCCoin that represents locked-up CCC, and can only be slowly disbursed back to its owners over many months in the form of CCC interest bearing payments. Meant to incentivize long-term good behavior by certain participants, in addition to rewarding those wanting to make a long term financial commitment to CCCoin.

Getting Started

Visit this web node on any regular web browser to get started right away!

Or run your own web node,

  1. Setup either Geth, Parity, or Test-RPC. Configure its settings in truffle.js. Settings for connecting to the CCCoin network with Geth 1.5.2 can be found here.

  2. Clone:

    $ git clone https://github.com/mediachainlabs/cccoin.git
  3. Install dependencies:

    $ curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
    $ sudo apt-get install nodejs libssl-dev npm
    $ cd cccoin/node/ && pip install -r requirements.txt 
    $ cd frontend/ && npm install && npm run build # OPTIONAL
    $ sudo npm install -g git+https://github.com/ethereumjs/testrpc # OPTIONAL
  4. Launch your Ethereum node. Refer to the instructions for your chosen variant from step #1:

    $ testrpc -p 9999 --gasLimit 0xFFFFFFFFF --gasPrice 1
  5. Either deploy new instance of the contract, or record the address of an already deployed contract:

    $ cd cccoin/ && truffle migrate --verbose-rpc
    # OR:
    $ echo "CONTRACT_ADDRESS_HERE" > cccoin/node/build_contracts/cccoin_contract_address.txt
  6. Launch your own web node, and then connect to http://127.0.0.1:50000:

    $ cd cccoin/node/ && python node_main.py start_web
  7. Launch your own rewards node:

    $ cd cccoin/node/ && python node_main.py start_rewards
  8. Launch your own audit node:

    $ cd cccoin/node/ && python node_main.py start_rewards

Status

  • Planned: Rewards Nodes vote on rewards, with M of N consensus required. Voting elects rewards nodes.
  • Planned: Streamlining of web node financier process.
  • Planned: More comprehensive in-browser light wallet functionality.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

cccoin's People

Contributors

autoencoder avatar denisnazarov avatar parkan avatar yusefnapora avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cccoin's Issues

Add signatures to individual post objects

Instead of posts: [ { title: ..., url: ... }] we should also have a signature wrapper. Needs only the sig object, public key can be pulled from top level object if needed.

[Writing] Docs/FAQ

  • High-level documentation of the project and it's goals. Explain the basics and how we implemented them on Ethereum, what compromises we made, etc. on Github (Can discuss in more detail)
  • Include the documentation or link to it on the frontend

Simple web ui

Core dApp:

  • Front-end design
    • Initial single page app design
  • Browser-side signatures
    • Implement browser-side signing.
  • Account creation:
    • Browser-side generation of key pairs
    • Localstorage of key pairs
  • Authentication:
    • Encrypted challenge-response protocol between browser and server. Prerequisite for the following:
    • Encrypted session cookies that provide authenticated users with read-only access to their own secret pending write transactions that have not yet been confirmed to be unblinded on the blockchain (votes, submissions).
  • Voting:
    • UI design
    • JS for upvotes, downvotes, flagging
    • JS for 2-phase blinding and unblinding of votes, with client-side signing.
    • Vote persistence across page views and across browsers.
  • Moderation:
    • Flagging
    • Configure flagging thresholds.
    • Mode for viewing flagged posts.
  • Pending vs confirmed transactions:
    • Finish logic for pending vs confirmed transactions of all types. Involves computing all state twice, once from confirmed actions and once from additional pending actions, and expiring old actions from the pending state as appropriate.
  • Image submission:
    • Basic image submission form UI.
    • Browser-side signed submission.
    • Server side.
  • Wallet UI:
    • Web-based way to view your token balance / payout history.
  • Enhancements:
    • Auditing mode.
    • Rewards function enhancements.
  • Listing:
    • Hook up sort types - new, top, trending.
    • Refine trending algorithm.
    • Filter sufficiently flagged posts from trending.
  • Performance:
    • Blockchain checkpoints stored in persistent DB, so the entire blockchain doesn't have to be replayed whenever the web node is restarted.

Future ideas / open questions:

  • Caching proxy that grabs images and resizes them on the fly for the web UI. Maybe an Nginx plugin?
  • Pinterest-like image upload / bookmarklets, where you can point it to a website, and then it shows you the large images on that website, you choose one, and it uploads the image to the submission form.
  • Commenting support in image popup window - in the style of the Instagram / Facebook desktop websites.
  • Robust authorship dispute resolution system?
  • Image data: IPFS & tlsnotary || IPFS & image file uploads.
  • Dynamic user rate throttling at the web node level, which can be connected to ML models.
  • Linking of real-world identities in signup flow - helps web node sponsors.
  • Sponsor auto-management system, that can increase rate limits for users that are bringing you the most money.
  • Sponsor dashboard for monitoring summaries of where your sponsor funds are going, where you're making the most money, throttling / suspending / increasing sponsorship rate limits for certain users.

TOS

  • Create TOS text
  • Backend, upon first login of a user, sends prompt_tos field containing text of TOS.
  • Frontend prompts user with modal if promp_tos field is sent in response for /login_2.

Permissioned Private Net

  • Setup private net with Geth, document settings.
  • Ensure that it's setup to have a sufficiently low gas price and max gas per call settings, based on how fast it's mining new ETH and our cost estimates. Maybe just set it extremely low?
  • Lock down Geth to not allow additional nodes to connect.
  • Block explorer, e.g. https://github.com/carsenk/explorer
  • Net stats, e.g. https://github.com/cubedro/eth-netstats
  • Record account credentials, for account that has the ETH. Probably the same account that's mining, for simplicity?
  • Deploy contract to private net, record address constants that are passed to the minter_address and cccoin_address variables of the CCCoinToken constructor in 2_deploy_contracts.js.
  • Basic tests.

Reward function testing & refinement

(tg note: rewards function == effectively the entire backend and finishing the whole project. Probably should break this issue down a bit more.)

Image grid item

  • Show correct reward (denominate in CCCoin since we don't have a price?)
  • Format datetime
  • Don't crop image in modal (popup when you click an image detail)
  • What is the hash there?
  • Include poster username

screen shot 2017-02-13 at 2 12 32 pm

[Writing] Announcement blog post

Jesse's outline:

  • The biggest collection of free, high quality images with attribution lives in Mediachain Attribution Engine [blog]
  • Recently, we wrote about how Mediachain can serve as the data solution for Ethereum powered applications
  • So we ate our own dog food, and built CC-Coin, an Ethereum smart contract that rewards content creators and curators for posting and submitting images licensed under CC.
  • CC-Coin is live on the Ethereum main net and uses Mediachain for a back-end.
  • We have submitted all the images in Attribution Engine to the first CC-Coin application here, and today we are open sourcing the code in hopes that someone out there is interested in taking the project to the next level—we want to give our CC-Coins to someone who cares about creators and attribution, and wants to build a token incentivized community around openly licensed images and attribution.
  • We hope this rewards system will serve as a way to reward image creators who make their works openly available for everyone to use and enjoy and the open data in Mediachain will serve as a single index for others to discover attribution and connect with creators

Analytics

One of:

  • GA or other JS integration method
    - [ ] Integration using manually created backend hooks, e.g. async hook that ships request headers & bodies to an analytics service upon each call.
    - [ ] Nginx log analysis

tg note: highly suspect of JS integrations requiring running of 3rd party JS.

Signup/login

  • Add separate Sign up button when logged out (in addition to Log in)
  • Improve sign up page (See Steem or Counterwallet)
    • Pre-generate password
    • Communicate that you cannot lose it

Steem UI:
screen shot 2017-02-13 at 2 05 37 pm

Counterwallet UI:
screen shot 2017-02-13 at 2 06 15 pm

Stats sidebar

- [ ] Always show it by default (remove Shown/Hidden toggle)
- [ ] Remove fixed/non-fixed toggle (unless it has a purpose?)
- [ ] Hook up real data for images leaderboard
- [ ] Hook up real data for users leaderboard
- [ ] Hook up events feed

Edit:

  • remove for now

User profile page

  • Add profile page where you can see
    • User's balance
    • User's images (low priority?)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.