Inspiration
Having run the OmniLayer Foundation and seen the early days of crypto, I've wanted to bring DeFi to proof of work chains using OP_Return tokens and find ways to trade faster without relying on slow block confirmations.
What it does
Parses OP_Return payloads in Bitcoin, Litecoin, Dogecoin transactions to construct a parallel layer where stablecoins, digital assets and UTXOs can trade with each other and the tokens can be used as collateral for swaps, futures and options.
How we built it
Originally in C++, then due to technical debt in javascript as a feeder app off of a vanilla C++ bitcoind or litecoind client, with a wallet written in typescript that acts as a stand-alone desktop app with fully-sync and API modes. The matching of multisig channels between counter-parties to enable fast trading is conducted through an orderbook server relay app but can also be delegated to chain signature smart contracts.
Challenges we ran into
Technical debt relating to cross-compiling various dated version of Bitcoin and Litecoin clients slowed development for years, the greatest mistake of my life was not building this as a parallel .js app earlier. Additionally the environment of PoW chains is UTXO dependant and generally slow so engineering optimal latency is a challenge.
Accomplishments that we're proud of
In an industry where everyone has centralized smart contracts with privately-run off-chain sequencers to make latency low, we've stuck to building highly decentralized infrastructure.
What we learned
Cosign finality enabled through regiona co-location is key to optimizing market structure.
What's next for TradeLayer
Integration with NEAR protocol and Beta launch!
Log in or sign up for Devpost to join the conversation.