COVAL UPDATE 0217

Shannon (HΩDL) Code
8 min readFeb 16, 2017

--

Circuits of Value: New beginnings

Long awaited update 2017

Since our last update Michael Sullivan and I have worked tirelessly to coordinate a smooth transition from our legacy chain to the Counterparty platform.

Decisions : Ledger

The decision to move away from the legacy coin daemon was multi-faceted. One of those decisions is related to some fundamental flaws with the coin daemon, more on this later.

Another reason was our belief in the distributed security and longevity of the bitcoin blockchain. Counterparty is a protocol which enables the creation of meta-tokens on top of Bitcoin. The blockchain bloat concerns are addressed by their use of OP_RETURN to store the information necessary to differentiate a Counterparty transaction from typical bitcoin transactions.

An added bonus will be the ability to encapsulate additional value within a COVAL transaction. (Alice can send Bob 10 COVAL to reward some behavior along with 1 Ƀ of encapsulated value)

Decisions: Swap Economics

Pre-mine (300m before bonus deductions) will be reduced by 25%

Individual balances being swapped will see an additional 15% bonus deposited in their wallet upon successful swap completion. This 15% will be deducted from the pre-mine in addition to the 25% deduction the Pre-mine is taking.

Retrospective: Exchange, Fork, Network outage

As many of you have noticed, trading has been disabled for a few months on Bittrex exchange. Three things happened during the time trading became disabled.

First, an upgraded seed node was spun up and installed within our bluemix environment. New versions of the wallet and block explorer were also brought live within this new environment. Due to a miscommunication this new seed node was not added to some mining daemons including Bittrex’s daemon used to handle transfers.

Second, the IBM Bluemix account hosting the daemon, explorer and wallet was suspended incorrectly. The account suspension was addressed and re-enabled within 4 hours. Unfortunately (due to unknown reasons) when the account was brought back online it was in an unstable state. One where containers could not be brought back online and new apps could not be provisioned. This situation took a number of weeks to remedy and thanks to the excellent support provided by the IBM container group the account was repaired with zero data loss.

Third, During the time of the hosting outage someone attacked the sha256 mining on the legacy COVAL network. Spiking the difficulty with an insanely high hash rate. After mining for a few hours the sha256 mining was turned off and the miner disappeared. As a result sha256 mining no longer works on the legacy COVAL network.

Fourth, likely due to Bittrex being disconnected from the main network or due to the seed node outage; Bittrex experienced a network re-org on the magnitude of 10k blocks. This re-org appeared to be an attack by Bittrex and resulted in a discrepancy of ~900k COVAL within their system.

Decisions: Bittrex

We requested Bittrex to keep the market disabled while we worked on the swap mechanics. Bittrex was paid back the discrepancy to make their books balance (transaction here) And work continued on the swap mechanics. An unrealized side-effect of keeping trading disabled meant that the order-books stayed intact, meaning that anyone with buy orders had their Bitcoin held (and still do). We apologize for this inconvenience.

Moving forward: Bittrex Swap

As of this writing we have arranged with Bittrex to have them handle the swap for any accounts they have within their exchange. This request on our part is unique and Bittrex has worked with us to provide this capability. The level of support provided by Bittrex is above par. Our appreciation to the Bittrex team is insurmountable.

  • Every COVAL account on Bittrex will see an increase of 15%
  • Trading will remain disabled until after the swap is complete
  • Order-books may or may not be cleared (TBD)
  • Users need not do anything to make this Bittrex swap happen.

Moving forward: Swap Tool

A tool has been developed to facilitate the swap for users who’s balances are kept within the COVAL online wallet. The swap tool has some exciting features that I’ll go over now.

  • The ability to log into the swap tool using existing wallet backups.
    * A hosted version of the wallet sits along side the swap tool as well.
  • The ability to create a new wallet account that swapped COVAL will be deposited into
    * If you forget to create a new account, the swap tool will create a mnemonic passphrase to be used within any Counterparty capable wallet
  • The tool uses a snapshot of the chain which requires no connection to the COVAL blockchain network in order to function.
    * This means the swap tool is entirely client side until the swap request is sent to our servers.
  • The version of the swap tool released along with this post will not actually do a swap but does send the swap request to our server to validate
    * This testing phase will enable us to iron out any bugs before the actual swap occurs.

Moving forward: Swap timeline

Swap testing phase : 2 weeks (Feb 17th — Mar 3rd)

Actual Swap phase : 2 weeks (Mar 3rd — Mar 17th)

Deposits : Allow 1 week after Swap phase completion (Mar 17th — Mar 24th)

Bittrex market resume: 3–5 days after swap deposit

Moving forward: Legacy COVAL Sale

An interest has been expressed by many to purchase legacy COVAL prior to the swap. I and Michael Sullivan do not participate in the speculation of alt-coins and as such you will never hear promises of profitability via the exchange markets. Our focus is on providing a platform and token with utility. That being said, we are both volunteering our time to this project. Some of the redemption options we are investigating require significant monetary deposits to be made as well.

Anyone who may be interested in purchasing COVAL prior to the swap should contact us directly on slack. We will gauge interest and feedback on the idea before making any decision and subsequent announcement.

All accounting will be made public after the swap as to easily understand the economic landscape and the remaining pre-mine supply.

Swap In Depth

The swap tool is hosted on github pages! Yes amazingly an entire crypto application has been built in such a way that it can be hosted on github and perform its work on each user’s balances.

The snapshot used for this test is from December 22 2016, meaning balances that have changed since that date will reflect zero. This shows how we will freeze the chain at a point in time regardless of ledger activity beyond that date. The swap request is multi phased, the flow is as follows.

Client Side (in your browser)

  • Swap tool looks to see if you’ve logged into the new COVAL wallet. If you have it, selects your HD key, otherwise it generates a new HD key to use
  • Using this HD key the first address is derived (this is where your new COVAL will be deposited)
  • Using this address / key a Loyyal address is generated (this is where your Loyyal side of things gets deposited)
  • Your COVAL wallet keys are now looped over
  • For every key found your balance is grabbed from the snapshot and a message is generated [covaladdress][lastevent][test][balance]
  • The previously created string is signed by the current key
  • The loop continues until every key has generated and signed a message
  • Now the entire set of signatures are signed by the HD key generated in the first step (The reason for this is fun)
  • The mnemonic phrase representing the HD key from step one is scrubbed from the request and the entire request is sent to a COVAL server.

Server Side (on our server)

Great care has been paid to making these requests fair and error free. Our server application only trusts one thing sent in the request, your signatures.

  • Signature verification requires a few pieces in order to validate.
    * The message to be signed
    * The signature
    * The address of the signer
  • On the server the messages to be signed are generated using the same snapshot used in the client side swap tool.
  • The server validates that the balance provided by the swap request matches what the server determined your balance should be
  • The server validates the rest of the message to be signed matches as well
  • Finally the signatures are all validated

Smart Contract (within Loyyal ledger)

If you remember part of the request includes the address to deposit the swap amount to. The entire swap request (all of the signatures for each COVAL balance) was signed by your Bitcoin / Counterparty HD key

  • The signature and address is sent to a special contract within the Loyyal ledger that can validate that the request was signed by the key belonging to the deposit address sent with the Swap request.
  • The server has now validated that every balance in your COVAL wallet has been signed by the key holding that balance
  • The server has now validated (via a smart contract) that the key belonging to deposit address was used to sign the entire request.
  • The results of the validation by the server and smart contract are returned to the user initiating the swap request.

The swap testing phase will allow a request to be sent to the server multiple times. The actual swap will not allow you to send more than one valid request.

Useful URL’s

Live Coval Block Explorer
Coval Swap Tool
Coval Legacy Wallet
Coval Legacy Wallet Backup File (test@test.com / test123)
New Coval Wallet (Bitcoin / Counterparty)
Email support related to swap

Swap tool video walkthrough

Let explorer load before anything else.
The test wallet received funds after snapshot that should not be allowed to swap
Valid swap request
Swap provides valid deposit account
Swap amount at time of snapshot is zero
Swap Signatures
Server validated response

--

--