Git Product home page Git Product logo

briolette's Introduction

Briolette - experimental framework for offline-enabled digital currency

Briolette is an experimental framework for researching offline digital currency designs.  This project is a proof-of-concept only and does not reflect a completed system nor a finalized design.  Its purpose is solely for research and experimentation. This is not an officially supported Google product.

Overview

At a high level, the current proof of concept is striving to enable cash-like properties:

  • Direct value exchanges between parties without an online intermediary
  • Transactions settle with near-finality
  • Settled funds may be instantly re-spent
  • Traceability is based on the exchanged coins, not the holder’s identity or account
  • Small value transactions are not prohibitively expensive to process

while realizing the benefits of being digital:

  • Direct exchange can be performed online as easily as offline
  • Multiple types of funds may exist in parallel (such as sovereign tokens and conditional tokens)
  • Business logic may be attached to transacted funds where limited respendability and online intermediation is acceptable 

There are a number of features that make up briolette's core design:

  • The cryptographic protocol can evolve – it must provide a set of core functionality to the surrounding system and be realizable on existing hardware, if possible.
  • Detecting and revoking double spenders is scalable – revocation can occur at different points in the system which enable hierarchical revocation capabilities.
  • Offline and online are one system – by creating one system with direct exchange, system operation controls and incentives create one large scale system to reason about, not two.

Every "wallet" carries a private secret which can have its public portion, or credential, randomized. Transference of tokens depends on valid credentials which are locked in, or committed to, by the prior holder of the token upon transference.  The prior holder must transfer the token using the credential that they themselves received the token on.  This creates a verifiable chain of history between these random credentials that are not directly linked to the participants. The credentials themselves have controlled linkability which provides different privacy properties from transactional and global system perspectives.  The current prototype is built around ECDAA, using this implementation.  Further research on the underlying crypto approach under way to improve on ECDAA.

See the theory of operation for a more detailed description of how the system services operates as well as a discussion of trust and how it is established.

See the design concepts for a more detailed discussion of the underlying design objectives and how the proof of concept attempts to meet them.

We are also beginning to work on design explainers as a means of helping make the design more approachable!

Building

System dependencies

Your system will need to have the Rust programming language installed -- version 1.68.0 or newer.

Additionally, see xaptum/ecdaa for any system requirements for building AMCL or ECDAA, such as cmake.

Diagram generation depends on PlantUML.

Building

The easiest way to build is to use cargo from the root directory (where this file is):

cargo build

Running

Simply run:

source src/utils.sh
start_servers

This will start all the servers in an order that ensures all data creation occurs in the right order. Additionally, it will perform one 2 token transaction.

Simulation

src/simulation/ carries a simple simulation system. To build:

cd src/simulation/briolettesim
cargo build

To run: ./target/debug/briolette-sim

All scenario configuration is currently hard-coded.

Contributions, etc

Please see docs for details.

briolette's People

Contributors

redpig 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

briolette's Issues

Expand design documentation

The design documentation is growing, but more is needed:

  • add retail usecases considered and any new ones
  • add more diagrams and visualizations to enable an easier approach to the subject matter
  • expand high level problem space discussion to make the content approachable without a strong technical background (possibly another explainer deck)

Feature: add example of long lived merchant id for e-commerce

Create a demo "certified merchant" where the merchant creates a randomized credential (with ticket) for receiving payments via e-commerce where the randomized credential hash (or ticket hash, etc) is embedded in the website's Certificate providing an alternative to a tax-authority managed merchant list.

Fix CMake failures from xaptum

#17 highlight the CMake version deprecation.

The third party ecdaa library has minimum CMake version requirements which are triggering build failures on all platforms with newer CMake releases.

Add a backend directory service

Add a service which all other services use to find the ones they need whether it is a validator shard for a given token hash or the clerk server and its port. This will simplify each single service's deployment configuration and enable more flexible examples

Implement a full mobile app which wraps the wallet and can transact

A proof of concept application should show the full picture of a potential client, even if the wallet itself lacks security guarantees.

This should largely wrap the wallet crate and either a "bank" wallet service will need to be set up or the wallet can withdraw directly from the mint.

implement basic recovery service

Implement a recovery service

  • for tokens which have expired and tickets have expired
  • with some grace period

Also enable this to work in the case a wallet thinks it has signed before when it hasn't - due to glitch or use of a probablistic enforcement (bloom filter or similar) for single signing of a given token and prior signature.

Complete the swap service (megaissue)

The current swap service is very crude:

  • collects a wallet of tokens one time from the mint, and
  • swaps them out value-for-value
    Once depleted it fails.

The swap service should:

  • token management must be safer and have controls
    • handle its cache of tokens automatically
    • the cache/relay should enforce safety policies (rate of withdrawals/etc) rather than minting tokens on the fly (mints should be air-gapped)
  • swaps from multiple tokens for one token should be possible
    • to unify change back to denominational values (0.10 + 0.79 + 0.11 = 1.00 or 5 + 3 + 12 = 20, etc)
  • swap policy criteria support
    • e.g., only allow swaps of expired tokens or those near the transaction limit
  • add support for NAC-based proof of sameness
    • enable a wallet to prove it is the same wallet based on ticket request sameness
    • to swap a token to a new ticket when the prior ticket has expired

registrar: split key generation and startup config

Currently the example registrar creates its own keys internally on start up and always loads them from a fixed location. Breaking this out will simplify having separate NAC registrars from TTC registrars which is how this would be deployed in most scenarios.

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.