Oct. 7, 2021: Vyper v0.3 Launches ✌️🐍

Major upgrade includes dynamic-sized arrays, 20% bytecode savings

In big tech news, the much hyped Vyper v0.3.0 shipped this week.

What does this include? Sadly, rumors of Vyper being rewritten in JS did not make the cut.

For those not in on the joke, the Vyper team generally takes to Javascript like a cat to bathtime. And while Vyper is certainly preferable for users who prefer Python to Javascript, the differences are not just stylistic in nature.

The Vyper team are quite experienced with the bleeding edge of blockchains, and frequently build capabilities into Vyper that can improve upon Solidity. Among other exciting developments, this new version of Vyper is far more efficient at compilation, leading to a major reduction in bytecode sizes.

These savings can make a difference when you are trying to win the races for efficiency.

The recent analysis by @scottincrypto demonstrates that marginal gas savings can make a big difference to DeFi users bottom line, where Curve remains at the head of the pack.

Vyper 0.3.0 does include some major changes visible to developers.

One key change coders may notice is more dynamic array sizes, which had been a particular bugbear for developers.

Dynamically sized arrays still require a max size limit, due to Vyper being a stickler on this point.

A max limit on array sizes is core to Vyper’s philosophy. Solidity allows array sizes to be uncapped in the code, but they still have a theoretical cap in that the EVM has a ceiling. In this way Solidity claims to be Turing complete, although in practice neither are. Vyper requiring the array size to be capped simply makes this constraint explicit, and this constraint allows Vyper to include significant savings .

Yet the most major change to Vyper 0.3.0 is refactoring internal calling conventions, which allows for overall efficiency gains. This amazing thread outlines it in full detail how this leads to the nearly 20% savings:

In the same way that you wouldn’t trust a new Apple iPhone to make a phone call, some degree of caution is warranted with Vyper 0.3.0. At the moment it should mostly be used for testing.

It would take nerves of steel to release a critical contract to production using new version.

Of course, Curve takes its security very seriously, which is one of the reasons it uses Vyper. Take note of the thoughtful analysis Curve’s novel TriCrypto pool received in a recent audit.

Now, why might Curve find a new version of Vyper and an audit useful? Hmm…

Disclaimers at https://curve.substack.com/about. All money from newsletter subscriptions goes to benefit PAC DAO crypto activism.