2

What are the benefits and differences of using Vyper over Solidity for smart contracts?

  • Are there any other differences besides syntax?
  • Are there any features for better developer experience (besides less typing with cleaner syntax)
  • Does Vyper provide better safety and security e.g. by stricter modifiers, defaults, and so on
  • Can Vyper and Solidity interact 100% - i.e. all Solidity functions can be called from Vyper and vice versa
  • What is the difference in toolchain maturity: static analyzers, code coverage tools, easy of installation, documentation and so on
2

I originally used Vyper for doing more complex math (specifically the curve integrals and inverse curve integrals for bonding curves), as it has a lot of securities built-in (such as over/underflow protection etc) but it can be quite a hassle. In my project, we ended up rewriting the math back into Solidity for continuity within our repo, and because the way that Vyper does square roots (the Babylonian method) was the same level of accuracy we got in Solidity anyway so there was no value add.

If you want to work with it just to try it out, go for it, but if you are looking for a specific reason to use it I wouldn't recommend unless you are going to be using some heavy math and want the Pythonic structure.

2

Context: My experience is in working on math implementations for bonding curves

Are there any other differences besides syntax?

There are some math operations available like square rooting but it turns out to be using the same babylonian method most solidity implementations use

Are there any features for better developer experience (besides less typing with cleaner syntax)

In 2019 I found there was an improvement in the tooling however there are issues compiling on windows without using a docker instance, but its steadily increasing and probably has

Can Vyper and Solidity interact 100% - i.e. all Solidity functions can be called from Vyper and vice versa

As long as the interfaces are preserved & the types set up then use, they are interchangeable, if in solidity you call an IERC20(Address).balanceOf() and that address happens to be a vyper implementation, it will still work as they have the same function declarations

What is the difference in toolchain maturity: static analyzers, code coverage tools, easy of installation, documentation and so on

Personally I found it a bit more complex and even more so to involve in a build sequence.

1
  • 1
    Taylor Series and Newton-Raphson Convergence method aren't Babylonian AFAIK (since neither one of them was born in Babylon at the time of its height). – goodvibration Apr 28 '20 at 11:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.