Radix Challenges Failings of Smart Contracts with the introduction of Alexandria, Scrypto, & Radix Engine v2

3 min read

Radix image

Radix Alexandria launched last month with a focus on developers.

Radix image
Radix DeFi Protocol in a Nutshell Via ZyCrypto

The first release of Scrypto and Radix Engine v2 offer a new asset-oriented way of building smart contracts that addresses the failings of the smart contracts of today.

If you’re a developer and want to dive straight in, head over to our new Radix Developers Site – and then contribute your creations on the new Radix DeFi Ecosystem page.

If you want to learn more about why Scrypto and Radix Engine v2 are so important to bring DeFi into the mainstream, read the freshly updated DeFi White Paper.

Here is w3hat is currently available.

What is Alexandria?

Followers of Radix know that there is a sequence of planned technology releasesOlympia → Alexandria → Babylon → Xi’an and beyond.

Radix Olympia marked the launch of the Radix public network “mainnet”.

Alexandria, however, is a little different; it is not a mainnet update. Instead, Alexandria delivers the first release of a new smart contract development experience with Scrypto and Radix Engine v2. Developers can now use a set of Scrypto tools on their own computer to start experimenting with what it’s like to build and run DeFi dApps using Scrypto – for now without deploying code to a network.

Babylon is will bring Olympia and Alexandria together, with a substantial update to mainnet to make it possible to deploy Scrypto code to the network – in short, bringing DeFi capability to Radix.

Developers can think of Alexandria as “early access” – their chance to become Scrypto experts, help shape the development of Scrypto with their feedback, and get their own DeFi dApps ready to go to be the very first deployed to Radix at the Babylon release.

Radix is excited to get it into developers’ hands immediately.

What is included with Alexandria for developers?

Alexandria brings the release of an early form of Scrypto and associated tools on the Scrypto Github repo – all open source. Scrypto itself is essentially a set of libraries and extensions to the popular Rust programming language that (when run within the Radix Engine environment) provide the asset-oriented features that define the Scrypto experience of writing smart contracts – or, as Radix calls them, blueprints and components.

The Scrypto language and compiler alone aren’t enough to really start building. Scrypto components are intended to be run within a shared network environment where they can be used via transactions and interact with accounts, resources, and even other components. So to meaningfully develop and test Scrypto blueprints and components, the developer needs some way of “deploying” that code and interacting with it.

Alexandria provides a simulator of such an environment that developers can use to quickly build, test, and iterate Scrypto code – all on their local computer. This includes the ability to deploy Scrypto code to a simulated “ledger” that uses your local filesystem, and a simulated Radix Engine to run (and validate) Scrypto code as if it were running on a network. Alexandria also includes tools to push simulated transactions through Scrypto components, and make it convenient to do things like create accounts and resources (ie. tokens, NFTs, and badges).

All of this is included in the Scrypto Github repo for developers to start working with. To get a bit more technical, that repo includes:

  • A Rust cargo file for Scrypto, including the libraries that provide Scrypto’s syntax and data types, and the Scrypto extension to the Rust compiler
  • Command line tools for development, including resim – providing commands to interact with the local Radix Engine simulator and filesystem-based ledger – and scrypto – a convenience wrapper for cargo to do Scrypto-specific things
  • Early Scrypto documentation, including a getting-started tutorial on Scrypto basic concepts, Scrypto code examples, language reference, and more

Beyond simply having a look at Scrypto syntax, these tools let a developer actually begin building and testing real DeFi functionality – and do so right away while Scrypto continues to improve and evolve as Radix works toward on-network Scrypto at Babylon. Radix expects that any code developed with these tools now with Alexandria will be deployable to mainnet with little-to-no changes at Babylon.

How can developers get started with Scrypto?

First, the new Radix Developers Site is the Radix hub for information on Scrypto and all the links you need to installation instructions, documentation, examples, and more.

Developers might also want to check out the series of blog articles describing the need for Scrypto, how it’s different from today’s smart contract paradigm, and the asset-oriented concepts it uses. It is highly recommend that you start here:

Alternatively the new DeFi White Paper delivers much of the same information in one place.

If you want a little more of the big picture about why Scrypto matters, why DeFi matters, and about Radix’s multi-year technology roadmap you might check out our keynote presentation from the recent Alexandria Preview Event.

Want some orientation on the world of DeFi app types you might build, with examples? The Radix DeFi Ecosystem page collects a cross-section of DeFi functionality and highlights community activity in building DeFi dApps with the Alexandria Scrypto tools. Over the coming weeks Radix will be adding a series of articles deep-diving different types of finance functionality and how DeFi makes them better.

Developers are encouragede to sign up for the Radix Developer Program. It is just getting started, but the developer program will ramp up early next year with developer workshops, hackathons, and lots of info about Scrypto development. Just provide your active Github ID and answer a few questions about your background as a developer – and for the first 500 to sign up, Radix will send $25 of XRD tokens (on the live Olympia mainnet).

And lastly, join the growing Radix developer community! Join other enthusiastic developers on the #scrypto channel of our Discord server, or on the community-run Radix Developers Telegram channel.