James Bachini

Smart Contracts

  • Javascript Smart Contracts

    Javascript Smart Contracts

    As an experiment I converted this Vyper token contract to a Javascript/Typescript syntax to see if we could make it easier for web developers to get up to speed with smart contract development. Solidity is the most popular smart contract language and it is already based losely on Javascript but there are plenty of syntax…

  • Using Vyper With Remix

    Using Vyper With Remix

    You can now use Vyper (a smart contract programming language similar to python) with remix to build and deploy contracts on Ethereum and other EVM blockchains. The first step is installing the Vyper plugin at https://remix.ethereum.org/ where you’ll find a list of plugins using the icon in the bottom left. You’ll then get an extra…

  • Get Contract Balance | Solidity Tips & Examples

    Get Contract Balance | Solidity Tips & Examples

    To get the contract balance in solidity there are a few different methods depending on if you want the Ether balance or an ERC20 token balance. Contract Balance Eth You can use the address type’s balance property to get the balance of any address, including the contract’s own address. The this value is used to…

  • How To Debug Solidity Smart Contracts

    How To Debug Solidity Smart Contracts

    If you’ve ever received a “gas message” error which makes no sense in Solidity then you’ve probably come across one of it’s greatest flaws. Error reporting and debugging isn’t great for blockchain developers but in this tutorial I’m going to provide some tips, tools and resources to debug Solidity smart contracts. James On YouTube Watch…

  • Ownable vs Permissionless Smart Contracts

    Ownable vs Permissionless Smart Contracts

    One of the beautiful things about smart contracts is they can be permissionless where the developers relinquish control to the community and all users are treated equally. However less than 20% of the top 50 protocols by TVL on Ethereum are using fully permissionless contracts. In this article we will look at why this is,…

  • Foundry Tutorial | How To Debug & Deploy Solidity Smart Contracts

    Foundry Tutorial | How To Debug & Deploy Solidity Smart Contracts

    Foundry is a Solidity Framework for building, testing, fuzzing, debugging and deploying Solidity smart contracts. In this Foundry tutorial we will cover the following: Introduction To Foundry [Video] James On YouTube Watch On YouTube: https://youtu.be/VhaP9kYvlOA |Subscribe Smart contracts are most often written in Solidity but tested and deployed using Javascript frameworks such as Truffle or…

  • 5 DeFi Growth Metrics For Better Valuations

    5 DeFi Growth Metrics For Better Valuations

    Growth metrics have been used by tech VC’s for years to predict and monitor companies growth patterns. Terms like CAC (Customer acquisition cost) and LTV (Lifetime value) are critical to how we value startups in the traditional space. In DeFi the landscape is different and the metrics that we use are too. However on-chain transparency…

  • Smart Contracts Simply Explained

    Smart Contracts Simply Explained

    This article is derived from a chapter in the free eBook explaining DeFi technologies:DeFi Demystified | An Introduction To Decentralized Finance Decentralized finance is built on smart contracts. The code that enables users to lend, borrow and swap tokens is all run on Ethereum’s virtual machine. Smart contracts are written (mainly) in the language of…

  • DeFi Risk | A Framework For Assessing & Managing Risk in DeFi

    DeFi Risk | A Framework For Assessing & Managing Risk in DeFi

    The high yields available in decentralised finance come with a downside. DeFi risk is real and if you are participating in the markets then you should know how to assess and manage that risk. By building a risk assessment framework for yield farms and DeFi opportunities we can better assess fair value and allocate capital…

  • Solana Tutorial | Building Smart Contracts & dApps For The Solana Hackathon

    Solana Tutorial | Building Smart Contracts & dApps For The Solana Hackathon

    This Solana tutorial goes through a step by step process of setting up a development environment for Solana, writing and deploying smart contracts and my experiences with entering the Solana Hackathon. Getting Started With Solana Solana is a high performance modern blockchain with impressive throughput capabilities. It can handle 50,000 transactions per second which makes…