Vyper Now Supports Dynamic Arrays

Solidity, King of the Castle

Ethereum smart contract developers are familiar with the Solidity programming language, but many have not tried Vyper. Vyper is a pythonic (similar syntax to Python) smart contract language for the Ethereum Virtual Machine (EVM). Vyper prioritizes security, readability, and encouraged simplicity to aid code audits.

Solidity is the most popular smart contract language, and it has the most developer attention. Solidity offers the richest EVM feature-set and is the default choice for most smart contract developers.

Vyper, the Scrappy Underdog

However, Vyper is catching up!

A common objection to using Vyper for smart contract development was the lack of dynamic arrays. A dynamic array is a simple data structure that can be initialized and grow in size to hold as many elements as needed. Solidity offers a lot of flexibility in this regard, but an array having no upper limit creates a potential security risk.

Vyper was originally provided with fixed array support, but the developer team recently merged a set of patches that provide dynamic array support into the master branch on GitHub.

Key Vyper developer señor doggo posted to Twitter about the news last week, asking for bug reports and testing from smart contract developers.

The Vyper developers plan to include this feature in the upcoming version 0.3.2 release.

Who Cares about Dynamic Arrays?

Solidity and Vyper are high-level languages, which means they prioritize syntax that is easy for humans to read and write. More flexibility allows programmers to express their creativity.

A smart contract cannot easily be changed after it has been deployed to the blockchain, so a programmer must choose between a large fixed-length array or a dynamic length array at the start. Solidity offers dynamic arrays that grow as needed, so they are popular. The more flexible option is often better.

Developer Response

The Curve team posted a very helpful writeup on Substack the next day, describing key reasons why dynamic arrays are critical for Vyper. Among them, dynamic arrays are needed to support the creation of ERC-1155 tokens (a kind of NFT).

Both Solidity and Vyper smart contracts are compiled to EVM bytecode, so Vyper closing the feature gap between it and Solidity allows for more talent to enter the space.

Vyper is used extensively by Yearn Finance and Curve Finance, both well-regarded DeFi projects with a focus on security.

Yearn developer Banteg often posts to Twitter about battling smart contracts without having access to dynamic arrays. Perhaps we’ll see a little less devposting and a little more hentai?

Photo of author

Written By BowTiedDevil

Degenerate coder, open source software maximalist, engineer, turbo autist.

Disclosure

This article may contain links to third-party websites or other content for information purposes. BowTiedIsland may receive a commission at no cost to you if you purchase a product after clicking one of these links. The Third-Party Sites are not under the control of BowTiedIsland, and BowTiedIsland is not responsible for the content of any Third-Party Site. All information contained herein is the opinion of the writer and does not constitute financial advice. We aim to act as a neutral third party and aid in your research and analysis.


The Jungle


Crypto, Investing, and E-Commerce with BowTied Bull

The future is internet based, therefore we have a triangle based approach with crypto, e-commerce business making and Investing in traditional assets

The Culture War with BowTiedRanger

Whether you’re a political junkie or just interested in current events. 

You’ve come to the right place for analysis of the most relevant current events and political issues.

Fitness With BowTiedOx

BowTiedOx provides you a place to find all of his latest programs and guides.

Weekly newsletters that cover fitness, health, and mindset, all grounded in the fundamentals of physiology.

Media Production with BowTied Turkey and BowTied Tamarin

Video is no longer optional.

Don’t get left behind.

Your brand deserves professional videos to engage your audience.

Art & Graphic Design with BowTied Patriot

BowTied Patriot is a graphic artist who specializes in photography, mixed medium custom artwork, and NFT creation.

Join BowTiedPatriot as he dives into making Art in Web3.0 and The Metaverse.

Cooking with BowTiedOctopod

Learn secrets from a fine dining chef for maximum flavor and time-saving efficiency

Newsletters on Ingredients, Techniques and Flavor hacks that will have you eating better. We will never eat bugs!

Meme Warfare with DgenFren

Increase your online engagement, organically influence narratives, and build your online persona by using marketing that your target audience actually wants: memes.

Learn How to Sell with BowTiedSalesGuy

Sales is one of the most transferrable life skills, yet few know how to actually sell.

Traditional sales tactics don’t cut it in today’s hyper competitive world.

Learn the secrets from a Chad Salesman and change your Life forever.

Ecommerce with BowTiedOpossum

Learn the skills to start and build your first online business.

Want to build a business that travels with you?

Learn from an industry veteran that has worked on and with brands you already know.