Skip links

Tech Tuesday Development Update – 2019 Week 5: Peer to peer orderbooks and the “first atomic swap” history

This series of posts is called the Tech Tuesday Updates. Along with AMA Mondays on Komodo’s subreddit and the Five Bullet Fridays weekly newsletter, Tech Tuesday Updates will be another weekly piece of content to look forward to.

In case you’ve missed a previous edition and want to catch up, you can find all the previous Tech Tuesday updates here.

DEX: peer to peer order books and the “first atomic swap”

Komodo has one of the longest histories in atomic swap development with lead developer jl777 having exchanges with Tier Nolan who is credited as having discovered the initial design of cross chain trading protocol.  This is very different to the on-chain DEX “atomicity” described in many of the current products based on a single blockchain, not cross blockchain.

In previous Tech Tuesdays we have given updates on the marketmaker v2 development leveraging peer to peer libbittorrent-DHT technology for better NAT performance.  Marketmaker v1 had decentralized order books. Even these could have conceivable been used for oraclizing into KV storage as a rudimentary oracle. However, Komodo has real Oracles Crypto Conditions (CC explained here and developer crypto conditions info here) to save different data (text, files, binary, etc. see below the proof of certifications) which are the topic of discussion on discord and calls.

This week, Komodo CTO tweeted about mobile phone atomic swap DEX testing for both maker and taker (bob & alice, seller & buyer).

A post of the first automated atomic swap, not the infamous “charlie swap” declared by many as the first atomic swap, by Litecoin Charlie Lee.  These had already been done many times in the 2017 Komodo slack, and years earlier as proof of concept before coding the automation of cross chain trading by UTXO atomicity.

I have chat logs to search through for more evidence, but there’s great snippets like how to create a liquidity provider linking to a Bittrex account in April 2017.   These were times of the community doing atomic swaps with the software by executing commands as the Tier Nolan protocol was happening on live blockchain! The community, not developers!!

In writing this section, I intended to only post 1 snippet, but on looking for that, I’ve scrolled to find things that are worth spending the extra minutes for this summary for Tech Tuesday.  I know people will enjoy reading it as much as I am writing it – and sure there’ll be some nostalgia amongst the early testers! The pioneers in atomic swap DEX trading. In 2019 mobile DEX testing we have the luxury to use our dedicated test chains BEER & PIZZA.  But in 2017, the early pioneers were using their own cryptocurrency.

2017-04-08.json:        "text": "you will need to fund the BTC and KMD addresses with 100 KMD utxos",

Two weeks later, a guide is published (wait for hybrid dex news that is not only proxy token but maybe even atomic swap based).

2017-04-23.json:                "preview": "Instructions for running LP (liquidity provider) Node\r\n\r\nPrerequisites:\r\n\r\nIt is required having a Bittrex account with activated api key, a Blocktrail.com api key (available for free f

rom site, only needed for BTC blockchain requests), a funded Bitcoin account, and a funded KMD account. The Bitcoin and Komodo accounts should be dedicated entities only funded with what is intended for the purpose. The Komodo account sh

ould be funded with 100 KMD UTXO. A simple method for achieving this is funding the LP account with several 100.0001 KMD transactions from a feeder account (steps can be done in batch with script). Setting up the Iguana account with a ne

w wallet is explained in https:\/\/github.com\/SuperNETorg\/komodo\/wiki\/Setup-Komodo-Notary-Node under 'Setting up SuperNET\/Iguana'.\r",

 

A history of peer to peer order book bugs (yes, because when you write code, you will write bugs too):

2017-07-03.json:        "text": "Btw, jl777 yesterday i couldnt get a coqui utxo to appear in the orderbook",

 

My favourite from this mornings grep (command line text tool built into operating systems in the 1970s)

2017-08-26.json:        "text": "can someone who did ZEC atomic swaps get the txids for all the tx for a specific ZEC swap? ideally a ZEC\/BTC swap, but any ZEC swap would do",

I could write a book called, Living With Komodo Developers… more history will become available as time permits – various community members have chat logs, server logs, server bills for those server logs, transaction ids, github commits etc.

Blockchain oracles: store proof of certifications

It doesn’t matter which industry, it doesn’t matter which certification – a public blockchain based certification system can prove a person really has a necessary skillset.

 

During a team meeting some weeks ago, the dialogue went something like this:

There is rampant plagiarism and doctoring of XXXX certifications, it’s a 50 million dollar industry in this area of the world alone.  Can we provide a proof of concept.

 

Whilst on the call we found some sample certificates, uploaded them to an oracle and then downloaded them down the other end.

 

The storage of a digital file is not a problem – it’s the workflow that needs to be married into the existing systems that needs consultation with people in contact with existing systems.   We are still exploring ways to work with certification providers and provide a solution on a case-by-case basis.

 

If you would like to work with us in providing these solutions, please contact partners at komodoplatform.com by mail.

 

In the meantime, please visit our discord channel #cc-oracles which have a focus using the existing test tools that have been made including blockchain oracle location services, blockchain chat records and the file uploader mechanism from this article.

 

The channel topic states:

This channel is for discussion and announcements surrounding the oracles crypto condition contract. Please feel free to answer any questions, technical or non-technical. The oracles contract can be used for converting off-chain data into on-chain data. It has vast set of use cases as dapps and other contracts can trigger actions based on what is written to an oracle. Please see the channel’s pinned messages for examples of how it is currently being used. Alright#0419 and will be happy to answer any questions you may have when they are available.

 

Tutorial: A series of how to use Komodo Crypto Conditions has begun editing and refinement

This week saw some refinements to the Crypto Conditions tutorials.  Not public yet, but are scheduled for this week initial release in discord for our community to give feedback.  Given the history of the above atomic swap testers, it’s tempting to just let loose with them at the moment – but I’m really on a tight schedule to delivery other work, and leaving community testers with support issues when I don’t have time to help is just not how I’d like to do it.

To prepare, if you have ubuntu linux on a laptop, server, KVM virtualization or virtualbox, install docker and have plenty of space.  If you want to sync komodo, you’ll need 9GB – but not necessary for tutorials.

Why docker for blockchain tutorials?

Using Komodo you can create a blockchain or a scalable blockchain cluster. Our aim is to get you using the technology within 10 minutes. Docker containers are lightweight so you can create several Komodo instances for exploring the technology without over-extending on your resource budget and use a single host to run multiple full nodes.

Testing with users in different networks and environments, we found that this recipe causes less friction and frustration.

Although docker adds a layer of tooling, it is only as complex as you make it – and we’re not making it complex. We will build a container, create several volumes for data storage, make a separate docker network and run several instances.

Should you wish to uninstall, it is a matter of removing the docker artifacts: container, network, volumes and if also docker and your system should be as familiar as always.

Ubuntu 18

sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt update
apt-cache policy docker-ce
sudo apt install docker-ce
sudo systemctl status docker
sudo usermod -aG docker ${USER}
##########################
#LOGOUT OF YOUR SYSTEM & LOGIN AGAIN
##########################
docker ps -a

Ubuntu 16

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt-get update
apt-cache policy docker-ce
sudo apt install docker-ce
sudo systemctl status docker
sudo usermod -aG docker ${USER}
##########################
#LOGOUT OF YOUR SYSTEM & LOGIN AGAIN
##########################
docker ps -a

And sit tight until https://github.com/komodo-techtuesday/blockchain-tutorials this blockchain tutorials repository has some files and instructions!

This is Komodo community spirit!

 

This may not be the earliest of these types of comments for instructions on how to use the early versions of marketmaker v1 for atomic swap trading.

Note: The KMDLABS discord channel (#kmdlabs) is dedicated to testing innovations, upgrades, new features and is a great way to get the necessary skills and knowledge for being a competent Notary Node operator.

Interested in GUI dApps development?   Discord’s #cc_gui channel will be where most of the work will take place in the coming weeks.

Thank you Komodo (& ecosystem) developers, what an exciting week!

To get more updates from Komodo, sign up for our weekly Five Bullet Fridays newsletter and join our active community on Discord.

Join us as we continue to develop and lead the blockchain industry into the future.