A few weeks back we lamented the bleak state of crypto regulation in Europe, where the Parliament is aggressively moving to crack down on rights like freedom to transact and freedom of self-custody. You knew the crypto community would prepare a rebuttal.
Fortunately, the European chapter of PAC DAO is stepping up and organizing European efforts to protect cryptocurrency users. The team has worked up a letter writing campaign to mimic the recent SEC letter writing campaign in the USA.
The details of the campaign are well covered by PAC DAO so we wonโt rehash these. Besides which, as an American, it would strategically advantageous to allow rival powers to harm themselves, so we donโt want to work too hard against our own self-interest.
For todayโs newsletter though, we wanted to highlight the interesting technical achievements behind the accompanying NFT drop and offer up your routine dose of Vyper pills.
In fact, this NFT is part of cryptocurrency history: the first known Vyper NFT compatible with OpenSea.
Last week we reviewed the launch of Vyper 0.3.2, made possible through the generous Curve veFunder emissions. In fact the now well-fed devs have subsequently managed to knock out a subsequent 0.3.3 release in just the past week. One of the groundbreaking features of these newer releases was full compatibility between Vyper and Solidity ABIs. Sounds cool, and squashing bugs is great, but what does this mean for my bags?
The story runs through EIP-165, which governed a common mechanism for self-reporting smart contract compatibility. In other words, you should be able to call this method on any contracts to see if it can support, say, the ERC-721 standard and thus operate as a fully formed NFT. It looks a bit like this:
However, Vyper wasnโt fully compatible with Solidity ABIs at the outset, so the bytes4 interfaceId
in the screenshot above was technically impossible. Some sites were smart enough to work around this and allow other bytes types to stand in, but OpenSeaโs API rejected any Vyper NFT. In other words, the burgeoning NFT subculture of apes, pengus, rocks, and the like all existed without Vyper.
Thanks to the recent Vyper releases, weโve deployed the first Vyper-based NFT compatible with OpenSea. The artwork is appropriately beautiful for the occasion, celebrating the plight and suffering of Europeans with subtle homages to the subcontinentโs rich cultural and artistic heritage. It evokes the styles of all the Old Masters: Da Vinci, Van Gogh, Michelangelo, Titian, Monet, Rembrandt, Picasso, and now joining their ranks, Scooby Doomer:
Still not sure why it matters that it was released in Vyper? Weโve mentioned new Vyper releases are sleek, to the point that we made the seemingly hyperbolic claim โSolidity is now a less efficient version of Vyper.โ We werenโt exaggerating.
When the news of Vyper 0.3.2โs release broke I rushed to redo the backend in Vyper. Both contracts had the same Cadillac NFT functionality (enumerable, metadata, ownable, mintable). The Solidity version was basically build off the standard OpenZeppelin libraries, the Vyper slightly modded from this repo.
Hereโs the difference in deploy costs, assuming gas costs of 50 gwei and ETH @ $3K.
Deployment Costs
Solidity: 0.1173027 = $351.91
Vyper: 0.07750625 = $232.52 (33% savings) ๐คฏ
But who cares about deployment, amirite, that only affects the devs? All that degens care about is the actual cost to mint their NFT! Hereโs what the free mint would run:
Minting Costs
Solidity: 0.00783505 = $23.51
Vyper: 0.0044596 = $13.38 (43% savings) ๐คฏ๐คฏ๐คฏ
Thatโs right, a Vyper clean mint was 43% cheaper. In the past we had to deploy a copy on Polygon because some users were price sensitive. If youโre doing an NFT drop and can now save your users up to half on fees, then only a sadist would choose Solidity.
Fortunately all the code is open-sourced, although this one has a few slight tweaks that might make it more ideal to stick with the Vyper repoโs sample code (the minting logic is separated out, a whitelist is checked, and ~10% of all NFTs are pseudorandomly assigned a gold border for eternal fortune.) However, the release above does include some code necessary to make the NFT comply with the Enumerable spec, so some mixing and matching may be necessary.
So again, we double down on our claim: Solidity is now a less efficient version of Vyper. Just in time for our campaign for our European friends across the pond.
If youโd like to support the efforts, please head to the minting page! Sadly, Etherscan does not yet support verification of contracts using Vyper 0.3.2 and above, so users are recommended to interface through the contract via the website, or by connecting directly to the repository through Brownie.
More details
Thanks to Chan-Ho for defeating the final boss on OpenSeaโs API and making it all possible!
Disclaimers! Author visited Europe and liked it.