March 7, 2023: Snekmate! πβοΈ
Vyper gets smart contract building blocks with release of Snekmate 0.0.1




@pcaversaccio should indeed feel proud about the release of Snekmate 0.0.1
This weekend, chatting with upcoming devs at ETHDenver, they asked about Vyper versus Solidity. Specifically, does Vyper have resources like OpenZeppelin templates to help aid in development of common contracts?
Wellβ¦ you seeβ¦ Vyper has a few example contracts in the docs and repo, but not yetβ¦
Today: Snekmate, snitches!
The contents of snekmate are a praiseworthy achievement. Within the repository, developers now have prebuilt templates containing dozens of useful building-blocks. Anything one might need to handle all variety of common tasks in Vyper.
Previously lacking Vyper libraries, just one of these contracts would have been a helpful resource. Instead of just one or two contracts, we gain a robust library of βstate-of-the-art, highly opinionated, hyper-optimised, and secure πVyper smart contract building blocks.β
The included token contracts expand upon the examples within the main Vyper repository with more rigor and structure. Further, all the included contracts include extensive testing, including unit-tests, property-based tests, and invariant-tests:
All of the contracts address specific coding needs, here are a few that caught our attention:
CreateAddress: Predicting the address where a new smart contract would be deployed can be tedious. A pair of methods here eases the process.
MerkleProofVerification: Merkle proofs are a key ingredient in everything from NFT pre-mints to trendy Zero Knowledge apps.
Multicall: With the number of contracts being deployed to the EVM continuously growing, the ability to batch calls together into a single call becomes increasingly crucial.
These building blocks are all robustly documented and beautifully formatted. Vyper developers need no longer reinvent the wheel doing tasks Solidity devs could manage with a single import.
Most importantly, if devs do wind up writing new snippets of code, the snekmate repository becomes a convenient hub to submit a pull request and guarantee future devs can benefit from your invention.
For example, the Curve team has been hard at work recently making gas and functionality improvements to existing Curve pool contracts. In the process, a number of hyper-optimized math functions have been created from scratch. Several of these new efficient math functions find a home in snekmate, until such time as they inevitably find their way into a future Vyper release.



Installation is easy whether you use forge, pip or npm.
Reaction is undoubtedly positive. Snekmateβs release highlights the broader broader growth of the Vyper ecosystem and community.


The Vyper Titanoboa interpreter is preparing a baptism by fire, as its performance will contribute to the failure or success of major upcoming Curve releases. The much anticipated $crvUSD and the next generation of TriCrypto are both relying on Titanoboa for extensive testing.
One useful consequence of using Titanoboa is the capacity for devs to perform line-by-line gas profiling. When gas golfing your contract toward their theoretical minimum, this feature proves highly useful. Recently this work got merged into the main Titanoboa repository:


The gas efficiency of Vyper is not its primary selling point over Solidity, but at minimum Vyperβs success obliterates the notion of a readability-efficiency dilemma in which a smart contract can be either comprehensible or cheap. Vyper devs get both.


Vyper had nice representation at ETHDenver. Legendary dev Patrick Collins delivered a thorough review of gas optimizations between Vyper and Solidity:

If youβre looking to learn how to get started with Vyper, shameless plug for our now comprehensive Vyper tutorial, in which you create your own $CRV-backed stablecoin from scratch.
Another important resource for aspiring Vyper devs is Ape Framework, a Brownie upgrade. Ape provides a world class tutorial along with several other great templates.

If you prefer to learn in person, devs headed to ETHDubai next week can join a Vyper event/hackathon.
Sadly though, for every two steps forwards Vyper takes, it hobbles backwards one step. The Vyper community suffered a blow with the brutal-sounding injury to 0xz80





Ouch for the injury and ouch for the burn! Speedy recovery!
Despite the setbacks, I can confirm based on recent chats with devs at ETHDenver that the interest in Vyper is sky-high.



Letβs keep up the momentum and make smart contracts snake again!
Disclaimers! Author has no investment in Vyperβs $SNEK token only because it does not exist outside my imajination.