One shot.
Twelve steps.
Zero fluff.
We were thrilled to present the Snek-Bera-Llama Coding Bootcamp last week—a turbocharged, interactive workshop where we oneshot a lending-backed stablecoin using Vyper and Curve onto Berapolia.
Whether you're a Solidity dev curious about Vyper, or a smart contract newbie, this workshop will walk you through the essentials—from setup to live deployment on Bearachain's testnet Bepolia. We even show you how to spin up your own Curve pool and work in Jupyter Notebooks using Boa!
Watch as we walk through 12 steps to create a lending-based stablecoin with a soft liquidation mechanisms inspired by $crvUSD—all in a single session!
Companion Resources
Repositories:
Boa: https://github.com/vyperlang/titanoboa/
Snekmate: https://github.com/pcaversaccio/snekmate
Curve Lite: https://github.com/curvefi/curve-core
Mamushi: https://github.com/benber86/mamushi
Ruff: https://github.com/astral-sh/ruff
Links:
Vyper Style: https://docs.vyperlang.org/en/stable/style-guide.html
Curve Style: https://github.com/CurveDocs/curve-docs/pull/324
Ape Academy: https://academy.apeworx.io/
Timeline & Key Topics:
00:00:00 - 00:05:00: Introduction
Workshop overview and explanation of what we'll be building
Introduction to Vyper programming language and its benefits
Brief explanation of the "SnekBeraLlama" concept
00:05:00 - 00:22:00: Setup & Environment Configuration
Git repository walkthrough and folder structure overview
Setting up a virtual environment and installing requirements
Introduction to key tools: Vyper compiler, Titanoboa, SnekMate, Curve-Lite
Discussion of testing tools: pytest, Mushi, and Ruff
00:22:00 - 00:30:00: Token Deployment Demo
Demonstration of deploying a basic ERC-20 token using Titanoboa
Explanation of Curve pool deployment process
Configuring and launching pools with Curve-Lite
00:30:00 - 00:43:00: Step 1-2: Basic Contract Setup
Creating a Minter contract with version pragma
Adding basic documentation using NatSpec format
Writing first basic function and compiling the contract
00:43:00 - 01:00:00: Step 3-4: Implementing Token Minting
Building ERC-20 minting functionality
Working with state variables and the self object
Adding access control for minting permissions
01:00:00 - 01:20:00: Step 5-6: Interfaces & External Contracts
Working with interfaces to connect contracts
Implementing decorators for contract initialization
Setting up external calls between contracts
01:20:00 - 01:40:00: Step 7-8: Price Oracles & Integer Math
Implementing a price oracle using Curve pools
Working with Vyper's integer math
Calculating collateralization percentages
01:40:00 - 02:05:00: Step 9-10: Structs & Loans
Creating loan structs to store loan properties
Implementing repayment functionality
Working with Vyper structs and mapping types
02:05:00 - 02:30:00: Step 11-12: Liquidations & Advanced Features
Implementing liquidation functionality
Adding event logging for liquidations
Working with dynamic arrays and Vyper's constraints
02:30:00 - 02:45:00: Advanced crvUSD-style Soft Liquidations
Upgrading to banded liquidation ranges
Implementing crvUSD-inspired soft liquidation mechanisms
Refactoring existing code to work with new liquidation model
02:45:00 - End: Q&A and Closing
Discussing potential improvements to the contract
Highlighting further resources
Community Q&A