npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

sexy-mobius-truffle-mixbytes

v1.0.1

Published

[![Build Status](https://travis-ci.org/clearmatics/mobius.svg?branch=master)](https://travis-ci.org/clearmatics/mobius)

Downloads

4

Readme

Möbius

Build Status

Trustless Tumbling for Transaction Privacy

Introduction

Möbius is a Smart Contract that runs on Ethereum that offers trustless autonomous tumbling using linkable ring signatures.

This proof of concept is still evolving and comes with the caveat that it should not be used for anything other than a technology demonstration.

White Paper

S. Meiklejohn, R. Mercer. Möbius: Trustless Tumbling for Transaction Privacy

Using Möbius

:point_right: See the full Tutorial


Möbius supports ether and ERC20 compatible token transactions. In order to use the Mixer with ERC20 compatible tokens, the DepositERC20Compatible and WithdrawERC20Compatible functions must be used. However, in order to do an ether transaction, one has to use the DepositEther and WithdrawEther functions.


To tumble a token it is deposited into the Mixer smart contract by sending the token and the stealth public key of the receiver to the Deposit method.

The Mixer contract places the token into an unfilled Ring specific to that token and denomination and provides the GUID of the Ring. The current ring size is 4, so when 3 other people deposit the same denomination of token into the Mixer the Ring will have filled. Tokens can only be withdrawn when the Ring is full.

The receiver then generates a linkable ring signature using their stealth private key, this signature and the Ring GUID is provided to the Withdraw method in exchange for the token.

The lifecycle and state of the Mixer and Rings is monitored using the following Events:

  • LogMixerDeposit - Tokens have been deposited into a Ring, includes: Ring GUID, Receiver Public Key, Token, Value
  • LogMixerReady - Withdrawals can be now me made, includes: Ring GUID, Signing Message
  • LogMixerWithdraw - Tokens have been withdrawn from a Ring, includes: Ring GUID, Tag, Token, Value
  • LogMixerDead - All tokens have been withdrawn from a Ring, includes: Ring GUID

The Orbital tool can be used to create the necessary keys and to create and verify compatible ring signatures, for details see the Orbital Integration Tests.

Caveats

  • #34 - Gas payer exposes sender/receiver
  • #22 - Only Ether is presently supported
  • #32 - Tokens are locked into the Ring until it's filled
  • #12 - Withdraw messages can be replayed

Gas Usage

Despite being an improvement over the previous iteration which used a Solidity P256k1 implementation, the new alt_bn128 opcodes are still expensive and there are many improvements which can be made to reduce these costs further. If you have any interesting optimisations or solutions to remove storage and memory operations please open an issue.

Currently the Gas usage is:

| Function | Avg | | -------- | ------- | | Deposit | 150k | | Withdraw | 725k |

Developing

Truffle is used to develop and test the Möbius Smart Contract. This has a dependency on Node.js. solidity-coverage provides code coverage metrics.

Prerequisites:

yarn needs to be installed (but npm should work just as well).

yarn install

This will install all the required packages.

Start testrpc in a separate terminal tab or window.

yarn testrpc

# in separate window or tab
yarn test

This will compile the contract, deploy to the Ganache instance and run the tests.

Testing with Orbital

The Orbital tool is needed to generate the signatures and random keys for some of the tests. If orbital is in $PATH the yarn test command will run additional tests which verify the functionality of the Mixer contract using randomly generated keys instead of the fixed test cases.