2/ We have put together a report that gives an overview the usage and opportunities of one of the world most used and loved programming languages in the blockchain developer ecosystem.
- Projects
- Opportunities for devs
- New developments in 2023
3/ The 2022 cryptocurrency market was very turbulent, with the fiascos of FTX, Terra and 3AC. This somewhat reflects to the underlying technology development, but as we will find out not as bad one would expect.
4/ HOW ARE PYTHON AND BLOCKCHAIN DEVELOPMENT ALIGNED?
What are the common touch point and ideal use cases for Python tools and devs in a blockchain space.
πππ
5/ #Python was the most in-demand programming language of 2022.
6/ Here are some use cases where Python is the number one programming language of choice:
- Data research
- Quantitative finance
- Trading automation
- Integration and testing
- Software automation and DevOps
7/ Because of the heavily financial nature of blockchains, and Python's unique status in finance and data research, there are multiple software development verticals where Python and blockchain development overlap.
8/ Not all blockchain core teams do not support Python based toolchains.
This is what a typical "off the shelf" chain ecosystem looks like:
9/ However even if the blockchain core team does not offer direct Python tooling, there are a lot of periphery projects where Python dominates
10/ Outside traditional software development verticals, we also have smart contracts, where we can find Python in part of tooling or smart contracts themselves.
11/ Furthermore, we can identify that Python plays a crucial role in security and smart contract auditing.
Currently, most well-known static linter and analysis tools are written in in Python.
12/ THE OVERALL STATE OF THE BLOCKCHAIN DEVELOPMENT ECOSYSTEM
They told is was ded... no?
πππ
13/ A good overview of the state of the blockchain development ecosystem can be found in the excellent Developer Report 2022 by @ElectricCapital
15/ Development is accelerating. Half of the new developers entered the industry in 2022.
16/ PYCHAIN 2022
πππ
17/ In 2022, Trading Strategy organised the first Python-focused blockchain developer conference, PyChain. The virtual event had over 1,200 signups and 500 concurrent stream viewers.
18/ PyChain 2022 included talks from numerous blockchains and protocols such as Ethereum Foundation, NEAR, Cosmos, Curve, but also included talks from the traditional quantitative finance perspective, having covered topics such as risk analysis and strategy backtesting.
19/ You can find the 30+ talk recordings on YouTube channel here:
It is very good beginner friendly developer material.
20/ There is going to be PyChain 2023 - the next edition.
Follow @PyChainConf and @TradingProtocol for the upcoming event and we will keep you posted as soon as we have dates for Q4/2023.
21/ PYTHON VERTICALS IN BLOCKCHAIN DEVELOPMENT
Based on our research, and our conference presentations, we have segmented Python and blockchain development ecosystem to following areas.
πππ
22/ - Core blockchain and node software
- Smart contract languages
- Integration libraries
- Smart contract development frameworks
- Trading
- Data research, including extract transform load (ETL) solutions
- Security and auditing
23/ Here we present some of the highlights of our report.
24/ CORE BLOCKCHAIN AND NODE SOFTWARE
Despite being somewhat of a controversial candidate for the task, Python language is used in core blockchain node development as well.
πππ
25/ @chia_project blockchain core software is written in Python. Chia claims to be the most decentralised blockchain if counted by an individual node count.
26/ Chia offers unique proof of spacetime (PoSt) consensus model. Chia offers smart contracts via the ChiaLip programming language and has been used in World Bank pilots.
27/ View Chia introduction here:
28/ @LamdenTau is the performant Python-based blockchain platform that makes using and creating the next generation of dApps easy for everyone.
Python and Python-inspired languages are being used as the smart contract programming language for several blockchains.
πππ
31/ Smart contract development is dominated by Solidity and Rust. The more experimental Python-based approaches are interesting, as they offer easier code readability, and writability and can offer better security compile-time guarantees, thus creating a safer ecosystem.
32/ @vyperlang is the offspring of the first-ever smart contract programming language, Serpent, made in 2014 by Vitalik Buterin.
33/ Vyper is used in production for many DeFi applications and has proven its robustness in transacting billions of dollars of value.
Here is a good intro video:
34/ SmartPy, is both a smart contract programming language and development platform for @tezos
35/ It uses Python as domain-specific language (DSL). Tezos is a proof-0f-stake blockchain and one of the first blockchains offering on-chain governance.
37/ @Algorand's PyTeal is yet another domain-specific language using Python. PyTeal allows you to write contracts for Algorand's Transaction Execution Approval Language (TEAL).
Integration libraries and software toolkit libraries are used to make blockchains communicate with other software. This includes web frontends and server-based applications like SaaS offerings.
πππ
39/ Web3.py is the original #Web3 toolkit for #Python. https://t.co/g5y2btrLQW was created for the Ethereum mainnet and is maintained by @ethereum Foundation. However, it is used with other EVM-based L1 and L2 blockchains as well.
41/ Pons is another #Python library for #Ethereum and EVM-based blockchains. Pons uses asynchronous programming model and is currently in an experimental stage.
View Pons presentation here:
42/ Sign in with Ethereum (SIWE) for Python offers a passwordless sign-in experience for your website using an Ethereum wallet. SIWE offers built-in security and integration with popular Python web frameworks like @djangoproject and Flask by @PalletsTeam
43/ CosmPy is a Python library for interacting with Cosmos SDK-based blockchain networks. CosmPy can be used for transferring tokens, staking, performing atomic swaps, deploying and interacting with a smart contract. CosmPy is maintained by @Fetch_ai
44/ View presentation to CosmPy here
45/ Paloma Software Development Kit (SDK) in Python is a simple library toolkit for building software that can interact with the Paloma blockchain.
46/ xrpl-py is a #Python library for interacting with XRP Ledger (@XRPLF).
Watch introduction to XRPL programming here
47/ @iota Wallet Library is Rust-based with Python bindings. It can be used to interact with IOTA blockchains, including Shimmer.
48/ View a tutorial how to do @shimmernet development free. NFTs are gas free.
49/ NEAR-API-Py is a Python library for the development of applications that use the @NEARProtocol. NEAR is a sharded high-performance smart contract-enabled blockchain with over 10 million accounts.
50/ @vegaprotocol is an order book DEX-based blockchain that has been geared towards professional traders from the start. For this reason, it has Vega API Python client as the first class client for the protocol.
52/ @Aptos_Network provides a lightly maintained official Python SDK. Currently, this is still in development and is unsuitable for directly interfacing with Aptos.
53/ Python Substrate Interface specialises in interfacing with a @Polkadot Substrate nodes; querying storage, composing extrinsics, encoding/decoding and providing additional convenience methods to deal with the features and metadata of the Substrate runtime.
Smart contract development frameworks provide additional tooling for writing smart contracts. This includes: compilation of complex projects, writing unit tests, deployment scripting.
πππ
56/ @ApeFramework is a smart contract development framework for Python developers, data scientists, and security professionals. ApeWorX supports Ethereum, EVM-based blockchains and StarkNet.
57/ View ApeWorX introduction video here
58/ @MultiversX SDK for Python (previously known as Elrond) offers compiling, testing and deployment of smart contracts for the MultiverseX blockchain.
View presentation here
59/ Anchor is a framework for @solana's Sealevel runtime providing several convenient developer tools for writing smart contracts.
60/ SnekMate is a repository for state-of-the-art, highly opinionated, hyper-optimised, and secure Vyper smart contract building blocks. By @pcaversaccio
#Python is the number one programming language for trading, in both cryptocurrency and traditional finance. Here we explore Python based cryptocurrency trading solutions.
πππ
62/ Trading Strategy is an algorithmic trading framework for decentralised finance (#DeFi) markets. It allows you to develop, backtest and execute trading strategies using high-level Python programming and quantitative finance tools instead of Solidity.
63/ View Trading Strategy presentation here
64/ @_hummingbot is a high-frequency trading framework for cryptocurrencies. Hummingbot specialises in market-making on centralised exchanges.
View Hummingbot presentation here
65/ @ccxt_official is an integration library for various centralised exchanges. CCXT stands for CryptoCurrency Exchange Trading Library. It offers a standard API to make orders for #Python and other languages.
ETL stands for Extract - transform - load (ETL). It refers to solutions to ingest data streams from one system and then transform this data to a different format, usually more suitable for queries and business analytics.
πππ
67/ Blockchain-ETL facilitates data science on blockchain data. Blockchain ETL is available in Google BigQuery for some EVM chains.
68/ Web3-Ethereum-Defi is a low-level Python library for extracting DeFi trading data form various blockchains. The project also offers trade execution primitives besides high performance data ingests.
Because of its easiness to read and scriptability, Python is the foundation of many blockchain and smart contract security tools.
πππ
70/ Mythril is a security analysis tool for EVM bytecode. Supports smart contracts built for Ethereum, Hedera, Quorum, Vechain, Roostock, Tron and other EVM-compatible blockchains. Mythril is maintained by @ConsenSys
71/ Slither is a Solidity static analysis framework written in Python 3. It runs a suite of vulnerability detectors, prints visual information about contract details, and provides an API to easily write custom analyses.
72/ Woke is a Python-based development and testing framework for Solidity. It offers vulnerability detectors, a Language Server Protocol (LSP) for Solidity and a fuzzer. Woke is maintained by @AckeeBlockchain
73/ Halmos is a symbolic bounded model checker for Ethereum smart contracts bytecode that can be used for bug detection as well as formal verification of the contract.
74/ Halmos executes the given contract bytecode with symbolic function arguments and symbolic storage states, enabling it to explore all possible behaviours. Halmos is maintained by @a16z
rotki is an open-source portfolio tracker, accounting and analytics tool that protects your privacy. rotki's Python source code is available to inspect.
76/ It is a local-first application with a strong focus on user privacy. Your financial data is kept encrypted in your system and not shared with third parties, making it suitable for funds and corporations.
78/ Blockchain technology has started to diversify from its Bitcoin and Ethereum architecture duopoly. While EVM is still the dominating solution, its architectural shortcomings are becoming more obvious as later-generation technology enters the market.
79/ Although any change towards more scalable, secure, and user-friendly technologies is slower than we wish, it is still happening.
80/ The technology areas that are changing are
- Specialisation: app chains are coming
- Scalability
- Industry maturity: bear market flushes out tourists
81/ We expect integration and the need to access data with variation and growth of the industry that will generate more demand for Python libraries and tooling. Software developers should find ample opportunities in this space as long as they know where to look.
Yesterday #DeFi markets had an irregular day, as the famous trader @avi_eisen, known for very profitable trades, opened a massive $63M short for $CRV Curve token on @AaveAave.
It did not go well. Keep reading.
πππ
2/ Shorting and longing using Aave loans is normal in trading. However, what marks this event special, is that the size of the Avi's position ($63M) was oversized to the relatively illiquid $CRV market.
3/ Aave is an over-collateralised lending platform. For taking a short position, you deposit US dollars (USDC) and take out $CRV. Then sell $CRV to USDC, deposit it to Aave, rinse and repeat.
1/ HOW BAD IS THE HOLE FTX HAS DUG ITSELF INTO AND HOW DID THIS HAPPEN?
There are no public facts, only rumours. We can make guesses about how a billion dollar money making machine can fail.
πππ
2/ It seems that FTX.com (not FTX.US) might have borrowed their user assets to Alameda, against their terms of service. Unless this is a misleading paragraph IANAL.
3/ The rumoured hole in the balance sheet of Alameda is $3B - $15B. Currently, there are no public facts on this.
1/ HOW DO BLOCKCHAINS AND STABLECOINS BENEFIT INTERNATIONAL BUSINESS-TO-BUSINESS TRADE TODAY?
A case study on our company doing USD stablecoin payments using blockchains like @avalancheavax for practically free.
A thread.
πππ
2/ There has been a lot of criticism that blockchains do not solve "any" real-world problems. While some of the hype might be oversold, saying blockchains do not solve any real-world problems is plain wrong.
3/ This thread is in the light of the criticism from thought leaders like @ProfHilaryAllen, @markrussinovich, @molly0xFFF - while some of the criticism is welcome, the discussion should be rational and balanced. We present the positive aspects blockchain solves for us here.