MyBit + Enigma

MyBit
MyBit
9 min readNov 14, 2018

--

Wealth management applications, the core use-case for the MyBit Network protocol, still rely upon multiple on-chain transactions that contain sensitive data for stakeholders. Providing a secure layer on top of the current architecture has become a necessity for the MyBit Network to cover use cases currently limited by privacy concerns.

The following document describes a proposal for using Enigma Protocol TEE/MCP network through the MyBit Network API to enhance the features of the latter, securely executing private transactions, and covering the current limitations of our platform.

Introduction to the MyBit Network

Built by the MyBit Foundation, the MyBit Network is a business layer on top of the Ethereum Blockchain that provides developers with a low-level entry barrier for developing financial applications. In other words, the MyBit Network is an out-of-the-box protocol for creating decentralised wealth management applications, such as crowd sales, funds, wills, and trusts.

To easily interact with the MyBit Network, the MyBit Foundation has also built the MyBit Software Development Kit (SDK). Compressed by a set of open-source technologies such as ES6 Web Libraries, Documentation and Getting Started Guides, any developer can start using our tech stack locally, to eventually migrate to our deployed contracts in test and main net.

A simple use case to understand the MyBit Network is the crowdfunding of digital assets. Leveraging our API, one can create the equivalent of a digital asset within the network, provide funding, and return dividends. By changing parameters within our API, one can then create a Trust, an application that sends an X amount of money to a user in a given Y period. Our Trust application can be seen already live and working on Mainnet.

Using MyBit Network for Financial Instruments (Trust)

A typical financial instrument is a Trust, a fiduciary arrangement that allows a Trustee to hold access/funds on behalf of one or multiple Beneficiaries based on a series of conditions. Since a Trust can be arranged in many ways, it usually involves co-trustees, lawyers, estate laws, and all sort of intermediaries, making the process slow and expensive.

With Blockchain technologies, all these middle-agents can be skipped, and instead, one can set up all the conditions in a usual contract through an Ethereum Smart Contract. Although a developer can start from scratch and set these conditions themselves, that would require them to provide all the functions on their own, which would require time and effort. Instead, they could use the MyBit Network API, speeding the development of the application.

Let’s set up an average Irrevocable Trust, and define the conditions required for this within the MyBit Network API.

From a role perspective:

  • The Trust must have an Owner, who can define a Trustee.
  • The Trust must have a Trustee, a manager who will administer the Trust.
  • The Trust must have one or more Beneficiaries, individuals who will benefit from it.

From an actions perspective:

  • The Trust must be able to accept ETH or ERC20 tokens to increase its value.
  • The Trust must be able to issue dividends to a defined Beneficiary.

From a conditions perspective:

  • The Trust must have a Period where it can receive funds.
  • The Trust must be unmodifiable after the Owner or Trustee defines so.

Using the MyBit Network API, these steps would look like this:

  1. Trust Company LLC registers an Operator on behalf of Mr John, the Trustee owner, within MyBit Network using addOperator which returns an Operator ID (trust-llc).
  2. Trust Company LLC creates an Asset, the digital representation of a Trust, by describing itself as the Asset Manager (Trustee), by calling createAsset(“Mr John Trust”, trust-llc, 10000), defining a Trust with 10,000 ETH that returns an ID (john-trust).
  3. Mr John funds the asset on behalf of his son (address 0x123), using contribute(john-trust,10000,0x123), sending the amount into the Trust.
  4. Trust Company LLC closes the funding of the Trust, locking the amount until it’s required by calling crowdsaleFinished(trust-llc).

Paying out Trust

Now that the funds are locked and safe in the Trust, we need to pay them out to John Jr. Based on the recommendations by Mr John, the money will be given to John Jr. in equal portions annually over ten years.

Using the MyBit Network API, this is done in one single step:

5. Trust Company LLC issues the payout for John Jr. by calling . issueDividends(john-trust, 0x123, 1000), which in turn checks that the Trust has the funds it has been requested.

The following sequence diagram showcases all the previously described flow and data calls from the MyBit API to the Ethereum and MyBit networks. Although we set up a middle entity called “Trust Company” to execute some of the actions, due the nature of the MyBit Network API, Mr John can take that role, be responsible of the Trust, and do everything himself.

Privacy Concerns and Limitations within MyBit Network

Although the current version of the MyBit Network can provide a set of features to developers for implementing wealth management applications, there are a series of privacy concerns within the protocol that makes some applications limited to the one we showcased before.

For instance, the moment John Jr. performs any action with his Trust Beneficiary address, it becomes public knowledge that he will receive an amount of 10,000 ETH throughout ten years. To avoid this, we have blocked any get or view operations on Asset entities (in this case the Trust), making them only available to owners. As a result, no third-party can see data related to created Assets, making them inaccessible for other use cases and platforms.

This architecture is somewhat inconvenient because we want individuals to perform any actions you can do in your average Bank through the MyBit Network. In today’s standards, third-parties can query wealth information from individuals to issue Credit Cards and Loans, without receiving information about the actual wealth of the said individual. However, within our network (and most platforms), this procedure discloses information related to the wealth of the individual.

Solutions through Encrypted Computations (Enigma Protocol)

Encrypted Computations are functions that operate over encrypted data to prove or calculate statements based on encrypted variables without disclosing the key the data was encrypted with. Computing over encrypted data has been a challenge over multiple years, and although theoretical solutions (like Fully Homomorphic Encryption) has been defined, there are still not many consumer-friendly services available to be used by developers or engineers alike.

Even though we have solutions for “sharing” encrypted data without disclosing its contents (for instance, Shamir’s Secret Sharing Algorithm allows us to generate a finite number of unrelated pieces of information that can be shared through a Network in order to backup information without disclosing it), encrypted computation is a more complex problem. Even if there are providers (like Microsoft) that can guarantee Trusted Execution Environments (TEEs) to perform encrypted computations, we are still tied to centralised or single-party solutions not easy to consume by developers.

Enigma Protocol solves this issue by creating a network of TEEs that use Intel’s Software Guard Extensions (SGX) to perform Secure multi-party computation (MPC). By providing a decentralised network of nodes with an economic incentive to compute these functions, developers and services can calculate a series of conditions without disclosing any information.

Using MyBit Network and Enigma Protocol for Loans

In our previous example, Mr John set up an Irrevocable Trust for his son, John Jr. The Trust is now locked into a contract that when called, will retrieve an amount of 1,000 ETH and send it to John Jr.’s address, given a year has passed between each call. In total, John Jr. will inherit a total of 10,000 ETH, which will only be taxed when retrieved, yet is technically his to use.

Thus, due to the nature of all the conditions for the Trust being defined by the MyBit Network and not a lawyer or Estate Laws, an authorized third-party can query information on the Trust. By providing this information, John Jr can get access to more financial instruments, such as Loans, based on the information given by the MyBit Network.

To protect the privacy of John Jr.’s wealth, instead of allowing the MyBit Network to query his wealth directly, we can proxy these calls through an Enigma Listener, create new functions within the MyBit Network such as creditCheckFor(x), and give limited-access to the authorised third-party so they can then decide to grant a loan to Jonh Jr. These calls will not show within the MyBit Explorer, and instead will be computed by an Enigma Virtual Machine (VM).

Defining Loan Conditions

John Jr wants to buy a new car and would like to use his Trust as collateral. He reaches out to Loan Company LLC, who requests the information about his Trust, but by granting it to them, he is forced to disclose all transaction information tied to his identity/address. So instead, John Jr. authorises Loan Company LLC to perform secure and private query calls against his trust, without exposing his information and only giving them what they need: proof he has access to an amount of money given a specific timeframe.

Using the MyBit Network API with the Enigma Protocol, these steps would look like this:

  1. John Jr. grants query access to his Trust to Loan Company LLC within the MyBit Network by calling addObserver(loan-llc) onto his Trust contract.
  2. Loan Company LLC then calls creditCheckFor(250) onto the MyBit Network, given that John Jr. wants to buy a Porsche Cayenne worth 250 ETH.
  3. John Jr. encrypts the signature for his Trust using the Enigma Client and submits those to the MyBit Network Credit contract.
  4. The MyBit Network requests an Enigma Computation. The inputs to the computation are: a. A function that decrypts John Jr.’s signatures and obtains the Trust address. b. A function that reviews the Trust dividend period, and the Trust’s balance. c. John Jr.’s encrypted signature.
  5. The Enigma Listener receives the computation request and passes the inputs to the Enigma Virtual Machine (i.e. compute(fn1(encrypted_signatures), fn2)).
  6. The Enigma Virtual Machine executes both functions. Function 1: i. Decrypting the arguments (private key, encrypted signature). ii. Verify signature and obtains Trust address. Function 2: i. Check whether the dividend ROI of the Trust address per year is > 250. ii. Check whether the current balance of the Trust is > 250. iii. Returns true if both conditions are passed, false if not.
  7. The MyBit Network creditCheckFor(250) call by Loan Company LLC returns true, giving them reassurance of John Jr.’s net worth and thus, granting him the loan.

The following sequence diagram showcases all the previously described flow and data calls from the MyBit Network to the Enigma Listener and VM. As before, even though we set up a middle entity called “Loan Company” to execute the check, due the nature of the MyBit Network API, this can be done by anyone John Jr authorises, enabling secure private peer-to-peer loans.

Conclusion

Financial reputation is an incredibly important and relevant use case for most wealth management platforms. As of today, we rely heavily on Financial Institutions to provide third-party access to this information, more often than not without our consent or request. These procedures are based on closed-sourced processes and algorithms that tend to benefit the consumers the least.

We envision MyBit Network as the next generation Wealth Management protocol for developing scalable, private and decentralised Assets Under Management (AUM) applications. To be able to do so, we are looking into distributed technologies that can guarantee the performance and security of all operations transacted on the MyBit Network. We see Enigma Protocol as a cutting-edge and potential provider of these requirements due to its implementation of TEE/MCP over a network.

The MyBit Foundation is focused on providing freedom to individuals from traditional wealth management solutions, and privacy is a critical element of doing so. The Ethereum protocol pseudo-anonymity is not enough for large-scale bank applications, so projects like Enigma are the missing pieces we are looking for to provide users with a truly open and distributed world.

MyBit is an open-source project. To explore opportunities to contribute please click here. To ask questions join our telegram below.

--

--

MyBit
MyBit
Editor for

MyBit enables the rapid building, testing, and deployment of wealth management applications on the Ethereum Blockchain.